]>
Commit | Line | Data |
---|---|---|
ccc6cda3 | 1 | #! /bin/sh |
39feef01 | 2 | # From configure.ac for Bash 4.3, version 4.060. |
f73dda09 | 3 | # Guess values for system-dependent variables and create Makefiles. |
39feef01 | 4 | # Generated by GNU Autoconf 2.69 for bash 4.3-rc1. |
f73dda09 JA |
5 | # |
6 | # Report bugs to <bug-bash@gnu.org>. | |
7 | # | |
1b1fe467 | 8 | # |
0ee50808 | 9 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
1b1fe467 CR |
10 | # |
11 | # | |
f73dda09 JA |
12 | # This configure script is free software; the Free Software Foundation |
13 | # gives unlimited permission to copy, distribute and modify it. | |
1b1fe467 CR |
14 | ## -------------------- ## |
15 | ## M4sh Initialization. ## | |
16 | ## -------------------- ## | |
ccc6cda3 | 17 | |
dd4f3dd8 CR |
18 | # Be more Bourne compatible |
19 | DUALCASE=1; export DUALCASE # for MKS sh | |
1b1fe467 | 20 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
a82a04b3 CR |
21 | emulate sh |
22 | NULLCMD=: | |
dd4f3dd8 | 23 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
5e4a95c7 CR |
24 | # is contrary to our usage. Disable this feature. |
25 | alias -g '${1+"$@"}'='"$@"' | |
b709b946 CR |
26 | setopt NO_GLOB_SUBST |
27 | else | |
1b1fe467 CR |
28 | case `(set -o) 2>/dev/null` in #( |
29 | *posix*) : | |
30 | set -o posix ;; #( | |
31 | *) : | |
32 | ;; | |
dd4f3dd8 | 33 | esac |
a82a04b3 | 34 | fi |
dd4f3dd8 CR |
35 | |
36 | ||
dd4f3dd8 CR |
37 | as_nl=' |
38 | ' | |
39 | export as_nl | |
40 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
41 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
43 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
1b1fe467 CR |
44 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
45 | # but without wasting forks for bash or zsh. | |
46 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
47 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='print -r --' | |
49 | as_echo_n='print -rn --' | |
50 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
dd4f3dd8 CR |
51 | as_echo='printf %s\n' |
52 | as_echo_n='printf %s' | |
53 | else | |
54 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
55 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
56 | as_echo_n='/usr/ucb/echo -n' | |
b709b946 | 57 | else |
dd4f3dd8 CR |
58 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
59 | as_echo_n_body='eval | |
60 | arg=$1; | |
1b1fe467 | 61 | case $arg in #( |
dd4f3dd8 CR |
62 | *"$as_nl"*) |
63 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
64 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
65 | esac; | |
66 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
67 | ' | |
68 | export as_echo_n_body | |
69 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
b709b946 | 70 | fi |
dd4f3dd8 CR |
71 | export as_echo_body |
72 | as_echo='sh -c $as_echo_body as_echo' | |
73 | fi | |
74 | ||
75 | # The user is always right. | |
76 | if test "${PATH_SEPARATOR+set}" != set; then | |
77 | PATH_SEPARATOR=: | |
78 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
79 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
80 | PATH_SEPARATOR=';' | |
81 | } | |
b709b946 CR |
82 | fi |
83 | ||
5e4a95c7 | 84 | |
b709b946 CR |
85 | # IFS |
86 | # We need space, tab and new line, in precisely that order. Quoting is | |
87 | # there to prevent editors from complaining about space-tab. | |
88 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
89 | # splitting by setting IFS to empty value.) | |
b709b946 CR |
90 | IFS=" "" $as_nl" |
91 | ||
92 | # Find who we are. Look in the path if we contain no directory separator. | |
1b1fe467 CR |
93 | as_myself= |
94 | case $0 in #(( | |
b709b946 CR |
95 | *[\\/]* ) as_myself=$0 ;; |
96 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
97 | for as_dir in $PATH | |
98 | do | |
99 | IFS=$as_save_IFS | |
100 | test -z "$as_dir" && as_dir=. | |
1b1fe467 CR |
101 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
102 | done | |
b709b946 CR |
103 | IFS=$as_save_IFS |
104 | ||
105 | ;; | |
106 | esac | |
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. | |
109 | if test "x$as_myself" = x; then | |
110 | as_myself=$0 | |
111 | fi | |
112 | if test ! -f "$as_myself"; then | |
dd4f3dd8 | 113 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
1b1fe467 | 114 | exit 1 |
b709b946 CR |
115 | fi |
116 | ||
1b1fe467 CR |
117 | # Unset variables that we do not need and which cause bugs (e.g. in |
118 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
119 | # suppresses any "Segmentation fault" message there. '((' could | |
120 | # trigger a bug in pdksh 5.2.14. | |
121 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
122 | do eval test x\${$as_var+set} = xset \ | |
123 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
b709b946 | 124 | done |
5e4a95c7 CR |
125 | PS1='$ ' |
126 | PS2='> ' | |
127 | PS4='+ ' | |
128 | ||
129 | # NLS nuisances. | |
dd4f3dd8 CR |
130 | LC_ALL=C |
131 | export LC_ALL | |
132 | LANGUAGE=C | |
133 | export LANGUAGE | |
5e4a95c7 | 134 | |
1b1fe467 CR |
135 | # CDPATH. |
136 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
137 | ||
0ee50808 CR |
138 | # Use a proper internal environment variable to ensure we don't fall |
139 | # into an infinite loop, continuously re-executing ourselves. | |
140 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
141 | _as_can_reexec=no; export _as_can_reexec; | |
142 | # We cannot yet assume a decent shell, so we have to provide a | |
143 | # neutralization value for shells without unset; and this also | |
144 | # works around shells that cannot unset nonexistent variables. | |
145 | # Preserve -v and -x to the replacement shell. | |
146 | BASH_ENV=/dev/null | |
147 | ENV=/dev/null | |
148 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
149 | case $- in # (((( | |
150 | *v*x* | *x*v* ) as_opts=-vx ;; | |
151 | *v* ) as_opts=-v ;; | |
152 | *x* ) as_opts=-x ;; | |
153 | * ) as_opts= ;; | |
154 | esac | |
155 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
156 | # Admittedly, this is quite paranoid, since all the known shells bail | |
157 | # out after a failed `exec'. | |
158 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
159 | as_fn_exit 255 | |
160 | fi | |
161 | # We don't want this to propagate to other subprocesses. | |
162 | { _as_can_reexec=; unset _as_can_reexec;} | |
1b1fe467 CR |
163 | if test "x$CONFIG_SHELL" = x; then |
164 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
165 | emulate sh | |
166 | NULLCMD=: | |
167 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
168 | # is contrary to our usage. Disable this feature. | |
169 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
170 | setopt NO_GLOB_SUBST | |
171 | else | |
172 | case \`(set -o) 2>/dev/null\` in #( | |
173 | *posix*) : | |
174 | set -o posix ;; #( | |
175 | *) : | |
176 | ;; | |
177 | esac | |
178 | fi | |
179 | " | |
180 | as_required="as_fn_return () { (exit \$1); } | |
181 | as_fn_success () { as_fn_return 0; } | |
182 | as_fn_failure () { as_fn_return 1; } | |
183 | as_fn_ret_success () { return 0; } | |
184 | as_fn_ret_failure () { return 1; } | |
185 | ||
186 | exitcode=0 | |
187 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
188 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
189 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
190 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
191 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
192 | ||
193 | else | |
194 | exitcode=1; echo positional parameters were not saved. | |
195 | fi | |
0ee50808 CR |
196 | test x\$exitcode = x0 || exit 1 |
197 | test -x / || exit 1" | |
1b1fe467 CR |
198 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO |
199 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
200 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
201 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
202 | test \$(( 1 + 1 )) = 2 || exit 1" | |
203 | if (eval "$as_required") 2>/dev/null; then : | |
204 | as_have_required=yes | |
205 | else | |
206 | as_have_required=no | |
207 | fi | |
208 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
209 | ||
210 | else | |
211 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
212 | as_found=false | |
213 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
214 | do | |
215 | IFS=$as_save_IFS | |
216 | test -z "$as_dir" && as_dir=. | |
217 | as_found=: | |
218 | case $as_dir in #( | |
219 | /*) | |
220 | for as_base in sh bash ksh sh5; do | |
221 | # Try only shells that exist, to save several forks. | |
222 | as_shell=$as_dir/$as_base | |
223 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
224 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
225 | CONFIG_SHELL=$as_shell as_have_required=yes | |
226 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
227 | break 2 | |
228 | fi | |
229 | fi | |
230 | done;; | |
231 | esac | |
232 | as_found=false | |
233 | done | |
234 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
235 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
236 | CONFIG_SHELL=$SHELL as_have_required=yes | |
237 | fi; } | |
238 | IFS=$as_save_IFS | |
239 | ||
240 | ||
241 | if test "x$CONFIG_SHELL" != x; then : | |
0ee50808 CR |
242 | export CONFIG_SHELL |
243 | # We cannot yet assume a decent shell, so we have to provide a | |
244 | # neutralization value for shells without unset; and this also | |
245 | # works around shells that cannot unset nonexistent variables. | |
246 | # Preserve -v and -x to the replacement shell. | |
247 | BASH_ENV=/dev/null | |
248 | ENV=/dev/null | |
249 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
250 | case $- in # (((( | |
251 | *v*x* | *x*v* ) as_opts=-vx ;; | |
252 | *v* ) as_opts=-v ;; | |
253 | *x* ) as_opts=-x ;; | |
254 | * ) as_opts= ;; | |
255 | esac | |
256 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
257 | # Admittedly, this is quite paranoid, since all the known shells bail | |
258 | # out after a failed `exec'. | |
259 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
260 | exit 255 | |
1b1fe467 CR |
261 | fi |
262 | ||
263 | if test x$as_have_required = xno; then : | |
264 | $as_echo "$0: This script requires a shell more modern than all" | |
265 | $as_echo "$0: the shells that I found on your system." | |
266 | if test x${ZSH_VERSION+set} = xset ; then | |
267 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
268 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
269 | else | |
270 | $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org | |
271 | $0: about your system, including any error possibly output | |
272 | $0: before this message. Then install a modern shell, or | |
273 | $0: manually run the script under such a shell if you do | |
274 | $0: have one." | |
275 | fi | |
276 | exit 1 | |
277 | fi | |
278 | fi | |
279 | fi | |
280 | SHELL=${CONFIG_SHELL-/bin/sh} | |
281 | export SHELL | |
282 | # Unset more variables known to interfere with behavior of common tools. | |
283 | CLICOLOR_FORCE= GREP_OPTIONS= | |
284 | unset CLICOLOR_FORCE GREP_OPTIONS | |
285 | ||
286 | ## --------------------- ## | |
287 | ## M4sh Shell Functions. ## | |
288 | ## --------------------- ## | |
289 | # as_fn_unset VAR | |
290 | # --------------- | |
291 | # Portably unset VAR. | |
292 | as_fn_unset () | |
293 | { | |
294 | { eval $1=; unset $1;} | |
295 | } | |
296 | as_unset=as_fn_unset | |
297 | ||
298 | # as_fn_set_status STATUS | |
299 | # ----------------------- | |
300 | # Set $? to STATUS, without forking. | |
301 | as_fn_set_status () | |
302 | { | |
303 | return $1 | |
304 | } # as_fn_set_status | |
305 | ||
306 | # as_fn_exit STATUS | |
307 | # ----------------- | |
308 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
309 | as_fn_exit () | |
310 | { | |
311 | set +e | |
312 | as_fn_set_status $1 | |
313 | exit $1 | |
314 | } # as_fn_exit | |
315 | ||
316 | # as_fn_mkdir_p | |
317 | # ------------- | |
318 | # Create "$as_dir" as a directory, including parents if necessary. | |
319 | as_fn_mkdir_p () | |
320 | { | |
321 | ||
322 | case $as_dir in #( | |
323 | -*) as_dir=./$as_dir;; | |
324 | esac | |
325 | test -d "$as_dir" || eval $as_mkdir_p || { | |
326 | as_dirs= | |
327 | while :; do | |
328 | case $as_dir in #( | |
329 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
330 | *) as_qdir=$as_dir;; | |
331 | esac | |
332 | as_dirs="'$as_qdir' $as_dirs" | |
333 | as_dir=`$as_dirname -- "$as_dir" || | |
334 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
335 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
336 | X"$as_dir" : 'X\(//\)$' \| \ | |
337 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
338 | $as_echo X"$as_dir" | | |
339 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
340 | s//\1/ | |
341 | q | |
342 | } | |
343 | /^X\(\/\/\)[^/].*/{ | |
344 | s//\1/ | |
345 | q | |
346 | } | |
347 | /^X\(\/\/\)$/{ | |
348 | s//\1/ | |
349 | q | |
350 | } | |
351 | /^X\(\/\).*/{ | |
352 | s//\1/ | |
353 | q | |
354 | } | |
355 | s/.*/./; q'` | |
356 | test -d "$as_dir" && break | |
357 | done | |
358 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
359 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
360 | ||
361 | ||
362 | } # as_fn_mkdir_p | |
0ee50808 CR |
363 | |
364 | # as_fn_executable_p FILE | |
365 | # ----------------------- | |
366 | # Test if FILE is an executable regular file. | |
367 | as_fn_executable_p () | |
368 | { | |
369 | test -f "$1" && test -x "$1" | |
370 | } # as_fn_executable_p | |
1b1fe467 CR |
371 | # as_fn_append VAR VALUE |
372 | # ---------------------- | |
373 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
374 | # advantage of any shell optimizations that allow amortized linear growth over | |
375 | # repeated appends, instead of the typical quadratic growth present in naive | |
376 | # implementations. | |
377 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
378 | eval 'as_fn_append () | |
379 | { | |
380 | eval $1+=\$2 | |
381 | }' | |
382 | else | |
383 | as_fn_append () | |
384 | { | |
385 | eval $1=\$$1\$2 | |
386 | } | |
387 | fi # as_fn_append | |
388 | ||
389 | # as_fn_arith ARG... | |
390 | # ------------------ | |
391 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
392 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
393 | # must be portable across $(()) and expr. | |
394 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
395 | eval 'as_fn_arith () | |
396 | { | |
397 | as_val=$(( $* )) | |
398 | }' | |
399 | else | |
400 | as_fn_arith () | |
401 | { | |
402 | as_val=`expr "$@" || test $? -eq 1` | |
403 | } | |
404 | fi # as_fn_arith | |
405 | ||
406 | ||
407 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
408 | # ---------------------------------------- | |
409 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
410 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
411 | # script with STATUS, using 1 if that was 0. | |
412 | as_fn_error () | |
413 | { | |
414 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
415 | if test "$4"; then | |
416 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
417 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
418 | fi | |
419 | $as_echo "$as_me: error: $2" >&2 | |
420 | as_fn_exit $as_status | |
421 | } # as_fn_error | |
422 | ||
b709b946 CR |
423 | if expr a : '\(a\)' >/dev/null 2>&1 && |
424 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
5e4a95c7 CR |
425 | as_expr=expr |
426 | else | |
427 | as_expr=false | |
428 | fi | |
429 | ||
b709b946 | 430 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
5e4a95c7 CR |
431 | as_basename=basename |
432 | else | |
433 | as_basename=false | |
434 | fi | |
a82a04b3 | 435 | |
1b1fe467 CR |
436 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
437 | as_dirname=dirname | |
438 | else | |
439 | as_dirname=false | |
440 | fi | |
a82a04b3 | 441 | |
b709b946 | 442 | as_me=`$as_basename -- "$0" || |
a82a04b3 CR |
443 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
444 | X"$0" : 'X\(//\)$' \| \ | |
b709b946 | 445 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
dd4f3dd8 | 446 | $as_echo X/"$0" | |
b709b946 CR |
447 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
448 | s//\1/ | |
449 | q | |
450 | } | |
451 | /^X\/\(\/\/\)$/{ | |
452 | s//\1/ | |
453 | q | |
454 | } | |
455 | /^X\/\(\/\).*/{ | |
456 | s//\1/ | |
457 | q | |
458 | } | |
459 | s/.*/./; q'` | |
9d6e5e30 | 460 | |
1b1fe467 CR |
461 | # Avoid depending upon Character Ranges. |
462 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
463 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
464 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
465 | as_cr_digits='0123456789' | |
466 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
9d6e5e30 | 467 | |
9d6e5e30 | 468 | |
1b1fe467 CR |
469 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
470 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
471 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
472 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
473 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
474 | sed -n ' | |
475 | p | |
476 | /[$]LINENO/= | |
477 | ' <$as_myself | | |
478 | sed ' | |
479 | s/[$]LINENO.*/&-/ | |
480 | t lineno | |
481 | b | |
482 | :lineno | |
483 | N | |
484 | :loop | |
485 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
486 | t loop | |
487 | s/-\n.*// | |
488 | ' >$as_me.lineno && | |
489 | chmod +x "$as_me.lineno" || | |
490 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
b709b946 | 491 | |
0ee50808 CR |
492 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have |
493 | # already done that, so ensure we don't try to do so again and fall | |
494 | # in an infinite loop. This has already happened in practice. | |
495 | _as_can_reexec=no; export _as_can_reexec | |
1b1fe467 CR |
496 | # Don't try to exec as it changes $[0], causing all sort of problems |
497 | # (the dirname of $[0] is not the place where we might find the | |
498 | # original and so on. Autoconf is especially sensitive to this). | |
499 | . "./$as_me.lineno" | |
500 | # Exit status is that of the last command. | |
501 | exit | |
b709b946 CR |
502 | } |
503 | ||
1b1fe467 CR |
504 | ECHO_C= ECHO_N= ECHO_T= |
505 | case `echo -n x` in #((((( | |
506 | -n*) | |
507 | case `echo 'xy\c'` in | |
508 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
509 | xy) ECHO_C='\c';; | |
510 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
511 | ECHO_T=' ';; | |
512 | esac;; | |
513 | *) | |
514 | ECHO_N='-n';; | |
515 | esac | |
e3db237e | 516 | |
1b1fe467 CR |
517 | rm -f conf$$ conf$$.exe conf$$.file |
518 | if test -d conf$$.dir; then | |
519 | rm -f conf$$.dir/conf$$.file | |
520 | else | |
521 | rm -f conf$$.dir | |
522 | mkdir conf$$.dir 2>/dev/null | |
abe2eb5b | 523 | fi |
1b1fe467 CR |
524 | if (echo >conf$$.file) 2>/dev/null; then |
525 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
526 | as_ln_s='ln -s' | |
527 | # ... but there are two gotchas: | |
528 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
529 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
0ee50808 | 530 | # In both cases, we have to default to `cp -pR'. |
1b1fe467 | 531 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
0ee50808 | 532 | as_ln_s='cp -pR' |
1b1fe467 CR |
533 | elif ln conf$$.file conf$$ 2>/dev/null; then |
534 | as_ln_s=ln | |
535 | else | |
0ee50808 | 536 | as_ln_s='cp -pR' |
1b1fe467 | 537 | fi |
b709b946 | 538 | else |
0ee50808 | 539 | as_ln_s='cp -pR' |
b709b946 | 540 | fi |
1b1fe467 CR |
541 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
542 | rmdir conf$$.dir 2>/dev/null | |
b709b946 | 543 | |
1b1fe467 CR |
544 | if mkdir -p . 2>/dev/null; then |
545 | as_mkdir_p='mkdir -p "$as_dir"' | |
546 | else | |
547 | test -d ./-p && rmdir ./-p | |
548 | as_mkdir_p=false | |
7175a77f | 549 | fi |
b709b946 | 550 | |
0ee50808 CR |
551 | as_test_x='test -x' |
552 | as_executable_p=as_fn_executable_p | |
b709b946 | 553 | |
1b1fe467 CR |
554 | # Sed expression to map a string onto a valid CPP name. |
555 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
b709b946 | 556 | |
1b1fe467 CR |
557 | # Sed expression to map a string onto a valid variable name. |
558 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
f73dda09 | 559 | |
f73dda09 | 560 | |
1b1fe467 CR |
561 | test -n "$DJDIR" || exec 7<&0 </dev/null |
562 | exec 6>&1 | |
7175a77f CR |
563 | |
564 | # Name of the host. | |
1b1fe467 | 565 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
7175a77f CR |
566 | # so uname gets run too. |
567 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
568 | ||
569 | # | |
570 | # Initializations. | |
f73dda09 | 571 | # |
ccc6cda3 | 572 | ac_default_prefix=/usr/local |
b709b946 | 573 | ac_clean_files= |
5e4a95c7 | 574 | ac_config_libobj_dir=. |
b709b946 | 575 | LIBOBJS= |
f73dda09 JA |
576 | cross_compiling=no |
577 | subdirs= | |
a82a04b3 CR |
578 | MFLAGS= |
579 | MAKEFLAGS= | |
f73dda09 | 580 | |
a82a04b3 CR |
581 | # Identity of this package. |
582 | PACKAGE_NAME='bash' | |
583 | PACKAGE_TARNAME='bash' | |
39feef01 CR |
584 | PACKAGE_VERSION='4.3-rc1' |
585 | PACKAGE_STRING='bash 4.3-rc1' | |
a82a04b3 | 586 | PACKAGE_BUGREPORT='bug-bash@gnu.org' |
1b1fe467 | 587 | PACKAGE_URL='' |
a82a04b3 | 588 | |
f73dda09 JA |
589 | ac_unique_file="shell.h" |
590 | # Factoring default headers for most tests. | |
591 | ac_includes_default="\ | |
592 | #include <stdio.h> | |
dd4f3dd8 | 593 | #ifdef HAVE_SYS_TYPES_H |
f73dda09 JA |
594 | # include <sys/types.h> |
595 | #endif | |
dd4f3dd8 | 596 | #ifdef HAVE_SYS_STAT_H |
f73dda09 JA |
597 | # include <sys/stat.h> |
598 | #endif | |
dd4f3dd8 | 599 | #ifdef STDC_HEADERS |
f73dda09 JA |
600 | # include <stdlib.h> |
601 | # include <stddef.h> | |
602 | #else | |
dd4f3dd8 | 603 | # ifdef HAVE_STDLIB_H |
f73dda09 JA |
604 | # include <stdlib.h> |
605 | # endif | |
606 | #endif | |
dd4f3dd8 CR |
607 | #ifdef HAVE_STRING_H |
608 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
f73dda09 JA |
609 | # include <memory.h> |
610 | # endif | |
611 | # include <string.h> | |
612 | #endif | |
dd4f3dd8 | 613 | #ifdef HAVE_STRINGS_H |
f73dda09 JA |
614 | # include <strings.h> |
615 | #endif | |
dd4f3dd8 | 616 | #ifdef HAVE_INTTYPES_H |
f73dda09 | 617 | # include <inttypes.h> |
b709b946 | 618 | #endif |
dd4f3dd8 | 619 | #ifdef HAVE_STDINT_H |
b709b946 | 620 | # include <stdint.h> |
f73dda09 | 621 | #endif |
dd4f3dd8 | 622 | #ifdef HAVE_UNISTD_H |
f73dda09 JA |
623 | # include <unistd.h> |
624 | #endif" | |
ccc6cda3 | 625 | |
dd4f3dd8 | 626 | ac_header_list= |
53ac45a3 | 627 | ac_func_list= |
af98a2a6 | 628 | ac_subst_vars='LTLIBOBJS |
691aebcb | 629 | LOCAL_DEFS |
af98a2a6 CR |
630 | LOCAL_LDFLAGS |
631 | LOCAL_CFLAGS | |
632 | LOCAL_LIBS | |
633 | MALLOC_DEBUG | |
634 | DEBUG | |
635 | RELSTATUS | |
636 | BASHVERS | |
637 | ARFLAGS | |
638 | BUILD_DIR | |
639 | incdir | |
640 | PROFILE_FLAGS | |
641 | SHOBJ_STATUS | |
642 | SHOBJ_LIBS | |
643 | SHOBJ_XLDFLAGS | |
644 | SHOBJ_LDFLAGS | |
645 | SHOBJ_LD | |
646 | SHOBJ_CFLAGS | |
647 | SHOBJ_CC | |
648 | JOBS_O | |
649 | TERMCAP_DEP | |
650 | TERMCAP_LIB | |
651 | SIGLIST_O | |
278286c9 CR |
652 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC |
653 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
654 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
af98a2a6 CR |
655 | LIBINTL_H |
656 | INTL_INC | |
657 | INTL_DEP | |
658 | LIBOBJS | |
659 | POSUB | |
660 | LTLIBINTL | |
661 | LIBINTL | |
662 | INTLLIBS | |
663 | INTL_LIBTOOL_SUFFIX_PREFIX | |
664 | INTLOBJS | |
665 | GENCAT | |
666 | INSTOBJEXT | |
667 | DATADIRNAME | |
668 | CATOBJEXT | |
669 | USE_INCLUDED_LIBINTL | |
670 | BUILD_INCLUDED_LIBINTL | |
671 | INTLBISON | |
672 | LTLIBICONV | |
673 | LIBICONV | |
674 | GLIBC21 | |
675 | ALLOCA | |
676 | MSGMERGE | |
677 | XGETTEXT | |
678 | GMSGFMT | |
679 | MSGFMT | |
680 | USE_NLS | |
681 | MKINSTALLDIRS | |
682 | SIZE | |
683 | MAKE_SHELL | |
684 | SET_MAKE | |
685 | YFLAGS | |
686 | YACC | |
687 | RANLIB | |
688 | AR | |
689 | INSTALL_DATA | |
690 | INSTALL_SCRIPT | |
691 | INSTALL_PROGRAM | |
692 | TILDE_LIB | |
693 | HIST_LIBDIR | |
694 | HISTORY_DEP | |
695 | HISTORY_LIB | |
696 | RL_INCLUDE | |
697 | RL_INCLUDEDIR | |
698 | RL_LIBDIR | |
699 | READLINE_DEP | |
700 | READLINE_LIB | |
701 | RL_MINOR | |
702 | RL_MAJOR | |
703 | RL_VERSION | |
7610e0c5 | 704 | LIBS_FOR_BUILD |
af98a2a6 | 705 | STATIC_LD |
af98a2a6 CR |
706 | SIGNAMES_O |
707 | SIGNAMES_H | |
708 | CROSS_COMPILE | |
709 | EGREP | |
710 | GREP | |
711 | CPP | |
712 | OBJEXT | |
713 | EXEEXT | |
714 | ac_ct_CC | |
715 | CPPFLAGS | |
716 | LDFLAGS | |
717 | CFLAGS | |
718 | CC | |
719 | HELPSTRINGS | |
abe2eb5b | 720 | HELPFILES_TARGET |
af98a2a6 CR |
721 | HELPINSTALL |
722 | HELPDIRDEFINE | |
723 | HELPDIR | |
724 | MALLOC_DEP | |
725 | MALLOC_LDFLAGS | |
726 | MALLOC_LIBRARY | |
727 | MALLOC_LIB | |
728 | MALLOC_SRC | |
729 | MALLOC_TARGET | |
730 | PURIFY | |
731 | TESTSCRIPT | |
7610e0c5 CR |
732 | CPPFLAGS_FOR_BUILD |
733 | LDFLAGS_FOR_BUILD | |
734 | CFLAGS_FOR_BUILD | |
735 | CC_FOR_BUILD | |
af98a2a6 | 736 | DEBUGGER_START_FILE |
af98a2a6 CR |
737 | host_os |
738 | host_vendor | |
739 | host_cpu | |
740 | host | |
741 | build_os | |
742 | build_vendor | |
743 | build_cpu | |
744 | build | |
745 | target_alias | |
746 | host_alias | |
747 | build_alias | |
748 | LIBS | |
749 | ECHO_T | |
750 | ECHO_N | |
751 | ECHO_C | |
752 | DEFS | |
753 | mandir | |
754 | localedir | |
755 | libdir | |
756 | psdir | |
757 | pdfdir | |
758 | dvidir | |
759 | htmldir | |
760 | infodir | |
761 | docdir | |
762 | oldincludedir | |
763 | includedir | |
764 | localstatedir | |
765 | sharedstatedir | |
766 | sysconfdir | |
767 | datadir | |
768 | datarootdir | |
769 | libexecdir | |
770 | sbindir | |
771 | bindir | |
772 | program_transform_name | |
773 | prefix | |
774 | exec_prefix | |
1b1fe467 | 775 | PACKAGE_URL |
af98a2a6 CR |
776 | PACKAGE_BUGREPORT |
777 | PACKAGE_STRING | |
778 | PACKAGE_VERSION | |
779 | PACKAGE_TARNAME | |
780 | PACKAGE_NAME | |
781 | PATH_SEPARATOR | |
782 | SHELL' | |
5e4a95c7 | 783 | ac_subst_files='' |
dd4f3dd8 CR |
784 | ac_user_opts=' |
785 | enable_option_checking | |
dd4f3dd8 CR |
786 | with_afs |
787 | with_bash_malloc | |
788 | with_curses | |
789 | with_gnu_malloc | |
790 | with_installed_readline | |
791 | with_purecov | |
792 | with_purify | |
793 | enable_minimal_config | |
794 | enable_alias | |
795 | enable_arith_for_command | |
796 | enable_array_variables | |
797 | enable_bang_history | |
798 | enable_brace_expansion | |
799 | enable_casemod_attributes | |
800 | enable_casemod_expansions | |
801 | enable_command_timing | |
802 | enable_cond_command | |
803 | enable_cond_regexp | |
804 | enable_coprocesses | |
805 | enable_debugger | |
f14388d3 | 806 | enable_direxpand_default |
dd4f3dd8 CR |
807 | enable_directory_stack |
808 | enable_disabled_builtins | |
809 | enable_dparen_arithmetic | |
810 | enable_extended_glob | |
691aebcb | 811 | enable_extended_glob_default |
c111d992 | 812 | enable_glob_asciiranges_default |
dd4f3dd8 CR |
813 | enable_help_builtin |
814 | enable_history | |
815 | enable_job_control | |
816 | enable_multibyte | |
817 | enable_net_redirections | |
818 | enable_process_substitution | |
819 | enable_progcomp | |
820 | enable_prompt_string_decoding | |
821 | enable_readline | |
822 | enable_restricted | |
823 | enable_select | |
824 | enable_separate_helpfiles | |
825 | enable_single_help_strings | |
826 | enable_strict_posix_default | |
827 | enable_usg_echo_default | |
828 | enable_xpg_echo_default | |
829 | enable_mem_scramble | |
830 | enable_profiling | |
831 | enable_static_link | |
832 | enable_largefile | |
833 | enable_nls | |
834 | with_gnu_ld | |
835 | enable_rpath | |
836 | with_libiconv_prefix | |
837 | with_included_gettext | |
838 | with_libintl_prefix | |
839 | ' | |
b709b946 CR |
840 | ac_precious_vars='build_alias |
841 | host_alias | |
842 | target_alias | |
843 | DEBUGGER_START_FILE | |
7610e0c5 CR |
844 | CC_FOR_BUILD |
845 | CFLAGS_FOR_BUILD | |
846 | LDFLAGS_FOR_BUILD | |
847 | CPPFLAGS_FOR_BUILD | |
b709b946 CR |
848 | CC |
849 | CFLAGS | |
850 | LDFLAGS | |
dd4f3dd8 | 851 | LIBS |
b709b946 CR |
852 | CPPFLAGS |
853 | CPP | |
854 | YACC | |
855 | YFLAGS' | |
856 | ||
a82a04b3 | 857 | |
ccc6cda3 | 858 | # Initialize some variables set by options. |
f73dda09 JA |
859 | ac_init_help= |
860 | ac_init_version=false | |
dd4f3dd8 CR |
861 | ac_unrecognized_opts= |
862 | ac_unrecognized_sep= | |
ccc6cda3 JA |
863 | # The variables have the same names as the options, with |
864 | # dashes changed to underlines. | |
f73dda09 | 865 | cache_file=/dev/null |
ccc6cda3 | 866 | exec_prefix=NONE |
ccc6cda3 | 867 | no_create= |
ccc6cda3 JA |
868 | no_recursion= |
869 | prefix=NONE | |
870 | program_prefix=NONE | |
871 | program_suffix=NONE | |
872 | program_transform_name=s,x,x, | |
873 | silent= | |
874 | site= | |
875 | srcdir= | |
ccc6cda3 JA |
876 | verbose= |
877 | x_includes=NONE | |
878 | x_libraries=NONE | |
f73dda09 JA |
879 | |
880 | # Installation directory options. | |
881 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
882 | # and all the variables that are supposed to be based on exec_prefix | |
883 | # by default will actually change. | |
884 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
b709b946 | 885 | # (The list follows the same order as the GNU Coding Standards.) |
ccc6cda3 JA |
886 | bindir='${exec_prefix}/bin' |
887 | sbindir='${exec_prefix}/sbin' | |
888 | libexecdir='${exec_prefix}/libexec' | |
b709b946 CR |
889 | datarootdir='${prefix}/share' |
890 | datadir='${datarootdir}' | |
ccc6cda3 JA |
891 | sysconfdir='${prefix}/etc' |
892 | sharedstatedir='${prefix}/com' | |
893 | localstatedir='${prefix}/var' | |
ccc6cda3 JA |
894 | includedir='${prefix}/include' |
895 | oldincludedir='/usr/include' | |
b709b946 CR |
896 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
897 | infodir='${datarootdir}/info' | |
898 | htmldir='${docdir}' | |
899 | dvidir='${docdir}' | |
900 | pdfdir='${docdir}' | |
901 | psdir='${docdir}' | |
902 | libdir='${exec_prefix}/lib' | |
903 | localedir='${datarootdir}/locale' | |
904 | mandir='${datarootdir}/man' | |
ccc6cda3 | 905 | |
ccc6cda3 | 906 | ac_prev= |
b709b946 | 907 | ac_dashdash= |
ccc6cda3 JA |
908 | for ac_option |
909 | do | |
ccc6cda3 JA |
910 | # If the previous option needs an argument, assign it. |
911 | if test -n "$ac_prev"; then | |
b709b946 | 912 | eval $ac_prev=\$ac_option |
ccc6cda3 JA |
913 | ac_prev= |
914 | continue | |
915 | fi | |
916 | ||
b709b946 | 917 | case $ac_option in |
1b1fe467 CR |
918 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
919 | *=) ac_optarg= ;; | |
920 | *) ac_optarg=yes ;; | |
b709b946 | 921 | esac |
ccc6cda3 JA |
922 | |
923 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
924 | ||
b709b946 CR |
925 | case $ac_dashdash$ac_option in |
926 | --) | |
927 | ac_dashdash=yes ;; | |
ccc6cda3 JA |
928 | |
929 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
930 | ac_prev=bindir ;; | |
931 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
f73dda09 | 932 | bindir=$ac_optarg ;; |
ccc6cda3 JA |
933 | |
934 | -build | --build | --buil | --bui | --bu) | |
f73dda09 | 935 | ac_prev=build_alias ;; |
ccc6cda3 | 936 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
f73dda09 | 937 | build_alias=$ac_optarg ;; |
ccc6cda3 JA |
938 | |
939 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
940 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
941 | ac_prev=cache_file ;; | |
942 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
943 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
f73dda09 JA |
944 | cache_file=$ac_optarg ;; |
945 | ||
946 | --config-cache | -C) | |
947 | cache_file=config.cache ;; | |
ccc6cda3 | 948 | |
b709b946 | 949 | -datadir | --datadir | --datadi | --datad) |
ccc6cda3 | 950 | ac_prev=datadir ;; |
b709b946 | 951 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
f73dda09 | 952 | datadir=$ac_optarg ;; |
ccc6cda3 | 953 | |
b709b946 CR |
954 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
955 | | --dataroo | --dataro | --datar) | |
956 | ac_prev=datarootdir ;; | |
957 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
958 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
959 | datarootdir=$ac_optarg ;; | |
960 | ||
ccc6cda3 | 961 | -disable-* | --disable-*) |
dd4f3dd8 | 962 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
ccc6cda3 | 963 | # Reject names that are not valid shell variable names. |
dd4f3dd8 | 964 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1b1fe467 | 965 | as_fn_error $? "invalid feature name: $ac_useropt" |
dd4f3dd8 CR |
966 | ac_useropt_orig=$ac_useropt |
967 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
968 | case $ac_user_opts in | |
969 | *" | |
970 | "enable_$ac_useropt" | |
971 | "*) ;; | |
972 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
973 | ac_unrecognized_sep=', ';; | |
974 | esac | |
975 | eval enable_$ac_useropt=no ;; | |
b709b946 CR |
976 | |
977 | -docdir | --docdir | --docdi | --doc | --do) | |
978 | ac_prev=docdir ;; | |
979 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
980 | docdir=$ac_optarg ;; | |
981 | ||
982 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
983 | ac_prev=dvidir ;; | |
984 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
985 | dvidir=$ac_optarg ;; | |
ccc6cda3 JA |
986 | |
987 | -enable-* | --enable-*) | |
dd4f3dd8 | 988 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
ccc6cda3 | 989 | # Reject names that are not valid shell variable names. |
dd4f3dd8 | 990 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1b1fe467 | 991 | as_fn_error $? "invalid feature name: $ac_useropt" |
dd4f3dd8 CR |
992 | ac_useropt_orig=$ac_useropt |
993 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
994 | case $ac_user_opts in | |
995 | *" | |
996 | "enable_$ac_useropt" | |
997 | "*) ;; | |
998 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
999 | ac_unrecognized_sep=', ';; | |
1000 | esac | |
1001 | eval enable_$ac_useropt=\$ac_optarg ;; | |
ccc6cda3 JA |
1002 | |
1003 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1004 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1005 | | --exec | --exe | --ex) | |
1006 | ac_prev=exec_prefix ;; | |
1007 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1008 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1009 | | --exec=* | --exe=* | --ex=*) | |
f73dda09 | 1010 | exec_prefix=$ac_optarg ;; |
ccc6cda3 JA |
1011 | |
1012 | -gas | --gas | --ga | --g) | |
1013 | # Obsolete; use --with-gas. | |
1014 | with_gas=yes ;; | |
1015 | ||
f73dda09 JA |
1016 | -help | --help | --hel | --he | -h) |
1017 | ac_init_help=long ;; | |
1018 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1019 | ac_init_help=recursive ;; | |
1020 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1021 | ac_init_help=short ;; | |
ccc6cda3 JA |
1022 | |
1023 | -host | --host | --hos | --ho) | |
f73dda09 | 1024 | ac_prev=host_alias ;; |
ccc6cda3 | 1025 | -host=* | --host=* | --hos=* | --ho=*) |
f73dda09 | 1026 | host_alias=$ac_optarg ;; |
ccc6cda3 | 1027 | |
b709b946 CR |
1028 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1029 | ac_prev=htmldir ;; | |
1030 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1031 | | --ht=*) | |
1032 | htmldir=$ac_optarg ;; | |
1033 | ||
ccc6cda3 JA |
1034 | -includedir | --includedir | --includedi | --included | --include \ |
1035 | | --includ | --inclu | --incl | --inc) | |
1036 | ac_prev=includedir ;; | |
1037 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1038 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
f73dda09 | 1039 | includedir=$ac_optarg ;; |
ccc6cda3 JA |
1040 | |
1041 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1042 | ac_prev=infodir ;; | |
1043 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
f73dda09 | 1044 | infodir=$ac_optarg ;; |
ccc6cda3 JA |
1045 | |
1046 | -libdir | --libdir | --libdi | --libd) | |
1047 | ac_prev=libdir ;; | |
1048 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
f73dda09 | 1049 | libdir=$ac_optarg ;; |
ccc6cda3 JA |
1050 | |
1051 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1052 | | --libexe | --libex | --libe) | |
1053 | ac_prev=libexecdir ;; | |
1054 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1055 | | --libexe=* | --libex=* | --libe=*) | |
f73dda09 | 1056 | libexecdir=$ac_optarg ;; |
ccc6cda3 | 1057 | |
b709b946 CR |
1058 | -localedir | --localedir | --localedi | --localed | --locale) |
1059 | ac_prev=localedir ;; | |
1060 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1061 | localedir=$ac_optarg ;; | |
1062 | ||
ccc6cda3 | 1063 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
b709b946 | 1064 | | --localstate | --localstat | --localsta | --localst | --locals) |
ccc6cda3 JA |
1065 | ac_prev=localstatedir ;; |
1066 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
b709b946 | 1067 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
f73dda09 | 1068 | localstatedir=$ac_optarg ;; |
ccc6cda3 JA |
1069 | |
1070 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1071 | ac_prev=mandir ;; | |
1072 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
f73dda09 | 1073 | mandir=$ac_optarg ;; |
ccc6cda3 JA |
1074 | |
1075 | -nfp | --nfp | --nf) | |
1076 | # Obsolete; use --without-fp. | |
1077 | with_fp=no ;; | |
1078 | ||
1079 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
a82a04b3 | 1080 | | --no-cr | --no-c | -n) |
ccc6cda3 JA |
1081 | no_create=yes ;; |
1082 | ||
1083 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1084 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1085 | no_recursion=yes ;; | |
1086 | ||
1087 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1088 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1089 | | --oldin | --oldi | --old | --ol | --o) | |
1090 | ac_prev=oldincludedir ;; | |
1091 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1092 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1093 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
f73dda09 | 1094 | oldincludedir=$ac_optarg ;; |
ccc6cda3 JA |
1095 | |
1096 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1097 | ac_prev=prefix ;; | |
1098 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
f73dda09 | 1099 | prefix=$ac_optarg ;; |
ccc6cda3 JA |
1100 | |
1101 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1102 | | --program-pre | --program-pr | --program-p) | |
1103 | ac_prev=program_prefix ;; | |
1104 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1105 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
f73dda09 | 1106 | program_prefix=$ac_optarg ;; |
ccc6cda3 JA |
1107 | |
1108 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1109 | | --program-suf | --program-su | --program-s) | |
1110 | ac_prev=program_suffix ;; | |
1111 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1112 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
f73dda09 | 1113 | program_suffix=$ac_optarg ;; |
ccc6cda3 JA |
1114 | |
1115 | -program-transform-name | --program-transform-name \ | |
1116 | | --program-transform-nam | --program-transform-na \ | |
1117 | | --program-transform-n | --program-transform- \ | |
1118 | | --program-transform | --program-transfor \ | |
1119 | | --program-transfo | --program-transf \ | |
1120 | | --program-trans | --program-tran \ | |
1121 | | --progr-tra | --program-tr | --program-t) | |
1122 | ac_prev=program_transform_name ;; | |
1123 | -program-transform-name=* | --program-transform-name=* \ | |
1124 | | --program-transform-nam=* | --program-transform-na=* \ | |
1125 | | --program-transform-n=* | --program-transform-=* \ | |
1126 | | --program-transform=* | --program-transfor=* \ | |
1127 | | --program-transfo=* | --program-transf=* \ | |
1128 | | --program-trans=* | --program-tran=* \ | |
1129 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
f73dda09 | 1130 | program_transform_name=$ac_optarg ;; |
ccc6cda3 | 1131 | |
b709b946 CR |
1132 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1133 | ac_prev=pdfdir ;; | |
1134 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1135 | pdfdir=$ac_optarg ;; | |
1136 | ||
1137 | -psdir | --psdir | --psdi | --psd | --ps) | |
1138 | ac_prev=psdir ;; | |
1139 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1140 | psdir=$ac_optarg ;; | |
1141 | ||
ccc6cda3 JA |
1142 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1143 | | -silent | --silent | --silen | --sile | --sil) | |
1144 | silent=yes ;; | |
1145 | ||
1146 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1147 | ac_prev=sbindir ;; | |
1148 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1149 | | --sbi=* | --sb=*) | |
f73dda09 | 1150 | sbindir=$ac_optarg ;; |
ccc6cda3 JA |
1151 | |
1152 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1153 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1154 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1155 | | --sha | --sh) | |
1156 | ac_prev=sharedstatedir ;; | |
1157 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1158 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1159 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1160 | | --sha=* | --sh=*) | |
f73dda09 | 1161 | sharedstatedir=$ac_optarg ;; |
ccc6cda3 JA |
1162 | |
1163 | -site | --site | --sit) | |
1164 | ac_prev=site ;; | |
1165 | -site=* | --site=* | --sit=*) | |
f73dda09 | 1166 | site=$ac_optarg ;; |
ccc6cda3 JA |
1167 | |
1168 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1169 | ac_prev=srcdir ;; | |
1170 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
f73dda09 | 1171 | srcdir=$ac_optarg ;; |
ccc6cda3 JA |
1172 | |
1173 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1174 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1175 | ac_prev=sysconfdir ;; | |
1176 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1177 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
f73dda09 | 1178 | sysconfdir=$ac_optarg ;; |
ccc6cda3 JA |
1179 | |
1180 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
f73dda09 | 1181 | ac_prev=target_alias ;; |
ccc6cda3 | 1182 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
f73dda09 | 1183 | target_alias=$ac_optarg ;; |
ccc6cda3 JA |
1184 | |
1185 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1186 | verbose=yes ;; | |
1187 | ||
f73dda09 JA |
1188 | -version | --version | --versio | --versi | --vers | -V) |
1189 | ac_init_version=: ;; | |
ccc6cda3 JA |
1190 | |
1191 | -with-* | --with-*) | |
dd4f3dd8 | 1192 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
ccc6cda3 | 1193 | # Reject names that are not valid shell variable names. |
dd4f3dd8 | 1194 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1b1fe467 | 1195 | as_fn_error $? "invalid package name: $ac_useropt" |
dd4f3dd8 CR |
1196 | ac_useropt_orig=$ac_useropt |
1197 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1198 | case $ac_user_opts in | |
1199 | *" | |
1200 | "with_$ac_useropt" | |
1201 | "*) ;; | |
1202 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1203 | ac_unrecognized_sep=', ';; | |
1204 | esac | |
1205 | eval with_$ac_useropt=\$ac_optarg ;; | |
ccc6cda3 JA |
1206 | |
1207 | -without-* | --without-*) | |
dd4f3dd8 | 1208 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
ccc6cda3 | 1209 | # Reject names that are not valid shell variable names. |
dd4f3dd8 | 1210 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1b1fe467 | 1211 | as_fn_error $? "invalid package name: $ac_useropt" |
dd4f3dd8 CR |
1212 | ac_useropt_orig=$ac_useropt |
1213 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1214 | case $ac_user_opts in | |
1215 | *" | |
1216 | "with_$ac_useropt" | |
1217 | "*) ;; | |
1218 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1219 | ac_unrecognized_sep=', ';; | |
1220 | esac | |
1221 | eval with_$ac_useropt=no ;; | |
ccc6cda3 JA |
1222 | |
1223 | --x) | |
1224 | # Obsolete; use --with-x. | |
1225 | with_x=yes ;; | |
1226 | ||
1227 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1228 | | --x-incl | --x-inc | --x-in | --x-i) | |
1229 | ac_prev=x_includes ;; | |
1230 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1231 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
f73dda09 | 1232 | x_includes=$ac_optarg ;; |
ccc6cda3 JA |
1233 | |
1234 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1235 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1236 | ac_prev=x_libraries ;; | |
1237 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1238 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
f73dda09 | 1239 | x_libraries=$ac_optarg ;; |
ccc6cda3 | 1240 | |
1b1fe467 CR |
1241 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1242 | Try \`$0 --help' for more information" | |
ccc6cda3 JA |
1243 | ;; |
1244 | ||
f73dda09 JA |
1245 | *=*) |
1246 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1247 | # Reject names that are not valid shell variable names. | |
1b1fe467 CR |
1248 | case $ac_envvar in #( |
1249 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1250 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; | |
1251 | esac | |
b709b946 | 1252 | eval $ac_envvar=\$ac_optarg |
f73dda09 JA |
1253 | export $ac_envvar ;; |
1254 | ||
ccc6cda3 | 1255 | *) |
f73dda09 | 1256 | # FIXME: should be removed in autoconf 3.0. |
dd4f3dd8 | 1257 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
f73dda09 | 1258 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
dd4f3dd8 | 1259 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
1b1fe467 | 1260 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
ccc6cda3 JA |
1261 | ;; |
1262 | ||
1263 | esac | |
1264 | done | |
1265 | ||
1266 | if test -n "$ac_prev"; then | |
f73dda09 | 1267 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
1b1fe467 | 1268 | as_fn_error $? "missing argument to $ac_option" |
ccc6cda3 | 1269 | fi |
ccc6cda3 | 1270 | |
dd4f3dd8 CR |
1271 | if test -n "$ac_unrecognized_opts"; then |
1272 | case $enable_option_checking in | |
1273 | no) ;; | |
1b1fe467 | 1274 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
af98a2a6 | 1275 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
dd4f3dd8 CR |
1276 | esac |
1277 | fi | |
1278 | ||
1279 | # Check all directory arguments for consistency. | |
b709b946 CR |
1280 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
1281 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1282 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1283 | libdir localedir mandir | |
c184f645 | 1284 | do |
b709b946 | 1285 | eval ac_val=\$$ac_var |
dd4f3dd8 CR |
1286 | # Remove trailing slashes. |
1287 | case $ac_val in | |
1288 | */ ) | |
1289 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1290 | eval $ac_var=\$ac_val;; | |
1291 | esac | |
1292 | # Be sure to have absolute directory names. | |
c184f645 | 1293 | case $ac_val in |
b709b946 CR |
1294 | [\\/$]* | ?:[\\/]* ) continue;; |
1295 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
ccc6cda3 | 1296 | esac |
1b1fe467 | 1297 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
ccc6cda3 JA |
1298 | done |
1299 | ||
f73dda09 JA |
1300 | # There might be people who depend on the old broken behavior: `$host' |
1301 | # used to hold the argument of --host etc. | |
a82a04b3 | 1302 | # FIXME: To remove some day. |
f73dda09 JA |
1303 | build=$build_alias |
1304 | host=$host_alias | |
1305 | target=$target_alias | |
1306 | ||
a82a04b3 | 1307 | # FIXME: To remove some day. |
f73dda09 JA |
1308 | if test "x$host_alias" != x; then |
1309 | if test "x$build_alias" = x; then | |
1310 | cross_compiling=maybe | |
f73dda09 JA |
1311 | elif test "x$build_alias" != "x$host_alias"; then |
1312 | cross_compiling=yes | |
1313 | fi | |
1314 | fi | |
ccc6cda3 | 1315 | |
f73dda09 JA |
1316 | ac_tool_prefix= |
1317 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
ccc6cda3 | 1318 | |
f73dda09 | 1319 | test "$silent" = yes && exec 6>/dev/null |
ccc6cda3 | 1320 | |
a82a04b3 | 1321 | |
b709b946 CR |
1322 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1323 | ac_ls_di=`ls -di .` && | |
1324 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1b1fe467 | 1325 | as_fn_error $? "working directory cannot be determined" |
b709b946 | 1326 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
1b1fe467 | 1327 | as_fn_error $? "pwd does not report name of working directory" |
b709b946 CR |
1328 | |
1329 | ||
ccc6cda3 JA |
1330 | # Find the source files, if location was not specified. |
1331 | if test -z "$srcdir"; then | |
1332 | ac_srcdir_defaulted=yes | |
b709b946 | 1333 | # Try the directory containing this script, then the parent directory. |
dd4f3dd8 CR |
1334 | ac_confdir=`$as_dirname -- "$as_myself" || |
1335 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1336 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1337 | X"$as_myself" : 'X\(//\)$' \| \ | |
1338 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1339 | $as_echo X"$as_myself" | | |
b709b946 CR |
1340 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
1341 | s//\1/ | |
1342 | q | |
1343 | } | |
1344 | /^X\(\/\/\)[^/].*/{ | |
1345 | s//\1/ | |
1346 | q | |
1347 | } | |
1348 | /^X\(\/\/\)$/{ | |
1349 | s//\1/ | |
1350 | q | |
1351 | } | |
1352 | /^X\(\/\).*/{ | |
1353 | s//\1/ | |
1354 | q | |
1355 | } | |
1356 | s/.*/./; q'` | |
ccc6cda3 | 1357 | srcdir=$ac_confdir |
b709b946 | 1358 | if test ! -r "$srcdir/$ac_unique_file"; then |
ccc6cda3 JA |
1359 | srcdir=.. |
1360 | fi | |
1361 | else | |
1362 | ac_srcdir_defaulted=no | |
1363 | fi | |
b709b946 CR |
1364 | if test ! -r "$srcdir/$ac_unique_file"; then |
1365 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1b1fe467 | 1366 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
c184f645 | 1367 | fi |
b709b946 CR |
1368 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
1369 | ac_abs_confdir=`( | |
1b1fe467 | 1370 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
b709b946 CR |
1371 | pwd)` |
1372 | # When building in place, set srcdir=. | |
1373 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1374 | srcdir=. | |
1375 | fi | |
1376 | # Remove unnecessary trailing slashes from srcdir. | |
1377 | # Double slashes in file names in object file debugging info | |
1378 | # mess up M-x gdb in Emacs. | |
1379 | case $srcdir in | |
1380 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1381 | esac | |
1382 | for ac_var in $ac_precious_vars; do | |
1383 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1384 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1385 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1386 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1387 | done | |
ccc6cda3 | 1388 | |
f73dda09 JA |
1389 | # |
1390 | # Report the --help message. | |
1391 | # | |
1392 | if test "$ac_init_help" = "long"; then | |
1393 | # Omit some internal or obsolete options to make the list less imposing. | |
1394 | # This message is too long to be a string in the A/UX 3.1 sh. | |
a82a04b3 | 1395 | cat <<_ACEOF |
39feef01 | 1396 | \`configure' configures bash 4.3-rc1 to adapt to many kinds of systems. |
ccc6cda3 | 1397 | |
f73dda09 | 1398 | Usage: $0 [OPTION]... [VAR=VALUE]... |
ccc6cda3 | 1399 | |
f73dda09 JA |
1400 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
1401 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1402 | ||
1403 | Defaults for the options are specified in brackets. | |
ccc6cda3 | 1404 | |
f73dda09 JA |
1405 | Configuration: |
1406 | -h, --help display this help and exit | |
1407 | --help=short display options specific to this package | |
1408 | --help=recursive display the short help of all the included packages | |
1409 | -V, --version display version information and exit | |
1b1fe467 | 1410 | -q, --quiet, --silent do not print \`checking ...' messages |
f73dda09 JA |
1411 | --cache-file=FILE cache test results in FILE [disabled] |
1412 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1413 | -n, --no-create do not create output files | |
1414 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
ccc6cda3 | 1415 | |
f73dda09 JA |
1416 | Installation directories: |
1417 | --prefix=PREFIX install architecture-independent files in PREFIX | |
dd4f3dd8 | 1418 | [$ac_default_prefix] |
f73dda09 | 1419 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
dd4f3dd8 | 1420 | [PREFIX] |
ccc6cda3 | 1421 | |
f73dda09 JA |
1422 | By default, \`make install' will install all the files in |
1423 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1424 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1425 | for instance \`--prefix=\$HOME'. | |
ccc6cda3 | 1426 | |
f73dda09 | 1427 | For better control, use the options below. |
ccc6cda3 | 1428 | |
f73dda09 | 1429 | Fine tuning of the installation directories: |
dd4f3dd8 CR |
1430 | --bindir=DIR user executables [EPREFIX/bin] |
1431 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1432 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1433 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1434 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1435 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1436 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1437 | --includedir=DIR C header files [PREFIX/include] | |
1438 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1439 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1440 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1441 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1442 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1443 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1444 | --docdir=DIR documentation root [DATAROOTDIR/doc/bash] | |
1445 | --htmldir=DIR html documentation [DOCDIR] | |
1446 | --dvidir=DIR dvi documentation [DOCDIR] | |
1447 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1448 | --psdir=DIR ps documentation [DOCDIR] | |
a82a04b3 | 1449 | _ACEOF |
f73dda09 | 1450 | |
a82a04b3 | 1451 | cat <<\_ACEOF |
f73dda09 JA |
1452 | |
1453 | System types: | |
1454 | --build=BUILD configure for building on BUILD [guessed] | |
a82a04b3 CR |
1455 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
1456 | _ACEOF | |
ccc6cda3 | 1457 | fi |
ccc6cda3 | 1458 | |
f73dda09 JA |
1459 | if test -n "$ac_init_help"; then |
1460 | case $ac_init_help in | |
39feef01 | 1461 | short | recursive ) echo "Configuration of bash 4.3-rc1:";; |
f73dda09 | 1462 | esac |
a82a04b3 | 1463 | cat <<\_ACEOF |
ccc6cda3 | 1464 | |
f73dda09 | 1465 | Optional Features: |
dd4f3dd8 | 1466 | --disable-option-checking ignore unrecognized --enable/--with options |
f73dda09 JA |
1467 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1468 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
7117c2d2 JA |
1469 | --enable-minimal-config a minimal sh-like configuration |
1470 | --enable-alias enable shell aliases | |
1471 | --enable-arith-for-command | |
1472 | enable arithmetic for command | |
1473 | --enable-array-variables | |
1474 | include shell array variables | |
1475 | --enable-bang-history turn on csh-style history substitution | |
1476 | --enable-brace-expansion | |
1477 | include brace expansion | |
fdf670ea CR |
1478 | --enable-casemod-attributes |
1479 | include case-modifying variable attributes | |
1480 | --enable-casemod-expansions | |
1481 | include case-modifying word expansions | |
7117c2d2 JA |
1482 | --enable-command-timing enable the time reserved word and command timing |
1483 | --enable-cond-command enable the conditional command | |
35ee8ea0 | 1484 | --enable-cond-regexp enable extended regular expression matching in |
d3a24ed2 | 1485 | conditional commands |
09767ff0 CR |
1486 | --enable-coprocesses enable coprocess support and the coproc reserved |
1487 | word | |
d3a24ed2 | 1488 | --enable-debugger enable support for bash debugger |
f14388d3 CR |
1489 | --enable-direxpand-default |
1490 | enable the direxpand shell option by default | |
7117c2d2 JA |
1491 | --enable-directory-stack |
1492 | enable builtins pushd/popd/dirs | |
1493 | --enable-disabled-builtins | |
1494 | allow disabled builtins to still be invoked | |
1495 | --enable-dparen-arithmetic | |
1496 | include ((...)) command | |
1497 | --enable-extended-glob include ksh-style extended pattern matching | |
691aebcb CR |
1498 | --enable-extended-glob-default |
1499 | force extended pattern matching to be enabled by | |
1500 | default | |
c111d992 CR |
1501 | --enable-glob-asciiranges-default |
1502 | force bracket range expressions in pattern matching | |
1503 | to use the C locale by default | |
7117c2d2 JA |
1504 | --enable-help-builtin include the help builtin |
1505 | --enable-history turn on command history | |
1506 | --enable-job-control enable job control features | |
d3a24ed2 | 1507 | --enable-multibyte enable multibyte characters if OS supports them |
7117c2d2 JA |
1508 | --enable-net-redirections |
1509 | enable /dev/tcp/host/port redirection | |
1510 | --enable-process-substitution | |
1511 | enable process substitution | |
1512 | --enable-progcomp enable programmable completion and the complete | |
1513 | builtin | |
1514 | --enable-prompt-string-decoding | |
1515 | turn on escape character decoding in prompts | |
1516 | --enable-readline turn on command line editing | |
1517 | --enable-restricted enable a restricted shell | |
1518 | --enable-select include select command | |
1519 | --enable-separate-helpfiles | |
1520 | use external files for help builtin documentation | |
01ed5ba4 CR |
1521 | --enable-single-help-strings |
1522 | store help documentation as a single string to ease | |
1523 | translation | |
7790f917 CR |
1524 | --enable-strict-posix-default |
1525 | configure bash to be posix-conformant by default | |
7117c2d2 JA |
1526 | --enable-usg-echo-default |
1527 | a synonym for --enable-xpg-echo-default | |
1528 | --enable-xpg-echo-default | |
1529 | make the echo builtin expand escape sequences by | |
1530 | default | |
1531 | --enable-mem-scramble scramble memory on calls to malloc and free | |
1532 | --enable-profiling allow profiling with gprof | |
1533 | --enable-static-link link bash statically, for use as a root shell | |
f73dda09 | 1534 | --disable-largefile omit support for large files |
5e13499c CR |
1535 | --disable-nls do not use Native Language Support |
1536 | --disable-rpath do not hardcode runtime library paths | |
f73dda09 JA |
1537 | |
1538 | Optional Packages: | |
1539 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1540 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
7117c2d2 JA |
1541 | --with-afs if you are running AFS |
1542 | --with-bash-malloc use the Bash version of malloc | |
1543 | --with-curses use the curses library instead of the termcap | |
1544 | library | |
1545 | --with-gnu-malloc synonym for --with-bash-malloc | |
1546 | --with-installed-readline | |
1547 | use a version of the readline library that is | |
1548 | already installed | |
1549 | --with-purecov configure to postprocess with pure coverage | |
1550 | --with-purify configure to postprocess with purify | |
5e13499c CR |
1551 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1552 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
1553 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
1554 | --with-included-gettext use the GNU gettext library included here | |
1555 | --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib | |
1556 | --without-libintl-prefix don't search for libintl in includedir and libdir | |
f73dda09 JA |
1557 | |
1558 | Some influential environment variables: | |
d3a24ed2 CR |
1559 | DEBUGGER_START_FILE |
1560 | location of bash debugger initialization file | |
7610e0c5 CR |
1561 | CC_FOR_BUILD |
1562 | C compiler used when compiling binaries used only at build time | |
1563 | CFLAGS_FOR_BUILD | |
1564 | Compliation options (CFLAGS) used when compiling binaries used | |
1565 | only at build time | |
1566 | LDFLAGS_FOR_BUILD | |
1567 | Linker options (LDFLAGS) used when compiling binaries used only | |
1568 | at build time | |
1569 | CPPFLAGS_FOR_BUILD | |
1570 | C preprocessor options (CPPFLAGS) used when compiling binaries | |
1571 | used only at build time | |
f73dda09 JA |
1572 | CC C compiler command |
1573 | CFLAGS C compiler flags | |
1574 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1575 | nonstandard directory <lib dir> | |
dd4f3dd8 | 1576 | LIBS libraries to pass to the linker, e.g. -l<library> |
1b1fe467 | 1577 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
b709b946 | 1578 | you have headers in a nonstandard directory <include dir> |
f73dda09 | 1579 | CPP C preprocessor |
1b1fe467 CR |
1580 | YACC The `Yet Another Compiler Compiler' implementation to use. |
1581 | Defaults to the first program found out of: `bison -y', `byacc', | |
1582 | `yacc'. | |
b709b946 CR |
1583 | YFLAGS The list of arguments that will be passed by default to $YACC. |
1584 | This script will default YFLAGS to the empty string to avoid a | |
1585 | default value of `-d' given by some make applications. | |
f73dda09 JA |
1586 | |
1587 | Use these variables to override the choices made by `configure' or to help | |
1588 | it to find libraries and programs with nonstandard names/locations. | |
1589 | ||
1590 | Report bugs to <bug-bash@gnu.org>. | |
a82a04b3 | 1591 | _ACEOF |
b709b946 | 1592 | ac_status=$? |
f73dda09 JA |
1593 | fi |
1594 | ||
1595 | if test "$ac_init_help" = "recursive"; then | |
1596 | # If there are subdirs, report their specific --help. | |
a82a04b3 | 1597 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
dd4f3dd8 CR |
1598 | test -d "$ac_dir" || |
1599 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1600 | continue | |
a82a04b3 CR |
1601 | ac_builddir=. |
1602 | ||
b709b946 CR |
1603 | case "$ac_dir" in |
1604 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1605 | *) | |
dd4f3dd8 | 1606 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
b709b946 | 1607 | # A ".." for each directory in $ac_dir_suffix. |
dd4f3dd8 | 1608 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
b709b946 CR |
1609 | case $ac_top_builddir_sub in |
1610 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1611 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1612 | esac ;; | |
1613 | esac | |
1614 | ac_abs_top_builddir=$ac_pwd | |
1615 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1616 | # for backward compatibility: | |
1617 | ac_top_builddir=$ac_top_build_prefix | |
a82a04b3 CR |
1618 | |
1619 | case $srcdir in | |
b709b946 | 1620 | .) # We are building in place. |
a82a04b3 | 1621 | ac_srcdir=. |
b709b946 CR |
1622 | ac_top_srcdir=$ac_top_builddir_sub |
1623 | ac_abs_top_srcdir=$ac_pwd ;; | |
1624 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
a82a04b3 | 1625 | ac_srcdir=$srcdir$ac_dir_suffix; |
b709b946 CR |
1626 | ac_top_srcdir=$srcdir |
1627 | ac_abs_top_srcdir=$srcdir ;; | |
1628 | *) # Relative name. | |
1629 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1630 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1631 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
5e4a95c7 | 1632 | esac |
b709b946 CR |
1633 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1634 | ||
1635 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1636 | # Check for guested configure. | |
1637 | if test -f "$ac_srcdir/configure.gnu"; then | |
1638 | echo && | |
1639 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1640 | elif test -f "$ac_srcdir/configure"; then | |
1641 | echo && | |
1642 | $SHELL "$ac_srcdir/configure" --help=recursive | |
f73dda09 | 1643 | else |
dd4f3dd8 | 1644 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
b709b946 CR |
1645 | fi || ac_status=$? |
1646 | cd "$ac_pwd" || { ac_status=$?; break; } | |
f73dda09 JA |
1647 | done |
1648 | fi | |
ccc6cda3 | 1649 | |
b709b946 | 1650 | test -n "$ac_init_help" && exit $ac_status |
f73dda09 | 1651 | if $ac_init_version; then |
a82a04b3 | 1652 | cat <<\_ACEOF |
39feef01 | 1653 | bash configure 4.3-rc1 |
0ee50808 | 1654 | generated by GNU Autoconf 2.69 |
ccc6cda3 | 1655 | |
0ee50808 | 1656 | Copyright (C) 2012 Free Software Foundation, Inc. |
f73dda09 JA |
1657 | This configure script is free software; the Free Software Foundation |
1658 | gives unlimited permission to copy, distribute and modify it. | |
a82a04b3 | 1659 | _ACEOF |
b709b946 | 1660 | exit |
f73dda09 | 1661 | fi |
7175a77f | 1662 | |
1b1fe467 CR |
1663 | ## ------------------------ ## |
1664 | ## Autoconf initialization. ## | |
1665 | ## ------------------------ ## | |
ccc6cda3 | 1666 | |
1b1fe467 CR |
1667 | # ac_fn_c_try_compile LINENO |
1668 | # -------------------------- | |
1669 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1670 | ac_fn_c_try_compile () | |
1671 | { | |
1672 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1673 | rm -f conftest.$ac_objext | |
1674 | if { { ac_try="$ac_compile" | |
1675 | case "(($ac_try" in | |
1676 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1677 | *) ac_try_echo=$ac_try;; | |
1678 | esac | |
1679 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1680 | $as_echo "$ac_try_echo"; } >&5 | |
1681 | (eval "$ac_compile") 2>conftest.err | |
1682 | ac_status=$? | |
1683 | if test -s conftest.err; then | |
1684 | grep -v '^ *+' conftest.err >conftest.er1 | |
1685 | cat conftest.er1 >&5 | |
1686 | mv -f conftest.er1 conftest.err | |
1687 | fi | |
1688 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1689 | test $ac_status = 0; } && { | |
1690 | test -z "$ac_c_werror_flag" || | |
1691 | test ! -s conftest.err | |
1692 | } && test -s conftest.$ac_objext; then : | |
1693 | ac_retval=0 | |
1694 | else | |
1695 | $as_echo "$as_me: failed program was:" >&5 | |
1696 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2dead0c4 | 1697 | |
1b1fe467 CR |
1698 | ac_retval=1 |
1699 | fi | |
1700 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1701 | as_fn_set_status $ac_retval | |
1702 | ||
1703 | } # ac_fn_c_try_compile | |
1704 | ||
1705 | # ac_fn_c_try_link LINENO | |
1706 | # ----------------------- | |
1707 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1708 | ac_fn_c_try_link () | |
7f947b68 | 1709 | { |
1b1fe467 CR |
1710 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1711 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1712 | if { { ac_try="$ac_link" | |
1713 | case "(($ac_try" in | |
1714 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1715 | *) ac_try_echo=$ac_try;; | |
1716 | esac | |
1717 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1718 | $as_echo "$ac_try_echo"; } >&5 | |
1719 | (eval "$ac_link") 2>conftest.err | |
1720 | ac_status=$? | |
1721 | if test -s conftest.err; then | |
1722 | grep -v '^ *+' conftest.err >conftest.er1 | |
1723 | cat conftest.er1 >&5 | |
1724 | mv -f conftest.er1 conftest.err | |
1725 | fi | |
1726 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1727 | test $ac_status = 0; } && { | |
1728 | test -z "$ac_c_werror_flag" || | |
1729 | test ! -s conftest.err | |
1730 | } && test -s conftest$ac_exeext && { | |
1731 | test "$cross_compiling" = yes || | |
0ee50808 | 1732 | test -x conftest$ac_exeext |
1b1fe467 CR |
1733 | }; then : |
1734 | ac_retval=0 | |
1735 | else | |
1736 | $as_echo "$as_me: failed program was:" >&5 | |
1737 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2dead0c4 | 1738 | |
1b1fe467 CR |
1739 | ac_retval=1 |
1740 | fi | |
1741 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1742 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1743 | # interfere with the next link command; also delete a directory that is | |
1744 | # left behind by Apple's compiler. We do this before executing the actions. | |
1745 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1746 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1747 | as_fn_set_status $ac_retval | |
7f947b68 | 1748 | |
1b1fe467 | 1749 | } # ac_fn_c_try_link |
7f947b68 | 1750 | |
1b1fe467 CR |
1751 | # ac_fn_c_try_cpp LINENO |
1752 | # ---------------------- | |
1753 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1754 | ac_fn_c_try_cpp () | |
1755 | { | |
1756 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1757 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1758 | case "(($ac_try" in | |
1759 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1760 | *) ac_try_echo=$ac_try;; | |
1761 | esac | |
1762 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1763 | $as_echo "$ac_try_echo"; } >&5 | |
1764 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1765 | ac_status=$? | |
1766 | if test -s conftest.err; then | |
1767 | grep -v '^ *+' conftest.err >conftest.er1 | |
1768 | cat conftest.er1 >&5 | |
1769 | mv -f conftest.er1 conftest.err | |
1770 | fi | |
1771 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1772 | test $ac_status = 0; } > conftest.i && { | |
1773 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1774 | test ! -s conftest.err | |
1775 | }; then : | |
1776 | ac_retval=0 | |
1777 | else | |
1778 | $as_echo "$as_me: failed program was:" >&5 | |
1779 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a82a04b3 | 1780 | |
1b1fe467 CR |
1781 | ac_retval=1 |
1782 | fi | |
1783 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1784 | as_fn_set_status $ac_retval | |
a82a04b3 | 1785 | |
1b1fe467 | 1786 | } # ac_fn_c_try_cpp |
c920c360 | 1787 | |
1b1fe467 CR |
1788 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1789 | # ------------------------------------------------------- | |
1790 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1791 | # the include files in INCLUDES and setting the cache variable VAR | |
1792 | # accordingly. | |
1793 | ac_fn_c_check_header_mongrel () | |
1794 | { | |
1795 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1796 | if eval \${$3+:} false; then : | |
1797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1798 | $as_echo_n "checking for $2... " >&6; } | |
1799 | if eval \${$3+:} false; then : | |
1800 | $as_echo_n "(cached) " >&6 | |
1801 | fi | |
1802 | eval ac_res=\$$3 | |
1803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1804 | $as_echo "$ac_res" >&6; } | |
1805 | else | |
1806 | # Is the header compilable? | |
1807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1808 | $as_echo_n "checking $2 usability... " >&6; } | |
1809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1810 | /* end confdefs.h. */ | |
1811 | $4 | |
1812 | #include <$2> | |
7f947b68 | 1813 | _ACEOF |
1b1fe467 CR |
1814 | if ac_fn_c_try_compile "$LINENO"; then : |
1815 | ac_header_compiler=yes | |
1816 | else | |
1817 | ac_header_compiler=no | |
1818 | fi | |
1819 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1821 | $as_echo "$ac_header_compiler" >&6; } | |
a82a04b3 | 1822 | |
1b1fe467 CR |
1823 | # Is the header present? |
1824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1825 | $as_echo_n "checking $2 presence... " >&6; } | |
1826 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1827 | /* end confdefs.h. */ | |
1828 | #include <$2> | |
1829 | _ACEOF | |
1830 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1831 | ac_header_preproc=yes | |
1832 | else | |
1833 | ac_header_preproc=no | |
1834 | fi | |
1835 | rm -f conftest.err conftest.i conftest.$ac_ext | |
1836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1837 | $as_echo "$ac_header_preproc" >&6; } | |
b709b946 | 1838 | |
1b1fe467 CR |
1839 | # So? What about this header? |
1840 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1841 | yes:no: ) | |
1842 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1843 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1844 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1845 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1846 | ;; | |
1847 | no:yes:* ) | |
1848 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1849 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1850 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1851 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1852 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1853 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1854 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1855 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1856 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1857 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1858 | ( $as_echo "## ------------------------------- ## | |
1859 | ## Report this to bug-bash@gnu.org ## | |
1860 | ## ------------------------------- ##" | |
1861 | ) | sed "s/^/$as_me: WARNING: /" >&2 | |
1862 | ;; | |
1863 | esac | |
1864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1865 | $as_echo_n "checking for $2... " >&6; } | |
1866 | if eval \${$3+:} false; then : | |
1867 | $as_echo_n "(cached) " >&6 | |
1868 | else | |
1869 | eval "$3=\$ac_header_compiler" | |
1870 | fi | |
1871 | eval ac_res=\$$3 | |
1872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1873 | $as_echo "$ac_res" >&6; } | |
1874 | fi | |
1875 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
ccc6cda3 | 1876 | |
1b1fe467 | 1877 | } # ac_fn_c_check_header_mongrel |
ccc6cda3 | 1878 | |
1b1fe467 CR |
1879 | # ac_fn_c_try_run LINENO |
1880 | # ---------------------- | |
1881 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1882 | # that executables *can* be run. | |
1883 | ac_fn_c_try_run () | |
1884 | { | |
1885 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1886 | if { { ac_try="$ac_link" | |
1887 | case "(($ac_try" in | |
1888 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1889 | *) ac_try_echo=$ac_try;; | |
1890 | esac | |
1891 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1892 | $as_echo "$ac_try_echo"; } >&5 | |
1893 | (eval "$ac_link") 2>&5 | |
1894 | ac_status=$? | |
1895 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1896 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1897 | { { case "(($ac_try" in | |
1898 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1899 | *) ac_try_echo=$ac_try;; | |
1900 | esac | |
1901 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1902 | $as_echo "$ac_try_echo"; } >&5 | |
1903 | (eval "$ac_try") 2>&5 | |
1904 | ac_status=$? | |
1905 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1906 | test $ac_status = 0; }; }; then : | |
1907 | ac_retval=0 | |
1908 | else | |
1909 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1910 | $as_echo "$as_me: failed program was:" >&5 | |
1911 | sed 's/^/| /' conftest.$ac_ext >&5 | |
71412226 | 1912 | |
1b1fe467 CR |
1913 | ac_retval=$ac_status |
1914 | fi | |
1915 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1916 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1917 | as_fn_set_status $ac_retval | |
ccc6cda3 | 1918 | |
1b1fe467 | 1919 | } # ac_fn_c_try_run |
71412226 | 1920 | |
1b1fe467 CR |
1921 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1922 | # ------------------------------------------------------- | |
1923 | # Tests whether HEADER exists and can be compiled using the include files in | |
1924 | # INCLUDES, setting the cache variable VAR accordingly. | |
1925 | ac_fn_c_check_header_compile () | |
1926 | { | |
1927 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1929 | $as_echo_n "checking for $2... " >&6; } | |
1930 | if eval \${$3+:} false; then : | |
1931 | $as_echo_n "(cached) " >&6 | |
1932 | else | |
1933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1934 | /* end confdefs.h. */ | |
1935 | $4 | |
1936 | #include <$2> | |
7f947b68 | 1937 | _ACEOF |
1b1fe467 CR |
1938 | if ac_fn_c_try_compile "$LINENO"; then : |
1939 | eval "$3=yes" | |
1940 | else | |
1941 | eval "$3=no" | |
1942 | fi | |
1943 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1944 | fi | |
1945 | eval ac_res=\$$3 | |
1946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1947 | $as_echo "$ac_res" >&6; } | |
1948 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
71412226 | 1949 | |
1b1fe467 | 1950 | } # ac_fn_c_check_header_compile |
71412226 | 1951 | |
1b1fe467 CR |
1952 | # ac_fn_c_check_func LINENO FUNC VAR |
1953 | # ---------------------------------- | |
1954 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1955 | ac_fn_c_check_func () | |
1956 | { | |
1957 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1959 | $as_echo_n "checking for $2... " >&6; } | |
1960 | if eval \${$3+:} false; then : | |
1961 | $as_echo_n "(cached) " >&6 | |
1962 | else | |
1963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1964 | /* end confdefs.h. */ | |
1965 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1966 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1967 | #define $2 innocuous_$2 | |
71412226 | 1968 | |
1b1fe467 CR |
1969 | /* System header to define __stub macros and hopefully few prototypes, |
1970 | which can conflict with char $2 (); below. | |
1971 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1972 | <limits.h> exists even on freestanding compilers. */ | |
7610e0c5 | 1973 | |
1b1fe467 CR |
1974 | #ifdef __STDC__ |
1975 | # include <limits.h> | |
1976 | #else | |
1977 | # include <assert.h> | |
1978 | #endif | |
7610e0c5 | 1979 | |
1b1fe467 | 1980 | #undef $2 |
c920c360 | 1981 | |
1b1fe467 CR |
1982 | /* Override any GCC internal prototype to avoid an error. |
1983 | Use char because int might match the return type of a GCC | |
1984 | builtin and then its argument prototype would still apply. */ | |
1985 | #ifdef __cplusplus | |
1986 | extern "C" | |
1987 | #endif | |
1988 | char $2 (); | |
1989 | /* The GNU C library defines this for functions which it implements | |
1990 | to always fail with ENOSYS. Some functions are actually named | |
1991 | something starting with __ and the normal name is an alias. */ | |
1992 | #if defined __stub_$2 || defined __stub___$2 | |
1993 | choke me | |
1994 | #endif | |
1995 | ||
1996 | int | |
1997 | main () | |
1998 | { | |
1999 | return $2 (); | |
2000 | ; | |
2001 | return 0; | |
2002 | } | |
7f947b68 | 2003 | _ACEOF |
1b1fe467 CR |
2004 | if ac_fn_c_try_link "$LINENO"; then : |
2005 | eval "$3=yes" | |
2006 | else | |
2007 | eval "$3=no" | |
2008 | fi | |
2009 | rm -f core conftest.err conftest.$ac_objext \ | |
2010 | conftest$ac_exeext conftest.$ac_ext | |
2011 | fi | |
2012 | eval ac_res=\$$3 | |
2013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2014 | $as_echo "$ac_res" >&6; } | |
2015 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
7610e0c5 | 2016 | |
1b1fe467 | 2017 | } # ac_fn_c_check_func |
71412226 | 2018 | |
1b1fe467 CR |
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. | |
2023 | ac_fn_c_check_type () | |
2024 | { | |
2025 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2026 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2027 | $as_echo_n "checking for $2... " >&6; } | |
2028 | if eval \${$3+:} false; then : | |
2029 | $as_echo_n "(cached) " >&6 | |
7f947b68 | 2030 | else |
1b1fe467 CR |
2031 | eval "$3=no" |
2032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2033 | /* end confdefs.h. */ | |
2034 | $4 | |
2035 | int | |
2036 | main () | |
2037 | { | |
2038 | if (sizeof ($2)) | |
2039 | return 0; | |
2040 | ; | |
2041 | return 0; | |
2042 | } | |
2043 | _ACEOF | |
2044 | if ac_fn_c_try_compile "$LINENO"; then : | |
2045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2046 | /* end confdefs.h. */ | |
2047 | $4 | |
2048 | int | |
2049 | main () | |
2050 | { | |
2051 | if (sizeof (($2))) | |
2052 | return 0; | |
2053 | ; | |
2054 | return 0; | |
2055 | } | |
2056 | _ACEOF | |
2057 | if ac_fn_c_try_compile "$LINENO"; then : | |
c920c360 | 2058 | |
7f947b68 | 2059 | else |
1b1fe467 | 2060 | eval "$3=yes" |
7f947b68 | 2061 | fi |
1b1fe467 | 2062 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7175a77f | 2063 | fi |
1b1fe467 CR |
2064 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2065 | fi | |
2066 | eval ac_res=\$$3 | |
2067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2068 | $as_echo "$ac_res" >&6; } | |
2069 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
71412226 | 2070 | |
1b1fe467 | 2071 | } # ac_fn_c_check_type |
c920c360 | 2072 | |
1b1fe467 CR |
2073 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2074 | # --------------------------------------------- | |
2075 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2076 | # accordingly. | |
2077 | ac_fn_c_check_decl () | |
2078 | { | |
2079 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2080 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2081 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2082 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2083 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2084 | if eval \${$3+:} false; then : | |
2085 | $as_echo_n "(cached) " >&6 | |
2086 | else | |
2087 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2088 | /* end confdefs.h. */ | |
2089 | $4 | |
2090 | int | |
2091 | main () | |
2092 | { | |
2093 | #ifndef $as_decl_name | |
2094 | #ifdef __cplusplus | |
2095 | (void) $as_decl_use; | |
2096 | #else | |
2097 | (void) $as_decl_name; | |
2098 | #endif | |
2099 | #endif | |
c920c360 | 2100 | |
1b1fe467 CR |
2101 | ; |
2102 | return 0; | |
2103 | } | |
2104 | _ACEOF | |
2105 | if ac_fn_c_try_compile "$LINENO"; then : | |
2106 | eval "$3=yes" | |
2107 | else | |
2108 | eval "$3=no" | |
2109 | fi | |
2110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2111 | fi | |
2112 | eval ac_res=\$$3 | |
2113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2114 | $as_echo "$ac_res" >&6; } | |
2115 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
c920c360 | 2116 | |
1b1fe467 | 2117 | } # ac_fn_c_check_decl |
c920c360 | 2118 | |
1b1fe467 CR |
2119 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2120 | # -------------------------------------------- | |
2121 | # Tries to find the compile-time value of EXPR in a program that includes | |
2122 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2123 | # computed | |
2124 | ac_fn_c_compute_int () | |
2125 | { | |
2126 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2127 | if test "$cross_compiling" = yes; then | |
2128 | # Depending upon the size, compute the lo and hi bounds. | |
2129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2130 | /* end confdefs.h. */ | |
2131 | $4 | |
2132 | int | |
2133 | main () | |
2134 | { | |
2135 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
0ee50808 CR |
2136 | test_array [0] = 0; |
2137 | return test_array [0]; | |
c920c360 | 2138 | |
1b1fe467 CR |
2139 | ; |
2140 | return 0; | |
2141 | } | |
2142 | _ACEOF | |
2143 | if ac_fn_c_try_compile "$LINENO"; then : | |
2144 | ac_lo=0 ac_mid=0 | |
2145 | while :; do | |
2146 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2147 | /* end confdefs.h. */ | |
2148 | $4 | |
2149 | int | |
2150 | main () | |
2151 | { | |
2152 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
0ee50808 CR |
2153 | test_array [0] = 0; |
2154 | return test_array [0]; | |
c920c360 | 2155 | |
1b1fe467 CR |
2156 | ; |
2157 | return 0; | |
2158 | } | |
2159 | _ACEOF | |
2160 | if ac_fn_c_try_compile "$LINENO"; then : | |
2161 | ac_hi=$ac_mid; break | |
2162 | else | |
2163 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2164 | if test $ac_lo -le $ac_mid; then | |
2165 | ac_lo= ac_hi= | |
2166 | break | |
2167 | fi | |
2168 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
2169 | fi | |
2170 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2171 | done | |
2172 | else | |
2173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2174 | /* end confdefs.h. */ | |
2175 | $4 | |
2176 | int | |
2177 | main () | |
2178 | { | |
2179 | static int test_array [1 - 2 * !(($2) < 0)]; | |
0ee50808 CR |
2180 | test_array [0] = 0; |
2181 | return test_array [0]; | |
c920c360 | 2182 | |
1b1fe467 CR |
2183 | ; |
2184 | return 0; | |
2185 | } | |
2186 | _ACEOF | |
2187 | if ac_fn_c_try_compile "$LINENO"; then : | |
2188 | ac_hi=-1 ac_mid=-1 | |
2189 | while :; do | |
2190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2191 | /* end confdefs.h. */ | |
2192 | $4 | |
2193 | int | |
2194 | main () | |
2195 | { | |
2196 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
0ee50808 CR |
2197 | test_array [0] = 0; |
2198 | return test_array [0]; | |
c920c360 | 2199 | |
1b1fe467 CR |
2200 | ; |
2201 | return 0; | |
2202 | } | |
2203 | _ACEOF | |
2204 | if ac_fn_c_try_compile "$LINENO"; then : | |
2205 | ac_lo=$ac_mid; break | |
2206 | else | |
2207 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2208 | if test $ac_mid -le $ac_hi; then | |
2209 | ac_lo= ac_hi= | |
2210 | break | |
2211 | fi | |
2212 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2213 | fi | |
2214 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2215 | done | |
2216 | else | |
2217 | ac_lo= ac_hi= | |
2218 | fi | |
2219 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2220 | fi | |
2221 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2222 | # Binary search between lo and hi bounds. | |
2223 | while test "x$ac_lo" != "x$ac_hi"; do | |
2224 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2226 | /* end confdefs.h. */ | |
2227 | $4 | |
2228 | int | |
2229 | main () | |
2230 | { | |
2231 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
0ee50808 CR |
2232 | test_array [0] = 0; |
2233 | return test_array [0]; | |
c920c360 | 2234 | |
1b1fe467 CR |
2235 | ; |
2236 | return 0; | |
2237 | } | |
2238 | _ACEOF | |
2239 | if ac_fn_c_try_compile "$LINENO"; then : | |
2240 | ac_hi=$ac_mid | |
2241 | else | |
2242 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2243 | fi | |
2244 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2245 | done | |
2246 | case $ac_lo in #(( | |
2247 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2248 | '') ac_retval=1 ;; | |
2249 | esac | |
2250 | else | |
2251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2252 | /* end confdefs.h. */ | |
2253 | $4 | |
2254 | static long int longval () { return $2; } | |
2255 | static unsigned long int ulongval () { return $2; } | |
2256 | #include <stdio.h> | |
2257 | #include <stdlib.h> | |
2258 | int | |
2259 | main () | |
2260 | { | |
c920c360 | 2261 | |
1b1fe467 CR |
2262 | FILE *f = fopen ("conftest.val", "w"); |
2263 | if (! f) | |
2264 | return 1; | |
2265 | if (($2) < 0) | |
2266 | { | |
2267 | long int i = longval (); | |
2268 | if (i != ($2)) | |
2269 | return 1; | |
2270 | fprintf (f, "%ld", i); | |
2271 | } | |
2272 | else | |
2273 | { | |
2274 | unsigned long int i = ulongval (); | |
2275 | if (i != ($2)) | |
2276 | return 1; | |
2277 | fprintf (f, "%lu", i); | |
2278 | } | |
2279 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2280 | on some platforms. */ | |
2281 | return ferror (f) || fclose (f) != 0; | |
2dead0c4 | 2282 | |
1b1fe467 CR |
2283 | ; |
2284 | return 0; | |
2285 | } | |
2286 | _ACEOF | |
2287 | if ac_fn_c_try_run "$LINENO"; then : | |
2288 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2289 | else | |
2290 | ac_retval=1 | |
2291 | fi | |
2292 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2293 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2294 | rm -f conftest.val | |
c920c360 | 2295 | |
1b1fe467 CR |
2296 | fi |
2297 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
2298 | as_fn_set_status $ac_retval | |
c920c360 | 2299 | |
1b1fe467 | 2300 | } # ac_fn_c_compute_int |
2dead0c4 | 2301 | |
1b1fe467 CR |
2302 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2303 | # ---------------------------------------------------- | |
2304 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2305 | # INCLUDES, setting cache variable VAR accordingly. | |
2306 | ac_fn_c_check_member () | |
2307 | { | |
2308 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2310 | $as_echo_n "checking for $2.$3... " >&6; } | |
2311 | if eval \${$4+:} false; then : | |
7f947b68 CR |
2312 | $as_echo_n "(cached) " >&6 |
2313 | else | |
1b1fe467 CR |
2314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2315 | /* end confdefs.h. */ | |
2316 | $5 | |
2317 | int | |
2318 | main () | |
2319 | { | |
2320 | static $2 ac_aggr; | |
2321 | if (ac_aggr.$3) | |
2322 | return 0; | |
2323 | ; | |
2324 | return 0; | |
2325 | } | |
2326 | _ACEOF | |
2327 | if ac_fn_c_try_compile "$LINENO"; then : | |
2328 | eval "$4=yes" | |
7f947b68 | 2329 | else |
1b1fe467 CR |
2330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2331 | /* end confdefs.h. */ | |
2332 | $5 | |
2333 | int | |
2334 | main () | |
2335 | { | |
2336 | static $2 ac_aggr; | |
2337 | if (sizeof ac_aggr.$3) | |
2338 | return 0; | |
2339 | ; | |
2340 | return 0; | |
2341 | } | |
2342 | _ACEOF | |
2343 | if ac_fn_c_try_compile "$LINENO"; then : | |
2344 | eval "$4=yes" | |
7f947b68 | 2345 | else |
1b1fe467 | 2346 | eval "$4=no" |
2dead0c4 | 2347 | fi |
1b1fe467 | 2348 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2dead0c4 | 2349 | fi |
1b1fe467 | 2350 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7175a77f | 2351 | fi |
1b1fe467 CR |
2352 | eval ac_res=\$$4 |
2353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2354 | $as_echo "$ac_res" >&6; } | |
2355 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
200aed9a | 2356 | |
1b1fe467 CR |
2357 | } # ac_fn_c_check_member |
2358 | cat >config.log <<_ACEOF | |
2359 | This file contains any messages produced by compilers while | |
2360 | running configure, to aid debugging if configure makes a mistake. | |
2dead0c4 | 2361 | |
39feef01 | 2362 | It was created by bash $as_me 4.3-rc1, which was |
0ee50808 | 2363 | generated by GNU Autoconf 2.69. Invocation command line was |
2dead0c4 | 2364 | |
1b1fe467 | 2365 | $ $0 $@ |
2dead0c4 | 2366 | |
1b1fe467 CR |
2367 | _ACEOF |
2368 | exec 5>>config.log | |
2369 | { | |
2370 | cat <<_ASUNAME | |
2371 | ## --------- ## | |
2372 | ## Platform. ## | |
2373 | ## --------- ## | |
2dead0c4 | 2374 | |
1b1fe467 CR |
2375 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2376 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2377 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2378 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2379 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
2dead0c4 | 2380 | |
1b1fe467 CR |
2381 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2382 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
2dead0c4 | 2383 | |
1b1fe467 CR |
2384 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2385 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2386 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2387 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2388 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2389 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2390 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
2dead0c4 | 2391 | |
1b1fe467 | 2392 | _ASUNAME |
2dead0c4 | 2393 | |
1b1fe467 CR |
2394 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2395 | for as_dir in $PATH | |
2396 | do | |
2397 | IFS=$as_save_IFS | |
2398 | test -z "$as_dir" && as_dir=. | |
2399 | $as_echo "PATH: $as_dir" | |
2400 | done | |
2401 | IFS=$as_save_IFS | |
2dead0c4 | 2402 | |
1b1fe467 | 2403 | } >&5 |
2dead0c4 | 2404 | |
1b1fe467 | 2405 | cat >&5 <<_ACEOF |
2dead0c4 CR |
2406 | |
2407 | ||
1b1fe467 CR |
2408 | ## ----------- ## |
2409 | ## Core tests. ## | |
2410 | ## ----------- ## | |
2dead0c4 | 2411 | |
1b1fe467 | 2412 | _ACEOF |
2dead0c4 CR |
2413 | |
2414 | ||
1b1fe467 CR |
2415 | # Keep a trace of the command line. |
2416 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2417 | # Strip out --silent because we don't want to record it for future runs. | |
2418 | # Also quote any args containing shell meta-characters. | |
2419 | # Make two passes to allow for proper duplicate-argument suppression. | |
2420 | ac_configure_args= | |
2421 | ac_configure_args0= | |
2422 | ac_configure_args1= | |
2423 | ac_must_keep_next=false | |
2424 | for ac_pass in 1 2 | |
2425 | do | |
2426 | for ac_arg | |
2427 | do | |
2428 | case $ac_arg in | |
2429 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2430 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2431 | | -silent | --silent | --silen | --sile | --sil) | |
2432 | continue ;; | |
2433 | *\'*) | |
2434 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2435 | esac | |
2436 | case $ac_pass in | |
2437 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2438 | 2) | |
2439 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2440 | if test $ac_must_keep_next = true; then | |
2441 | ac_must_keep_next=false # Got value, back to normal. | |
2442 | else | |
2443 | case $ac_arg in | |
2444 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2445 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2446 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2447 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2448 | case "$ac_configure_args0 " in | |
2449 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2450 | esac | |
2451 | ;; | |
2452 | -* ) ac_must_keep_next=true ;; | |
2453 | esac | |
2454 | fi | |
2455 | as_fn_append ac_configure_args " '$ac_arg'" | |
2456 | ;; | |
2457 | esac | |
2458 | done | |
2459 | done | |
2460 | { ac_configure_args0=; unset ac_configure_args0;} | |
2461 | { ac_configure_args1=; unset ac_configure_args1;} | |
2dead0c4 | 2462 | |
1b1fe467 CR |
2463 | # When interrupted or exit'd, cleanup temporary files, and complete |
2464 | # config.log. We remove comments because anyway the quotes in there | |
2465 | # would cause problems or look ugly. | |
2466 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2467 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2468 | trap 'exit_status=$? | |
2469 | # Save into config.log some information that might help in debugging. | |
2470 | { | |
2471 | echo | |
2dead0c4 | 2472 | |
1b1fe467 CR |
2473 | $as_echo "## ---------------- ## |
2474 | ## Cache variables. ## | |
2475 | ## ---------------- ##" | |
2476 | echo | |
2477 | # The following way of writing the cache mishandles newlines in values, | |
2478 | ( | |
2479 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2480 | eval ac_val=\$$ac_var | |
2481 | case $ac_val in #( | |
2482 | *${as_nl}*) | |
2483 | case $ac_var in #( | |
2484 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2485 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2486 | esac | |
2487 | case $ac_var in #( | |
2488 | _ | IFS | as_nl) ;; #( | |
2489 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2490 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2491 | esac ;; | |
2492 | esac | |
2493 | done | |
2494 | (set) 2>&1 | | |
2495 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2496 | *${as_nl}ac_space=\ *) | |
2497 | sed -n \ | |
2498 | "s/'\''/'\''\\\\'\'''\''/g; | |
2499 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2500 | ;; #( | |
2501 | *) | |
2502 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2503 | ;; | |
2504 | esac | | |
2505 | sort | |
2506 | ) | |
2507 | echo | |
2508 | ||
2509 | $as_echo "## ----------------- ## | |
2510 | ## Output variables. ## | |
2511 | ## ----------------- ##" | |
2512 | echo | |
2513 | for ac_var in $ac_subst_vars | |
2514 | do | |
2515 | eval ac_val=\$$ac_var | |
2516 | case $ac_val in | |
2517 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2518 | esac | |
2519 | $as_echo "$ac_var='\''$ac_val'\''" | |
2520 | done | sort | |
2521 | echo | |
2dead0c4 | 2522 | |
1b1fe467 CR |
2523 | if test -n "$ac_subst_files"; then |
2524 | $as_echo "## ------------------- ## | |
2525 | ## File substitutions. ## | |
2526 | ## ------------------- ##" | |
2527 | echo | |
2528 | for ac_var in $ac_subst_files | |
2529 | do | |
2530 | eval ac_val=\$$ac_var | |
2531 | case $ac_val in | |
2532 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2533 | esac | |
2534 | $as_echo "$ac_var='\''$ac_val'\''" | |
2535 | done | sort | |
2536 | echo | |
2537 | fi | |
7f947b68 | 2538 | |
1b1fe467 CR |
2539 | if test -s confdefs.h; then |
2540 | $as_echo "## ----------- ## | |
2541 | ## confdefs.h. ## | |
2542 | ## ----------- ##" | |
2543 | echo | |
2544 | cat confdefs.h | |
2545 | echo | |
2546 | fi | |
2547 | test "$ac_signal" != 0 && | |
2548 | $as_echo "$as_me: caught signal $ac_signal" | |
2549 | $as_echo "$as_me: exit $exit_status" | |
2550 | } >&5 | |
2551 | rm -f core *.core core.conftest.* && | |
2552 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2553 | exit $exit_status | |
2554 | ' 0 | |
2555 | for ac_signal in 1 2 13 15; do | |
2556 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2557 | done | |
2558 | ac_signal=0 | |
2dead0c4 | 2559 | |
1b1fe467 CR |
2560 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
2561 | rm -f -r conftest* confdefs.h | |
7f947b68 | 2562 | |
1b1fe467 | 2563 | $as_echo "/* confdefs.h */" > confdefs.h |
7f947b68 | 2564 | |
1b1fe467 | 2565 | # Predefined preprocessor variables. |
7f947b68 | 2566 | |
1b1fe467 CR |
2567 | cat >>confdefs.h <<_ACEOF |
2568 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
7175a77f | 2569 | _ACEOF |
7f947b68 | 2570 | |
1b1fe467 CR |
2571 | cat >>confdefs.h <<_ACEOF |
2572 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2573 | _ACEOF | |
2dead0c4 | 2574 | |
1b1fe467 CR |
2575 | cat >>confdefs.h <<_ACEOF |
2576 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
7175a77f | 2577 | _ACEOF |
7f947b68 | 2578 | |
1b1fe467 CR |
2579 | cat >>confdefs.h <<_ACEOF |
2580 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2581 | _ACEOF | |
2dead0c4 | 2582 | |
1b1fe467 CR |
2583 | cat >>confdefs.h <<_ACEOF |
2584 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2585 | _ACEOF | |
7f947b68 | 2586 | |
1b1fe467 CR |
2587 | cat >>confdefs.h <<_ACEOF |
2588 | #define PACKAGE_URL "$PACKAGE_URL" | |
7175a77f | 2589 | _ACEOF |
2dead0c4 | 2590 | |
1b1fe467 CR |
2591 | |
2592 | # Let the site file select an alternate cache file if it wants to. | |
2593 | # Prefer an explicitly selected file to automatically selected ones. | |
2594 | ac_site_file1=NONE | |
2595 | ac_site_file2=NONE | |
2596 | if test -n "$CONFIG_SITE"; then | |
2597 | # We do not want a PATH search for config.site. | |
2598 | case $CONFIG_SITE in #(( | |
2599 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2600 | */*) ac_site_file1=$CONFIG_SITE;; | |
2601 | *) ac_site_file1=./$CONFIG_SITE;; | |
2602 | esac | |
2603 | elif test "x$prefix" != xNONE; then | |
2604 | ac_site_file1=$prefix/share/config.site | |
2605 | ac_site_file2=$prefix/etc/config.site | |
2606 | else | |
2607 | ac_site_file1=$ac_default_prefix/share/config.site | |
2608 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2dead0c4 | 2609 | fi |
1b1fe467 CR |
2610 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
2611 | do | |
2612 | test "x$ac_site_file" = xNONE && continue | |
2613 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then | |
2614 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2615 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2616 | sed 's/^/| /' "$ac_site_file" >&5 | |
2617 | . "$ac_site_file" \ | |
2618 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2619 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2620 | as_fn_error $? "failed to load site script $ac_site_file | |
2621 | See \`config.log' for more details" "$LINENO" 5; } | |
2622 | fi | |
2623 | done | |
2dead0c4 | 2624 | |
1b1fe467 CR |
2625 | if test -r "$cache_file"; then |
2626 | # Some versions of bash will fail to source /dev/null (special files | |
2627 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2628 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
2629 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2630 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2631 | case $cache_file in | |
2632 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2633 | *) . "./$cache_file";; | |
2634 | esac | |
2635 | fi | |
2636 | else | |
2637 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2638 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2639 | >$cache_file | |
2dead0c4 | 2640 | fi |
2dead0c4 | 2641 | |
1b1fe467 CR |
2642 | as_fn_append ac_header_list " stdlib.h" |
2643 | as_fn_append ac_header_list " unistd.h" | |
2644 | as_fn_append ac_header_list " sys/param.h" | |
2645 | as_fn_append ac_header_list " sys/time.h" | |
2646 | as_fn_append ac_func_list " alarm" | |
2647 | as_fn_append ac_func_list " fpurge" | |
2648 | as_fn_append ac_func_list " __fpurge" | |
2649 | as_fn_append ac_func_list " snprintf" | |
2650 | as_fn_append ac_func_list " vsnprintf" | |
2651 | # Check that the precious variables saved in the cache have kept the same | |
2652 | # value. | |
2653 | ac_cache_corrupted=false | |
2654 | for ac_var in $ac_precious_vars; do | |
2655 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2656 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2657 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2658 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2659 | case $ac_old_set,$ac_new_set in | |
2660 | set,) | |
2661 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2662 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2663 | ac_cache_corrupted=: ;; | |
2664 | ,set) | |
2665 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2666 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2667 | ac_cache_corrupted=: ;; | |
2668 | ,);; | |
2669 | *) | |
2670 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2671 | # differences in whitespace do not lead to failure. | |
2672 | ac_old_val_w=`echo x $ac_old_val` | |
2673 | ac_new_val_w=`echo x $ac_new_val` | |
2674 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2675 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2676 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2677 | ac_cache_corrupted=: | |
2678 | else | |
2679 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2680 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2681 | eval $ac_var=\$ac_old_val | |
2682 | fi | |
2683 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2684 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2685 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2686 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2687 | fi;; | |
2688 | esac | |
2689 | # Pass precious variables to config.status. | |
2690 | if test "$ac_new_set" = set; then | |
2691 | case $ac_new_val in | |
2692 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2693 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2694 | esac | |
2695 | case " $ac_configure_args " in | |
2696 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2697 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2698 | esac | |
2699 | fi | |
2700 | done | |
2701 | if $ac_cache_corrupted; then | |
2702 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2703 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2704 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2705 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2706 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2dead0c4 | 2707 | fi |
1b1fe467 CR |
2708 | ## -------------------- ## |
2709 | ## Main body of script. ## | |
2710 | ## -------------------- ## | |
2dead0c4 | 2711 | |
1b1fe467 CR |
2712 | ac_ext=c |
2713 | ac_cpp='$CPP $CPPFLAGS' | |
2714 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2715 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2716 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2717 | ||
2718 | ||
2719 | ||
2720 | ||
2721 | ||
2722 | ||
2723 | ac_aux_dir= | |
2724 | for ac_dir in ./support "$srcdir"/./support; do | |
2725 | if test -f "$ac_dir/install-sh"; then | |
2726 | ac_aux_dir=$ac_dir | |
2727 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2728 | break | |
2729 | elif test -f "$ac_dir/install.sh"; then | |
2730 | ac_aux_dir=$ac_dir | |
2731 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2732 | break | |
2733 | elif test -f "$ac_dir/shtool"; then | |
2734 | ac_aux_dir=$ac_dir | |
2735 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2736 | break | |
2737 | fi | |
2738 | done | |
2739 | if test -z "$ac_aux_dir"; then | |
2740 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in ./support \"$srcdir\"/./support" "$LINENO" 5 | |
2741 | fi | |
2742 | ||
2743 | # These three variables are undocumented and unsupported, | |
2744 | # and are intended to be withdrawn in a future Autoconf release. | |
2745 | # They can cause serious problems if a builder's source tree is in a directory | |
2746 | # whose full name contains unusual characters. | |
2747 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2748 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2749 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
2750 | ||
2751 | ||
2752 | ac_config_headers="$ac_config_headers config.h" | |
2753 | ||
2754 | ||
2755 | BASHVERS=4.3 | |
39feef01 | 2756 | RELSTATUS=rc1 |
1b1fe467 CR |
2757 | |
2758 | case "$RELSTATUS" in | |
2759 | alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;; | |
2760 | *) DEBUG= MALLOC_DEBUG= ;; | |
2761 | esac | |
2762 | ||
2763 | # Make sure we can run config.sub. | |
2764 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
2765 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
2766 | ||
2767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
2768 | $as_echo_n "checking build system type... " >&6; } | |
2769 | if ${ac_cv_build+:} false; then : | |
2770 | $as_echo_n "(cached) " >&6 | |
2771 | else | |
2772 | ac_build_alias=$build_alias | |
2773 | test "x$ac_build_alias" = x && | |
2774 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
2775 | test "x$ac_build_alias" = x && | |
2776 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
2777 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
2778 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
2779 | ||
2780 | fi | |
2781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
2782 | $as_echo "$ac_cv_build" >&6; } | |
2783 | case $ac_cv_build in | |
2784 | *-*-*) ;; | |
2785 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
2786 | esac | |
2787 | build=$ac_cv_build | |
2788 | ac_save_IFS=$IFS; IFS='-' | |
2789 | set x $ac_cv_build | |
2790 | shift | |
2791 | build_cpu=$1 | |
2792 | build_vendor=$2 | |
2793 | shift; shift | |
2794 | # Remember, the first character of IFS is used to create $*, | |
2795 | # except with old shells: | |
2796 | build_os=$* | |
2797 | IFS=$ac_save_IFS | |
2798 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
2799 | ||
2800 | ||
2801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
2802 | $as_echo_n "checking host system type... " >&6; } | |
2803 | if ${ac_cv_host+:} false; then : | |
2804 | $as_echo_n "(cached) " >&6 | |
2805 | else | |
2806 | if test "x$host_alias" = x; then | |
2807 | ac_cv_host=$ac_cv_build | |
2808 | else | |
2809 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
2810 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
2811 | fi | |
2812 | ||
2813 | fi | |
2814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
2815 | $as_echo "$ac_cv_host" >&6; } | |
2816 | case $ac_cv_host in | |
2817 | *-*-*) ;; | |
2818 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
2819 | esac | |
2820 | host=$ac_cv_host | |
2821 | ac_save_IFS=$IFS; IFS='-' | |
2822 | set x $ac_cv_host | |
2823 | shift | |
2824 | host_cpu=$1 | |
2825 | host_vendor=$2 | |
2826 | shift; shift | |
2827 | # Remember, the first character of IFS is used to create $*, | |
2828 | # except with old shells: | |
2829 | host_os=$* | |
2830 | IFS=$ac_save_IFS | |
2831 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
2832 | ||
2833 | ||
2834 | ||
2835 | ||
2836 | opt_bash_malloc=yes | |
2837 | opt_purify=no | |
2838 | opt_purecov=no | |
2839 | opt_afs=no | |
2840 | opt_curses=no | |
2841 | opt_with_installed_readline=no | |
2842 | ||
2843 | #htmldir= | |
2844 | ||
2845 | case "${host_cpu}-${host_os}" in | |
2846 | alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux | |
2847 | *[Cc]ray*-*) opt_bash_malloc=no ;; # Crays | |
2848 | *-osf1*) opt_bash_malloc=no ;; # other osf/1 machines | |
2849 | sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 | |
2850 | sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment | |
2851 | mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment | |
2852 | m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir | |
2853 | sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF | |
2854 | #*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here | |
2855 | #*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree | |
2856 | *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment | |
2857 | *-mirbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment | |
2858 | *-aix*) opt_bash_malloc=no ;; # AIX machines | |
2859 | *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep | |
10e78433 | 2860 | *-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep |
1b1fe467 CR |
2861 | *-macos*) opt_bash_malloc=no ;; # Apple MacOS X |
2862 | *-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X) | |
2863 | *-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X) | |
2864 | *-dgux*) opt_bash_malloc=no ;; # DG/UX machines | |
2865 | *-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX 6.x | |
2866 | *-machten4) opt_bash_malloc=no ;; # MachTen 4.x | |
2867 | *-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins | |
2868 | *-beos*) opt_bash_malloc=no ;; # they say it's suitable | |
2869 | *-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment | |
2870 | *-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft | |
2871 | *-nsk*) opt_bash_malloc=no ;; # HP NonStop | |
2872 | esac | |
2873 | ||
2874 | # memory scrambling on free() | |
2875 | case "${host_os}" in | |
2876 | sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; | |
2877 | *) opt_memscramble=yes ;; | |
2878 | esac | |
2879 | ||
2880 | ||
2881 | ||
2882 | ||
2883 | # Check whether --with-afs was given. | |
2884 | if test "${with_afs+set}" = set; then : | |
2885 | withval=$with_afs; opt_afs=$withval | |
2886 | fi | |
2887 | ||
2888 | ||
2889 | # Check whether --with-bash-malloc was given. | |
2890 | if test "${with_bash_malloc+set}" = set; then : | |
2891 | withval=$with_bash_malloc; opt_bash_malloc=$withval | |
2892 | fi | |
2893 | ||
2894 | ||
2895 | # Check whether --with-curses was given. | |
2896 | if test "${with_curses+set}" = set; then : | |
2897 | withval=$with_curses; opt_curses=$withval | |
2898 | fi | |
2899 | ||
2900 | ||
2901 | # Check whether --with-gnu-malloc was given. | |
2902 | if test "${with_gnu_malloc+set}" = set; then : | |
2903 | withval=$with_gnu_malloc; opt_bash_malloc=$withval | |
2904 | fi | |
2905 | ||
2906 | ||
2907 | # Check whether --with-installed-readline was given. | |
2908 | if test "${with_installed_readline+set}" = set; then : | |
2909 | withval=$with_installed_readline; opt_with_installed_readline=$withval | |
2910 | fi | |
2911 | ||
2912 | ||
2913 | # Check whether --with-purecov was given. | |
2914 | if test "${with_purecov+set}" = set; then : | |
2915 | withval=$with_purecov; opt_purecov=$withval | |
2916 | fi | |
2917 | ||
2918 | ||
2919 | # Check whether --with-purify was given. | |
2920 | if test "${with_purify+set}" = set; then : | |
2921 | withval=$with_purify; opt_purify=$withval | |
2922 | fi | |
2923 | ||
2924 | ||
2925 | if test "$opt_bash_malloc" = yes; then | |
2926 | MALLOC_TARGET=malloc | |
2927 | MALLOC_SRC=malloc.c | |
2928 | ||
2929 | MALLOC_LIB='-lmalloc' | |
2930 | MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' | |
2931 | MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' | |
2932 | MALLOC_DEP='$(MALLOC_LIBRARY)' | |
2933 | ||
2934 | $as_echo "#define USING_BASH_MALLOC 1" >>confdefs.h | |
2935 | ||
2936 | else | |
2937 | MALLOC_LIB= | |
2938 | MALLOC_LIBRARY= | |
2939 | MALLOC_LDFLAGS= | |
2940 | MALLOC_DEP= | |
2941 | fi | |
2942 | ||
2943 | if test "$opt_purify" = yes; then | |
2944 | PURIFY="purify " | |
2945 | $as_echo "#define DISABLE_MALLOC_WRAPPERS 1" >>confdefs.h | |
2946 | ||
2947 | else | |
2948 | PURIFY= | |
2949 | fi | |
2950 | ||
2951 | if test "$opt_purecov" = yes; then | |
2952 | PURIFY="${PURIFY}purecov" | |
2953 | fi | |
2954 | ||
2955 | if test "$opt_afs" = yes; then | |
2956 | $as_echo "#define AFS 1" >>confdefs.h | |
2957 | ||
2958 | fi | |
2959 | ||
2960 | if test "$opt_curses" = yes; then | |
2961 | prefer_curses=yes | |
2962 | fi | |
2963 | ||
2964 | if test -z "${DEBUGGER_START_FILE}"; then | |
2965 | DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc' | |
2966 | fi | |
2967 | ||
2968 | opt_minimal_config=no | |
7f947b68 CR |
2969 | |
2970 | opt_job_control=yes | |
2971 | opt_alias=yes | |
2972 | opt_readline=yes | |
2973 | opt_history=yes | |
2974 | opt_bang_history=yes | |
2975 | opt_dirstack=yes | |
2976 | opt_restricted=yes | |
2977 | opt_process_subst=yes | |
2978 | opt_prompt_decoding=yes | |
2979 | opt_select=yes | |
2980 | opt_help=yes | |
2981 | opt_array_variables=yes | |
2982 | opt_dparen_arith=yes | |
2983 | opt_extended_glob=yes | |
2984 | opt_brace_expansion=yes | |
2985 | opt_disabled_builtins=no | |
2986 | opt_command_timing=yes | |
2987 | opt_xpg_echo=no | |
2988 | opt_strict_posix=no | |
2989 | opt_cond_command=yes | |
2990 | opt_cond_regexp=yes | |
2991 | opt_coproc=yes | |
2992 | opt_arith_for_command=yes | |
2993 | opt_net_redirs=yes | |
2994 | opt_progcomp=yes | |
2995 | opt_separate_help=no | |
2996 | opt_multibyte=yes | |
2997 | opt_debugger=yes | |
2998 | opt_single_longdoc_strings=yes | |
2999 | opt_casemod_attrs=yes | |
3000 | opt_casemod_expansions=yes | |
3001 | opt_extglob_default=no | |
f14388d3 | 3002 | opt_dircomplete_expand_default=no |
c111d992 | 3003 | opt_globascii_default=no |
7f947b68 CR |
3004 | |
3005 | opt_static_link=no | |
3006 | opt_profiling=no | |
3007 | ||
3008 | # Check whether --enable-minimal-config was given. | |
1b1fe467 | 3009 | if test "${enable_minimal_config+set}" = set; then : |
7f947b68 | 3010 | enableval=$enable_minimal_config; opt_minimal_config=$enableval |
2dead0c4 | 3011 | fi |
2dead0c4 | 3012 | |
7f947b68 CR |
3013 | |
3014 | if test $opt_minimal_config = yes; then | |
3015 | opt_job_control=no opt_alias=no opt_readline=no | |
3016 | opt_history=no opt_bang_history=no opt_dirstack=no | |
3017 | opt_restricted=no opt_process_subst=no opt_prompt_decoding=no | |
3018 | opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no | |
3019 | opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no | |
3020 | opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no | |
3021 | opt_net_redirs=no opt_progcomp=no opt_separate_help=no | |
3022 | opt_multibyte=yes opt_cond_regexp=no opt_coproc=no | |
3023 | opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no | |
c111d992 | 3024 | opt_globascii_default=no |
2dead0c4 | 3025 | fi |
2dead0c4 | 3026 | |
7f947b68 | 3027 | # Check whether --enable-alias was given. |
1b1fe467 | 3028 | if test "${enable_alias+set}" = set; then : |
7f947b68 | 3029 | enableval=$enable_alias; opt_alias=$enableval |
2dead0c4 | 3030 | fi |
2dead0c4 | 3031 | |
7f947b68 | 3032 | # Check whether --enable-arith-for-command was given. |
1b1fe467 | 3033 | if test "${enable_arith_for_command+set}" = set; then : |
7f947b68 | 3034 | enableval=$enable_arith_for_command; opt_arith_for_command=$enableval |
2dead0c4 | 3035 | fi |
2dead0c4 | 3036 | |
7f947b68 | 3037 | # Check whether --enable-array-variables was given. |
1b1fe467 | 3038 | if test "${enable_array_variables+set}" = set; then : |
7f947b68 | 3039 | enableval=$enable_array_variables; opt_array_variables=$enableval |
2dead0c4 | 3040 | fi |
2dead0c4 | 3041 | |
7f947b68 | 3042 | # Check whether --enable-bang-history was given. |
1b1fe467 | 3043 | if test "${enable_bang_history+set}" = set; then : |
7f947b68 CR |
3044 | enableval=$enable_bang_history; opt_bang_history=$enableval |
3045 | fi | |
2dead0c4 | 3046 | |
7f947b68 | 3047 | # Check whether --enable-brace-expansion was given. |
1b1fe467 | 3048 | if test "${enable_brace_expansion+set}" = set; then : |
7f947b68 | 3049 | enableval=$enable_brace_expansion; opt_brace_expansion=$enableval |
2dead0c4 | 3050 | fi |
2dead0c4 | 3051 | |
7f947b68 | 3052 | # Check whether --enable-casemod-attributes was given. |
1b1fe467 | 3053 | if test "${enable_casemod_attributes+set}" = set; then : |
7f947b68 | 3054 | enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval |
2dead0c4 | 3055 | fi |
2dead0c4 | 3056 | |
7f947b68 | 3057 | # Check whether --enable-casemod-expansions was given. |
1b1fe467 | 3058 | if test "${enable_casemod_expansions+set}" = set; then : |
7f947b68 | 3059 | enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval |
2dead0c4 | 3060 | fi |
2dead0c4 | 3061 | |
7f947b68 | 3062 | # Check whether --enable-command-timing was given. |
1b1fe467 | 3063 | if test "${enable_command_timing+set}" = set; then : |
7f947b68 | 3064 | enableval=$enable_command_timing; opt_command_timing=$enableval |
2dead0c4 | 3065 | fi |
2dead0c4 | 3066 | |
7f947b68 | 3067 | # Check whether --enable-cond-command was given. |
1b1fe467 | 3068 | if test "${enable_cond_command+set}" = set; then : |
7f947b68 | 3069 | enableval=$enable_cond_command; opt_cond_command=$enableval |
2dead0c4 | 3070 | fi |
2dead0c4 | 3071 | |
7f947b68 | 3072 | # Check whether --enable-cond-regexp was given. |
1b1fe467 | 3073 | if test "${enable_cond_regexp+set}" = set; then : |
7f947b68 | 3074 | enableval=$enable_cond_regexp; opt_cond_regexp=$enableval |
2dead0c4 | 3075 | fi |
2dead0c4 | 3076 | |
7f947b68 | 3077 | # Check whether --enable-coprocesses was given. |
1b1fe467 | 3078 | if test "${enable_coprocesses+set}" = set; then : |
7f947b68 | 3079 | enableval=$enable_coprocesses; opt_coproc=$enableval |
2dead0c4 | 3080 | fi |
2dead0c4 | 3081 | |
7f947b68 | 3082 | # Check whether --enable-debugger was given. |
1b1fe467 | 3083 | if test "${enable_debugger+set}" = set; then : |
7f947b68 | 3084 | enableval=$enable_debugger; opt_debugger=$enableval |
2dead0c4 | 3085 | fi |
2dead0c4 | 3086 | |
f14388d3 | 3087 | # Check whether --enable-direxpand-default was given. |
1b1fe467 | 3088 | if test "${enable_direxpand_default+set}" = set; then : |
f14388d3 CR |
3089 | enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval |
3090 | fi | |
3091 | ||
7f947b68 | 3092 | # Check whether --enable-directory-stack was given. |
1b1fe467 | 3093 | if test "${enable_directory_stack+set}" = set; then : |
7f947b68 | 3094 | enableval=$enable_directory_stack; opt_dirstack=$enableval |
2dead0c4 | 3095 | fi |
2dead0c4 | 3096 | |
7f947b68 | 3097 | # Check whether --enable-disabled-builtins was given. |
1b1fe467 | 3098 | if test "${enable_disabled_builtins+set}" = set; then : |
7f947b68 | 3099 | enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval |
2dead0c4 | 3100 | fi |
2dead0c4 | 3101 | |
7f947b68 | 3102 | # Check whether --enable-dparen-arithmetic was given. |
1b1fe467 | 3103 | if test "${enable_dparen_arithmetic+set}" = set; then : |
7f947b68 | 3104 | enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval |
2dead0c4 CR |
3105 | fi |
3106 | ||
7f947b68 | 3107 | # Check whether --enable-extended-glob was given. |
1b1fe467 | 3108 | if test "${enable_extended_glob+set}" = set; then : |
7f947b68 CR |
3109 | enableval=$enable_extended_glob; opt_extended_glob=$enableval |
3110 | fi | |
2dead0c4 | 3111 | |
7f947b68 | 3112 | # Check whether --enable-extended-glob-default was given. |
1b1fe467 | 3113 | if test "${enable_extended_glob_default+set}" = set; then : |
7f947b68 | 3114 | enableval=$enable_extended_glob_default; opt_extglob_default=$enableval |
2dead0c4 CR |
3115 | fi |
3116 | ||
c111d992 CR |
3117 | # Check whether --enable-glob-asciiranges-default was given. |
3118 | if test "${enable_glob_asciiranges_default+set}" = set; then : | |
3119 | enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval | |
3120 | fi | |
3121 | ||
7f947b68 | 3122 | # Check whether --enable-help-builtin was given. |
1b1fe467 | 3123 | if test "${enable_help_builtin+set}" = set; then : |
7f947b68 | 3124 | enableval=$enable_help_builtin; opt_help=$enableval |
2dead0c4 CR |
3125 | fi |
3126 | ||
7f947b68 | 3127 | # Check whether --enable-history was given. |
1b1fe467 | 3128 | if test "${enable_history+set}" = set; then : |
7f947b68 | 3129 | enableval=$enable_history; opt_history=$enableval |
2dead0c4 | 3130 | fi |
7f947b68 CR |
3131 | |
3132 | # Check whether --enable-job-control was given. | |
1b1fe467 | 3133 | if test "${enable_job_control+set}" = set; then : |
7f947b68 CR |
3134 | enableval=$enable_job_control; opt_job_control=$enableval |
3135 | fi | |
3136 | ||
3137 | # Check whether --enable-multibyte was given. | |
1b1fe467 | 3138 | if test "${enable_multibyte+set}" = set; then : |
7f947b68 CR |
3139 | enableval=$enable_multibyte; opt_multibyte=$enableval |
3140 | fi | |
3141 | ||
3142 | # Check whether --enable-net-redirections was given. | |
1b1fe467 | 3143 | if test "${enable_net_redirections+set}" = set; then : |
7f947b68 CR |
3144 | enableval=$enable_net_redirections; opt_net_redirs=$enableval |
3145 | fi | |
3146 | ||
3147 | # Check whether --enable-process-substitution was given. | |
1b1fe467 | 3148 | if test "${enable_process_substitution+set}" = set; then : |
7f947b68 CR |
3149 | enableval=$enable_process_substitution; opt_process_subst=$enableval |
3150 | fi | |
3151 | ||
3152 | # Check whether --enable-progcomp was given. | |
1b1fe467 | 3153 | if test "${enable_progcomp+set}" = set; then : |
7f947b68 CR |
3154 | enableval=$enable_progcomp; opt_progcomp=$enableval |
3155 | fi | |
3156 | ||
3157 | # Check whether --enable-prompt-string-decoding was given. | |
1b1fe467 | 3158 | if test "${enable_prompt_string_decoding+set}" = set; then : |
7f947b68 CR |
3159 | enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval |
3160 | fi | |
3161 | ||
3162 | # Check whether --enable-readline was given. | |
1b1fe467 | 3163 | if test "${enable_readline+set}" = set; then : |
7f947b68 CR |
3164 | enableval=$enable_readline; opt_readline=$enableval |
3165 | fi | |
3166 | ||
3167 | # Check whether --enable-restricted was given. | |
1b1fe467 | 3168 | if test "${enable_restricted+set}" = set; then : |
7f947b68 CR |
3169 | enableval=$enable_restricted; opt_restricted=$enableval |
3170 | fi | |
3171 | ||
3172 | # Check whether --enable-select was given. | |
1b1fe467 | 3173 | if test "${enable_select+set}" = set; then : |
7f947b68 CR |
3174 | enableval=$enable_select; opt_select=$enableval |
3175 | fi | |
3176 | ||
3177 | # Check whether --enable-separate-helpfiles was given. | |
1b1fe467 | 3178 | if test "${enable_separate_helpfiles+set}" = set; then : |
7f947b68 CR |
3179 | enableval=$enable_separate_helpfiles; opt_separate_help=$enableval |
3180 | fi | |
3181 | ||
3182 | # Check whether --enable-single-help-strings was given. | |
1b1fe467 | 3183 | if test "${enable_single_help_strings+set}" = set; then : |
7f947b68 CR |
3184 | enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval |
3185 | fi | |
3186 | ||
3187 | # Check whether --enable-strict-posix-default was given. | |
1b1fe467 | 3188 | if test "${enable_strict_posix_default+set}" = set; then : |
7f947b68 CR |
3189 | enableval=$enable_strict_posix_default; opt_strict_posix=$enableval |
3190 | fi | |
3191 | ||
3192 | # Check whether --enable-usg-echo-default was given. | |
1b1fe467 | 3193 | if test "${enable_usg_echo_default+set}" = set; then : |
7f947b68 CR |
3194 | enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval |
3195 | fi | |
3196 | ||
3197 | # Check whether --enable-xpg-echo-default was given. | |
1b1fe467 | 3198 | if test "${enable_xpg_echo_default+set}" = set; then : |
7f947b68 CR |
3199 | enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval |
3200 | fi | |
3201 | ||
3202 | ||
3203 | # Check whether --enable-mem-scramble was given. | |
1b1fe467 | 3204 | if test "${enable_mem_scramble+set}" = set; then : |
7f947b68 CR |
3205 | enableval=$enable_mem_scramble; opt_memscramble=$enableval |
3206 | fi | |
3207 | ||
3208 | # Check whether --enable-profiling was given. | |
1b1fe467 | 3209 | if test "${enable_profiling+set}" = set; then : |
7f947b68 CR |
3210 | enableval=$enable_profiling; opt_profiling=$enableval |
3211 | fi | |
3212 | ||
3213 | # Check whether --enable-static-link was given. | |
1b1fe467 | 3214 | if test "${enable_static_link+set}" = set; then : |
7f947b68 CR |
3215 | enableval=$enable_static_link; opt_static_link=$enableval |
3216 | fi | |
3217 | ||
3218 | ||
3219 | ||
3220 | ||
3221 | ||
3222 | ||
3223 | ||
3224 | ||
3225 | ||
3226 | if test $opt_alias = yes; then | |
1b1fe467 | 3227 | $as_echo "#define ALIAS 1" >>confdefs.h |
7f947b68 CR |
3228 | |
3229 | fi | |
3230 | if test $opt_dirstack = yes; then | |
1b1fe467 | 3231 | $as_echo "#define PUSHD_AND_POPD 1" >>confdefs.h |
7f947b68 CR |
3232 | |
3233 | fi | |
3234 | if test $opt_restricted = yes; then | |
1b1fe467 | 3235 | $as_echo "#define RESTRICTED_SHELL 1" >>confdefs.h |
7f947b68 CR |
3236 | |
3237 | fi | |
3238 | if test $opt_process_subst = yes; then | |
1b1fe467 | 3239 | $as_echo "#define PROCESS_SUBSTITUTION 1" >>confdefs.h |
7f947b68 CR |
3240 | |
3241 | fi | |
3242 | if test $opt_prompt_decoding = yes; then | |
1b1fe467 | 3243 | $as_echo "#define PROMPT_STRING_DECODE 1" >>confdefs.h |
7f947b68 CR |
3244 | |
3245 | fi | |
3246 | if test $opt_select = yes; then | |
1b1fe467 | 3247 | $as_echo "#define SELECT_COMMAND 1" >>confdefs.h |
7f947b68 CR |
3248 | |
3249 | fi | |
3250 | if test $opt_help = yes; then | |
1b1fe467 | 3251 | $as_echo "#define HELP_BUILTIN 1" >>confdefs.h |
7f947b68 CR |
3252 | |
3253 | fi | |
3254 | if test $opt_array_variables = yes; then | |
1b1fe467 | 3255 | $as_echo "#define ARRAY_VARS 1" >>confdefs.h |
7f947b68 CR |
3256 | |
3257 | fi | |
3258 | if test $opt_dparen_arith = yes; then | |
1b1fe467 | 3259 | $as_echo "#define DPAREN_ARITHMETIC 1" >>confdefs.h |
7f947b68 CR |
3260 | |
3261 | fi | |
3262 | if test $opt_brace_expansion = yes; then | |
1b1fe467 | 3263 | $as_echo "#define BRACE_EXPANSION 1" >>confdefs.h |
7f947b68 CR |
3264 | |
3265 | fi | |
3266 | if test $opt_disabled_builtins = yes; then | |
1b1fe467 | 3267 | $as_echo "#define DISABLED_BUILTINS 1" >>confdefs.h |
7f947b68 CR |
3268 | |
3269 | fi | |
3270 | if test $opt_command_timing = yes; then | |
1b1fe467 | 3271 | $as_echo "#define COMMAND_TIMING 1" >>confdefs.h |
7f947b68 CR |
3272 | |
3273 | fi | |
3274 | if test $opt_xpg_echo = yes ; then | |
1b1fe467 | 3275 | $as_echo "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h |
7f947b68 CR |
3276 | |
3277 | fi | |
3278 | if test $opt_strict_posix = yes; then | |
1b1fe467 | 3279 | $as_echo "#define STRICT_POSIX 1" >>confdefs.h |
7f947b68 CR |
3280 | |
3281 | fi | |
3282 | if test $opt_extended_glob = yes ; then | |
1b1fe467 | 3283 | $as_echo "#define EXTENDED_GLOB 1" >>confdefs.h |
7f947b68 CR |
3284 | |
3285 | fi | |
3286 | if test $opt_extglob_default = yes; then | |
1b1fe467 | 3287 | $as_echo "#define EXTGLOB_DEFAULT 1" >>confdefs.h |
7f947b68 CR |
3288 | |
3289 | else | |
1b1fe467 | 3290 | $as_echo "#define EXTGLOB_DEFAULT 0" >>confdefs.h |
7f947b68 CR |
3291 | |
3292 | fi | |
3293 | if test $opt_cond_command = yes ; then | |
1b1fe467 | 3294 | $as_echo "#define COND_COMMAND 1" >>confdefs.h |
7f947b68 CR |
3295 | |
3296 | fi | |
3297 | if test $opt_cond_regexp = yes ; then | |
1b1fe467 | 3298 | $as_echo "#define COND_REGEXP 1" >>confdefs.h |
7f947b68 CR |
3299 | |
3300 | fi | |
3301 | if test $opt_coproc = yes; then | |
1b1fe467 | 3302 | $as_echo "#define COPROCESS_SUPPORT 1" >>confdefs.h |
7f947b68 CR |
3303 | |
3304 | fi | |
3305 | if test $opt_arith_for_command = yes; then | |
1b1fe467 | 3306 | $as_echo "#define ARITH_FOR_COMMAND 1" >>confdefs.h |
7f947b68 CR |
3307 | |
3308 | fi | |
3309 | if test $opt_net_redirs = yes; then | |
1b1fe467 | 3310 | $as_echo "#define NETWORK_REDIRECTIONS 1" >>confdefs.h |
7f947b68 CR |
3311 | |
3312 | fi | |
3313 | if test $opt_progcomp = yes; then | |
1b1fe467 | 3314 | $as_echo "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h |
7f947b68 CR |
3315 | |
3316 | fi | |
3317 | if test $opt_multibyte = no; then | |
1b1fe467 | 3318 | $as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h |
7f947b68 CR |
3319 | |
3320 | fi | |
3321 | if test $opt_debugger = yes; then | |
1b1fe467 | 3322 | $as_echo "#define DEBUGGER 1" >>confdefs.h |
7f947b68 CR |
3323 | |
3324 | fi | |
3325 | if test $opt_casemod_attrs = yes; then | |
1b1fe467 | 3326 | $as_echo "#define CASEMOD_ATTRS 1" >>confdefs.h |
7f947b68 CR |
3327 | |
3328 | fi | |
3329 | if test $opt_casemod_expansions = yes; then | |
1b1fe467 | 3330 | $as_echo "#define CASEMOD_EXPANSIONS 1" >>confdefs.h |
7f947b68 | 3331 | |
f14388d3 CR |
3332 | fi |
3333 | if test $opt_dircomplete_expand_default = yes; then | |
1b1fe467 | 3334 | $as_echo "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h |
f14388d3 | 3335 | |
c111d992 CR |
3336 | fi |
3337 | if test $opt_globascii_default = yes; then | |
3338 | $as_echo "#define GLOBASCII_DEFAULT 1" >>confdefs.h | |
3339 | ||
3340 | else | |
3341 | $as_echo "#define GLOBASCII_DEFAULT 0" >>confdefs.h | |
3342 | ||
7f947b68 CR |
3343 | fi |
3344 | ||
3345 | if test $opt_memscramble = yes; then | |
1b1fe467 | 3346 | $as_echo "#define MEMSCRAMBLE 1" >>confdefs.h |
7f947b68 CR |
3347 | |
3348 | fi | |
3349 | ||
3350 | if test "$opt_minimal_config" = yes; then | |
3351 | TESTSCRIPT=run-minimal | |
3352 | else | |
3353 | TESTSCRIPT=run-all | |
3354 | fi | |
3355 | ||
3356 | HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= | |
3357 | if test "$opt_separate_help" != no; then | |
3358 | if test "$opt_separate_help" = "yes" ; then | |
3359 | HELPDIR='${datadir}/bash' | |
3360 | else | |
3361 | HELPDIR=$opt_separate_help | |
3362 | fi | |
3363 | HELPDIRDEFINE='-H ${HELPDIR}' | |
3364 | HELPINSTALL='install-help' | |
3365 | HELPFILES_TARGET='helpdoc' | |
3366 | fi | |
3367 | HELPSTRINGS= | |
3368 | if test "$opt_single_longdoc_strings" != "yes"; then | |
3369 | HELPSTRINGS='-S' | |
71412226 CR |
3370 | fi |
3371 | ||
3372 | ||
3373 | ||
3374 | ||
3375 | ||
3376 | ||
3377 | ||
3378 | ||
3379 | ||
3380 | ||
3381 | ||
3382 | ||
3383 | ||
3384 | ||
3385 | ||
3386 | ||
3387 | ||
3388 | ||
abe2eb5b | 3389 | |
71412226 | 3390 | echo "" |
7117c2d2 | 3391 | echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}" |
f73dda09 | 3392 | echo "" |
d166f048 | 3393 | |
f73dda09 JA |
3394 | ac_ext=c |
3395 | ac_cpp='$CPP $CPPFLAGS' | |
3396 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3397 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3398 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3399 | if test -n "$ac_tool_prefix"; then | |
3400 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3401 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1b1fe467 | 3402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 3403 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 3404 | if ${ac_cv_prog_CC+:} false; then : |
dd4f3dd8 | 3405 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
3406 | else |
3407 | if test -n "$CC"; then | |
3408 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3409 | else | |
a82a04b3 CR |
3410 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3411 | for as_dir in $PATH | |
3412 | do | |
3413 | IFS=$as_save_IFS | |
3414 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 3415 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 3416 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 3417 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
1b1fe467 | 3418 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
3419 | break 2 |
3420 | fi | |
3421 | done | |
1b1fe467 | 3422 | done |
b709b946 | 3423 | IFS=$as_save_IFS |
ccc6cda3 | 3424 | |
f73dda09 JA |
3425 | fi |
3426 | fi | |
3427 | CC=$ac_cv_prog_CC | |
3428 | if test -n "$CC"; then | |
1b1fe467 | 3429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
dd4f3dd8 | 3430 | $as_echo "$CC" >&6; } |
f73dda09 | 3431 | else |
1b1fe467 | 3432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 3433 | $as_echo "no" >&6; } |
f73dda09 | 3434 | fi |
ccc6cda3 | 3435 | |
b709b946 | 3436 | |
f73dda09 JA |
3437 | fi |
3438 | if test -z "$ac_cv_prog_CC"; then | |
3439 | ac_ct_CC=$CC | |
3440 | # Extract the first word of "gcc", so it can be a program name with args. | |
3441 | set dummy gcc; ac_word=$2 | |
1b1fe467 | 3442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 3443 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 3444 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
dd4f3dd8 | 3445 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
3446 | else |
3447 | if test -n "$ac_ct_CC"; then | |
3448 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3449 | else | |
a82a04b3 CR |
3450 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3451 | for as_dir in $PATH | |
3452 | do | |
3453 | IFS=$as_save_IFS | |
3454 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 3455 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 3456 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 3457 | ac_cv_prog_ac_ct_CC="gcc" |
1b1fe467 | 3458 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
3459 | break 2 |
3460 | fi | |
3461 | done | |
1b1fe467 | 3462 | done |
b709b946 | 3463 | IFS=$as_save_IFS |
ccc6cda3 | 3464 | |
f73dda09 JA |
3465 | fi |
3466 | fi | |
3467 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3468 | if test -n "$ac_ct_CC"; then | |
1b1fe467 | 3469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
dd4f3dd8 | 3470 | $as_echo "$ac_ct_CC" >&6; } |
f73dda09 | 3471 | else |
1b1fe467 | 3472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 3473 | $as_echo "no" >&6; } |
f73dda09 | 3474 | fi |
ccc6cda3 | 3475 | |
b709b946 CR |
3476 | if test "x$ac_ct_CC" = x; then |
3477 | CC="" | |
3478 | else | |
3479 | case $cross_compiling:$ac_tool_warned in | |
3480 | yes:) | |
1b1fe467 | 3481 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
af98a2a6 | 3482 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
b709b946 CR |
3483 | ac_tool_warned=yes ;; |
3484 | esac | |
3485 | CC=$ac_ct_CC | |
3486 | fi | |
f73dda09 JA |
3487 | else |
3488 | CC="$ac_cv_prog_CC" | |
3489 | fi | |
bb70624e | 3490 | |
f73dda09 | 3491 | if test -z "$CC"; then |
b709b946 CR |
3492 | if test -n "$ac_tool_prefix"; then |
3493 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
f73dda09 | 3494 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
1b1fe467 | 3495 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 3496 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 3497 | if ${ac_cv_prog_CC+:} false; then : |
dd4f3dd8 | 3498 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
3499 | else |
3500 | if test -n "$CC"; then | |
3501 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3502 | else | |
a82a04b3 CR |
3503 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3504 | for as_dir in $PATH | |
3505 | do | |
3506 | IFS=$as_save_IFS | |
3507 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 3508 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 3509 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 3510 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
1b1fe467 | 3511 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
3512 | break 2 |
3513 | fi | |
3514 | done | |
1b1fe467 | 3515 | done |
b709b946 | 3516 | IFS=$as_save_IFS |
f73dda09 | 3517 | |
ccc6cda3 JA |
3518 | fi |
3519 | fi | |
f73dda09 | 3520 | CC=$ac_cv_prog_CC |
ccc6cda3 | 3521 | if test -n "$CC"; then |
1b1fe467 | 3522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
dd4f3dd8 | 3523 | $as_echo "$CC" >&6; } |
c184f645 | 3524 | else |
1b1fe467 | 3525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 3526 | $as_echo "no" >&6; } |
c184f645 CR |
3527 | fi |
3528 | ||
c184f645 | 3529 | |
b709b946 | 3530 | fi |
f73dda09 | 3531 | fi |
ccc6cda3 JA |
3532 | if test -z "$CC"; then |
3533 | # Extract the first word of "cc", so it can be a program name with args. | |
3534 | set dummy cc; ac_word=$2 | |
1b1fe467 | 3535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 3536 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 3537 | if ${ac_cv_prog_CC+:} false; then : |
dd4f3dd8 | 3538 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
3539 | else |
3540 | if test -n "$CC"; then | |
3541 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3542 | else | |
ccc6cda3 | 3543 | ac_prog_rejected=no |
a82a04b3 CR |
3544 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3545 | for as_dir in $PATH | |
3546 | do | |
3547 | IFS=$as_save_IFS | |
3548 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 3549 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 3550 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 CR |
3551 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3552 | ac_prog_rejected=yes | |
3553 | continue | |
3554 | fi | |
3555 | ac_cv_prog_CC="cc" | |
1b1fe467 | 3556 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
3557 | break 2 |
3558 | fi | |
3559 | done | |
1b1fe467 | 3560 | done |
b709b946 | 3561 | IFS=$as_save_IFS |
f73dda09 | 3562 | |
ccc6cda3 JA |
3563 | if test $ac_prog_rejected = yes; then |
3564 | # We found a bogon in the path, so make sure we never use it. | |
3565 | set dummy $ac_cv_prog_CC | |
3566 | shift | |
f73dda09 | 3567 | if test $# != 0; then |
ccc6cda3 JA |
3568 | # We chose a different compiler from the bogus one. |
3569 | # However, it has the same basename, so the bogon will be chosen | |
3570 | # first if we set CC to just the basename; use the full file name. | |
3571 | shift | |
5e4a95c7 | 3572 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
ccc6cda3 JA |
3573 | fi |
3574 | fi | |
3575 | fi | |
3576 | fi | |
f73dda09 | 3577 | CC=$ac_cv_prog_CC |
ccc6cda3 | 3578 | if test -n "$CC"; then |
1b1fe467 | 3579 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
dd4f3dd8 | 3580 | $as_echo "$CC" >&6; } |
ccc6cda3 | 3581 | else |
1b1fe467 | 3582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 3583 | $as_echo "no" >&6; } |
ccc6cda3 JA |
3584 | fi |
3585 | ||
b709b946 | 3586 | |
f73dda09 JA |
3587 | fi |
3588 | if test -z "$CC"; then | |
3589 | if test -n "$ac_tool_prefix"; then | |
b709b946 | 3590 | for ac_prog in cl.exe |
f73dda09 JA |
3591 | do |
3592 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3593 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
1b1fe467 | 3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 3595 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 3596 | if ${ac_cv_prog_CC+:} false; then : |
dd4f3dd8 | 3597 | $as_echo_n "(cached) " >&6 |
bb70624e JA |
3598 | else |
3599 | if test -n "$CC"; then | |
3600 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3601 | else | |
a82a04b3 CR |
3602 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3603 | for as_dir in $PATH | |
3604 | do | |
3605 | IFS=$as_save_IFS | |
3606 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 3607 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 3608 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 3609 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
1b1fe467 | 3610 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
3611 | break 2 |
3612 | fi | |
3613 | done | |
1b1fe467 | 3614 | done |
b709b946 | 3615 | IFS=$as_save_IFS |
f73dda09 | 3616 | |
bb70624e JA |
3617 | fi |
3618 | fi | |
f73dda09 | 3619 | CC=$ac_cv_prog_CC |
bb70624e | 3620 | if test -n "$CC"; then |
1b1fe467 | 3621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
dd4f3dd8 | 3622 | $as_echo "$CC" >&6; } |
bb70624e | 3623 | else |
1b1fe467 | 3624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 3625 | $as_echo "no" >&6; } |
bb70624e | 3626 | fi |
ccc6cda3 | 3627 | |
b709b946 | 3628 | |
f73dda09 JA |
3629 | test -n "$CC" && break |
3630 | done | |
ccc6cda3 | 3631 | fi |
f73dda09 JA |
3632 | if test -z "$CC"; then |
3633 | ac_ct_CC=$CC | |
b709b946 | 3634 | for ac_prog in cl.exe |
f73dda09 JA |
3635 | do |
3636 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3637 | set dummy $ac_prog; ac_word=$2 | |
1b1fe467 | 3638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 3639 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 3640 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
dd4f3dd8 | 3641 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
3642 | else |
3643 | if test -n "$ac_ct_CC"; then | |
3644 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3645 | else | |
a82a04b3 CR |
3646 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3647 | for as_dir in $PATH | |
3648 | do | |
3649 | IFS=$as_save_IFS | |
3650 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 3651 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 3652 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 3653 | ac_cv_prog_ac_ct_CC="$ac_prog" |
1b1fe467 | 3654 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
3655 | break 2 |
3656 | fi | |
3657 | done | |
1b1fe467 | 3658 | done |
b709b946 | 3659 | IFS=$as_save_IFS |
ccc6cda3 | 3660 | |
ccc6cda3 | 3661 | fi |
ccc6cda3 | 3662 | fi |
f73dda09 JA |
3663 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
3664 | if test -n "$ac_ct_CC"; then | |
1b1fe467 | 3665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
dd4f3dd8 | 3666 | $as_echo "$ac_ct_CC" >&6; } |
f73dda09 | 3667 | else |
1b1fe467 | 3668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 3669 | $as_echo "no" >&6; } |
ccc6cda3 JA |
3670 | fi |
3671 | ||
b709b946 | 3672 | |
f73dda09 JA |
3673 | test -n "$ac_ct_CC" && break |
3674 | done | |
ccc6cda3 | 3675 | |
b709b946 CR |
3676 | if test "x$ac_ct_CC" = x; then |
3677 | CC="" | |
3678 | else | |
3679 | case $cross_compiling:$ac_tool_warned in | |
3680 | yes:) | |
1b1fe467 | 3681 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
af98a2a6 | 3682 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
b709b946 CR |
3683 | ac_tool_warned=yes ;; |
3684 | esac | |
3685 | CC=$ac_ct_CC | |
3686 | fi | |
bb70624e JA |
3687 | fi |
3688 | ||
f73dda09 JA |
3689 | fi |
3690 | ||
a82a04b3 | 3691 | |
1b1fe467 | 3692 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
af98a2a6 | 3693 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
1b1fe467 CR |
3694 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3695 | See \`config.log' for more details" "$LINENO" 5; } | |
f73dda09 JA |
3696 | |
3697 | # Provide some information about the compiler. | |
1b1fe467 | 3698 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
dd4f3dd8 CR |
3699 | set X $ac_compile |
3700 | ac_compiler=$2 | |
1b1fe467 CR |
3701 | for ac_option in --version -v -V -qversion; do |
3702 | { { ac_try="$ac_compiler $ac_option >&5" | |
7175a77f CR |
3703 | case "(($ac_try" in |
3704 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3705 | *) ac_try_echo=$ac_try;; | |
3706 | esac | |
1b1fe467 CR |
3707 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3708 | $as_echo "$ac_try_echo"; } >&5 | |
3709 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
7175a77f | 3710 | ac_status=$? |
1b1fe467 CR |
3711 | if test -s conftest.err; then |
3712 | sed '10a\ | |
3713 | ... rest of stderr output deleted ... | |
3714 | 10q' conftest.err >conftest.er1 | |
3715 | cat conftest.er1 >&5 | |
3716 | fi | |
3717 | rm -f conftest.er1 conftest.err | |
3718 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3719 | test $ac_status = 0; } | |
3720 | done | |
f73dda09 | 3721 | |
1b1fe467 | 3722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 3723 | /* end confdefs.h. */ |
f73dda09 JA |
3724 | |
3725 | int | |
3726 | main () | |
3727 | { | |
3728 | ||
3729 | ; | |
3730 | return 0; | |
3731 | } | |
3732 | _ACEOF | |
3733 | ac_clean_files_save=$ac_clean_files | |
dd4f3dd8 | 3734 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
f73dda09 JA |
3735 | # Try to create an executable without -o first, disregard a.out. |
3736 | # It will help us diagnose broken compilers, and finding out an intuition | |
3737 | # of exeext. | |
1b1fe467 CR |
3738 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3739 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
dd4f3dd8 CR |
3740 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3741 | ||
3742 | # The possible output files: | |
3743 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3744 | ||
b709b946 CR |
3745 | ac_rmfiles= |
3746 | for ac_file in $ac_files | |
3747 | do | |
3748 | case $ac_file in | |
dd4f3dd8 | 3749 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b709b946 CR |
3750 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; |
3751 | esac | |
3752 | done | |
3753 | rm -f $ac_rmfiles | |
3754 | ||
1b1fe467 | 3755 | if { { ac_try="$ac_link_default" |
b709b946 CR |
3756 | case "(($ac_try" in |
3757 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3758 | *) ac_try_echo=$ac_try;; | |
3759 | esac | |
1b1fe467 CR |
3760 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3761 | $as_echo "$ac_try_echo"; } >&5 | |
b709b946 | 3762 | (eval "$ac_link_default") 2>&5 |
f73dda09 | 3763 | ac_status=$? |
1b1fe467 CR |
3764 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3765 | test $ac_status = 0; }; then : | |
b709b946 CR |
3766 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
3767 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3768 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3769 | # so that the user can short-circuit this test for compilers unknown to | |
3770 | # Autoconf. | |
dd4f3dd8 | 3771 | for ac_file in $ac_files '' |
5e4a95c7 CR |
3772 | do |
3773 | test -f "$ac_file" || continue | |
f73dda09 | 3774 | case $ac_file in |
dd4f3dd8 | 3775 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
5e4a95c7 CR |
3776 | ;; |
3777 | [ab].out ) | |
3778 | # We found the default executable, but exeext='' is most | |
3779 | # certainly right. | |
3780 | break;; | |
3781 | *.* ) | |
1b1fe467 | 3782 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
b709b946 CR |
3783 | then :; else |
3784 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3785 | fi | |
3786 | # We set ac_cv_exeext here because the later test for it is not | |
3787 | # safe: cross compilers may not add the suffix if given an `-o' | |
3788 | # argument, so we may need to know it at that point already. | |
3789 | # Even if this section looks crufty: it has the advantage of | |
3790 | # actually working. | |
5e4a95c7 CR |
3791 | break;; |
3792 | * ) | |
3793 | break;; | |
f73dda09 JA |
3794 | esac |
3795 | done | |
b709b946 CR |
3796 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3797 | ||
ccc6cda3 | 3798 | else |
dd4f3dd8 CR |
3799 | ac_file='' |
3800 | fi | |
1b1fe467 CR |
3801 | if test -z "$ac_file"; then : |
3802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3803 | $as_echo "no" >&6; } | |
3804 | $as_echo "$as_me: failed program was:" >&5 | |
5e4a95c7 CR |
3805 | sed 's/^/| /' conftest.$ac_ext >&5 |
3806 | ||
1b1fe467 | 3807 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
af98a2a6 | 3808 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
1b1fe467 CR |
3809 | as_fn_error 77 "C compiler cannot create executables |
3810 | See \`config.log' for more details" "$LINENO" 5; } | |
3811 | else | |
3812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3813 | $as_echo "yes" >&6; } | |
f73dda09 | 3814 | fi |
1b1fe467 CR |
3815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3816 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3818 | $as_echo "$ac_file" >&6; } | |
f73dda09 | 3819 | ac_exeext=$ac_cv_exeext |
f73dda09 | 3820 | |
dd4f3dd8 | 3821 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
f73dda09 | 3822 | ac_clean_files=$ac_clean_files_save |
1b1fe467 | 3823 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
dd4f3dd8 | 3824 | $as_echo_n "checking for suffix of executables... " >&6; } |
1b1fe467 | 3825 | if { { ac_try="$ac_link" |
b709b946 CR |
3826 | case "(($ac_try" in |
3827 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3828 | *) ac_try_echo=$ac_try;; | |
3829 | esac | |
1b1fe467 CR |
3830 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3831 | $as_echo "$ac_try_echo"; } >&5 | |
b709b946 | 3832 | (eval "$ac_link") 2>&5 |
f73dda09 | 3833 | ac_status=$? |
1b1fe467 CR |
3834 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3835 | test $ac_status = 0; }; then : | |
f73dda09 JA |
3836 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3837 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3838 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3839 | # `rm'. | |
5e4a95c7 CR |
3840 | for ac_file in conftest.exe conftest conftest.*; do |
3841 | test -f "$ac_file" || continue | |
f73dda09 | 3842 | case $ac_file in |
dd4f3dd8 | 3843 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
f73dda09 | 3844 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
5e4a95c7 | 3845 | break;; |
f73dda09 JA |
3846 | * ) break;; |
3847 | esac | |
3848 | done | |
ccc6cda3 | 3849 | else |
1b1fe467 | 3850 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
af98a2a6 | 3851 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
1b1fe467 CR |
3852 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3853 | See \`config.log' for more details" "$LINENO" 5; } | |
f73dda09 | 3854 | fi |
1b1fe467 CR |
3855 | rm -f conftest conftest$ac_cv_exeext |
3856 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
dd4f3dd8 | 3857 | $as_echo "$ac_cv_exeext" >&6; } |
f73dda09 JA |
3858 | |
3859 | rm -f conftest.$ac_ext | |
3860 | EXEEXT=$ac_cv_exeext | |
3861 | ac_exeext=$EXEEXT | |
1b1fe467 CR |
3862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3863 | /* end confdefs.h. */ | |
3864 | #include <stdio.h> | |
3865 | int | |
3866 | main () | |
3867 | { | |
3868 | FILE *f = fopen ("conftest.out", "w"); | |
3869 | return ferror (f) || fclose (f) != 0; | |
3870 | ||
3871 | ; | |
3872 | return 0; | |
3873 | } | |
3874 | _ACEOF | |
3875 | ac_clean_files="$ac_clean_files conftest.out" | |
3876 | # Check that the compiler produces executables we can run. If not, either | |
3877 | # the compiler is broken, or we cross compile. | |
3878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3879 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3880 | if test "$cross_compiling" != yes; then | |
3881 | { { ac_try="$ac_link" | |
3882 | case "(($ac_try" in | |
3883 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3884 | *) ac_try_echo=$ac_try;; | |
3885 | esac | |
3886 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3887 | $as_echo "$ac_try_echo"; } >&5 | |
3888 | (eval "$ac_link") 2>&5 | |
3889 | ac_status=$? | |
3890 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3891 | test $ac_status = 0; } | |
3892 | if { ac_try='./conftest$ac_cv_exeext' | |
3893 | { { case "(($ac_try" in | |
3894 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3895 | *) ac_try_echo=$ac_try;; | |
3896 | esac | |
3897 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3898 | $as_echo "$ac_try_echo"; } >&5 | |
3899 | (eval "$ac_try") 2>&5 | |
3900 | ac_status=$? | |
3901 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3902 | test $ac_status = 0; }; }; then | |
3903 | cross_compiling=no | |
3904 | else | |
3905 | if test "$cross_compiling" = maybe; then | |
3906 | cross_compiling=yes | |
3907 | else | |
3908 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3909 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3910 | as_fn_error $? "cannot run C compiled programs. | |
3911 | If you meant to cross compile, use \`--host'. | |
3912 | See \`config.log' for more details" "$LINENO" 5; } | |
3913 | fi | |
3914 | fi | |
3915 | fi | |
3916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3917 | $as_echo "$cross_compiling" >&6; } | |
3918 | ||
3919 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3920 | ac_clean_files=$ac_clean_files_save | |
3921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
7175a77f | 3922 | $as_echo_n "checking for suffix of object files... " >&6; } |
1b1fe467 | 3923 | if ${ac_cv_objext+:} false; then : |
7175a77f CR |
3924 | $as_echo_n "(cached) " >&6 |
3925 | else | |
1b1fe467 | 3926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7f947b68 | 3927 | /* end confdefs.h. */ |
7175a77f | 3928 | |
7f947b68 CR |
3929 | int |
3930 | main () | |
3931 | { | |
7f947b68 CR |
3932 | |
3933 | ; | |
3934 | return 0; | |
3935 | } | |
3936 | _ACEOF | |
7175a77f | 3937 | rm -f conftest.o conftest.obj |
1b1fe467 | 3938 | if { { ac_try="$ac_compile" |
7f947b68 CR |
3939 | case "(($ac_try" in |
3940 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3941 | *) ac_try_echo=$ac_try;; | |
3942 | esac | |
1b1fe467 CR |
3943 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
3944 | $as_echo "$ac_try_echo"; } >&5 | |
7175a77f | 3945 | (eval "$ac_compile") 2>&5 |
7f947b68 | 3946 | ac_status=$? |
1b1fe467 CR |
3947 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3948 | test $ac_status = 0; }; then : | |
7610e0c5 CR |
3949 | for ac_file in conftest.o conftest.obj conftest.*; do |
3950 | test -f "$ac_file" || continue; | |
3951 | case $ac_file in | |
3952 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
3953 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
3954 | break;; | |
3955 | esac | |
3956 | done | |
3957 | else | |
3958 | $as_echo "$as_me: failed program was:" >&5 | |
3959 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3960 | ||
1b1fe467 | 3961 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
71412226 | 3962 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
1b1fe467 CR |
3963 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3964 | See \`config.log' for more details" "$LINENO" 5; } | |
71412226 | 3965 | fi |
f73dda09 | 3966 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
ccc6cda3 | 3967 | fi |
1b1fe467 | 3968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
dd4f3dd8 | 3969 | $as_echo "$ac_cv_objext" >&6; } |
f73dda09 JA |
3970 | OBJEXT=$ac_cv_objext |
3971 | ac_objext=$OBJEXT | |
1b1fe467 | 3972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
dd4f3dd8 | 3973 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } |
1b1fe467 | 3974 | if ${ac_cv_c_compiler_gnu+:} false; then : |
dd4f3dd8 | 3975 | $as_echo_n "(cached) " >&6 |
f73dda09 | 3976 | else |
1b1fe467 | 3977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 3978 | /* end confdefs.h. */ |
f73dda09 JA |
3979 | |
3980 | int | |
3981 | main () | |
3982 | { | |
3983 | #ifndef __GNUC__ | |
3984 | choke me | |
3985 | #endif | |
3986 | ||
3987 | ; | |
3988 | return 0; | |
3989 | } | |
3990 | _ACEOF | |
1b1fe467 | 3991 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 JA |
3992 | ac_compiler_gnu=yes |
3993 | else | |
1b1fe467 | 3994 | ac_compiler_gnu=no |
f73dda09 | 3995 | fi |
b709b946 | 3996 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f73dda09 JA |
3997 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3998 | ||
3999 | fi | |
1b1fe467 | 4000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
dd4f3dd8 CR |
4001 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } |
4002 | if test $ac_compiler_gnu = yes; then | |
4003 | GCC=yes | |
4004 | else | |
4005 | GCC= | |
4006 | fi | |
f73dda09 JA |
4007 | ac_test_CFLAGS=${CFLAGS+set} |
4008 | ac_save_CFLAGS=$CFLAGS | |
1b1fe467 | 4009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
dd4f3dd8 | 4010 | $as_echo_n "checking whether $CC accepts -g... " >&6; } |
1b1fe467 | 4011 | if ${ac_cv_prog_cc_g+:} false; then : |
dd4f3dd8 | 4012 | $as_echo_n "(cached) " >&6 |
f73dda09 | 4013 | else |
b709b946 CR |
4014 | ac_save_c_werror_flag=$ac_c_werror_flag |
4015 | ac_c_werror_flag=yes | |
4016 | ac_cv_prog_cc_g=no | |
4017 | CFLAGS="-g" | |
1b1fe467 | 4018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4019 | /* end confdefs.h. */ |
f73dda09 JA |
4020 | |
4021 | int | |
4022 | main () | |
4023 | { | |
ccc6cda3 | 4024 | |
f73dda09 JA |
4025 | ; |
4026 | return 0; | |
4027 | } | |
4028 | _ACEOF | |
1b1fe467 | 4029 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 JA |
4030 | ac_cv_prog_cc_g=yes |
4031 | else | |
1b1fe467 CR |
4032 | CFLAGS="" |
4033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
abe2eb5b | 4034 | /* end confdefs.h. */ |
c184f645 | 4035 | |
c184f645 CR |
4036 | int |
4037 | main () | |
4038 | { | |
b709b946 | 4039 | |
c184f645 CR |
4040 | ; |
4041 | return 0; | |
4042 | } | |
4043 | _ACEOF | |
1b1fe467 | 4044 | if ac_fn_c_try_compile "$LINENO"; then : |
7175a77f | 4045 | |
1b1fe467 CR |
4046 | else |
4047 | ac_c_werror_flag=$ac_save_c_werror_flag | |
b709b946 | 4048 | CFLAGS="-g" |
1b1fe467 | 4049 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4050 | /* end confdefs.h. */ |
b709b946 | 4051 | |
f73dda09 JA |
4052 | int |
4053 | main () | |
4054 | { | |
b709b946 | 4055 | |
f73dda09 JA |
4056 | ; |
4057 | return 0; | |
4058 | } | |
4059 | _ACEOF | |
1b1fe467 | 4060 | if ac_fn_c_try_compile "$LINENO"; then : |
b709b946 | 4061 | ac_cv_prog_cc_g=yes |
d3ad40de | 4062 | fi |
b709b946 CR |
4063 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4064 | fi | |
b709b946 CR |
4065 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4066 | fi | |
b709b946 CR |
4067 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4068 | ac_c_werror_flag=$ac_save_c_werror_flag | |
4069 | fi | |
1b1fe467 | 4070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
dd4f3dd8 | 4071 | $as_echo "$ac_cv_prog_cc_g" >&6; } |
b709b946 CR |
4072 | if test "$ac_test_CFLAGS" = set; then |
4073 | CFLAGS=$ac_save_CFLAGS | |
4074 | elif test $ac_cv_prog_cc_g = yes; then | |
4075 | if test "$GCC" = yes; then | |
4076 | CFLAGS="-g -O2" | |
4077 | else | |
4078 | CFLAGS="-g" | |
4079 | fi | |
4080 | else | |
4081 | if test "$GCC" = yes; then | |
4082 | CFLAGS="-O2" | |
4083 | else | |
4084 | CFLAGS= | |
4085 | fi | |
4086 | fi | |
1b1fe467 | 4087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
dd4f3dd8 | 4088 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } |
1b1fe467 | 4089 | if ${ac_cv_prog_cc_c89+:} false; then : |
dd4f3dd8 | 4090 | $as_echo_n "(cached) " >&6 |
b709b946 CR |
4091 | else |
4092 | ac_cv_prog_cc_c89=no | |
4093 | ac_save_CC=$CC | |
1b1fe467 | 4094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4095 | /* end confdefs.h. */ |
b709b946 CR |
4096 | #include <stdarg.h> |
4097 | #include <stdio.h> | |
0ee50808 | 4098 | struct stat; |
b709b946 CR |
4099 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
4100 | struct buf { int x; }; | |
4101 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4102 | static char *e (p, i) | |
4103 | char **p; | |
4104 | int i; | |
4105 | { | |
4106 | return p[i]; | |
4107 | } | |
4108 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4109 | { | |
4110 | char *s; | |
4111 | va_list v; | |
4112 | va_start (v,p); | |
4113 | s = g (p, va_arg (v,int)); | |
4114 | va_end (v); | |
4115 | return s; | |
4116 | } | |
4117 | ||
4118 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
4119 | function prototypes and stuff, but not '\xHH' hex character constants. | |
4120 | These don't provoke an error unfortunately, instead are silently treated | |
4121 | as 'x'. The following induces an error, until -std is added to get | |
4122 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
4123 | array size at least. It's necessary to write '\x00'==0 to get something | |
4124 | that's true only with -std. */ | |
4125 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4126 | ||
4127 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
4128 | inside strings and character constants. */ | |
4129 | #define FOO(x) 'x' | |
4130 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4131 | ||
4132 | int test (int i, double x); | |
4133 | struct s1 {int (*f) (int a);}; | |
4134 | struct s2 {int (*f) (double a);}; | |
4135 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4136 | int argc; | |
4137 | char **argv; | |
f73dda09 JA |
4138 | int |
4139 | main () | |
4140 | { | |
b709b946 | 4141 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
f73dda09 JA |
4142 | ; |
4143 | return 0; | |
4144 | } | |
4145 | _ACEOF | |
b709b946 CR |
4146 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
4147 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4148 | do | |
4149 | CC="$ac_save_CC $ac_arg" | |
1b1fe467 | 4150 | if ac_fn_c_try_compile "$LINENO"; then : |
b709b946 | 4151 | ac_cv_prog_cc_c89=$ac_arg |
f73dda09 | 4152 | fi |
b709b946 CR |
4153 | rm -f core conftest.err conftest.$ac_objext |
4154 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
cce855bc | 4155 | done |
b709b946 CR |
4156 | rm -f conftest.$ac_ext |
4157 | CC=$ac_save_CC | |
4158 | ||
f73dda09 | 4159 | fi |
b709b946 CR |
4160 | # AC_CACHE_VAL |
4161 | case "x$ac_cv_prog_cc_c89" in | |
4162 | x) | |
1b1fe467 | 4163 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
dd4f3dd8 | 4164 | $as_echo "none needed" >&6; } ;; |
b709b946 | 4165 | xno) |
1b1fe467 | 4166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
dd4f3dd8 | 4167 | $as_echo "unsupported" >&6; } ;; |
b709b946 CR |
4168 | *) |
4169 | CC="$CC $ac_cv_prog_cc_c89" | |
1b1fe467 | 4170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 |
dd4f3dd8 | 4171 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; |
b709b946 | 4172 | esac |
1b1fe467 | 4173 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
cce855bc | 4174 | |
1b1fe467 | 4175 | fi |
5e4a95c7 | 4176 | |
f73dda09 JA |
4177 | ac_ext=c |
4178 | ac_cpp='$CPP $CPPFLAGS' | |
4179 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4180 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4181 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
bb70624e | 4182 | |
a82a04b3 CR |
4183 | |
4184 | ||
4185 | ||
1b1fe467 | 4186 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 |
dd4f3dd8 | 4187 | $as_echo_n "checking for strerror in -lcposix... " >&6; } |
1b1fe467 | 4188 | if ${ac_cv_lib_cposix_strerror+:} false; then : |
dd4f3dd8 | 4189 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
4190 | else |
4191 | ac_check_lib_save_LIBS=$LIBS | |
4192 | LIBS="-lcposix $LIBS" | |
1b1fe467 | 4193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4194 | /* end confdefs.h. */ |
ccc6cda3 | 4195 | |
b709b946 CR |
4196 | /* Override any GCC internal prototype to avoid an error. |
4197 | Use char because int might match the return type of a GCC | |
4198 | builtin and then its argument prototype would still apply. */ | |
5e13499c CR |
4199 | #ifdef __cplusplus |
4200 | extern "C" | |
4201 | #endif | |
5e13499c CR |
4202 | char strerror (); |
4203 | int | |
4204 | main () | |
4205 | { | |
b709b946 | 4206 | return strerror (); |
5e13499c CR |
4207 | ; |
4208 | return 0; | |
4209 | } | |
4210 | _ACEOF | |
1b1fe467 | 4211 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c | 4212 | ac_cv_lib_cposix_strerror=yes |
ccc6cda3 | 4213 | else |
1b1fe467 | 4214 | ac_cv_lib_cposix_strerror=no |
5e13499c | 4215 | fi |
1b1fe467 CR |
4216 | rm -f core conftest.err conftest.$ac_objext \ |
4217 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c CR |
4218 | LIBS=$ac_check_lib_save_LIBS |
4219 | fi | |
1b1fe467 | 4220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5 |
dd4f3dd8 | 4221 | $as_echo "$ac_cv_lib_cposix_strerror" >&6; } |
1b1fe467 | 4222 | if test "x$ac_cv_lib_cposix_strerror" = xyes; then : |
5e13499c | 4223 | LIBS="$LIBS -lcposix" |
ccc6cda3 JA |
4224 | fi |
4225 | ||
a82a04b3 CR |
4226 | |
4227 | ||
f73dda09 JA |
4228 | ac_ext=c |
4229 | ac_cpp='$CPP $CPPFLAGS' | |
4230 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4231 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4232 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1b1fe467 | 4233 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
dd4f3dd8 | 4234 | $as_echo_n "checking how to run the C preprocessor... " >&6; } |
ccc6cda3 JA |
4235 | # On Suns, sometimes $CPP names a directory. |
4236 | if test -n "$CPP" && test -d "$CPP"; then | |
4237 | CPP= | |
4238 | fi | |
4239 | if test -z "$CPP"; then | |
1b1fe467 | 4240 | if ${ac_cv_prog_CPP+:} false; then : |
dd4f3dd8 | 4241 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
4242 | else |
4243 | # Double quotes because CPP needs to be expanded | |
4244 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4245 | do | |
4246 | ac_preproc_ok=false | |
4247 | for ac_c_preproc_warn_flag in '' yes | |
4248 | do | |
4249 | # Use a header file that comes with gcc, so configuring glibc | |
4250 | # with a fresh cross-compiler works. | |
5e4a95c7 CR |
4251 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
4252 | # <limits.h> exists even on freestanding compilers. | |
ccc6cda3 | 4253 | # On the NeXT, cc -E runs the code through the compiler's parser, |
f73dda09 | 4254 | # not just through cpp. "Syntax error" is here to catch this case. |
1b1fe467 | 4255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 CR |
4256 | /* end confdefs.h. */ |
4257 | #ifdef __STDC__ | |
4258 | # include <limits.h> | |
4259 | #else | |
4260 | # include <assert.h> | |
4261 | #endif | |
4262 | Syntax error | |
f73dda09 | 4263 | _ACEOF |
1b1fe467 | 4264 | if ac_fn_c_try_cpp "$LINENO"; then : |
7175a77f | 4265 | |
1b1fe467 | 4266 | else |
f73dda09 JA |
4267 | # Broken: fails on valid input. |
4268 | continue | |
4269 | fi | |
1b1fe467 | 4270 | rm -f conftest.err conftest.i conftest.$ac_ext |
f73dda09 | 4271 | |
b709b946 | 4272 | # OK, works on sane cases. Now check whether nonexistent headers |
f73dda09 | 4273 | # can be detected and how. |
1b1fe467 | 4274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4275 | /* end confdefs.h. */ |
f73dda09 JA |
4276 | #include <ac_nonexistent.h> |
4277 | _ACEOF | |
1b1fe467 | 4278 | if ac_fn_c_try_cpp "$LINENO"; then : |
f73dda09 JA |
4279 | # Broken: success on invalid input. |
4280 | continue | |
bb70624e | 4281 | else |
f73dda09 JA |
4282 | # Passes both tests. |
4283 | ac_preproc_ok=: | |
4284 | break | |
4285 | fi | |
1b1fe467 | 4286 | rm -f conftest.err conftest.i conftest.$ac_ext |
f73dda09 JA |
4287 | |
4288 | done | |
4289 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
1b1fe467 CR |
4290 | rm -f conftest.i conftest.err conftest.$ac_ext |
4291 | if $ac_preproc_ok; then : | |
f73dda09 JA |
4292 | break |
4293 | fi | |
4294 | ||
4295 | done | |
4296 | ac_cv_prog_CPP=$CPP | |
4297 | ||
4298 | fi | |
4299 | CPP=$ac_cv_prog_CPP | |
4300 | else | |
4301 | ac_cv_prog_CPP=$CPP | |
4302 | fi | |
1b1fe467 | 4303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
dd4f3dd8 | 4304 | $as_echo "$CPP" >&6; } |
f73dda09 JA |
4305 | ac_preproc_ok=false |
4306 | for ac_c_preproc_warn_flag in '' yes | |
4307 | do | |
4308 | # Use a header file that comes with gcc, so configuring glibc | |
4309 | # with a fresh cross-compiler works. | |
5e4a95c7 CR |
4310 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
4311 | # <limits.h> exists even on freestanding compilers. | |
f73dda09 JA |
4312 | # On the NeXT, cc -E runs the code through the compiler's parser, |
4313 | # not just through cpp. "Syntax error" is here to catch this case. | |
1b1fe467 | 4314 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 CR |
4315 | /* end confdefs.h. */ |
4316 | #ifdef __STDC__ | |
4317 | # include <limits.h> | |
4318 | #else | |
4319 | # include <assert.h> | |
4320 | #endif | |
4321 | Syntax error | |
f73dda09 | 4322 | _ACEOF |
1b1fe467 | 4323 | if ac_fn_c_try_cpp "$LINENO"; then : |
7175a77f | 4324 | |
1b1fe467 | 4325 | else |
f73dda09 JA |
4326 | # Broken: fails on valid input. |
4327 | continue | |
4328 | fi | |
1b1fe467 | 4329 | rm -f conftest.err conftest.i conftest.$ac_ext |
f73dda09 | 4330 | |
b709b946 | 4331 | # OK, works on sane cases. Now check whether nonexistent headers |
f73dda09 | 4332 | # can be detected and how. |
1b1fe467 | 4333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4334 | /* end confdefs.h. */ |
f73dda09 JA |
4335 | #include <ac_nonexistent.h> |
4336 | _ACEOF | |
1b1fe467 | 4337 | if ac_fn_c_try_cpp "$LINENO"; then : |
f73dda09 JA |
4338 | # Broken: success on invalid input. |
4339 | continue | |
4340 | else | |
f73dda09 JA |
4341 | # Passes both tests. |
4342 | ac_preproc_ok=: | |
4343 | break | |
ccc6cda3 | 4344 | fi |
1b1fe467 | 4345 | rm -f conftest.err conftest.i conftest.$ac_ext |
f73dda09 JA |
4346 | |
4347 | done | |
4348 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
1b1fe467 CR |
4349 | rm -f conftest.i conftest.err conftest.$ac_ext |
4350 | if $ac_preproc_ok; then : | |
4351 | ||
ccc6cda3 | 4352 | else |
1b1fe467 | 4353 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
af98a2a6 | 4354 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
1b1fe467 CR |
4355 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
4356 | See \`config.log' for more details" "$LINENO" 5; } | |
ccc6cda3 | 4357 | fi |
ccc6cda3 | 4358 | |
f73dda09 JA |
4359 | ac_ext=c |
4360 | ac_cpp='$CPP $CPPFLAGS' | |
4361 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4362 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4363 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4364 | ||
a82a04b3 | 4365 | |
1b1fe467 | 4366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
dd4f3dd8 | 4367 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } |
1b1fe467 | 4368 | if ${ac_cv_path_GREP+:} false; then : |
dd4f3dd8 | 4369 | $as_echo_n "(cached) " >&6 |
b709b946 | 4370 | else |
dd4f3dd8 | 4371 | if test -z "$GREP"; then |
b709b946 | 4372 | ac_path_GREP_found=false |
dd4f3dd8 CR |
4373 | # Loop through the user's path and test for each of PROGNAME-LIST |
4374 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
b709b946 CR |
4375 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
4376 | do | |
4377 | IFS=$as_save_IFS | |
4378 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 4379 | for ac_prog in grep ggrep; do |
dd4f3dd8 CR |
4380 | for ac_exec_ext in '' $ac_executable_extensions; do |
4381 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
0ee50808 | 4382 | as_fn_executable_p "$ac_path_GREP" || continue |
dd4f3dd8 | 4383 | # Check for GNU ac_path_GREP and select it if it is found. |
b709b946 CR |
4384 | # Check for GNU $ac_path_GREP |
4385 | case `"$ac_path_GREP" --version 2>&1` in | |
4386 | *GNU*) | |
4387 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4388 | *) | |
4389 | ac_count=0 | |
dd4f3dd8 | 4390 | $as_echo_n 0123456789 >"conftest.in" |
b709b946 CR |
4391 | while : |
4392 | do | |
4393 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4394 | mv "conftest.tmp" "conftest.in" | |
4395 | cp "conftest.in" "conftest.nl" | |
dd4f3dd8 | 4396 | $as_echo 'GREP' >> "conftest.nl" |
b709b946 CR |
4397 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
4398 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
1b1fe467 | 4399 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
b709b946 CR |
4400 | if test $ac_count -gt ${ac_path_GREP_max-0}; then |
4401 | # Best one so far, save it but keep looking for a better one | |
4402 | ac_cv_path_GREP="$ac_path_GREP" | |
4403 | ac_path_GREP_max=$ac_count | |
4404 | fi | |
4405 | # 10*(2^10) chars as input seems more than enough | |
4406 | test $ac_count -gt 10 && break | |
4407 | done | |
4408 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4409 | esac | |
4410 | ||
dd4f3dd8 CR |
4411 | $ac_path_GREP_found && break 3 |
4412 | done | |
b709b946 | 4413 | done |
1b1fe467 | 4414 | done |
b709b946 | 4415 | IFS=$as_save_IFS |
dd4f3dd8 | 4416 | if test -z "$ac_cv_path_GREP"; then |
1b1fe467 | 4417 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
dd4f3dd8 | 4418 | fi |
b709b946 CR |
4419 | else |
4420 | ac_cv_path_GREP=$GREP | |
4421 | fi | |
4422 | ||
b709b946 | 4423 | fi |
1b1fe467 | 4424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
dd4f3dd8 | 4425 | $as_echo "$ac_cv_path_GREP" >&6; } |
b709b946 CR |
4426 | GREP="$ac_cv_path_GREP" |
4427 | ||
4428 | ||
1b1fe467 | 4429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
dd4f3dd8 | 4430 | $as_echo_n "checking for egrep... " >&6; } |
1b1fe467 | 4431 | if ${ac_cv_path_EGREP+:} false; then : |
dd4f3dd8 | 4432 | $as_echo_n "(cached) " >&6 |
b709b946 CR |
4433 | else |
4434 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4435 | then ac_cv_path_EGREP="$GREP -E" | |
4436 | else | |
dd4f3dd8 | 4437 | if test -z "$EGREP"; then |
b709b946 | 4438 | ac_path_EGREP_found=false |
dd4f3dd8 CR |
4439 | # Loop through the user's path and test for each of PROGNAME-LIST |
4440 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
b709b946 CR |
4441 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
4442 | do | |
4443 | IFS=$as_save_IFS | |
4444 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 4445 | for ac_prog in egrep; do |
dd4f3dd8 CR |
4446 | for ac_exec_ext in '' $ac_executable_extensions; do |
4447 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
0ee50808 | 4448 | as_fn_executable_p "$ac_path_EGREP" || continue |
dd4f3dd8 | 4449 | # Check for GNU ac_path_EGREP and select it if it is found. |
b709b946 CR |
4450 | # Check for GNU $ac_path_EGREP |
4451 | case `"$ac_path_EGREP" --version 2>&1` in | |
4452 | *GNU*) | |
4453 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4454 | *) | |
4455 | ac_count=0 | |
dd4f3dd8 | 4456 | $as_echo_n 0123456789 >"conftest.in" |
b709b946 CR |
4457 | while : |
4458 | do | |
4459 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4460 | mv "conftest.tmp" "conftest.in" | |
4461 | cp "conftest.in" "conftest.nl" | |
dd4f3dd8 | 4462 | $as_echo 'EGREP' >> "conftest.nl" |
b709b946 CR |
4463 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
4464 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
1b1fe467 | 4465 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
b709b946 CR |
4466 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then |
4467 | # Best one so far, save it but keep looking for a better one | |
4468 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4469 | ac_path_EGREP_max=$ac_count | |
5e4a95c7 | 4470 | fi |
b709b946 CR |
4471 | # 10*(2^10) chars as input seems more than enough |
4472 | test $ac_count -gt 10 && break | |
4473 | done | |
4474 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4475 | esac | |
4476 | ||
dd4f3dd8 CR |
4477 | $ac_path_EGREP_found && break 3 |
4478 | done | |
b709b946 | 4479 | done |
1b1fe467 | 4480 | done |
b709b946 | 4481 | IFS=$as_save_IFS |
dd4f3dd8 | 4482 | if test -z "$ac_cv_path_EGREP"; then |
1b1fe467 | 4483 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
dd4f3dd8 | 4484 | fi |
b709b946 CR |
4485 | else |
4486 | ac_cv_path_EGREP=$EGREP | |
4487 | fi | |
4488 | ||
b709b946 | 4489 | fi |
d3ad40de | 4490 | fi |
1b1fe467 | 4491 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
dd4f3dd8 | 4492 | $as_echo "$ac_cv_path_EGREP" >&6; } |
b709b946 | 4493 | EGREP="$ac_cv_path_EGREP" |
d3ad40de | 4494 | |
9d6e5e30 | 4495 | |
1b1fe467 | 4496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
dd4f3dd8 | 4497 | $as_echo_n "checking for ANSI C header files... " >&6; } |
1b1fe467 | 4498 | if ${ac_cv_header_stdc+:} false; then : |
dd4f3dd8 | 4499 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 4500 | else |
1b1fe467 | 4501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4502 | /* end confdefs.h. */ |
a82a04b3 CR |
4503 | #include <stdlib.h> |
4504 | #include <stdarg.h> | |
4505 | #include <string.h> | |
4506 | #include <float.h> | |
4507 | ||
5e4a95c7 CR |
4508 | int |
4509 | main () | |
4510 | { | |
4511 | ||
4512 | ; | |
4513 | return 0; | |
4514 | } | |
a82a04b3 | 4515 | _ACEOF |
1b1fe467 | 4516 | if ac_fn_c_try_compile "$LINENO"; then : |
a82a04b3 | 4517 | ac_cv_header_stdc=yes |
f73dda09 | 4518 | else |
1b1fe467 | 4519 | ac_cv_header_stdc=no |
a82a04b3 | 4520 | fi |
b709b946 | 4521 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a82a04b3 CR |
4522 | |
4523 | if test $ac_cv_header_stdc = yes; then | |
4524 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
1b1fe467 | 4525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4526 | /* end confdefs.h. */ |
a82a04b3 CR |
4527 | #include <string.h> |
4528 | ||
4529 | _ACEOF | |
4530 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 CR |
4531 | $EGREP "memchr" >/dev/null 2>&1; then : |
4532 | ||
a82a04b3 CR |
4533 | else |
4534 | ac_cv_header_stdc=no | |
4535 | fi | |
4536 | rm -f conftest* | |
4537 | ||
4538 | fi | |
4539 | ||
4540 | if test $ac_cv_header_stdc = yes; then | |
4541 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
1b1fe467 | 4542 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4543 | /* end confdefs.h. */ |
a82a04b3 CR |
4544 | #include <stdlib.h> |
4545 | ||
4546 | _ACEOF | |
4547 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 CR |
4548 | $EGREP "free" >/dev/null 2>&1; then : |
4549 | ||
a82a04b3 CR |
4550 | else |
4551 | ac_cv_header_stdc=no | |
4552 | fi | |
4553 | rm -f conftest* | |
4554 | ||
4555 | fi | |
4556 | ||
4557 | if test $ac_cv_header_stdc = yes; then | |
4558 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
1b1fe467 | 4559 | if test "$cross_compiling" = yes; then : |
a82a04b3 CR |
4560 | : |
4561 | else | |
1b1fe467 | 4562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4563 | /* end confdefs.h. */ |
a82a04b3 | 4564 | #include <ctype.h> |
b709b946 | 4565 | #include <stdlib.h> |
a82a04b3 CR |
4566 | #if ((' ' & 0x0FF) == 0x020) |
4567 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4568 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4569 | #else | |
5e4a95c7 CR |
4570 | # define ISLOWER(c) \ |
4571 | (('a' <= (c) && (c) <= 'i') \ | |
4572 | || ('j' <= (c) && (c) <= 'r') \ | |
4573 | || ('s' <= (c) && (c) <= 'z')) | |
a82a04b3 CR |
4574 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
4575 | #endif | |
4576 | ||
4577 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4578 | int | |
4579 | main () | |
4580 | { | |
4581 | int i; | |
4582 | for (i = 0; i < 256; i++) | |
4583 | if (XOR (islower (i), ISLOWER (i)) | |
5e4a95c7 | 4584 | || toupper (i) != TOUPPER (i)) |
b709b946 CR |
4585 | return 2; |
4586 | return 0; | |
a82a04b3 CR |
4587 | } |
4588 | _ACEOF | |
1b1fe467 | 4589 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f | 4590 | |
1b1fe467 CR |
4591 | else |
4592 | ac_cv_header_stdc=no | |
a82a04b3 | 4593 | fi |
1b1fe467 CR |
4594 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4595 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a82a04b3 | 4596 | fi |
b709b946 | 4597 | |
a82a04b3 CR |
4598 | fi |
4599 | fi | |
1b1fe467 | 4600 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
dd4f3dd8 | 4601 | $as_echo "$ac_cv_header_stdc" >&6; } |
a82a04b3 CR |
4602 | if test $ac_cv_header_stdc = yes; then |
4603 | ||
1b1fe467 | 4604 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
7f947b68 CR |
4605 | |
4606 | fi | |
4607 | ||
7175a77f | 4608 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
7175a77f CR |
4609 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4610 | inttypes.h stdint.h unistd.h | |
1b1fe467 CR |
4611 | do : |
4612 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4613 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4614 | " | |
4615 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7175a77f CR |
4616 | cat >>confdefs.h <<_ACEOF |
4617 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4618 | _ACEOF | |
4619 | ||
4620 | fi | |
4621 | ||
4622 | done | |
4623 | ||
4624 | ||
4625 | ||
1b1fe467 CR |
4626 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4627 | if test "x$ac_cv_header_minix_config_h" = xyes; then : | |
7175a77f CR |
4628 | MINIX=yes |
4629 | else | |
4630 | MINIX= | |
4631 | fi | |
4632 | ||
4633 | ||
4634 | if test "$MINIX" = yes; then | |
4635 | ||
1b1fe467 | 4636 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
7175a77f CR |
4637 | |
4638 | ||
1b1fe467 | 4639 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
7175a77f CR |
4640 | |
4641 | ||
1b1fe467 | 4642 | $as_echo "#define _MINIX 1" >>confdefs.h |
7175a77f CR |
4643 | |
4644 | fi | |
4645 | ||
4646 | ||
1b1fe467 | 4647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
7175a77f | 4648 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } |
1b1fe467 | 4649 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
7175a77f CR |
4650 | $as_echo_n "(cached) " >&6 |
4651 | else | |
1b1fe467 | 4652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
4653 | /* end confdefs.h. */ |
4654 | ||
0ee50808 CR |
4655 | # define __EXTENSIONS__ 1 |
4656 | $ac_includes_default | |
7175a77f CR |
4657 | int |
4658 | main () | |
4659 | { | |
4660 | ||
4661 | ; | |
4662 | return 0; | |
4663 | } | |
4664 | _ACEOF | |
1b1fe467 | 4665 | if ac_fn_c_try_compile "$LINENO"; then : |
7175a77f | 4666 | ac_cv_safe_to_define___extensions__=yes |
7610e0c5 | 4667 | else |
1b1fe467 | 4668 | ac_cv_safe_to_define___extensions__=no |
7610e0c5 | 4669 | fi |
7610e0c5 CR |
4670 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4671 | fi | |
1b1fe467 | 4672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
7f947b68 CR |
4673 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } |
4674 | test $ac_cv_safe_to_define___extensions__ = yes && | |
1b1fe467 | 4675 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
2dead0c4 | 4676 | |
1b1fe467 | 4677 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
7610e0c5 | 4678 | |
1b1fe467 | 4679 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
7f947b68 | 4680 | |
1b1fe467 CR |
4681 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
4682 | ||
4683 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
7610e0c5 | 4684 | |
c920c360 | 4685 | |
2dead0c4 | 4686 | |
7f947b68 CR |
4687 | |
4688 | # Check whether --enable-largefile was given. | |
1b1fe467 | 4689 | if test "${enable_largefile+set}" = set; then : |
7f947b68 | 4690 | enableval=$enable_largefile; |
7610e0c5 CR |
4691 | fi |
4692 | ||
7f947b68 | 4693 | if test "$enable_largefile" != no; then |
7610e0c5 | 4694 | |
1b1fe467 | 4695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 |
abe2eb5b | 4696 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } |
1b1fe467 | 4697 | if ${ac_cv_sys_largefile_CC+:} false; then : |
abe2eb5b CR |
4698 | $as_echo_n "(cached) " >&6 |
4699 | else | |
4700 | ac_cv_sys_largefile_CC=no | |
4701 | if test "$GCC" != yes; then | |
4702 | ac_save_CC=$CC | |
4703 | while :; do | |
4704 | # IRIX 6.2 and later do not support large files by default, | |
4705 | # so use the C compiler's -n32 option if that helps. | |
1b1fe467 | 4706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b CR |
4707 | /* end confdefs.h. */ |
4708 | #include <sys/types.h> | |
4709 | /* Check that off_t can represent 2**63 - 1 correctly. | |
e3db237e CR |
4710 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
4711 | since some C++ compilers masquerading as C compilers | |
4712 | incorrectly reject 9223372036854775807. */ | |
f73dda09 JA |
4713 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
4714 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4715 | && LARGE_OFF_T % 2147483647 == 1) | |
4716 | ? 1 : -1]; | |
4717 | int | |
4718 | main () | |
4719 | { | |
bb70624e | 4720 | |
f73dda09 JA |
4721 | ; |
4722 | return 0; | |
4723 | } | |
4724 | _ACEOF | |
1b1fe467 | 4725 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 | 4726 | break |
f73dda09 | 4727 | fi |
b709b946 CR |
4728 | rm -f core conftest.err conftest.$ac_objext |
4729 | CC="$CC -n32" | |
1b1fe467 | 4730 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 | 4731 | ac_cv_sys_largefile_CC=' -n32'; break |
f73dda09 | 4732 | fi |
b709b946 | 4733 | rm -f core conftest.err conftest.$ac_objext |
5e4a95c7 | 4734 | break |
f73dda09 JA |
4735 | done |
4736 | CC=$ac_save_CC | |
4737 | rm -f conftest.$ac_ext | |
4738 | fi | |
bb70624e | 4739 | fi |
1b1fe467 | 4740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 |
dd4f3dd8 | 4741 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } |
f73dda09 JA |
4742 | if test "$ac_cv_sys_largefile_CC" != no; then |
4743 | CC=$CC$ac_cv_sys_largefile_CC | |
4744 | fi | |
bb70624e | 4745 | |
1b1fe467 | 4746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 |
dd4f3dd8 | 4747 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } |
1b1fe467 | 4748 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
dd4f3dd8 | 4749 | $as_echo_n "(cached) " >&6 |
bb70624e | 4750 | else |
f73dda09 | 4751 | while :; do |
1b1fe467 | 4752 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4753 | /* end confdefs.h. */ |
f73dda09 JA |
4754 | #include <sys/types.h> |
4755 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4756 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4757 | since some C++ compilers masquerading as C compilers | |
4758 | incorrectly reject 9223372036854775807. */ | |
4759 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4760 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4761 | && LARGE_OFF_T % 2147483647 == 1) | |
4762 | ? 1 : -1]; | |
4763 | int | |
4764 | main () | |
4765 | { | |
bb70624e | 4766 | |
f73dda09 JA |
4767 | ; |
4768 | return 0; | |
4769 | } | |
4770 | _ACEOF | |
1b1fe467 | 4771 | if ac_fn_c_try_compile "$LINENO"; then : |
dd4f3dd8 | 4772 | ac_cv_sys_file_offset_bits=no; break |
2e4498b3 | 4773 | fi |
2e4498b3 | 4774 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1b1fe467 | 4775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2e4498b3 | 4776 | /* end confdefs.h. */ |
f73dda09 JA |
4777 | #define _FILE_OFFSET_BITS 64 |
4778 | #include <sys/types.h> | |
4779 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4780 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4781 | since some C++ compilers masquerading as C compilers | |
4782 | incorrectly reject 9223372036854775807. */ | |
4783 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4784 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4785 | && LARGE_OFF_T % 2147483647 == 1) | |
4786 | ? 1 : -1]; | |
4787 | int | |
4788 | main () | |
4789 | { | |
bb70624e | 4790 | |
f73dda09 JA |
4791 | ; |
4792 | return 0; | |
4793 | } | |
4794 | _ACEOF | |
1b1fe467 | 4795 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 | 4796 | ac_cv_sys_file_offset_bits=64; break |
f73dda09 | 4797 | fi |
b709b946 | 4798 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dd4f3dd8 | 4799 | ac_cv_sys_file_offset_bits=unknown |
f73dda09 JA |
4800 | break |
4801 | done | |
4802 | fi | |
1b1fe467 | 4803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 |
dd4f3dd8 CR |
4804 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } |
4805 | case $ac_cv_sys_file_offset_bits in #( | |
4806 | no | unknown) ;; | |
4807 | *) | |
a82a04b3 | 4808 | cat >>confdefs.h <<_ACEOF |
f73dda09 | 4809 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits |
a82a04b3 | 4810 | _ACEOF |
dd4f3dd8 CR |
4811 | ;; |
4812 | esac | |
4813 | rm -rf conftest* | |
4814 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
1b1fe467 | 4815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 |
dd4f3dd8 | 4816 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } |
1b1fe467 | 4817 | if ${ac_cv_sys_large_files+:} false; then : |
dd4f3dd8 | 4818 | $as_echo_n "(cached) " >&6 |
bb70624e | 4819 | else |
f73dda09 | 4820 | while :; do |
1b1fe467 | 4821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4822 | /* end confdefs.h. */ |
f73dda09 JA |
4823 | #include <sys/types.h> |
4824 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4825 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4826 | since some C++ compilers masquerading as C compilers | |
4827 | incorrectly reject 9223372036854775807. */ | |
4828 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4829 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4830 | && LARGE_OFF_T % 2147483647 == 1) | |
4831 | ? 1 : -1]; | |
4832 | int | |
4833 | main () | |
4834 | { | |
4835 | ||
4836 | ; | |
4837 | return 0; | |
4838 | } | |
4839 | _ACEOF | |
1b1fe467 | 4840 | if ac_fn_c_try_compile "$LINENO"; then : |
dd4f3dd8 | 4841 | ac_cv_sys_large_files=no; break |
bb70624e | 4842 | fi |
b709b946 | 4843 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1b1fe467 | 4844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4845 | /* end confdefs.h. */ |
f73dda09 JA |
4846 | #define _LARGE_FILES 1 |
4847 | #include <sys/types.h> | |
4848 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4849 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4850 | since some C++ compilers masquerading as C compilers | |
4851 | incorrectly reject 9223372036854775807. */ | |
4852 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4853 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4854 | && LARGE_OFF_T % 2147483647 == 1) | |
4855 | ? 1 : -1]; | |
4856 | int | |
4857 | main () | |
4858 | { | |
bb70624e | 4859 | |
f73dda09 JA |
4860 | ; |
4861 | return 0; | |
4862 | } | |
4863 | _ACEOF | |
1b1fe467 | 4864 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 | 4865 | ac_cv_sys_large_files=1; break |
f73dda09 | 4866 | fi |
b709b946 | 4867 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dd4f3dd8 | 4868 | ac_cv_sys_large_files=unknown |
f73dda09 JA |
4869 | break |
4870 | done | |
4871 | fi | |
1b1fe467 | 4872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
dd4f3dd8 CR |
4873 | $as_echo "$ac_cv_sys_large_files" >&6; } |
4874 | case $ac_cv_sys_large_files in #( | |
4875 | no | unknown) ;; | |
4876 | *) | |
a82a04b3 | 4877 | cat >>confdefs.h <<_ACEOF |
f73dda09 | 4878 | #define _LARGE_FILES $ac_cv_sys_large_files |
a82a04b3 | 4879 | _ACEOF |
dd4f3dd8 CR |
4880 | ;; |
4881 | esac | |
4882 | rm -rf conftest* | |
4883 | fi | |
0ee50808 CR |
4884 | |
4885 | ||
f73dda09 | 4886 | fi |
cce855bc | 4887 | |
a82a04b3 CR |
4888 | |
4889 | ||
dc8fbaf9 | 4890 | SIGNAMES_O= |
b72432fd JA |
4891 | SIGNAMES_H=lsignames.h |
4892 | ||
a82a04b3 CR |
4893 | |
4894 | ||
d3ad40de | 4895 | CROSS_COMPILE= |
cce855bc JA |
4896 | if test "x$cross_compiling" = "xyes"; then |
4897 | case "${host}" in | |
28ef6c31 | 4898 | *-cygwin*) |
cce855bc | 4899 | cross_cache=${srcdir}/cross-build/cygwin32.cache |
cce855bc | 4900 | ;; |
9607141c CR |
4901 | *-mingw*) |
4902 | cross_cache=${srcdir}/cross-build/cygwin32.cache | |
4903 | ;; | |
b72432fd JA |
4904 | i[3456]86-*-beos*) |
4905 | cross_cache=${srcdir}/cross-build/x86-beos.cache | |
b72432fd JA |
4906 | ;; |
4907 | *) echo "configure: cross-compiling for $host is not supported" >&2 | |
cce855bc JA |
4908 | ;; |
4909 | esac | |
b72432fd JA |
4910 | if test -n "${cross_cache}" && test -r "${cross_cache}"; then |
4911 | echo "loading cross-build cache file ${cross_cache}" | |
4912 | . ${cross_cache} | |
4913 | fi | |
4914 | unset cross_cache | |
dc8fbaf9 | 4915 | SIGNAMES_O='signames.o' |
9607141c CR |
4916 | CROSS_COMPILE='-DCROSS_COMPILING' |
4917 | ||
cce855bc JA |
4918 | fi |
4919 | ||
a82a04b3 | 4920 | |
dc8fbaf9 | 4921 | |
a82a04b3 | 4922 | |
7610e0c5 CR |
4923 | if test -z "$CFLAGS"; then |
4924 | AUTO_CFLAGS="-g ${GCC+-O2}" | |
4925 | AUTO_LDFLAGS="-g ${GCC+-O2}" | |
4926 | else | |
4927 | AUTO_CFLAGS= AUTO_LDFLAGS= | |
4928 | fi | |
ccc6cda3 | 4929 | |
7610e0c5 CR |
4930 | CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} |
4931 | # LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX | |
ccc6cda3 | 4932 | |
cce855bc JA |
4933 | if test "$opt_profiling" = "yes"; then |
4934 | PROFILE_FLAGS=-pg | |
b72432fd JA |
4935 | case "$host_os" in |
4936 | solaris2*) ;; | |
4937 | *) opt_static_link=yes ;; | |
4938 | esac | |
7117c2d2 | 4939 | DEBUG= MALLOC_DEBUG= |
cce855bc JA |
4940 | fi |
4941 | ||
f4f5e1c2 CR |
4942 | prefer_shared=yes |
4943 | prefer_static=no | |
4944 | ||
cce855bc | 4945 | if test "$opt_static_link" = yes; then |
f4f5e1c2 CR |
4946 | prefer_static=yes |
4947 | prefer_shared=no | |
f73dda09 JA |
4948 | # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 |
4949 | if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then | |
b72432fd | 4950 | STATIC_LD="-static" |
f73dda09 JA |
4951 | case "$host_os" in |
4952 | solaris2*) ;; | |
4953 | *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental | |
4954 | esac | |
cce855bc JA |
4955 | fi |
4956 | fi | |
4957 | ||
7610e0c5 | 4958 | # set the appropriate make variables for building the "build tools" |
348a457e CR |
4959 | # modify defaults based on whether or not we are cross compiling, since the |
4960 | # options for the target host may not be appropriate for the build host | |
da5b17cd | 4961 | if test "X$cross_compiling" = "Xno"; then |
7610e0c5 CR |
4962 | CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} |
4963 | CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' | |
da5b17cd | 4964 | LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} |
7610e0c5 CR |
4965 | # CFLAGS set above to default value if not passed in environment |
4966 | CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} | |
4967 | LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} | |
da5b17cd | 4968 | else |
7610e0c5 | 4969 | CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} |
da5b17cd CR |
4970 | CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} |
4971 | LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} | |
7610e0c5 CR |
4972 | CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} |
4973 | LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} | |
da5b17cd CR |
4974 | fi |
4975 | ||
7610e0c5 | 4976 | |
7117c2d2 | 4977 | |
a82a04b3 CR |
4978 | |
4979 | ||
4980 | ||
4981 | ||
4982 | ||
4983 | ||
4984 | ||
4985 | ||
4986 | ||
f73dda09 | 4987 | if test $ac_cv_c_compiler_gnu = yes; then |
1b1fe467 | 4988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 |
dd4f3dd8 | 4989 | $as_echo_n "checking whether $CC needs -traditional... " >&6; } |
1b1fe467 | 4990 | if ${ac_cv_prog_gcc_traditional+:} false; then : |
dd4f3dd8 | 4991 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
4992 | else |
4993 | ac_pattern="Autoconf.*'x'" | |
1b1fe467 | 4994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 4995 | /* end confdefs.h. */ |
ccc6cda3 JA |
4996 | #include <sgtty.h> |
4997 | Autoconf TIOCGETP | |
f73dda09 | 4998 | _ACEOF |
ccc6cda3 | 4999 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 | 5000 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : |
ccc6cda3 JA |
5001 | ac_cv_prog_gcc_traditional=yes |
5002 | else | |
ccc6cda3 JA |
5003 | ac_cv_prog_gcc_traditional=no |
5004 | fi | |
5005 | rm -f conftest* | |
5006 | ||
a82a04b3 | 5007 | |
ccc6cda3 | 5008 | if test $ac_cv_prog_gcc_traditional = no; then |
1b1fe467 | 5009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 5010 | /* end confdefs.h. */ |
ccc6cda3 JA |
5011 | #include <termio.h> |
5012 | Autoconf TCGETA | |
f73dda09 | 5013 | _ACEOF |
ccc6cda3 | 5014 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 | 5015 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : |
ccc6cda3 JA |
5016 | ac_cv_prog_gcc_traditional=yes |
5017 | fi | |
5018 | rm -f conftest* | |
5019 | ||
5020 | fi | |
5021 | fi | |
1b1fe467 | 5022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 |
dd4f3dd8 | 5023 | $as_echo "$ac_cv_prog_gcc_traditional" >&6; } |
ccc6cda3 JA |
5024 | if test $ac_cv_prog_gcc_traditional = yes; then |
5025 | CC="$CC -traditional" | |
5026 | fi | |
5027 | fi | |
5028 | ||
a82a04b3 CR |
5029 | |
5030 | ||
f73dda09 | 5031 | if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no" |
b72432fd | 5032 | then |
f73dda09 JA |
5033 | # If the user specified --with-installed-readline=PREFIX and PREFIX |
5034 | # is not `yes', set ac_cv_rl_prefix to PREFIX | |
5035 | test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline | |
b72432fd | 5036 | |
a82a04b3 | 5037 | |
bb70624e JA |
5038 | if test "X$bash_cv_termcap_lib" = "X"; then |
5039 | _bash_needmsg=yes | |
5040 | else | |
1b1fe467 | 5041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 |
dd4f3dd8 | 5042 | $as_echo_n "checking which library has the termcap functions... " >&6; } |
bb70624e JA |
5043 | _bash_needmsg= |
5044 | fi | |
1b1fe467 | 5045 | if ${bash_cv_termcap_lib+:} false; then : |
dd4f3dd8 | 5046 | $as_echo_n "(cached) " >&6 |
bb70624e | 5047 | else |
1b1fe467 CR |
5048 | ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" |
5049 | if test "x$ac_cv_func_tgetent" = xyes; then : | |
5050 | bash_cv_termcap_lib=libc | |
5051 | else | |
5052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 | |
5053 | $as_echo_n "checking for tgetent in -ltermcap... " >&6; } | |
5054 | if ${ac_cv_lib_termcap_tgetent+:} false; then : | |
dd4f3dd8 | 5055 | $as_echo_n "(cached) " >&6 |
bb70624e | 5056 | else |
1b1fe467 CR |
5057 | ac_check_lib_save_LIBS=$LIBS |
5058 | LIBS="-ltermcap $LIBS" | |
5059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f CR |
5060 | /* end confdefs.h. */ |
5061 | ||
5062 | /* Override any GCC internal prototype to avoid an error. | |
5063 | Use char because int might match the return type of a GCC | |
5064 | builtin and then its argument prototype would still apply. */ | |
5065 | #ifdef __cplusplus | |
5066 | extern "C" | |
5067 | #endif | |
5068 | char tgetent (); | |
5069 | int | |
5070 | main () | |
5071 | { | |
5072 | return tgetent (); | |
5073 | ; | |
5074 | return 0; | |
5075 | } | |
5076 | _ACEOF | |
1b1fe467 | 5077 | if ac_fn_c_try_link "$LINENO"; then : |
7175a77f CR |
5078 | ac_cv_lib_termcap_tgetent=yes |
5079 | else | |
1b1fe467 | 5080 | ac_cv_lib_termcap_tgetent=no |
7175a77f | 5081 | fi |
1b1fe467 CR |
5082 | rm -f core conftest.err conftest.$ac_objext \ |
5083 | conftest$ac_exeext conftest.$ac_ext | |
7175a77f CR |
5084 | LIBS=$ac_check_lib_save_LIBS |
5085 | fi | |
1b1fe467 | 5086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 |
7175a77f | 5087 | $as_echo "$ac_cv_lib_termcap_tgetent" >&6; } |
1b1fe467 | 5088 | if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : |
7f947b68 | 5089 | bash_cv_termcap_lib=libtermcap |
e3db237e | 5090 | else |
1b1fe467 | 5091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 |
7f947b68 | 5092 | $as_echo_n "checking for tgetent in -ltinfo... " >&6; } |
1b1fe467 | 5093 | if ${ac_cv_lib_tinfo_tgetent+:} false; then : |
e3db237e CR |
5094 | $as_echo_n "(cached) " >&6 |
5095 | else | |
5096 | ac_check_lib_save_LIBS=$LIBS | |
7f947b68 | 5097 | LIBS="-ltinfo $LIBS" |
1b1fe467 | 5098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e3db237e CR |
5099 | /* end confdefs.h. */ |
5100 | ||
5101 | /* Override any GCC internal prototype to avoid an error. | |
5102 | Use char because int might match the return type of a GCC | |
5103 | builtin and then its argument prototype would still apply. */ | |
5104 | #ifdef __cplusplus | |
5105 | extern "C" | |
5106 | #endif | |
5107 | char tgetent (); | |
5108 | int | |
5109 | main () | |
5110 | { | |
5111 | return tgetent (); | |
5112 | ; | |
5113 | return 0; | |
5114 | } | |
5115 | _ACEOF | |
1b1fe467 | 5116 | if ac_fn_c_try_link "$LINENO"; then : |
7f947b68 | 5117 | ac_cv_lib_tinfo_tgetent=yes |
abe2eb5b | 5118 | else |
1b1fe467 | 5119 | ac_cv_lib_tinfo_tgetent=no |
abe2eb5b | 5120 | fi |
1b1fe467 CR |
5121 | rm -f core conftest.err conftest.$ac_objext \ |
5122 | conftest$ac_exeext conftest.$ac_ext | |
abe2eb5b CR |
5123 | LIBS=$ac_check_lib_save_LIBS |
5124 | fi | |
1b1fe467 | 5125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 |
abe2eb5b | 5126 | $as_echo "$ac_cv_lib_tinfo_tgetent" >&6; } |
1b1fe467 | 5127 | if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then : |
abe2eb5b | 5128 | bash_cv_termcap_lib=libtinfo |
bb70624e | 5129 | else |
1b1fe467 | 5130 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 |
dd4f3dd8 | 5131 | $as_echo_n "checking for tgetent in -lcurses... " >&6; } |
1b1fe467 | 5132 | if ${ac_cv_lib_curses_tgetent+:} false; then : |
dd4f3dd8 | 5133 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
5134 | else |
5135 | ac_check_lib_save_LIBS=$LIBS | |
5136 | LIBS="-lcurses $LIBS" | |
1b1fe467 | 5137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 5138 | /* end confdefs.h. */ |
b72432fd | 5139 | |
b709b946 CR |
5140 | /* Override any GCC internal prototype to avoid an error. |
5141 | Use char because int might match the return type of a GCC | |
5142 | builtin and then its argument prototype would still apply. */ | |
f73dda09 JA |
5143 | #ifdef __cplusplus |
5144 | extern "C" | |
5145 | #endif | |
f73dda09 JA |
5146 | char tgetent (); |
5147 | int | |
5148 | main () | |
5149 | { | |
b709b946 | 5150 | return tgetent (); |
f73dda09 JA |
5151 | ; |
5152 | return 0; | |
5153 | } | |
5154 | _ACEOF | |
1b1fe467 | 5155 | if ac_fn_c_try_link "$LINENO"; then : |
f73dda09 JA |
5156 | ac_cv_lib_curses_tgetent=yes |
5157 | else | |
1b1fe467 | 5158 | ac_cv_lib_curses_tgetent=no |
f73dda09 | 5159 | fi |
1b1fe467 CR |
5160 | rm -f core conftest.err conftest.$ac_objext \ |
5161 | conftest$ac_exeext conftest.$ac_ext | |
f73dda09 JA |
5162 | LIBS=$ac_check_lib_save_LIBS |
5163 | fi | |
1b1fe467 | 5164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 |
dd4f3dd8 | 5165 | $as_echo "$ac_cv_lib_curses_tgetent" >&6; } |
1b1fe467 | 5166 | if test "x$ac_cv_lib_curses_tgetent" = xyes; then : |
bb70624e JA |
5167 | bash_cv_termcap_lib=libcurses |
5168 | else | |
1b1fe467 | 5169 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 |
dd4f3dd8 | 5170 | $as_echo_n "checking for tgetent in -lncurses... " >&6; } |
1b1fe467 | 5171 | if ${ac_cv_lib_ncurses_tgetent+:} false; then : |
dd4f3dd8 | 5172 | $as_echo_n "(cached) " >&6 |
bb70624e | 5173 | else |
f73dda09 | 5174 | ac_check_lib_save_LIBS=$LIBS |
bb70624e | 5175 | LIBS="-lncurses $LIBS" |
1b1fe467 | 5176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 5177 | /* end confdefs.h. */ |
f73dda09 | 5178 | |
b709b946 CR |
5179 | /* Override any GCC internal prototype to avoid an error. |
5180 | Use char because int might match the return type of a GCC | |
5181 | builtin and then its argument prototype would still apply. */ | |
f73dda09 JA |
5182 | #ifdef __cplusplus |
5183 | extern "C" | |
5184 | #endif | |
f73dda09 JA |
5185 | char tgetent (); |
5186 | int | |
5187 | main () | |
5188 | { | |
b709b946 | 5189 | return tgetent (); |
f73dda09 JA |
5190 | ; |
5191 | return 0; | |
5192 | } | |
5193 | _ACEOF | |
1b1fe467 | 5194 | if ac_fn_c_try_link "$LINENO"; then : |
f73dda09 JA |
5195 | ac_cv_lib_ncurses_tgetent=yes |
5196 | else | |
1b1fe467 | 5197 | ac_cv_lib_ncurses_tgetent=no |
f73dda09 | 5198 | fi |
1b1fe467 CR |
5199 | rm -f core conftest.err conftest.$ac_objext \ |
5200 | conftest$ac_exeext conftest.$ac_ext | |
f73dda09 JA |
5201 | LIBS=$ac_check_lib_save_LIBS |
5202 | fi | |
1b1fe467 | 5203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 |
dd4f3dd8 | 5204 | $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } |
1b1fe467 | 5205 | if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then : |
f73dda09 | 5206 | bash_cv_termcap_lib=libncurses |
bb70624e | 5207 | else |
f73dda09 | 5208 | bash_cv_termcap_lib=gnutermcap |
bb70624e | 5209 | fi |
bb70624e | 5210 | |
bb70624e JA |
5211 | fi |
5212 | ||
5213 | fi | |
5214 | ||
5215 | fi | |
5216 | ||
5217 | fi | |
5218 | ||
d3a24ed2 CR |
5219 | fi |
5220 | ||
bb70624e | 5221 | if test "X$_bash_needmsg" = "Xyes"; then |
1b1fe467 | 5222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 |
dd4f3dd8 | 5223 | $as_echo_n "checking which library has the termcap functions... " >&6; } |
bb70624e | 5224 | fi |
1b1fe467 | 5225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 |
dd4f3dd8 | 5226 | $as_echo "using $bash_cv_termcap_lib" >&6; } |
bb70624e JA |
5227 | if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then |
5228 | LDFLAGS="$LDFLAGS -L./lib/termcap" | |
5229 | TERMCAP_LIB="./lib/termcap/libtermcap.a" | |
5230 | TERMCAP_DEP="./lib/termcap/libtermcap.a" | |
5231 | elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then | |
5232 | TERMCAP_LIB=-ltermcap | |
5233 | TERMCAP_DEP= | |
f73dda09 JA |
5234 | elif test $bash_cv_termcap_lib = libtinfo; then |
5235 | TERMCAP_LIB=-ltinfo | |
5236 | TERMCAP_DEP= | |
bb70624e JA |
5237 | elif test $bash_cv_termcap_lib = libncurses; then |
5238 | TERMCAP_LIB=-lncurses | |
5239 | TERMCAP_DEP= | |
d3a24ed2 CR |
5240 | elif test $bash_cv_termcap_lib = libc; then |
5241 | TERMCAP_LIB= | |
5242 | TERMCAP_DEP= | |
bb70624e JA |
5243 | else |
5244 | TERMCAP_LIB=-lcurses | |
5245 | TERMCAP_DEP= | |
5246 | fi | |
5247 | ||
a82a04b3 CR |
5248 | |
5249 | ||
5250 | ||
1b1fe467 | 5251 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5 |
dd4f3dd8 | 5252 | $as_echo_n "checking version of installed readline library... " >&6; } |
f73dda09 JA |
5253 | |
5254 | # What a pain in the ass this is. | |
5255 | ||
5256 | # save cpp and ld options | |
5257 | _save_CFLAGS="$CFLAGS" | |
5258 | _save_LDFLAGS="$LDFLAGS" | |
5259 | _save_LIBS="$LIBS" | |
5260 | ||
5261 | # Don't set ac_cv_rl_prefix if the caller has already assigned a value. This | |
5262 | # allows the caller to do something like $_rl_prefix=$withval if the user | |
5263 | # specifies --with-installed-readline=PREFIX as an argument to configure | |
5264 | ||
5265 | if test -z "$ac_cv_rl_prefix"; then | |
5266 | test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix} | |
5267 | fi | |
5268 | ||
5269 | eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include | |
5270 | eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib | |
5271 | ||
5272 | LIBS="$LIBS -lreadline ${TERMCAP_LIB}" | |
5273 | CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" | |
5274 | LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" | |
5275 | ||
1b1fe467 | 5276 | if ${ac_cv_rl_version+:} false; then : |
dd4f3dd8 | 5277 | $as_echo_n "(cached) " >&6 |
d3a24ed2 | 5278 | else |
1b1fe467 | 5279 | if test "$cross_compiling" = yes; then : |
f73dda09 JA |
5280 | ac_cv_rl_version='4.2' |
5281 | else | |
1b1fe467 | 5282 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 5283 | /* end confdefs.h. */ |
f73dda09 JA |
5284 | |
5285 | #include <stdio.h> | |
5286 | #include <readline/readline.h> | |
5287 | ||
798a67db CR |
5288 | extern int rl_gnu_readline_p; |
5289 | ||
f73dda09 JA |
5290 | main() |
5291 | { | |
5292 | FILE *fp; | |
5293 | fp = fopen("conftest.rlv", "w"); | |
798a67db CR |
5294 | if (fp == 0) |
5295 | exit(1); | |
5296 | if (rl_gnu_readline_p != 1) | |
5297 | fprintf(fp, "0.0\n"); | |
5298 | else | |
5299 | fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0"); | |
f73dda09 JA |
5300 | fclose(fp); |
5301 | exit(0); | |
5302 | } | |
5303 | ||
5304 | _ACEOF | |
1b1fe467 | 5305 | if ac_fn_c_try_run "$LINENO"; then : |
f73dda09 JA |
5306 | ac_cv_rl_version=`cat conftest.rlv` |
5307 | else | |
1b1fe467 | 5308 | ac_cv_rl_version='0.0' |
f73dda09 | 5309 | fi |
1b1fe467 CR |
5310 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5311 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f73dda09 | 5312 | fi |
b709b946 | 5313 | |
d3a24ed2 | 5314 | fi |
f73dda09 | 5315 | |
a82a04b3 | 5316 | |
f73dda09 JA |
5317 | CFLAGS="$_save_CFLAGS" |
5318 | LDFLAGS="$_save_LDFLAGS" | |
5319 | LIBS="$_save_LIBS" | |
5320 | ||
5321 | RL_MAJOR=0 | |
5322 | RL_MINOR=0 | |
5323 | ||
5324 | # ( | |
5325 | case "$ac_cv_rl_version" in | |
5326 | 2*|3*|4*|5*|6*|7*|8*|9*) | |
5327 | RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'` | |
7117c2d2 | 5328 | RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'` |
f73dda09 JA |
5329 | ;; |
5330 | esac | |
5331 | ||
5332 | # ((( | |
5333 | case $RL_MAJOR in | |
5334 | [0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;; | |
5335 | [0-9]) _RL_MAJOR=0$RL_MAJOR ;; | |
5336 | *) _RL_MAJOR=00 ;; | |
5337 | esac | |
5338 | ||
5339 | # ((( | |
5340 | case $RL_MINOR in | |
5341 | [0-9][0-9]) _RL_MINOR=$RL_MINOR ;; | |
5342 | [0-9]) _RL_MINOR=0$RL_MINOR ;; | |
5343 | *) _RL_MINOR=00 ;; | |
5344 | esac | |
5345 | ||
5346 | RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" | |
5347 | ||
5348 | # Readline versions greater than 4.2 have these defines in readline.h | |
5349 | ||
5350 | if test $ac_cv_rl_version = '0.0' ; then | |
1b1fe467 | 5351 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5 |
dd4f3dd8 | 5352 | $as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;} |
f73dda09 JA |
5353 | elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then |
5354 | # set these for use by the caller | |
5355 | RL_PREFIX=$ac_cv_rl_prefix | |
5356 | RL_LIBDIR=$ac_cv_rl_libdir | |
5357 | RL_INCLUDEDIR=$ac_cv_rl_includedir | |
1b1fe467 | 5358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 |
dd4f3dd8 | 5359 | $as_echo "$ac_cv_rl_version" >&6; } |
f73dda09 JA |
5360 | else |
5361 | ||
a82a04b3 CR |
5362 | |
5363 | cat >>confdefs.h <<_ACEOF | |
f73dda09 | 5364 | #define RL_READLINE_VERSION $RL_VERSION |
a82a04b3 | 5365 | _ACEOF |
f73dda09 | 5366 | |
a82a04b3 CR |
5367 | |
5368 | cat >>confdefs.h <<_ACEOF | |
f73dda09 | 5369 | #define RL_VERSION_MAJOR $RL_MAJOR |
a82a04b3 | 5370 | _ACEOF |
f73dda09 | 5371 | |
a82a04b3 CR |
5372 | |
5373 | cat >>confdefs.h <<_ACEOF | |
f73dda09 | 5374 | #define RL_VERSION_MINOR $RL_MINOR |
a82a04b3 CR |
5375 | _ACEOF |
5376 | ||
5377 | ||
5378 | ||
5379 | ||
5380 | ||
545f34cf CR |
5381 | |
5382 | # set these for use by the caller | |
5383 | RL_PREFIX=$ac_cv_rl_prefix | |
5384 | RL_LIBDIR=$ac_cv_rl_libdir | |
5385 | RL_INCLUDEDIR=$ac_cv_rl_includedir | |
5386 | ||
1b1fe467 | 5387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 |
dd4f3dd8 | 5388 | $as_echo "$ac_cv_rl_version" >&6; } |
bb70624e | 5389 | |
f73dda09 | 5390 | fi |
bb70624e | 5391 | |
a82a04b3 | 5392 | |
f73dda09 | 5393 | case "$ac_cv_rl_version" in |
d3a24ed2 | 5394 | 5*|6*|7*|8*|9*) ;; |
f73dda09 | 5395 | *) opt_with_installed_readline=no |
1b1fe467 | 5396 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5 |
dd4f3dd8 | 5397 | $as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} |
1b1fe467 | 5398 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5 |
dd4f3dd8 | 5399 | $as_echo "$as_me: WARNING: using private bash version" >&2;} |
bb70624e JA |
5400 | ;; |
5401 | esac | |
bb70624e JA |
5402 | fi |
5403 | ||
fd3925f1 | 5404 | TILDE_LIB=-ltilde |
bb70624e | 5405 | if test $opt_readline = yes; then |
1b1fe467 | 5406 | $as_echo "#define READLINE 1" >>confdefs.h |
bb70624e | 5407 | |
f73dda09 | 5408 | if test "$opt_with_installed_readline" != "no" ; then |
d3a24ed2 CR |
5409 | case "$opt_with_installed_readline" in |
5410 | yes) RL_INCLUDE= ;; | |
5411 | *) case "$RL_INCLUDEDIR" in | |
5412 | /usr/include) ;; | |
5413 | *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; | |
5414 | esac | |
5415 | ;; | |
f73dda09 | 5416 | esac |
bb70624e | 5417 | READLINE_DEP= |
233564d2 | 5418 | READLINE_LIB=-lreadline |
fd3925f1 CR |
5419 | # section for OS versions that don't allow unresolved symbols |
5420 | # to be compiled into dynamic libraries. | |
5421 | case "$host_os" in | |
5422 | cygwin*) TILDE_LIB= ;; | |
5423 | esac | |
bb70624e JA |
5424 | else |
5425 | RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
5426 | READLINE_DEP='$(READLINE_LIBRARY)' | |
fd3925f1 | 5427 | # section for OS versions that ship an older/broken version of |
233564d2 CR |
5428 | # readline as a standard dynamic library and don't allow a |
5429 | # static version specified as -llibname to override the | |
5430 | # dynamic version | |
5431 | case "${host_os}" in | |
82a5df63 | 5432 | darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;; |
233564d2 CR |
5433 | *) READLINE_LIB=-lreadline ;; |
5434 | esac | |
bb70624e JA |
5435 | fi |
5436 | else | |
5437 | RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
5438 | READLINE_LIB= READLINE_DEP= | |
5439 | fi | |
5440 | if test $opt_history = yes || test $opt_bang_history = yes; then | |
5441 | if test $opt_history = yes; then | |
1b1fe467 | 5442 | $as_echo "#define HISTORY 1" >>confdefs.h |
bb70624e JA |
5443 | |
5444 | fi | |
5445 | if test $opt_bang_history = yes; then | |
1b1fe467 | 5446 | $as_echo "#define BANG_HISTORY 1" >>confdefs.h |
b72432fd JA |
5447 | |
5448 | fi | |
f73dda09 JA |
5449 | if test "$opt_with_installed_readline" != "no"; then |
5450 | HIST_LIBDIR=$RL_LIBDIR | |
b72432fd | 5451 | HISTORY_DEP= |
233564d2 | 5452 | HISTORY_LIB=-lhistory |
d3a24ed2 CR |
5453 | case "$opt_with_installed_readline" in |
5454 | yes) RL_INCLUDE= ;; | |
5455 | *) case "$RL_INCLUDEDIR" in | |
5456 | /usr/include) ;; | |
5457 | *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; | |
5458 | esac | |
5459 | ;; | |
f73dda09 | 5460 | esac |
b72432fd JA |
5461 | else |
5462 | HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
5463 | HISTORY_DEP='$(HISTORY_LIBRARY)' | |
233564d2 CR |
5464 | # section for OS versions that ship an older version of |
5465 | # readline as a standard dynamic library and don't allow a | |
5466 | # static version specified as -llibname to override the | |
5467 | # dynamic version | |
5468 | case "${host_os}" in | |
82a5df63 | 5469 | darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;; |
233564d2 CR |
5470 | *) HISTORY_LIB=-lhistory ;; |
5471 | esac | |
b72432fd JA |
5472 | fi |
5473 | else | |
5474 | HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
5475 | HISTORY_LIB= HISTORY_DEP= | |
5476 | fi | |
5477 | ||
a82a04b3 CR |
5478 | |
5479 | ||
5480 | ||
5481 | ||
5482 | ||
5483 | ||
5484 | ||
5485 | ||
5486 | ||
fd3925f1 | 5487 | |
ccc6cda3 JA |
5488 | # Find a good install program. We prefer a C program (faster), |
5489 | # so one script is as good as another. But avoid the broken or | |
5490 | # incompatible versions: | |
5491 | # SysV /etc/install, /usr/sbin/install | |
5492 | # SunOS /usr/etc/install | |
5493 | # IRIX /sbin/install | |
5494 | # AIX /bin/install | |
f73dda09 | 5495 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
bb70624e | 5496 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
ccc6cda3 JA |
5497 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
5498 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5e4a95c7 | 5499 | # OS/2's system install, which has a completely different semantic |
ccc6cda3 | 5500 | # ./install, which can be erroneously created by make from ./install.sh. |
dd4f3dd8 | 5501 | # Reject install programs that cannot install multiple files. |
1b1fe467 | 5502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
dd4f3dd8 | 5503 | $as_echo_n "checking for a BSD-compatible install... " >&6; } |
ccc6cda3 | 5504 | if test -z "$INSTALL"; then |
1b1fe467 | 5505 | if ${ac_cv_path_install+:} false; then : |
dd4f3dd8 | 5506 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 5507 | else |
a82a04b3 CR |
5508 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5509 | for as_dir in $PATH | |
5510 | do | |
5511 | IFS=$as_save_IFS | |
5512 | test -z "$as_dir" && as_dir=. | |
1b1fe467 CR |
5513 | # Account for people who put trailing slashes in PATH elements. |
5514 | case $as_dir/ in #(( | |
5515 | ./ | .// | /[cC]/* | \ | |
a82a04b3 | 5516 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
1b1fe467 | 5517 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
a82a04b3 CR |
5518 | /usr/ucb/* ) ;; |
5519 | *) | |
5520 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5521 | # Don't use installbsd from OSF since it installs stuff as root | |
5522 | # by default. | |
5523 | for ac_prog in ginstall scoinst install; do | |
5524 | for ac_exec_ext in '' $ac_executable_extensions; do | |
0ee50808 | 5525 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
5e4a95c7 CR |
5526 | if test $ac_prog = install && |
5527 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5528 | # AIX install. It has an incompatible calling convention. | |
5529 | : | |
5530 | elif test $ac_prog = install && | |
5531 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5532 | # program-specific install script used by HP pwplus--don't use. | |
5533 | : | |
5534 | else | |
dd4f3dd8 CR |
5535 | rm -rf conftest.one conftest.two conftest.dir |
5536 | echo one > conftest.one | |
5537 | echo two > conftest.two | |
5538 | mkdir conftest.dir | |
5539 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5540 | test -s conftest.one && test -s conftest.two && | |
5541 | test -s conftest.dir/conftest.one && | |
5542 | test -s conftest.dir/conftest.two | |
5543 | then | |
5544 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5545 | break 3 | |
5546 | fi | |
5e4a95c7 CR |
5547 | fi |
5548 | fi | |
ccc6cda3 | 5549 | done |
a82a04b3 CR |
5550 | done |
5551 | ;; | |
5552 | esac | |
dd4f3dd8 | 5553 | |
1b1fe467 | 5554 | done |
b709b946 | 5555 | IFS=$as_save_IFS |
a82a04b3 | 5556 | |
dd4f3dd8 | 5557 | rm -rf conftest.one conftest.two conftest.dir |
ccc6cda3 JA |
5558 | |
5559 | fi | |
5560 | if test "${ac_cv_path_install+set}" = set; then | |
f73dda09 | 5561 | INSTALL=$ac_cv_path_install |
ccc6cda3 | 5562 | else |
b709b946 CR |
5563 | # As a last resort, use the slow shell script. Don't cache a |
5564 | # value for INSTALL within a source directory, because that will | |
ccc6cda3 | 5565 | # break other packages using the cache if that directory is |
b709b946 | 5566 | # removed, or if the value is a relative name. |
f73dda09 | 5567 | INSTALL=$ac_install_sh |
ccc6cda3 JA |
5568 | fi |
5569 | fi | |
1b1fe467 | 5570 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
dd4f3dd8 | 5571 | $as_echo "$INSTALL" >&6; } |
ccc6cda3 JA |
5572 | |
5573 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5574 | # It thinks the first close brace ends the variable substitution. | |
5575 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5576 | ||
f73dda09 | 5577 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
bb70624e | 5578 | |
ccc6cda3 JA |
5579 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
5580 | ||
208fdb50 CR |
5581 | if test -n "$ac_tool_prefix"; then |
5582 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5583 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
1b1fe467 | 5584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 5585 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 5586 | if ${ac_cv_prog_AR+:} false; then : |
dd4f3dd8 | 5587 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
5588 | else |
5589 | if test -n "$AR"; then | |
5590 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5591 | else | |
a82a04b3 CR |
5592 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5593 | for as_dir in $PATH | |
5594 | do | |
5595 | IFS=$as_save_IFS | |
5596 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 5597 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 5598 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
208fdb50 | 5599 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
1b1fe467 | 5600 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
5601 | break 2 |
5602 | fi | |
5603 | done | |
1b1fe467 | 5604 | done |
b709b946 | 5605 | IFS=$as_save_IFS |
f73dda09 | 5606 | |
ccc6cda3 JA |
5607 | fi |
5608 | fi | |
f73dda09 | 5609 | AR=$ac_cv_prog_AR |
ccc6cda3 | 5610 | if test -n "$AR"; then |
1b1fe467 | 5611 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
dd4f3dd8 | 5612 | $as_echo "$AR" >&6; } |
ccc6cda3 | 5613 | else |
1b1fe467 | 5614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 5615 | $as_echo "no" >&6; } |
ccc6cda3 JA |
5616 | fi |
5617 | ||
b709b946 | 5618 | |
208fdb50 CR |
5619 | fi |
5620 | if test -z "$ac_cv_prog_AR"; then | |
5621 | ac_ct_AR=$AR | |
5622 | # Extract the first word of "ar", so it can be a program name with args. | |
5623 | set dummy ar; ac_word=$2 | |
5624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5625 | $as_echo_n "checking for $ac_word... " >&6; } | |
5626 | if ${ac_cv_prog_ac_ct_AR+:} false; then : | |
5627 | $as_echo_n "(cached) " >&6 | |
5628 | else | |
5629 | if test -n "$ac_ct_AR"; then | |
5630 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5631 | else | |
5632 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5633 | for as_dir in $PATH | |
5634 | do | |
5635 | IFS=$as_save_IFS | |
5636 | test -z "$as_dir" && as_dir=. | |
5637 | for ac_exec_ext in '' $ac_executable_extensions; do | |
0ee50808 | 5638 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
208fdb50 CR |
5639 | ac_cv_prog_ac_ct_AR="ar" |
5640 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5641 | break 2 | |
5642 | fi | |
5643 | done | |
5644 | done | |
5645 | IFS=$as_save_IFS | |
5646 | ||
5647 | fi | |
5648 | fi | |
5649 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
5650 | if test -n "$ac_ct_AR"; then | |
5651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
5652 | $as_echo "$ac_ct_AR" >&6; } | |
5653 | else | |
5654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5655 | $as_echo "no" >&6; } | |
5656 | fi | |
5657 | ||
5658 | if test "x$ac_ct_AR" = x; then | |
5659 | AR="" | |
5660 | else | |
5661 | case $cross_compiling:$ac_tool_warned in | |
5662 | yes:) | |
5663 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5664 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5665 | ac_tool_warned=yes ;; | |
5666 | esac | |
5667 | AR=$ac_ct_AR | |
5668 | fi | |
5669 | else | |
5670 | AR="$ac_cv_prog_AR" | |
5671 | fi | |
5672 | ||
b72432fd | 5673 | test -n "$ARFLAGS" || ARFLAGS="cr" |
f73dda09 JA |
5674 | if test -n "$ac_tool_prefix"; then |
5675 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5676 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
1b1fe467 | 5677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 5678 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 5679 | if ${ac_cv_prog_RANLIB+:} false; then : |
dd4f3dd8 | 5680 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
5681 | else |
5682 | if test -n "$RANLIB"; then | |
5683 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5684 | else | |
a82a04b3 CR |
5685 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5686 | for as_dir in $PATH | |
5687 | do | |
5688 | IFS=$as_save_IFS | |
5689 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 5690 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 5691 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 5692 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
1b1fe467 | 5693 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
5694 | break 2 |
5695 | fi | |
5696 | done | |
1b1fe467 | 5697 | done |
b709b946 | 5698 | IFS=$as_save_IFS |
f73dda09 | 5699 | |
ccc6cda3 JA |
5700 | fi |
5701 | fi | |
f73dda09 | 5702 | RANLIB=$ac_cv_prog_RANLIB |
ccc6cda3 | 5703 | if test -n "$RANLIB"; then |
1b1fe467 | 5704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
dd4f3dd8 | 5705 | $as_echo "$RANLIB" >&6; } |
f73dda09 | 5706 | else |
1b1fe467 | 5707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 5708 | $as_echo "no" >&6; } |
f73dda09 JA |
5709 | fi |
5710 | ||
b709b946 | 5711 | |
f73dda09 JA |
5712 | fi |
5713 | if test -z "$ac_cv_prog_RANLIB"; then | |
5714 | ac_ct_RANLIB=$RANLIB | |
5715 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5716 | set dummy ranlib; ac_word=$2 | |
1b1fe467 | 5717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 5718 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 5719 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
dd4f3dd8 | 5720 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
5721 | else |
5722 | if test -n "$ac_ct_RANLIB"; then | |
5723 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5724 | else | |
a82a04b3 CR |
5725 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5726 | for as_dir in $PATH | |
5727 | do | |
5728 | IFS=$as_save_IFS | |
5729 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 5730 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 5731 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 5732 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
1b1fe467 | 5733 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
5734 | break 2 |
5735 | fi | |
5736 | done | |
1b1fe467 | 5737 | done |
b709b946 | 5738 | IFS=$as_save_IFS |
f73dda09 | 5739 | |
f73dda09 JA |
5740 | fi |
5741 | fi | |
5742 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5743 | if test -n "$ac_ct_RANLIB"; then | |
1b1fe467 | 5744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
dd4f3dd8 | 5745 | $as_echo "$ac_ct_RANLIB" >&6; } |
ccc6cda3 | 5746 | else |
1b1fe467 | 5747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 5748 | $as_echo "no" >&6; } |
f73dda09 JA |
5749 | fi |
5750 | ||
b709b946 CR |
5751 | if test "x$ac_ct_RANLIB" = x; then |
5752 | RANLIB=":" | |
5753 | else | |
5754 | case $cross_compiling:$ac_tool_warned in | |
5755 | yes:) | |
1b1fe467 | 5756 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
af98a2a6 | 5757 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
b709b946 CR |
5758 | ac_tool_warned=yes ;; |
5759 | esac | |
5760 | RANLIB=$ac_ct_RANLIB | |
5761 | fi | |
f73dda09 JA |
5762 | else |
5763 | RANLIB="$ac_cv_prog_RANLIB" | |
ccc6cda3 JA |
5764 | fi |
5765 | ||
5766 | for ac_prog in 'bison -y' byacc | |
5767 | do | |
f73dda09 | 5768 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
ccc6cda3 | 5769 | set dummy $ac_prog; ac_word=$2 |
1b1fe467 | 5770 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 5771 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 5772 | if ${ac_cv_prog_YACC+:} false; then : |
dd4f3dd8 | 5773 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
5774 | else |
5775 | if test -n "$YACC"; then | |
5776 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5777 | else | |
a82a04b3 CR |
5778 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5779 | for as_dir in $PATH | |
5780 | do | |
5781 | IFS=$as_save_IFS | |
5782 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 5783 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 5784 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 5785 | ac_cv_prog_YACC="$ac_prog" |
1b1fe467 | 5786 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
5787 | break 2 |
5788 | fi | |
5789 | done | |
1b1fe467 | 5790 | done |
b709b946 | 5791 | IFS=$as_save_IFS |
f73dda09 | 5792 | |
ccc6cda3 JA |
5793 | fi |
5794 | fi | |
f73dda09 | 5795 | YACC=$ac_cv_prog_YACC |
ccc6cda3 | 5796 | if test -n "$YACC"; then |
1b1fe467 | 5797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
dd4f3dd8 | 5798 | $as_echo "$YACC" >&6; } |
ccc6cda3 | 5799 | else |
1b1fe467 | 5800 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 5801 | $as_echo "no" >&6; } |
ccc6cda3 JA |
5802 | fi |
5803 | ||
b709b946 | 5804 | |
f73dda09 | 5805 | test -n "$YACC" && break |
ccc6cda3 JA |
5806 | done |
5807 | test -n "$YACC" || YACC="yacc" | |
5808 | ||
1b1fe467 | 5809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
dd4f3dd8 CR |
5810 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } |
5811 | set x ${MAKE-make} | |
5812 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
1b1fe467 | 5813 | if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : |
dd4f3dd8 | 5814 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 5815 | else |
a82a04b3 | 5816 | cat >conftest.make <<\_ACEOF |
b709b946 | 5817 | SHELL = /bin/sh |
ccc6cda3 | 5818 | all: |
b709b946 | 5819 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a82a04b3 | 5820 | _ACEOF |
1b1fe467 | 5821 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
b709b946 CR |
5822 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
5823 | *@@@%%%=?*=@@@%%%*) | |
5824 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
5825 | *) | |
5826 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
5827 | esac | |
f73dda09 | 5828 | rm -f conftest.make |
ccc6cda3 | 5829 | fi |
b709b946 | 5830 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
1b1fe467 | 5831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
dd4f3dd8 | 5832 | $as_echo "yes" >&6; } |
ccc6cda3 JA |
5833 | SET_MAKE= |
5834 | else | |
1b1fe467 | 5835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 5836 | $as_echo "no" >&6; } |
ccc6cda3 JA |
5837 | SET_MAKE="MAKE=${MAKE-make}" |
5838 | fi | |
5839 | ||
a82a04b3 | 5840 | |
41d203e2 CR |
5841 | case "$ac_cv_prog_YACC" in |
5842 | *bison*) ;; | |
5843 | *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5 | |
5844 | $as_echo "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;; | |
5845 | esac | |
5846 | ||
b72432fd | 5847 | case "$host_os" in |
bb70624e | 5848 | opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; |
b72432fd JA |
5849 | *) MAKE_SHELL=/bin/sh ;; |
5850 | esac | |
5851 | ||
a82a04b3 | 5852 | |
10590446 CR |
5853 | if test x$SIZE = x; then |
5854 | if test x$ac_tool_prefix = x; then | |
5855 | SIZE=size | |
5856 | else | |
5857 | SIZE=${ac_tool_prefix}size | |
5858 | save_IFS=$IFS ; IFS=: | |
5859 | size_found=0 | |
5860 | for dir in $PATH; do | |
5861 | if test -x $dir/$SIZE ; then | |
5862 | size_found=1 | |
5863 | break | |
5864 | fi | |
5865 | done | |
5866 | if test $size_found -eq 0; then | |
233564d2 | 5867 | SIZE=: |
10590446 CR |
5868 | fi |
5869 | IFS=$save_IFS | |
5870 | fi | |
5871 | fi | |
5872 | ||
e624d0f7 | 5873 | |
278286c9 CR |
5874 | # Checks for stat-related time functions. |
5875 | ||
5876 | # Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software | |
5877 | # Foundation, Inc. | |
5878 | ||
5879 | # This file is free software; the Free Software Foundation | |
5880 | # gives unlimited permission to copy and/or distribute it, | |
5881 | # with or without modifications, as long as this notice is preserved. | |
5882 | ||
5883 | ||
5884 | # st_atim.tv_nsec - Linux, Solaris, Cygwin | |
5885 | # st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE | |
5886 | # st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE | |
5887 | # st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) | |
5888 | ||
5889 | # st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) | |
5890 | # st_birthtim - Cygwin 1.7.0+ | |
5891 | ||
5892 | ||
5893 | ||
5894 | # Configure checks for struct timespec | |
5895 | ||
5896 | # Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. | |
5897 | ||
5898 | # This file is free software; the Free Software Foundation | |
5899 | # gives unlimited permission to copy and/or distribute it, | |
5900 | # with or without modifications, as long as this notice is preserved. | |
5901 | ||
5902 | # Original written by Paul Eggert and Jim Meyering. | |
5903 | # Modified by Chet Ramey for bash | |
5904 | ||
5905 | ||
5906 | ||
5907 | ||
5908 | ||
1b1fe467 | 5909 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
ccc6cda3 | 5910 | |
e624d0f7 | 5911 | |
1b1fe467 | 5912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
dd4f3dd8 | 5913 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } |
1b1fe467 | 5914 | if ${ac_cv_c_const+:} false; then : |
dd4f3dd8 | 5915 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 5916 | else |
1b1fe467 | 5917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 CR |
5918 | /* end confdefs.h. */ |
5919 | ||
5920 | int | |
5921 | main () | |
5c26afb8 | 5922 | { |
0ee50808 | 5923 | |
5c26afb8 | 5924 | #ifndef __cplusplus |
0ee50808 | 5925 | /* Ultrix mips cc rejects this sort of thing. */ |
5c26afb8 | 5926 | typedef int charset[2]; |
0ee50808 | 5927 | const charset cs = { 0, 0 }; |
5c26afb8 | 5928 | /* SunOS 4.1.1 cc rejects this. */ |
dd4f3dd8 CR |
5929 | char const *const *pcpcc; |
5930 | char **ppc; | |
5c26afb8 CR |
5931 | /* NEC SVR4.0.2 mips cc rejects this. */ |
5932 | struct point {int x, y;}; | |
5933 | static struct point const zero = {0,0}; | |
5934 | /* AIX XL C 1.02.0.0 rejects this. | |
5935 | It does not let you subtract one const X* pointer from another in | |
5936 | an arm of an if-expression whose if-part is not a constant | |
5937 | expression */ | |
f73dda09 | 5938 | const char *g = "string"; |
dd4f3dd8 | 5939 | pcpcc = &g + (g ? g-g : 0); |
f73dda09 | 5940 | /* HPUX 7.0 cc rejects these. */ |
dd4f3dd8 CR |
5941 | ++pcpcc; |
5942 | ppc = (char**) pcpcc; | |
5943 | pcpcc = (char const *const *) ppc; | |
0ee50808 CR |
5944 | { /* SCO 3.2v4 cc rejects this sort of thing. */ |
5945 | char tx; | |
5946 | char *t = &tx; | |
f73dda09 JA |
5947 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
5948 | ||
5949 | *t++ = 0; | |
b709b946 | 5950 | if (s) return 0; |
f73dda09 JA |
5951 | } |
5952 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5953 | int x[] = {25, 17}; | |
5954 | const int *foo = &x[0]; | |
5955 | ++foo; | |
5956 | } | |
5957 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5958 | typedef const int *iptr; | |
5959 | iptr p = 0; | |
5960 | ++p; | |
5961 | } | |
0ee50808 | 5962 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying |
f73dda09 | 5963 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
0ee50808 CR |
5964 | struct s { int j; const int *ap[3]; } bx; |
5965 | struct s *b = &bx; b->j = 5; | |
f73dda09 JA |
5966 | } |
5967 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5968 | const int foo = 10; | |
b709b946 | 5969 | if (!foo) return 0; |
f73dda09 | 5970 | } |
dd4f3dd8 | 5971 | return !cs[0] && !zero.x; |
ccc6cda3 JA |
5972 | #endif |
5973 | ||
f73dda09 JA |
5974 | ; |
5975 | return 0; | |
5976 | } | |
5977 | _ACEOF | |
1b1fe467 | 5978 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 JA |
5979 | ac_cv_c_const=yes |
5980 | else | |
1b1fe467 | 5981 | ac_cv_c_const=no |
f73dda09 | 5982 | fi |
b709b946 | 5983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f73dda09 | 5984 | fi |
1b1fe467 | 5985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
dd4f3dd8 | 5986 | $as_echo "$ac_cv_c_const" >&6; } |
f73dda09 JA |
5987 | if test $ac_cv_c_const = no; then |
5988 | ||
1b1fe467 | 5989 | $as_echo "#define const /**/" >>confdefs.h |
ccc6cda3 JA |
5990 | |
5991 | fi | |
5992 | ||
1b1fe467 | 5993 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
dd4f3dd8 | 5994 | $as_echo_n "checking for inline... " >&6; } |
1b1fe467 | 5995 | if ${ac_cv_c_inline+:} false; then : |
dd4f3dd8 | 5996 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 5997 | else |
f73dda09 JA |
5998 | ac_cv_c_inline=no |
5999 | for ac_kw in inline __inline__ __inline; do | |
1b1fe467 | 6000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6001 | /* end confdefs.h. */ |
f73dda09 | 6002 | #ifndef __cplusplus |
5e4a95c7 CR |
6003 | typedef int foo_t; |
6004 | static $ac_kw foo_t static_foo () {return 0; } | |
6005 | $ac_kw foo_t foo () {return 0; } | |
ccc6cda3 JA |
6006 | #endif |
6007 | ||
f73dda09 | 6008 | _ACEOF |
1b1fe467 | 6009 | if ac_fn_c_try_compile "$LINENO"; then : |
b709b946 | 6010 | ac_cv_c_inline=$ac_kw |
f73dda09 | 6011 | fi |
b709b946 CR |
6012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6013 | test "$ac_cv_c_inline" != no && break | |
f73dda09 | 6014 | done |
ccc6cda3 JA |
6015 | |
6016 | fi | |
1b1fe467 | 6017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
dd4f3dd8 | 6018 | $as_echo "$ac_cv_c_inline" >&6; } |
5e4a95c7 | 6019 | |
f73dda09 JA |
6020 | case $ac_cv_c_inline in |
6021 | inline | yes) ;; | |
5e4a95c7 CR |
6022 | *) |
6023 | case $ac_cv_c_inline in | |
6024 | no) ac_val=;; | |
6025 | *) ac_val=$ac_cv_c_inline;; | |
6026 | esac | |
6027 | cat >>confdefs.h <<_ACEOF | |
6028 | #ifndef __cplusplus | |
6029 | #define inline $ac_val | |
6030 | #endif | |
5c26afb8 | 6031 | _ACEOF |
5e4a95c7 | 6032 | ;; |
f73dda09 | 6033 | esac |
ccc6cda3 | 6034 | |
1b1fe467 | 6035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
dd4f3dd8 | 6036 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } |
1b1fe467 | 6037 | if ${ac_cv_c_bigendian+:} false; then : |
dd4f3dd8 | 6038 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 6039 | else |
dd4f3dd8 | 6040 | ac_cv_c_bigendian=unknown |
af98a2a6 | 6041 | # See if we're dealing with a universal compiler. |
1b1fe467 | 6042 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6043 | /* end confdefs.h. */ |
af98a2a6 CR |
6044 | #ifndef __APPLE_CC__ |
6045 | not a universal capable compiler | |
dd4f3dd8 CR |
6046 | #endif |
6047 | typedef int dummy; | |
ccc6cda3 | 6048 | |
f73dda09 | 6049 | _ACEOF |
1b1fe467 | 6050 | if ac_fn_c_try_compile "$LINENO"; then : |
af98a2a6 CR |
6051 | |
6052 | # Check for potential -arch flags. It is not universal unless | |
1b1fe467 CR |
6053 | # there are at least two -arch flags with different values. |
6054 | ac_arch= | |
6055 | ac_prev= | |
6056 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
6057 | if test -n "$ac_prev"; then | |
6058 | case $ac_word in | |
6059 | i?86 | x86_64 | ppc | ppc64) | |
6060 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
6061 | ac_arch=$ac_word | |
6062 | else | |
6063 | ac_cv_c_bigendian=universal | |
6064 | break | |
6065 | fi | |
6066 | ;; | |
6067 | esac | |
6068 | ac_prev= | |
6069 | elif test "x$ac_word" = "x-arch"; then | |
6070 | ac_prev=arch | |
6071 | fi | |
6072 | done | |
dd4f3dd8 | 6073 | fi |
dd4f3dd8 CR |
6074 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6075 | if test $ac_cv_c_bigendian = unknown; then | |
6076 | # See if sys/param.h defines the BYTE_ORDER macro. | |
1b1fe467 | 6077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
dd4f3dd8 CR |
6078 | /* end confdefs.h. */ |
6079 | #include <sys/types.h> | |
6080 | #include <sys/param.h> | |
6081 | ||
6082 | int | |
6083 | main () | |
6084 | { | |
6085 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
6086 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
6087 | && LITTLE_ENDIAN) | |
6088 | bogus endian macros | |
6089 | #endif | |
6090 | ||
6091 | ; | |
6092 | return 0; | |
6093 | } | |
6094 | _ACEOF | |
1b1fe467 | 6095 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 | 6096 | # It does; now see whether it defined to BIG_ENDIAN or not. |
1b1fe467 | 6097 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6098 | /* end confdefs.h. */ |
f73dda09 | 6099 | #include <sys/types.h> |
dd4f3dd8 | 6100 | #include <sys/param.h> |
ccc6cda3 | 6101 | |
f73dda09 JA |
6102 | int |
6103 | main () | |
6104 | { | |
6105 | #if BYTE_ORDER != BIG_ENDIAN | |
dd4f3dd8 CR |
6106 | not big endian |
6107 | #endif | |
ccc6cda3 | 6108 | |
f73dda09 JA |
6109 | ; |
6110 | return 0; | |
6111 | } | |
6112 | _ACEOF | |
1b1fe467 | 6113 | if ac_fn_c_try_compile "$LINENO"; then : |
f73dda09 | 6114 | ac_cv_c_bigendian=yes |
ccc6cda3 | 6115 | else |
1b1fe467 | 6116 | ac_cv_c_bigendian=no |
ccc6cda3 | 6117 | fi |
b709b946 | 6118 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dd4f3dd8 | 6119 | fi |
dd4f3dd8 CR |
6120 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6121 | fi | |
6122 | if test $ac_cv_c_bigendian = unknown; then | |
6123 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
1b1fe467 | 6124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6125 | /* end confdefs.h. */ |
dd4f3dd8 CR |
6126 | #include <limits.h> |
6127 | ||
a82a04b3 CR |
6128 | int |
6129 | main () | |
6130 | { | |
dd4f3dd8 CR |
6131 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) |
6132 | bogus endian macros | |
6133 | #endif | |
6134 | ||
a82a04b3 CR |
6135 | ; |
6136 | return 0; | |
6137 | } | |
6138 | _ACEOF | |
1b1fe467 | 6139 | if ac_fn_c_try_compile "$LINENO"; then : |
dd4f3dd8 | 6140 | # It does; now see whether it defined to _BIG_ENDIAN or not. |
1b1fe467 | 6141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
dd4f3dd8 CR |
6142 | /* end confdefs.h. */ |
6143 | #include <limits.h> | |
6144 | ||
6145 | int | |
6146 | main () | |
6147 | { | |
6148 | #ifndef _BIG_ENDIAN | |
6149 | not big endian | |
6150 | #endif | |
6151 | ||
6152 | ; | |
6153 | return 0; | |
6154 | } | |
6155 | _ACEOF | |
1b1fe467 | 6156 | if ac_fn_c_try_compile "$LINENO"; then : |
dd4f3dd8 CR |
6157 | ac_cv_c_bigendian=yes |
6158 | else | |
1b1fe467 | 6159 | ac_cv_c_bigendian=no |
dd4f3dd8 | 6160 | fi |
dd4f3dd8 | 6161 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
dd4f3dd8 | 6162 | fi |
dd4f3dd8 CR |
6163 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6164 | fi | |
6165 | if test $ac_cv_c_bigendian = unknown; then | |
6166 | # Compile a test program. | |
1b1fe467 | 6167 | if test "$cross_compiling" = yes; then : |
dd4f3dd8 | 6168 | # Try to guess by grepping values from an object file. |
1b1fe467 | 6169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
dd4f3dd8 CR |
6170 | /* end confdefs.h. */ |
6171 | short int ascii_mm[] = | |
6172 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
6173 | short int ascii_ii[] = | |
6174 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
6175 | int use_ascii (int i) { | |
6176 | return ascii_mm[i] + ascii_ii[i]; | |
6177 | } | |
6178 | short int ebcdic_ii[] = | |
6179 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
6180 | short int ebcdic_mm[] = | |
6181 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
6182 | int use_ebcdic (int i) { | |
6183 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
6184 | } | |
6185 | extern int foo; | |
6186 | ||
6187 | int | |
6188 | main () | |
6189 | { | |
6190 | return use_ascii (foo) == use_ebcdic (foo); | |
6191 | ; | |
6192 | return 0; | |
6193 | } | |
6194 | _ACEOF | |
1b1fe467 | 6195 | if ac_fn_c_try_compile "$LINENO"; then : |
dd4f3dd8 CR |
6196 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then |
6197 | ac_cv_c_bigendian=yes | |
6198 | fi | |
6199 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
6200 | if test "$ac_cv_c_bigendian" = unknown; then | |
6201 | ac_cv_c_bigendian=no | |
6202 | else | |
6203 | # finding both strings is unlikely to happen, but who knows? | |
6204 | ac_cv_c_bigendian=unknown | |
6205 | fi | |
6206 | fi | |
1b1fe467 CR |
6207 | fi |
6208 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7175a77f | 6209 | else |
1b1fe467 | 6210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7610e0c5 | 6211 | /* end confdefs.h. */ |
b709b946 | 6212 | $ac_includes_default |
f73dda09 JA |
6213 | int |
6214 | main () | |
ccc6cda3 | 6215 | { |
b709b946 | 6216 | |
dd4f3dd8 CR |
6217 | /* Are we little or big endian? From Harbison&Steele. */ |
6218 | union | |
6219 | { | |
6220 | long int l; | |
6221 | char c[sizeof (long int)]; | |
6222 | } u; | |
6223 | u.l = 1; | |
6224 | return u.c[sizeof (long int) - 1] == 1; | |
b709b946 CR |
6225 | |
6226 | ; | |
6227 | return 0; | |
ccc6cda3 | 6228 | } |
f73dda09 | 6229 | _ACEOF |
1b1fe467 | 6230 | if ac_fn_c_try_run "$LINENO"; then : |
abe2eb5b CR |
6231 | ac_cv_c_bigendian=no |
6232 | else | |
1b1fe467 | 6233 | ac_cv_c_bigendian=yes |
abe2eb5b | 6234 | fi |
1b1fe467 CR |
6235 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6236 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
abe2eb5b CR |
6237 | fi |
6238 | ||
abe2eb5b CR |
6239 | fi |
6240 | fi | |
1b1fe467 | 6241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
abe2eb5b CR |
6242 | $as_echo "$ac_cv_c_bigendian" >&6; } |
6243 | case $ac_cv_c_bigendian in #( | |
dd4f3dd8 | 6244 | yes) |
1b1fe467 | 6245 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h |
dd4f3dd8 CR |
6246 | ;; #( |
6247 | no) | |
6248 | ;; #( | |
6249 | universal) | |
af98a2a6 | 6250 | |
1b1fe467 | 6251 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
af98a2a6 CR |
6252 | |
6253 | ;; #( | |
dd4f3dd8 | 6254 | *) |
1b1fe467 CR |
6255 | as_fn_error $? "unknown endianness |
6256 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
dd4f3dd8 | 6257 | esac |
ccc6cda3 | 6258 | |
1b1fe467 | 6259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 |
dd4f3dd8 | 6260 | $as_echo_n "checking for preprocessor stringizing operator... " >&6; } |
1b1fe467 | 6261 | if ${ac_cv_c_stringize+:} false; then : |
dd4f3dd8 | 6262 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 6263 | else |
1b1fe467 | 6264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6265 | /* end confdefs.h. */ |
f73dda09 | 6266 | #define x(y) #y |
ccc6cda3 | 6267 | |
f73dda09 JA |
6268 | char *s = x(teststring); |
6269 | _ACEOF | |
6270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 6271 | $EGREP "#teststring" >/dev/null 2>&1; then : |
f73dda09 | 6272 | ac_cv_c_stringize=no |
ccc6cda3 | 6273 | else |
f73dda09 | 6274 | ac_cv_c_stringize=yes |
ccc6cda3 | 6275 | fi |
f73dda09 | 6276 | rm -f conftest* |
ccc6cda3 JA |
6277 | |
6278 | fi | |
1b1fe467 | 6279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stringize" >&5 |
dd4f3dd8 | 6280 | $as_echo "$ac_cv_c_stringize" >&6; } |
f73dda09 | 6281 | if test $ac_cv_c_stringize = yes; then |
ccc6cda3 | 6282 | |
1b1fe467 | 6283 | $as_echo "#define HAVE_STRINGIZE 1" >>confdefs.h |
ccc6cda3 JA |
6284 | |
6285 | fi | |
6286 | ||
b709b946 CR |
6287 | |
6288 | ||
1b1fe467 | 6289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double with more range or precision than double" >&5 |
dd4f3dd8 | 6290 | $as_echo_n "checking for long double with more range or precision than double... " >&6; } |
1b1fe467 | 6291 | if ${ac_cv_type_long_double_wider+:} false; then : |
dd4f3dd8 | 6292 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 6293 | else |
1b1fe467 | 6294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6295 | /* end confdefs.h. */ |
a82a04b3 | 6296 | #include <float.h> |
b709b946 CR |
6297 | long double const a[] = |
6298 | { | |
6299 | 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON, | |
6300 | LDBL_MIN, LDBL_MAX, LDBL_EPSILON | |
6301 | }; | |
6302 | long double | |
6303 | f (long double x) | |
6304 | { | |
6305 | return ((x + (unsigned long int) 10) * (-1 / x) + a[0] | |
6306 | + (x ? f (x) : 'c')); | |
6307 | } | |
6308 | ||
f73dda09 JA |
6309 | int |
6310 | main () | |
6311 | { | |
b709b946 CR |
6312 | static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP) |
6313 | + (DBL_MANT_DIG < LDBL_MANT_DIG) | |
6314 | - (LDBL_MAX_EXP < DBL_MAX_EXP) | |
6315 | - (LDBL_MANT_DIG < DBL_MANT_DIG))) | |
6316 | && (int) LDBL_EPSILON == 0 | |
6317 | )]; | |
0ee50808 CR |
6318 | test_array [0] = 0; |
6319 | return test_array [0]; | |
a82a04b3 CR |
6320 | |
6321 | ; | |
6322 | return 0; | |
ccc6cda3 | 6323 | } |
f73dda09 | 6324 | _ACEOF |
1b1fe467 | 6325 | if ac_fn_c_try_compile "$LINENO"; then : |
b709b946 | 6326 | ac_cv_type_long_double_wider=yes |
ccc6cda3 | 6327 | else |
1b1fe467 | 6328 | ac_cv_type_long_double_wider=no |
f73dda09 | 6329 | fi |
b709b946 | 6330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
e624d0f7 | 6331 | fi |
1b1fe467 | 6332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double_wider" >&5 |
dd4f3dd8 | 6333 | $as_echo "$ac_cv_type_long_double_wider" >&6; } |
b709b946 CR |
6334 | if test $ac_cv_type_long_double_wider = yes; then |
6335 | ||
1b1fe467 | 6336 | $as_echo "#define HAVE_LONG_DOUBLE_WIDER 1" >>confdefs.h |
b709b946 CR |
6337 | |
6338 | fi | |
6339 | ||
6340 | ac_cv_c_long_double=$ac_cv_type_long_double_wider | |
6341 | if test $ac_cv_c_long_double = yes; then | |
ccc6cda3 | 6342 | |
1b1fe467 | 6343 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
ccc6cda3 | 6344 | |
b709b946 | 6345 | fi |
ccc6cda3 | 6346 | |
1b1fe467 | 6347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 |
dd4f3dd8 | 6348 | $as_echo_n "checking for function prototypes... " >&6; } |
b709b946 | 6349 | if test "$ac_cv_prog_cc_c89" != no; then |
1b1fe467 | 6350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
dd4f3dd8 | 6351 | $as_echo "yes" >&6; } |
ccc6cda3 | 6352 | |
1b1fe467 | 6353 | $as_echo "#define PROTOTYPES 1" >>confdefs.h |
ccc6cda3 | 6354 | |
545f34cf | 6355 | |
1b1fe467 | 6356 | $as_echo "#define __PROTOTYPES 1" >>confdefs.h |
e624d0f7 | 6357 | |
e624d0f7 | 6358 | else |
1b1fe467 | 6359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 6360 | $as_echo "no" >&6; } |
e624d0f7 | 6361 | fi |
e624d0f7 | 6362 | |
1b1fe467 | 6363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 |
dd4f3dd8 | 6364 | $as_echo_n "checking whether char is unsigned... " >&6; } |
1b1fe467 | 6365 | if ${ac_cv_c_char_unsigned+:} false; then : |
dd4f3dd8 | 6366 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 6367 | else |
1b1fe467 | 6368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6369 | /* end confdefs.h. */ |
545f34cf CR |
6370 | $ac_includes_default |
6371 | int | |
6372 | main () | |
6373 | { | |
a82a04b3 | 6374 | static int test_array [1 - 2 * !(((char) -1) < 0)]; |
0ee50808 CR |
6375 | test_array [0] = 0; |
6376 | return test_array [0]; | |
a82a04b3 | 6377 | |
545f34cf CR |
6378 | ; |
6379 | return 0; | |
6380 | } | |
f73dda09 | 6381 | _ACEOF |
1b1fe467 | 6382 | if ac_fn_c_try_compile "$LINENO"; then : |
545f34cf | 6383 | ac_cv_c_char_unsigned=no |
f73dda09 | 6384 | else |
1b1fe467 | 6385 | ac_cv_c_char_unsigned=yes |
5e13499c | 6386 | fi |
b709b946 | 6387 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e13499c | 6388 | fi |
1b1fe467 | 6389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 |
dd4f3dd8 | 6390 | $as_echo "$ac_cv_c_char_unsigned" >&6; } |
5e13499c | 6391 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
1b1fe467 | 6392 | $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h |
5e13499c | 6393 | |
a927e029 CR |
6394 | fi |
6395 | ||
1b1fe467 | 6396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 |
a927e029 | 6397 | $as_echo_n "checking for working volatile... " >&6; } |
1b1fe467 | 6398 | if ${ac_cv_c_volatile+:} false; then : |
a927e029 CR |
6399 | $as_echo_n "(cached) " >&6 |
6400 | else | |
1b1fe467 | 6401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a927e029 CR |
6402 | /* end confdefs.h. */ |
6403 | ||
6404 | int | |
6405 | main () | |
6406 | { | |
6407 | ||
6408 | volatile int x; | |
6409 | int * volatile y = (int *) 0; | |
6410 | return !x && !y; | |
6411 | ; | |
6412 | return 0; | |
6413 | } | |
6414 | _ACEOF | |
1b1fe467 | 6415 | if ac_fn_c_try_compile "$LINENO"; then : |
a927e029 CR |
6416 | ac_cv_c_volatile=yes |
6417 | else | |
1b1fe467 | 6418 | ac_cv_c_volatile=no |
a927e029 | 6419 | fi |
a927e029 CR |
6420 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6421 | fi | |
1b1fe467 | 6422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 |
a927e029 CR |
6423 | $as_echo "$ac_cv_c_volatile" >&6; } |
6424 | if test $ac_cv_c_volatile = no; then | |
6425 | ||
1b1fe467 | 6426 | $as_echo "#define volatile /**/" >>confdefs.h |
a927e029 | 6427 | |
5e13499c CR |
6428 | fi |
6429 | ||
1b1fe467 | 6430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 |
c1d39fb8 | 6431 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } |
1b1fe467 | 6432 | if ${ac_cv_c_restrict+:} false; then : |
c1d39fb8 CR |
6433 | $as_echo_n "(cached) " >&6 |
6434 | else | |
6435 | ac_cv_c_restrict=no | |
6436 | # The order here caters to the fact that C++ does not require restrict. | |
6437 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
1b1fe467 | 6438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c1d39fb8 CR |
6439 | /* end confdefs.h. */ |
6440 | typedef int * int_ptr; | |
6441 | int foo (int_ptr $ac_kw ip) { | |
6442 | return ip[0]; | |
6443 | } | |
6444 | int | |
6445 | main () | |
6446 | { | |
6447 | int s[1]; | |
6448 | int * $ac_kw t = s; | |
6449 | t[0] = 0; | |
6450 | return foo(t) | |
6451 | ; | |
6452 | return 0; | |
6453 | } | |
6454 | _ACEOF | |
1b1fe467 | 6455 | if ac_fn_c_try_compile "$LINENO"; then : |
c1d39fb8 | 6456 | ac_cv_c_restrict=$ac_kw |
c1d39fb8 | 6457 | fi |
c1d39fb8 CR |
6458 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6459 | test "$ac_cv_c_restrict" != no && break | |
6460 | done | |
6461 | ||
6462 | fi | |
1b1fe467 | 6463 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 |
c1d39fb8 CR |
6464 | $as_echo "$ac_cv_c_restrict" >&6; } |
6465 | ||
c1d39fb8 CR |
6466 | case $ac_cv_c_restrict in |
6467 | restrict) ;; | |
1b1fe467 | 6468 | no) $as_echo "#define restrict /**/" >>confdefs.h |
c1d39fb8 CR |
6469 | ;; |
6470 | *) cat >>confdefs.h <<_ACEOF | |
6471 | #define restrict $ac_cv_c_restrict | |
6472 | _ACEOF | |
6473 | ;; | |
6474 | esac | |
6475 | ||
a82a04b3 CR |
6476 | |
6477 | ||
5e13499c CR |
6478 | MKINSTALLDIRS= |
6479 | if test -n "$ac_aux_dir"; then | |
6480 | case "$ac_aux_dir" in | |
6481 | /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; | |
6482 | *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; | |
6483 | esac | |
6484 | fi | |
6485 | if test -z "$MKINSTALLDIRS"; then | |
6486 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6487 | fi | |
6488 | ||
a82a04b3 CR |
6489 | |
6490 | ||
1b1fe467 | 6491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
dd4f3dd8 | 6492 | $as_echo_n "checking whether NLS is requested... " >&6; } |
b709b946 | 6493 | # Check whether --enable-nls was given. |
1b1fe467 | 6494 | if test "${enable_nls+set}" = set; then : |
b709b946 | 6495 | enableval=$enable_nls; USE_NLS=$enableval |
5e13499c CR |
6496 | else |
6497 | USE_NLS=yes | |
b709b946 CR |
6498 | fi |
6499 | ||
1b1fe467 | 6500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 |
dd4f3dd8 | 6501 | $as_echo "$USE_NLS" >&6; } |
5e13499c | 6502 | |
a82a04b3 CR |
6503 | |
6504 | ||
6505 | ||
6506 | ||
6507 | ||
5e13499c CR |
6508 | # Prepare PATH_SEPARATOR. |
6509 | # The user is always right. | |
6510 | if test "${PATH_SEPARATOR+set}" != set; then | |
6511 | echo "#! /bin/sh" >conf$$.sh | |
6512 | echo "exit 0" >>conf$$.sh | |
6513 | chmod +x conf$$.sh | |
6514 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6515 | PATH_SEPARATOR=';' | |
6516 | else | |
6517 | PATH_SEPARATOR=: | |
6518 | fi | |
6519 | rm -f conf$$.sh | |
6520 | fi | |
6521 | ||
6522 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6523 | # as systems may use methods other than mode bits to determine executability. | |
6524 | cat >conf$$.file <<_ASEOF | |
6525 | #! /bin/sh | |
6526 | exit 0 | |
6527 | _ASEOF | |
6528 | chmod +x conf$$.file | |
6529 | if test -x conf$$.file >/dev/null 2>&1; then | |
6530 | ac_executable_p="test -x" | |
6531 | else | |
6532 | ac_executable_p="test -f" | |
6533 | fi | |
6534 | rm -f conf$$.file | |
6535 | ||
6536 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6537 | set dummy msgfmt; ac_word=$2 | |
1b1fe467 | 6538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 6539 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 6540 | if ${ac_cv_path_MSGFMT+:} false; then : |
dd4f3dd8 | 6541 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
6542 | else |
6543 | case "$MSGFMT" in | |
6544 | [\\/]* | ?:[\\/]*) | |
6545 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
6546 | ;; | |
6547 | *) | |
6548 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
6549 | for ac_dir in $PATH; do | |
6550 | IFS="$ac_save_IFS" | |
6551 | test -z "$ac_dir" && ac_dir=. | |
6552 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6553 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6554 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && | |
6555 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | |
6556 | ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" | |
6557 | break 2 | |
6558 | fi | |
6559 | fi | |
6560 | done | |
6561 | done | |
6562 | IFS="$ac_save_IFS" | |
6563 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" | |
6564 | ;; | |
6565 | esac | |
6566 | fi | |
6567 | MSGFMT="$ac_cv_path_MSGFMT" | |
6568 | if test "$MSGFMT" != ":"; then | |
1b1fe467 | 6569 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 |
dd4f3dd8 | 6570 | $as_echo "$MSGFMT" >&6; } |
5e13499c | 6571 | else |
1b1fe467 | 6572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 6573 | $as_echo "no" >&6; } |
5e13499c CR |
6574 | fi |
6575 | ||
6576 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6577 | set dummy gmsgfmt; ac_word=$2 | |
1b1fe467 | 6578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 6579 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 6580 | if ${ac_cv_path_GMSGFMT+:} false; then : |
dd4f3dd8 | 6581 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
6582 | else |
6583 | case $GMSGFMT in | |
6584 | [\\/]* | ?:[\\/]*) | |
6585 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
6586 | ;; | |
6587 | *) | |
a82a04b3 CR |
6588 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
6589 | for as_dir in $PATH | |
6590 | do | |
6591 | IFS=$as_save_IFS | |
6592 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 6593 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 6594 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 6595 | ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" |
1b1fe467 | 6596 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
6597 | break 2 |
6598 | fi | |
6599 | done | |
1b1fe467 | 6600 | done |
b709b946 | 6601 | IFS=$as_save_IFS |
5e13499c CR |
6602 | |
6603 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
6604 | ;; | |
6605 | esac | |
6606 | fi | |
6607 | GMSGFMT=$ac_cv_path_GMSGFMT | |
5e13499c | 6608 | if test -n "$GMSGFMT"; then |
1b1fe467 | 6609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 |
dd4f3dd8 | 6610 | $as_echo "$GMSGFMT" >&6; } |
5e13499c | 6611 | else |
1b1fe467 | 6612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 6613 | $as_echo "no" >&6; } |
5e13499c CR |
6614 | fi |
6615 | ||
a82a04b3 CR |
6616 | |
6617 | ||
b709b946 | 6618 | |
5e13499c CR |
6619 | # Prepare PATH_SEPARATOR. |
6620 | # The user is always right. | |
6621 | if test "${PATH_SEPARATOR+set}" != set; then | |
6622 | echo "#! /bin/sh" >conf$$.sh | |
6623 | echo "exit 0" >>conf$$.sh | |
6624 | chmod +x conf$$.sh | |
6625 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6626 | PATH_SEPARATOR=';' | |
6627 | else | |
6628 | PATH_SEPARATOR=: | |
6629 | fi | |
6630 | rm -f conf$$.sh | |
6631 | fi | |
6632 | ||
6633 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6634 | # as systems may use methods other than mode bits to determine executability. | |
6635 | cat >conf$$.file <<_ASEOF | |
6636 | #! /bin/sh | |
6637 | exit 0 | |
6638 | _ASEOF | |
6639 | chmod +x conf$$.file | |
6640 | if test -x conf$$.file >/dev/null 2>&1; then | |
6641 | ac_executable_p="test -x" | |
6642 | else | |
6643 | ac_executable_p="test -f" | |
6644 | fi | |
6645 | rm -f conf$$.file | |
6646 | ||
6647 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6648 | set dummy xgettext; ac_word=$2 | |
1b1fe467 | 6649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 6650 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 6651 | if ${ac_cv_path_XGETTEXT+:} false; then : |
dd4f3dd8 | 6652 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
6653 | else |
6654 | case "$XGETTEXT" in | |
6655 | [\\/]* | ?:[\\/]*) | |
6656 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
6657 | ;; | |
6658 | *) | |
6659 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
6660 | for ac_dir in $PATH; do | |
6661 | IFS="$ac_save_IFS" | |
6662 | test -z "$ac_dir" && ac_dir=. | |
6663 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6664 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6665 | if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && | |
6666 | (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 | |
6667 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" | |
6668 | break 2 | |
6669 | fi | |
6670 | fi | |
6671 | done | |
6672 | done | |
6673 | IFS="$ac_save_IFS" | |
6674 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
6675 | ;; | |
6676 | esac | |
6677 | fi | |
6678 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
6679 | if test "$XGETTEXT" != ":"; then | |
1b1fe467 | 6680 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 |
dd4f3dd8 | 6681 | $as_echo "$XGETTEXT" >&6; } |
5e13499c | 6682 | else |
1b1fe467 | 6683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 6684 | $as_echo "no" >&6; } |
5e13499c CR |
6685 | fi |
6686 | ||
6687 | rm -f messages.po | |
6688 | ||
a82a04b3 | 6689 | |
5e13499c CR |
6690 | # Prepare PATH_SEPARATOR. |
6691 | # The user is always right. | |
6692 | if test "${PATH_SEPARATOR+set}" != set; then | |
6693 | echo "#! /bin/sh" >conf$$.sh | |
6694 | echo "exit 0" >>conf$$.sh | |
6695 | chmod +x conf$$.sh | |
6696 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6697 | PATH_SEPARATOR=';' | |
6698 | else | |
6699 | PATH_SEPARATOR=: | |
6700 | fi | |
6701 | rm -f conf$$.sh | |
6702 | fi | |
6703 | ||
6704 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6705 | # as systems may use methods other than mode bits to determine executability. | |
6706 | cat >conf$$.file <<_ASEOF | |
6707 | #! /bin/sh | |
6708 | exit 0 | |
6709 | _ASEOF | |
6710 | chmod +x conf$$.file | |
6711 | if test -x conf$$.file >/dev/null 2>&1; then | |
6712 | ac_executable_p="test -x" | |
6713 | else | |
6714 | ac_executable_p="test -f" | |
6715 | fi | |
6716 | rm -f conf$$.file | |
6717 | ||
6718 | # Extract the first word of "msgmerge", so it can be a program name with args. | |
6719 | set dummy msgmerge; ac_word=$2 | |
1b1fe467 | 6720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 6721 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 6722 | if ${ac_cv_path_MSGMERGE+:} false; then : |
dd4f3dd8 | 6723 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
6724 | else |
6725 | case "$MSGMERGE" in | |
6726 | [\\/]* | ?:[\\/]*) | |
6727 | ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. | |
6728 | ;; | |
6729 | *) | |
6730 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
6731 | for ac_dir in $PATH; do | |
6732 | IFS="$ac_save_IFS" | |
6733 | test -z "$ac_dir" && ac_dir=. | |
6734 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6735 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6736 | if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then | |
6737 | ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" | |
6738 | break 2 | |
6739 | fi | |
6740 | fi | |
6741 | done | |
6742 | done | |
6743 | IFS="$ac_save_IFS" | |
6744 | test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" | |
6745 | ;; | |
6746 | esac | |
6747 | fi | |
6748 | MSGMERGE="$ac_cv_path_MSGMERGE" | |
6749 | if test "$MSGMERGE" != ":"; then | |
1b1fe467 | 6750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 |
dd4f3dd8 | 6751 | $as_echo "$MSGMERGE" >&6; } |
5e13499c | 6752 | else |
1b1fe467 | 6753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 6754 | $as_echo "no" >&6; } |
5e13499c CR |
6755 | fi |
6756 | ||
a82a04b3 | 6757 | |
5e13499c CR |
6758 | if test "$GMSGFMT" != ":"; then |
6759 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && | |
6760 | (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | |
6761 | : ; | |
6762 | else | |
6763 | GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` | |
1b1fe467 | 6764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 |
dd4f3dd8 | 6765 | $as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; } |
5e13499c CR |
6766 | GMSGFMT=":" |
6767 | fi | |
6768 | fi | |
6769 | ||
6770 | if test "$XGETTEXT" != ":"; then | |
6771 | if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && | |
6772 | (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | |
6773 | : ; | |
6774 | else | |
1b1fe467 | 6775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 |
dd4f3dd8 | 6776 | $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } |
5e13499c CR |
6777 | XGETTEXT=":" |
6778 | fi | |
6779 | rm -f messages.po | |
6780 | fi | |
6781 | ||
b709b946 | 6782 | ac_config_commands="$ac_config_commands default-1" |
a82a04b3 | 6783 | |
5e13499c | 6784 | |
1b1fe467 CR |
6785 | ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" |
6786 | if test "x$ac_cv_type_off_t" = xyes; then : | |
7175a77f | 6787 | |
5e13499c CR |
6788 | else |
6789 | ||
a82a04b3 | 6790 | cat >>confdefs.h <<_ACEOF |
b709b946 | 6791 | #define off_t long int |
a82a04b3 | 6792 | _ACEOF |
5e13499c CR |
6793 | |
6794 | fi | |
6795 | ||
1b1fe467 CR |
6796 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
6797 | if test "x$ac_cv_type_size_t" = xyes; then : | |
abe2eb5b | 6798 | |
5e13499c CR |
6799 | else |
6800 | ||
a82a04b3 | 6801 | cat >>confdefs.h <<_ACEOF |
b709b946 | 6802 | #define size_t unsigned int |
a82a04b3 | 6803 | _ACEOF |
5e13499c CR |
6804 | |
6805 | fi | |
6806 | ||
6807 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
6808 | # for constant arguments. Useless! | |
1b1fe467 | 6809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
dd4f3dd8 | 6810 | $as_echo_n "checking for working alloca.h... " >&6; } |
1b1fe467 | 6811 | if ${ac_cv_working_alloca_h+:} false; then : |
dd4f3dd8 | 6812 | $as_echo_n "(cached) " >&6 |
5e13499c | 6813 | else |
1b1fe467 | 6814 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6815 | /* end confdefs.h. */ |
5e13499c CR |
6816 | #include <alloca.h> |
6817 | int | |
6818 | main () | |
6819 | { | |
6820 | char *p = (char *) alloca (2 * sizeof (int)); | |
b709b946 | 6821 | if (p) return 0; |
5e13499c CR |
6822 | ; |
6823 | return 0; | |
6824 | } | |
6825 | _ACEOF | |
1b1fe467 | 6826 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c CR |
6827 | ac_cv_working_alloca_h=yes |
6828 | else | |
1b1fe467 | 6829 | ac_cv_working_alloca_h=no |
5e13499c | 6830 | fi |
1b1fe467 CR |
6831 | rm -f core conftest.err conftest.$ac_objext \ |
6832 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c | 6833 | fi |
1b1fe467 | 6834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
dd4f3dd8 | 6835 | $as_echo "$ac_cv_working_alloca_h" >&6; } |
5e13499c CR |
6836 | if test $ac_cv_working_alloca_h = yes; then |
6837 | ||
1b1fe467 | 6838 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
5e13499c CR |
6839 | |
6840 | fi | |
6841 | ||
1b1fe467 | 6842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
dd4f3dd8 | 6843 | $as_echo_n "checking for alloca... " >&6; } |
1b1fe467 | 6844 | if ${ac_cv_func_alloca_works+:} false; then : |
dd4f3dd8 | 6845 | $as_echo_n "(cached) " >&6 |
5e13499c | 6846 | else |
1b1fe467 | 6847 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6848 | /* end confdefs.h. */ |
5e13499c CR |
6849 | #ifdef __GNUC__ |
6850 | # define alloca __builtin_alloca | |
6851 | #else | |
6852 | # ifdef _MSC_VER | |
6853 | # include <malloc.h> | |
6854 | # define alloca _alloca | |
6855 | # else | |
dd4f3dd8 | 6856 | # ifdef HAVE_ALLOCA_H |
5e13499c CR |
6857 | # include <alloca.h> |
6858 | # else | |
6859 | # ifdef _AIX | |
6860 | #pragma alloca | |
6861 | # else | |
6862 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
1b1fe467 | 6863 | void *alloca (size_t); |
5e13499c CR |
6864 | # endif |
6865 | # endif | |
6866 | # endif | |
6867 | # endif | |
6868 | #endif | |
6869 | ||
6870 | int | |
6871 | main () | |
6872 | { | |
6873 | char *p = (char *) alloca (1); | |
b709b946 | 6874 | if (p) return 0; |
5e13499c CR |
6875 | ; |
6876 | return 0; | |
6877 | } | |
6878 | _ACEOF | |
1b1fe467 | 6879 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c CR |
6880 | ac_cv_func_alloca_works=yes |
6881 | else | |
1b1fe467 | 6882 | ac_cv_func_alloca_works=no |
5e13499c | 6883 | fi |
1b1fe467 CR |
6884 | rm -f core conftest.err conftest.$ac_objext \ |
6885 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c | 6886 | fi |
1b1fe467 | 6887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
dd4f3dd8 | 6888 | $as_echo "$ac_cv_func_alloca_works" >&6; } |
5e13499c CR |
6889 | |
6890 | if test $ac_cv_func_alloca_works = yes; then | |
6891 | ||
1b1fe467 | 6892 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
5e13499c CR |
6893 | |
6894 | else | |
6895 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
6896 | # that cause trouble. Some versions do not even contain alloca or | |
6897 | # contain a buggy version. If you still want to use their alloca, | |
6898 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
6899 | ||
b709b946 | 6900 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
5e13499c | 6901 | |
1b1fe467 | 6902 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
a82a04b3 | 6903 | |
545f34cf | 6904 | |
1b1fe467 | 6905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
dd4f3dd8 | 6906 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } |
1b1fe467 | 6907 | if ${ac_cv_os_cray+:} false; then : |
dd4f3dd8 | 6908 | $as_echo_n "(cached) " >&6 |
5e13499c | 6909 | else |
1b1fe467 | 6910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 6911 | /* end confdefs.h. */ |
b709b946 | 6912 | #if defined CRAY && ! defined CRAY2 |
5e13499c CR |
6913 | webecray |
6914 | #else | |
6915 | wenotbecray | |
6916 | #endif | |
6917 | ||
6918 | _ACEOF | |
6919 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 6920 | $EGREP "webecray" >/dev/null 2>&1; then : |
5e13499c CR |
6921 | ac_cv_os_cray=yes |
6922 | else | |
6923 | ac_cv_os_cray=no | |
6924 | fi | |
6925 | rm -f conftest* | |
6926 | ||
6927 | fi | |
1b1fe467 | 6928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
dd4f3dd8 | 6929 | $as_echo "$ac_cv_os_cray" >&6; } |
5e13499c CR |
6930 | if test $ac_cv_os_cray = yes; then |
6931 | for ac_func in _getb67 GETB67 getb67; do | |
dd4f3dd8 | 6932 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
1b1fe467 CR |
6933 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
6934 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
5e13499c | 6935 | |
1b1fe467 CR |
6936 | cat >>confdefs.h <<_ACEOF |
6937 | #define CRAY_STACKSEG_END $ac_func | |
6938 | _ACEOF | |
7175a77f | 6939 | |
1b1fe467 CR |
6940 | break |
6941 | fi | |
7175a77f | 6942 | |
1b1fe467 CR |
6943 | done |
6944 | fi | |
7175a77f | 6945 | |
1b1fe467 | 6946 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
7175a77f | 6947 | $as_echo_n "checking stack direction for C alloca... " >&6; } |
1b1fe467 | 6948 | if ${ac_cv_c_stack_direction+:} false; then : |
7175a77f CR |
6949 | $as_echo_n "(cached) " >&6 |
6950 | else | |
1b1fe467 | 6951 | if test "$cross_compiling" = yes; then : |
7175a77f CR |
6952 | ac_cv_c_stack_direction=0 |
6953 | else | |
1b1fe467 | 6954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
6955 | /* end confdefs.h. */ |
6956 | $ac_includes_default | |
6957 | int | |
0ee50808 | 6958 | find_stack_direction (int *addr, int depth) |
7175a77f | 6959 | { |
0ee50808 CR |
6960 | int dir, dummy = 0; |
6961 | if (! addr) | |
6962 | addr = &dummy; | |
6963 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
6964 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
6965 | return dir + dummy; | |
7175a77f CR |
6966 | } |
6967 | ||
6968 | int | |
0ee50808 | 6969 | main (int argc, char **argv) |
5e13499c | 6970 | { |
0ee50808 | 6971 | return find_stack_direction (0, argc + !argv + 20) < 0; |
5e13499c CR |
6972 | } |
6973 | _ACEOF | |
1b1fe467 | 6974 | if ac_fn_c_try_run "$LINENO"; then : |
5e13499c CR |
6975 | ac_cv_c_stack_direction=1 |
6976 | else | |
1b1fe467 | 6977 | ac_cv_c_stack_direction=-1 |
5e13499c | 6978 | fi |
1b1fe467 CR |
6979 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6980 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e13499c | 6981 | fi |
b709b946 | 6982 | |
5e13499c | 6983 | fi |
1b1fe467 | 6984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 |
dd4f3dd8 | 6985 | $as_echo "$ac_cv_c_stack_direction" >&6; } |
a82a04b3 | 6986 | cat >>confdefs.h <<_ACEOF |
5e13499c | 6987 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
a82a04b3 CR |
6988 | _ACEOF |
6989 | ||
5e13499c CR |
6990 | |
6991 | fi | |
6992 | ||
a82a04b3 CR |
6993 | |
6994 | ||
7175a77f | 6995 | |
1b1fe467 CR |
6996 | for ac_header in $ac_header_list |
6997 | do : | |
6998 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6999 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
7000 | " | |
7001 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
2dead0c4 CR |
7002 | cat >>confdefs.h <<_ACEOF |
7003 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7004 | _ACEOF | |
7005 | ||
e3db237e | 7006 | fi |
2dead0c4 CR |
7007 | |
7008 | done | |
7009 | ||
7010 | ||
7011 | ||
7012 | ||
7013 | ||
7014 | ||
7015 | ||
7016 | ||
1b1fe467 CR |
7017 | for ac_func in getpagesize |
7018 | do : | |
7019 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
7020 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
2dead0c4 | 7021 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 7022 | #define HAVE_GETPAGESIZE 1 |
a82a04b3 | 7023 | _ACEOF |
5e13499c CR |
7024 | |
7025 | fi | |
7026 | done | |
7027 | ||
1b1fe467 | 7028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
dd4f3dd8 | 7029 | $as_echo_n "checking for working mmap... " >&6; } |
1b1fe467 | 7030 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
dd4f3dd8 | 7031 | $as_echo_n "(cached) " >&6 |
5e13499c | 7032 | else |
1b1fe467 | 7033 | if test "$cross_compiling" = yes; then : |
5e13499c CR |
7034 | ac_cv_func_mmap_fixed_mapped=no |
7035 | else | |
1b1fe467 | 7036 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7037 | /* end confdefs.h. */ |
5e13499c | 7038 | $ac_includes_default |
a82a04b3 CR |
7039 | /* malloc might have been renamed as rpl_malloc. */ |
7040 | #undef malloc | |
7041 | ||
5e13499c CR |
7042 | /* Thanks to Mike Haertel and Jim Avera for this test. |
7043 | Here is a matrix of mmap possibilities: | |
7044 | mmap private not fixed | |
7045 | mmap private fixed at somewhere currently unmapped | |
7046 | mmap private fixed at somewhere already mapped | |
7047 | mmap shared not fixed | |
7048 | mmap shared fixed at somewhere currently unmapped | |
7049 | mmap shared fixed at somewhere already mapped | |
7050 | For private mappings, we should verify that changes cannot be read() | |
7051 | back from the file, nor mmap's back from the file at a different | |
7052 | address. (There have been systems where private was not correctly | |
7053 | implemented like the infamous i386 svr4.0, and systems where the | |
7054 | VM page cache was not coherent with the file system buffer cache | |
7055 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7056 | For shared mappings, we should conversely verify that changes get | |
a82a04b3 | 7057 | propagated back to all the places they're supposed to be. |
5e13499c CR |
7058 | |
7059 | Grep wants private fixed already mapped. | |
7060 | The main things grep needs to know about mmap are: | |
7061 | * does it exist and is it safe to write into the mmap'd area | |
7062 | * how to use it (BSD variants) */ | |
7063 | ||
7064 | #include <fcntl.h> | |
7065 | #include <sys/mman.h> | |
7066 | ||
dd4f3dd8 | 7067 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
5e13499c CR |
7068 | char *malloc (); |
7069 | #endif | |
7070 | ||
7071 | /* This mess was copied from the GNU getpagesize.h. */ | |
dd4f3dd8 | 7072 | #ifndef HAVE_GETPAGESIZE |
5e13499c CR |
7073 | # ifdef _SC_PAGESIZE |
7074 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
7075 | # else /* no _SC_PAGESIZE */ | |
dd4f3dd8 | 7076 | # ifdef HAVE_SYS_PARAM_H |
5e13499c CR |
7077 | # include <sys/param.h> |
7078 | # ifdef EXEC_PAGESIZE | |
7079 | # define getpagesize() EXEC_PAGESIZE | |
7080 | # else /* no EXEC_PAGESIZE */ | |
7081 | # ifdef NBPG | |
7082 | # define getpagesize() NBPG * CLSIZE | |
7083 | # ifndef CLSIZE | |
7084 | # define CLSIZE 1 | |
7085 | # endif /* no CLSIZE */ | |
7086 | # else /* no NBPG */ | |
7087 | # ifdef NBPC | |
7088 | # define getpagesize() NBPC | |
7089 | # else /* no NBPC */ | |
7090 | # ifdef PAGESIZE | |
7091 | # define getpagesize() PAGESIZE | |
7092 | # endif /* PAGESIZE */ | |
7093 | # endif /* no NBPC */ | |
7094 | # endif /* no NBPG */ | |
7095 | # endif /* no EXEC_PAGESIZE */ | |
7096 | # else /* no HAVE_SYS_PARAM_H */ | |
7097 | # define getpagesize() 8192 /* punt totally */ | |
7098 | # endif /* no HAVE_SYS_PARAM_H */ | |
7099 | # endif /* no _SC_PAGESIZE */ | |
7100 | ||
7101 | #endif /* no HAVE_GETPAGESIZE */ | |
7102 | ||
7103 | int | |
7104 | main () | |
7105 | { | |
7106 | char *data, *data2, *data3; | |
1b1fe467 | 7107 | const char *cdata2; |
5e13499c | 7108 | int i, pagesize; |
1b1fe467 | 7109 | int fd, fd2; |
5e13499c CR |
7110 | |
7111 | pagesize = getpagesize (); | |
7112 | ||
7113 | /* First, make a file with some known garbage in it. */ | |
7114 | data = (char *) malloc (pagesize); | |
7115 | if (!data) | |
b709b946 | 7116 | return 1; |
5e13499c CR |
7117 | for (i = 0; i < pagesize; ++i) |
7118 | *(data + i) = rand (); | |
7119 | umask (0); | |
7120 | fd = creat ("conftest.mmap", 0600); | |
7121 | if (fd < 0) | |
1b1fe467 | 7122 | return 2; |
5e13499c | 7123 | if (write (fd, data, pagesize) != pagesize) |
1b1fe467 | 7124 | return 3; |
5e13499c CR |
7125 | close (fd); |
7126 | ||
1b1fe467 CR |
7127 | /* Next, check that the tail of a page is zero-filled. File must have |
7128 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
7129 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
7130 | if (fd2 < 0) | |
7131 | return 4; | |
7132 | cdata2 = ""; | |
7133 | if (write (fd2, cdata2, 1) != 1) | |
7134 | return 5; | |
7135 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
7136 | if (data2 == MAP_FAILED) | |
7137 | return 6; | |
7138 | for (i = 0; i < pagesize; ++i) | |
7139 | if (*(data2 + i)) | |
7140 | return 7; | |
7141 | close (fd2); | |
7142 | if (munmap (data2, pagesize)) | |
7143 | return 8; | |
7144 | ||
5e13499c CR |
7145 | /* Next, try to mmap the file at a fixed address which already has |
7146 | something else allocated at it. If we can, also make sure that | |
7147 | we see the same garbage. */ | |
7148 | fd = open ("conftest.mmap", O_RDWR); | |
7149 | if (fd < 0) | |
1b1fe467 | 7150 | return 9; |
5e13499c | 7151 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
5e4a95c7 | 7152 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) |
1b1fe467 | 7153 | return 10; |
5e13499c CR |
7154 | for (i = 0; i < pagesize; ++i) |
7155 | if (*(data + i) != *(data2 + i)) | |
1b1fe467 | 7156 | return 11; |
5e13499c CR |
7157 | |
7158 | /* Finally, make sure that changes to the mapped area do not | |
7159 | percolate back to the file as seen by read(). (This is a bug on | |
7160 | some variants of i386 svr4.0.) */ | |
7161 | for (i = 0; i < pagesize; ++i) | |
7162 | *(data2 + i) = *(data2 + i) + 1; | |
7163 | data3 = (char *) malloc (pagesize); | |
7164 | if (!data3) | |
1b1fe467 | 7165 | return 12; |
5e13499c | 7166 | if (read (fd, data3, pagesize) != pagesize) |
1b1fe467 | 7167 | return 13; |
5e13499c CR |
7168 | for (i = 0; i < pagesize; ++i) |
7169 | if (*(data + i) != *(data3 + i)) | |
1b1fe467 | 7170 | return 14; |
5e13499c | 7171 | close (fd); |
b709b946 | 7172 | return 0; |
5e13499c CR |
7173 | } |
7174 | _ACEOF | |
1b1fe467 | 7175 | if ac_fn_c_try_run "$LINENO"; then : |
5e13499c CR |
7176 | ac_cv_func_mmap_fixed_mapped=yes |
7177 | else | |
1b1fe467 | 7178 | ac_cv_func_mmap_fixed_mapped=no |
5e13499c | 7179 | fi |
1b1fe467 CR |
7180 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7181 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e13499c | 7182 | fi |
b709b946 | 7183 | |
5e13499c | 7184 | fi |
1b1fe467 | 7185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
dd4f3dd8 | 7186 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } |
5e13499c CR |
7187 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
7188 | ||
1b1fe467 | 7189 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
5e13499c CR |
7190 | |
7191 | fi | |
1b1fe467 | 7192 | rm -f conftest.mmap conftest.txt |
5e13499c | 7193 | |
a82a04b3 | 7194 | |
1b1fe467 | 7195 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
dd4f3dd8 | 7196 | $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } |
1b1fe467 | 7197 | if ${ac_cv_gnu_library_2_1+:} false; then : |
dd4f3dd8 | 7198 | $as_echo_n "(cached) " >&6 |
5e13499c | 7199 | else |
1b1fe467 | 7200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7201 | /* end confdefs.h. */ |
5e13499c CR |
7202 | |
7203 | #include <features.h> | |
7204 | #ifdef __GNU_LIBRARY__ | |
7205 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
7206 | Lucky GNU user | |
7207 | #endif | |
7208 | #endif | |
7209 | ||
7210 | _ACEOF | |
7211 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 7212 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then : |
5e13499c CR |
7213 | ac_cv_gnu_library_2_1=yes |
7214 | else | |
7215 | ac_cv_gnu_library_2_1=no | |
7216 | fi | |
7217 | rm -f conftest* | |
7218 | ||
a82a04b3 CR |
7219 | |
7220 | ||
5e13499c | 7221 | fi |
1b1fe467 | 7222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 |
dd4f3dd8 | 7223 | $as_echo "$ac_cv_gnu_library_2_1" >&6; } |
5e13499c CR |
7224 | |
7225 | GLIBC21="$ac_cv_gnu_library_2_1" | |
7226 | ||
a82a04b3 CR |
7227 | |
7228 | ||
7229 | ||
1b1fe467 | 7230 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 |
dd4f3dd8 | 7231 | $as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; } |
1b1fe467 | 7232 | if ${gt_cv_int_divbyzero_sigfpe+:} false; then : |
dd4f3dd8 | 7233 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
7234 | else |
7235 | ||
1b1fe467 | 7236 | if test "$cross_compiling" = yes; then : |
5e13499c CR |
7237 | |
7238 | # Guess based on the CPU. | |
7239 | case "$host_cpu" in | |
7240 | alpha* | i3456786 | m68k | s390*) | |
7241 | gt_cv_int_divbyzero_sigfpe="guessing yes";; | |
7242 | *) | |
7243 | gt_cv_int_divbyzero_sigfpe="guessing no";; | |
7244 | esac | |
7245 | ||
7246 | else | |
1b1fe467 | 7247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7248 | /* end confdefs.h. */ |
5e13499c CR |
7249 | |
7250 | #include <stdlib.h> | |
7251 | #include <signal.h> | |
7252 | ||
7253 | static void | |
7254 | #ifdef __cplusplus | |
7255 | sigfpe_handler (int sig) | |
7256 | #else | |
7257 | sigfpe_handler (sig) int sig; | |
7258 | #endif | |
7259 | { | |
7260 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ | |
7261 | exit (sig != SIGFPE); | |
7262 | } | |
7263 | ||
7264 | int x = 1; | |
7265 | int y = 0; | |
7266 | int z; | |
7267 | int nan; | |
7268 | ||
7269 | int main () | |
7270 | { | |
7271 | signal (SIGFPE, sigfpe_handler); | |
7272 | /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ | |
7273 | #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) | |
7274 | signal (SIGTRAP, sigfpe_handler); | |
7275 | #endif | |
7276 | /* Linux/SPARC yields signal SIGILL. */ | |
7277 | #if defined (__sparc__) && defined (__linux__) | |
7278 | signal (SIGILL, sigfpe_handler); | |
7279 | #endif | |
7280 | ||
7281 | z = x / y; | |
7282 | nan = y / y; | |
7283 | exit (1); | |
7284 | } | |
7285 | ||
7286 | _ACEOF | |
1b1fe467 | 7287 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f CR |
7288 | gt_cv_int_divbyzero_sigfpe=yes |
7289 | else | |
1b1fe467 | 7290 | gt_cv_int_divbyzero_sigfpe=no |
7175a77f | 7291 | fi |
1b1fe467 CR |
7292 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7293 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7175a77f CR |
7294 | fi |
7295 | ||
7296 | ||
5e13499c | 7297 | fi |
1b1fe467 | 7298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5 |
dd4f3dd8 | 7299 | $as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; } |
5e13499c CR |
7300 | case "$gt_cv_int_divbyzero_sigfpe" in |
7301 | *yes) value=1;; | |
7302 | *) value=0;; | |
7303 | esac | |
7304 | ||
a82a04b3 | 7305 | cat >>confdefs.h <<_ACEOF |
5e13499c | 7306 | #define INTDIV0_RAISES_SIGFPE $value |
a82a04b3 CR |
7307 | _ACEOF |
7308 | ||
545f34cf | 7309 | |
a82a04b3 | 7310 | |
1b1fe467 | 7311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 |
dd4f3dd8 | 7312 | $as_echo_n "checking for inttypes.h... " >&6; } |
1b1fe467 | 7313 | if ${jm_ac_cv_header_inttypes_h+:} false; then : |
dd4f3dd8 | 7314 | $as_echo_n "(cached) " >&6 |
5e13499c | 7315 | else |
1b1fe467 | 7316 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7317 | /* end confdefs.h. */ |
5e13499c CR |
7318 | #include <sys/types.h> |
7319 | #include <inttypes.h> | |
7320 | int | |
7321 | main () | |
7322 | { | |
7323 | uintmax_t i = (uintmax_t) -1; | |
7324 | ; | |
7325 | return 0; | |
7326 | } | |
7327 | _ACEOF | |
1b1fe467 | 7328 | if ac_fn_c_try_compile "$LINENO"; then : |
5e13499c CR |
7329 | jm_ac_cv_header_inttypes_h=yes |
7330 | else | |
1b1fe467 | 7331 | jm_ac_cv_header_inttypes_h=no |
5e13499c | 7332 | fi |
b709b946 | 7333 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e13499c | 7334 | fi |
1b1fe467 | 7335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_inttypes_h" >&5 |
dd4f3dd8 | 7336 | $as_echo "$jm_ac_cv_header_inttypes_h" >&6; } |
5e13499c CR |
7337 | if test $jm_ac_cv_header_inttypes_h = yes; then |
7338 | ||
a82a04b3 | 7339 | cat >>confdefs.h <<_ACEOF |
5e13499c | 7340 | #define HAVE_INTTYPES_H_WITH_UINTMAX 1 |
a82a04b3 | 7341 | _ACEOF |
5e13499c CR |
7342 | |
7343 | fi | |
7344 | ||
a82a04b3 | 7345 | |
1b1fe467 | 7346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 |
dd4f3dd8 | 7347 | $as_echo_n "checking for stdint.h... " >&6; } |
1b1fe467 | 7348 | if ${jm_ac_cv_header_stdint_h+:} false; then : |
dd4f3dd8 | 7349 | $as_echo_n "(cached) " >&6 |
5e13499c | 7350 | else |
1b1fe467 | 7351 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7352 | /* end confdefs.h. */ |
5e13499c CR |
7353 | #include <sys/types.h> |
7354 | #include <stdint.h> | |
7355 | int | |
7356 | main () | |
7357 | { | |
7358 | uintmax_t i = (uintmax_t) -1; | |
7359 | ; | |
7360 | return 0; | |
7361 | } | |
7362 | _ACEOF | |
1b1fe467 | 7363 | if ac_fn_c_try_compile "$LINENO"; then : |
abe2eb5b CR |
7364 | jm_ac_cv_header_stdint_h=yes |
7365 | else | |
1b1fe467 | 7366 | jm_ac_cv_header_stdint_h=no |
7610e0c5 | 7367 | fi |
abe2eb5b CR |
7368 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7369 | fi | |
1b1fe467 | 7370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jm_ac_cv_header_stdint_h" >&5 |
7610e0c5 | 7371 | $as_echo "$jm_ac_cv_header_stdint_h" >&6; } |
5e13499c CR |
7372 | if test $jm_ac_cv_header_stdint_h = yes; then |
7373 | ||
a82a04b3 | 7374 | cat >>confdefs.h <<_ACEOF |
5e13499c | 7375 | #define HAVE_STDINT_H_WITH_UINTMAX 1 |
a82a04b3 | 7376 | _ACEOF |
5e13499c CR |
7377 | |
7378 | fi | |
7379 | ||
a82a04b3 | 7380 | |
1b1fe467 | 7381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 |
dd4f3dd8 | 7382 | $as_echo_n "checking for unsigned long long... " >&6; } |
1b1fe467 | 7383 | if ${ac_cv_type_unsigned_long_long+:} false; then : |
dd4f3dd8 | 7384 | $as_echo_n "(cached) " >&6 |
5e13499c | 7385 | else |
1b1fe467 | 7386 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7387 | /* end confdefs.h. */ |
5e13499c CR |
7388 | unsigned long long ull = 1; int i = 63; |
7389 | int | |
7390 | main () | |
7391 | { | |
7392 | unsigned long long ullmax = (unsigned long long) -1; | |
7393 | return ull << i | ull >> i | ullmax / ull | ullmax % ull; | |
7394 | ; | |
7395 | return 0; | |
7396 | } | |
7397 | _ACEOF | |
1b1fe467 | 7398 | if ac_fn_c_try_link "$LINENO"; then : |
e3db237e | 7399 | ac_cv_type_unsigned_long_long=yes |
5e13499c | 7400 | else |
1b1fe467 | 7401 | ac_cv_type_unsigned_long_long=no |
5e13499c | 7402 | fi |
1b1fe467 CR |
7403 | rm -f core conftest.err conftest.$ac_objext \ |
7404 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c | 7405 | fi |
1b1fe467 | 7406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long" >&5 |
dd4f3dd8 | 7407 | $as_echo "$ac_cv_type_unsigned_long_long" >&6; } |
5e13499c CR |
7408 | if test $ac_cv_type_unsigned_long_long = yes; then |
7409 | ||
1b1fe467 | 7410 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h |
5e13499c CR |
7411 | |
7412 | fi | |
7413 | ||
a82a04b3 CR |
7414 | |
7415 | ||
7416 | ||
5e13499c CR |
7417 | if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then |
7418 | ||
7419 | test $ac_cv_type_unsigned_long_long = yes \ | |
7420 | && ac_type='unsigned long long' \ | |
7421 | || ac_type='unsigned long' | |
7422 | ||
a82a04b3 | 7423 | cat >>confdefs.h <<_ACEOF |
5e13499c | 7424 | #define uintmax_t $ac_type |
a82a04b3 | 7425 | _ACEOF |
5e13499c CR |
7426 | |
7427 | else | |
7428 | ||
1b1fe467 | 7429 | $as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h |
5e13499c CR |
7430 | |
7431 | fi | |
7432 | ||
a82a04b3 | 7433 | |
1b1fe467 | 7434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 |
dd4f3dd8 | 7435 | $as_echo_n "checking for inttypes.h... " >&6; } |
1b1fe467 | 7436 | if ${gt_cv_header_inttypes_h+:} false; then : |
dd4f3dd8 | 7437 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
7438 | else |
7439 | ||
1b1fe467 | 7440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7441 | /* end confdefs.h. */ |
5e13499c CR |
7442 | #include <sys/types.h> |
7443 | #include <inttypes.h> | |
7444 | int | |
7445 | main () | |
7446 | { | |
7447 | ||
7448 | ; | |
7449 | return 0; | |
7450 | } | |
7451 | _ACEOF | |
1b1fe467 | 7452 | if ac_fn_c_try_compile "$LINENO"; then : |
5e13499c CR |
7453 | gt_cv_header_inttypes_h=yes |
7454 | else | |
1b1fe467 | 7455 | gt_cv_header_inttypes_h=no |
5e13499c | 7456 | fi |
b709b946 | 7457 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e13499c CR |
7458 | |
7459 | fi | |
1b1fe467 | 7460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_header_inttypes_h" >&5 |
dd4f3dd8 | 7461 | $as_echo "$gt_cv_header_inttypes_h" >&6; } |
5e13499c CR |
7462 | if test $gt_cv_header_inttypes_h = yes; then |
7463 | ||
a82a04b3 | 7464 | cat >>confdefs.h <<_ACEOF |
5e13499c | 7465 | #define HAVE_INTTYPES_H 1 |
a82a04b3 | 7466 | _ACEOF |
5e13499c CR |
7467 | |
7468 | fi | |
7469 | ||
a82a04b3 CR |
7470 | |
7471 | ||
5e13499c | 7472 | if test $gt_cv_header_inttypes_h = yes; then |
1b1fe467 | 7473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 |
dd4f3dd8 | 7474 | $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } |
1b1fe467 | 7475 | if ${gt_cv_inttypes_pri_broken+:} false; then : |
dd4f3dd8 | 7476 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
7477 | else |
7478 | ||
1b1fe467 | 7479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 7480 | /* end confdefs.h. */ |
5e13499c CR |
7481 | #include <inttypes.h> |
7482 | #ifdef PRId32 | |
7483 | char *p = PRId32; | |
7484 | #endif | |
7485 | ||
7486 | int | |
7487 | main () | |
7488 | { | |
7489 | ||
7490 | ; | |
7491 | return 0; | |
7492 | } | |
7493 | _ACEOF | |
1b1fe467 | 7494 | if ac_fn_c_try_compile "$LINENO"; then : |
2e4498b3 CR |
7495 | gt_cv_inttypes_pri_broken=no |
7496 | else | |
1b1fe467 | 7497 | gt_cv_inttypes_pri_broken=yes |
5e13499c | 7498 | fi |
b709b946 | 7499 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e13499c CR |
7500 | |
7501 | fi | |
1b1fe467 | 7502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 |
dd4f3dd8 | 7503 | $as_echo "$gt_cv_inttypes_pri_broken" >&6; } |
5e13499c CR |
7504 | fi |
7505 | if test "$gt_cv_inttypes_pri_broken" = yes; then | |
7506 | ||
a82a04b3 | 7507 | cat >>confdefs.h <<_ACEOF |
5e13499c | 7508 | #define PRI_MACROS_BROKEN 1 |
a82a04b3 | 7509 | _ACEOF |
5e13499c CR |
7510 | |
7511 | fi | |
7512 | ||
a82a04b3 | 7513 | |
5e13499c CR |
7514 | if test "X$prefix" = "XNONE"; then |
7515 | acl_final_prefix="$ac_default_prefix" | |
7516 | else | |
7517 | acl_final_prefix="$prefix" | |
7518 | fi | |
7519 | if test "X$exec_prefix" = "XNONE"; then | |
7520 | acl_final_exec_prefix='${prefix}' | |
7521 | else | |
7522 | acl_final_exec_prefix="$exec_prefix" | |
7523 | fi | |
7524 | acl_save_prefix="$prefix" | |
7525 | prefix="$acl_final_prefix" | |
7526 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7527 | prefix="$acl_save_prefix" | |
7528 | ||
a82a04b3 | 7529 | |
b709b946 | 7530 | # Check whether --with-gnu-ld was given. |
1b1fe467 | 7531 | if test "${with_gnu_ld+set}" = set; then : |
b709b946 | 7532 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes |
5e13499c CR |
7533 | else |
7534 | with_gnu_ld=no | |
b709b946 CR |
7535 | fi |
7536 | ||
5e13499c CR |
7537 | # Prepare PATH_SEPARATOR. |
7538 | # The user is always right. | |
7539 | if test "${PATH_SEPARATOR+set}" != set; then | |
7540 | echo "#! /bin/sh" >conf$$.sh | |
7541 | echo "exit 0" >>conf$$.sh | |
7542 | chmod +x conf$$.sh | |
7543 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7544 | PATH_SEPARATOR=';' | |
7545 | else | |
7546 | PATH_SEPARATOR=: | |
7547 | fi | |
7548 | rm -f conf$$.sh | |
7549 | fi | |
7550 | ac_prog=ld | |
7551 | if test "$GCC" = yes; then | |
7552 | # Check if gcc -print-prog-name=ld gives a path. | |
1b1fe467 | 7553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
dd4f3dd8 | 7554 | $as_echo_n "checking for ld used by GCC... " >&6; } |
5e13499c CR |
7555 | case $host in |
7556 | *-*-mingw*) | |
7557 | # gcc leaves a trailing carriage return which upsets mingw | |
7558 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7559 | *) | |
7560 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7561 | esac | |
7562 | case $ac_prog in | |
7563 | # Accept absolute paths. | |
7564 | [\\/]* | [A-Za-z]:[\\/]*) | |
7565 | re_direlt='/[^/][^/]*/\.\./' | |
7566 | # Canonicalize the path of ld | |
7567 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7568 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7569 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7570 | done | |
7571 | test -z "$LD" && LD="$ac_prog" | |
7572 | ;; | |
7573 | "") | |
7574 | # If it fails, then pretend we aren't using GCC. | |
7575 | ac_prog=ld | |
7576 | ;; | |
7577 | *) | |
7578 | # If it is relative, then search for the first ld in PATH. | |
7579 | with_gnu_ld=unknown | |
7580 | ;; | |
7581 | esac | |
7582 | elif test "$with_gnu_ld" = yes; then | |
1b1fe467 | 7583 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
dd4f3dd8 | 7584 | $as_echo_n "checking for GNU ld... " >&6; } |
5e13499c | 7585 | else |
1b1fe467 | 7586 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
dd4f3dd8 | 7587 | $as_echo_n "checking for non-GNU ld... " >&6; } |
5e13499c | 7588 | fi |
1b1fe467 | 7589 | if ${acl_cv_path_LD+:} false; then : |
dd4f3dd8 | 7590 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
7591 | else |
7592 | if test -z "$LD"; then | |
7593 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7594 | for ac_dir in $PATH; do | |
7595 | test -z "$ac_dir" && ac_dir=. | |
7596 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7597 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7598 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7599 | # but apparently some GNU ld's only accept -v. | |
7600 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7601 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7602 | test "$with_gnu_ld" != no && break | |
7603 | else | |
7604 | test "$with_gnu_ld" != yes && break | |
7605 | fi | |
7606 | fi | |
7607 | done | |
7608 | IFS="$ac_save_ifs" | |
7609 | else | |
7610 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7611 | fi | |
7612 | fi | |
7613 | ||
7614 | LD="$acl_cv_path_LD" | |
7615 | if test -n "$LD"; then | |
1b1fe467 | 7616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
dd4f3dd8 | 7617 | $as_echo "$LD" >&6; } |
5e13499c | 7618 | else |
1b1fe467 | 7619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 7620 | $as_echo "no" >&6; } |
5e13499c | 7621 | fi |
1b1fe467 CR |
7622 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
7623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
dd4f3dd8 | 7624 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } |
1b1fe467 | 7625 | if ${acl_cv_prog_gnu_ld+:} false; then : |
dd4f3dd8 | 7626 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
7627 | else |
7628 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7629 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7630 | acl_cv_prog_gnu_ld=yes | |
7631 | else | |
7632 | acl_cv_prog_gnu_ld=no | |
7633 | fi | |
7634 | fi | |
1b1fe467 | 7635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
dd4f3dd8 | 7636 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } |
5e13499c CR |
7637 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7638 | ||
a82a04b3 CR |
7639 | |
7640 | ||
1b1fe467 | 7641 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
dd4f3dd8 | 7642 | $as_echo_n "checking for shared library run path origin... " >&6; } |
1b1fe467 | 7643 | if ${acl_cv_rpath+:} false; then : |
dd4f3dd8 | 7644 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
7645 | else |
7646 | ||
7647 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7648 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7649 | . ./conftest.sh | |
7650 | rm -f ./conftest.sh | |
7651 | acl_cv_rpath=done | |
7652 | ||
7653 | fi | |
1b1fe467 | 7654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
dd4f3dd8 | 7655 | $as_echo "$acl_cv_rpath" >&6; } |
5e13499c CR |
7656 | wl="$acl_cv_wl" |
7657 | libext="$acl_cv_libext" | |
7658 | shlibext="$acl_cv_shlibext" | |
7659 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7660 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7661 | hardcode_direct="$acl_cv_hardcode_direct" | |
7662 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
b709b946 | 7663 | # Check whether --enable-rpath was given. |
1b1fe467 | 7664 | if test "${enable_rpath+set}" = set; then : |
b709b946 | 7665 | enableval=$enable_rpath; : |
5e13499c CR |
7666 | else |
7667 | enable_rpath=yes | |
b709b946 CR |
7668 | fi |
7669 | ||
5e13499c | 7670 | |
a82a04b3 CR |
7671 | |
7672 | ||
7673 | ||
7674 | ||
7675 | ||
7676 | ||
5e13499c CR |
7677 | use_additional=yes |
7678 | ||
7679 | acl_save_prefix="$prefix" | |
7680 | prefix="$acl_final_prefix" | |
7681 | acl_save_exec_prefix="$exec_prefix" | |
7682 | exec_prefix="$acl_final_exec_prefix" | |
7683 | ||
7684 | eval additional_includedir=\"$includedir\" | |
7685 | eval additional_libdir=\"$libdir\" | |
7686 | ||
7687 | exec_prefix="$acl_save_exec_prefix" | |
7688 | prefix="$acl_save_prefix" | |
7689 | ||
a82a04b3 | 7690 | |
b709b946 | 7691 | # Check whether --with-libiconv-prefix was given. |
1b1fe467 | 7692 | if test "${with_libiconv_prefix+set}" = set; then : |
b709b946 | 7693 | withval=$with_libiconv_prefix; |
5e13499c CR |
7694 | if test "X$withval" = "Xno"; then |
7695 | use_additional=no | |
7696 | else | |
7697 | if test "X$withval" = "X"; then | |
7698 | ||
7699 | acl_save_prefix="$prefix" | |
7700 | prefix="$acl_final_prefix" | |
7701 | acl_save_exec_prefix="$exec_prefix" | |
7702 | exec_prefix="$acl_final_exec_prefix" | |
7703 | ||
7704 | eval additional_includedir=\"$includedir\" | |
7705 | eval additional_libdir=\"$libdir\" | |
7706 | ||
7707 | exec_prefix="$acl_save_exec_prefix" | |
7708 | prefix="$acl_save_prefix" | |
7709 | ||
7710 | else | |
7711 | additional_includedir="$withval/include" | |
7712 | additional_libdir="$withval/lib" | |
7713 | fi | |
7714 | fi | |
7715 | ||
b709b946 CR |
7716 | fi |
7717 | ||
5e13499c CR |
7718 | LIBICONV= |
7719 | LTLIBICONV= | |
7720 | INCICONV= | |
7721 | rpathdirs= | |
7722 | ltrpathdirs= | |
7723 | names_already_handled= | |
7724 | names_next_round='iconv ' | |
7725 | while test -n "$names_next_round"; do | |
7726 | names_this_round="$names_next_round" | |
7727 | names_next_round= | |
7728 | for name in $names_this_round; do | |
7729 | already_handled= | |
7730 | for n in $names_already_handled; do | |
7731 | if test "$n" = "$name"; then | |
7732 | already_handled=yes | |
7733 | break | |
7734 | fi | |
7735 | done | |
7736 | if test -z "$already_handled"; then | |
7737 | names_already_handled="$names_already_handled $name" | |
7738 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7739 | eval value=\"\$HAVE_LIB$uppername\" | |
7740 | if test -n "$value"; then | |
7741 | if test "$value" = yes; then | |
7742 | eval value=\"\$LIB$uppername\" | |
7743 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
7744 | eval value=\"\$LTLIB$uppername\" | |
7745 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
7746 | else | |
7747 | : | |
7748 | fi | |
7749 | else | |
7750 | found_dir= | |
7751 | found_la= | |
7752 | found_so= | |
7753 | found_a= | |
7754 | if test $use_additional = yes; then | |
f4f5e1c2 | 7755 | if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
5e13499c CR |
7756 | found_dir="$additional_libdir" |
7757 | found_so="$additional_libdir/lib$name.$shlibext" | |
7758 | if test -f "$additional_libdir/lib$name.la"; then | |
7759 | found_la="$additional_libdir/lib$name.la" | |
7760 | fi | |
7761 | else | |
7762 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7763 | found_dir="$additional_libdir" | |
7764 | found_a="$additional_libdir/lib$name.$libext" | |
7765 | if test -f "$additional_libdir/lib$name.la"; then | |
7766 | found_la="$additional_libdir/lib$name.la" | |
7767 | fi | |
7768 | fi | |
7769 | fi | |
7770 | fi | |
7771 | if test "X$found_dir" = "X"; then | |
7772 | for x in $LDFLAGS $LTLIBICONV; do | |
7773 | ||
7774 | acl_save_prefix="$prefix" | |
7775 | prefix="$acl_final_prefix" | |
7776 | acl_save_exec_prefix="$exec_prefix" | |
7777 | exec_prefix="$acl_final_exec_prefix" | |
7778 | eval x=\"$x\" | |
7779 | exec_prefix="$acl_save_exec_prefix" | |
7780 | prefix="$acl_save_prefix" | |
7781 | ||
7782 | case "$x" in | |
7783 | -L*) | |
7784 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
f4f5e1c2 | 7785 | if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
5e13499c CR |
7786 | found_dir="$dir" |
7787 | found_so="$dir/lib$name.$shlibext" | |
7788 | if test -f "$dir/lib$name.la"; then | |
7789 | found_la="$dir/lib$name.la" | |
7790 | fi | |
7791 | else | |
7792 | if test -f "$dir/lib$name.$libext"; then | |
7793 | found_dir="$dir" | |
7794 | found_a="$dir/lib$name.$libext" | |
7795 | if test -f "$dir/lib$name.la"; then | |
7796 | found_la="$dir/lib$name.la" | |
7797 | fi | |
7798 | fi | |
7799 | fi | |
7800 | ;; | |
7801 | esac | |
7802 | if test "X$found_dir" != "X"; then | |
7803 | break | |
7804 | fi | |
7805 | done | |
7806 | fi | |
7807 | if test "X$found_dir" != "X"; then | |
7808 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
7809 | if test "X$found_so" != "X"; then | |
7810 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7811 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7812 | else | |
7813 | haveit= | |
7814 | for x in $ltrpathdirs; do | |
7815 | if test "X$x" = "X$found_dir"; then | |
7816 | haveit=yes | |
7817 | break | |
7818 | fi | |
7819 | done | |
7820 | if test -z "$haveit"; then | |
7821 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7822 | fi | |
7823 | if test "$hardcode_direct" = yes; then | |
7824 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7825 | else | |
7826 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7827 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7828 | haveit= | |
7829 | for x in $rpathdirs; do | |
7830 | if test "X$x" = "X$found_dir"; then | |
7831 | haveit=yes | |
7832 | break | |
7833 | fi | |
7834 | done | |
7835 | if test -z "$haveit"; then | |
7836 | rpathdirs="$rpathdirs $found_dir" | |
7837 | fi | |
7838 | else | |
7839 | haveit= | |
7840 | for x in $LDFLAGS $LIBICONV; do | |
7841 | ||
7842 | acl_save_prefix="$prefix" | |
7843 | prefix="$acl_final_prefix" | |
7844 | acl_save_exec_prefix="$exec_prefix" | |
7845 | exec_prefix="$acl_final_exec_prefix" | |
7846 | eval x=\"$x\" | |
7847 | exec_prefix="$acl_save_exec_prefix" | |
7848 | prefix="$acl_save_prefix" | |
7849 | ||
7850 | if test "X$x" = "X-L$found_dir"; then | |
7851 | haveit=yes | |
7852 | break | |
7853 | fi | |
7854 | done | |
7855 | if test -z "$haveit"; then | |
7856 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
7857 | fi | |
7858 | if test "$hardcode_minus_L" != no; then | |
7859 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
7860 | else | |
7861 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
7862 | fi | |
7863 | fi | |
7864 | fi | |
7865 | fi | |
7866 | else | |
7867 | if test "X$found_a" != "X"; then | |
7868 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
7869 | else | |
7870 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
7871 | fi | |
7872 | fi | |
7873 | additional_includedir= | |
7874 | case "$found_dir" in | |
7875 | */lib | */lib/) | |
7876 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7877 | additional_includedir="$basedir/include" | |
7878 | ;; | |
7879 | esac | |
7880 | if test "X$additional_includedir" != "X"; then | |
7881 | if test "X$additional_includedir" != "X/usr/include"; then | |
7882 | haveit= | |
7883 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7884 | if test -n "$GCC"; then | |
7885 | case $host_os in | |
7886 | linux*) haveit=yes;; | |
7887 | esac | |
7888 | fi | |
7889 | fi | |
7890 | if test -z "$haveit"; then | |
7891 | for x in $CPPFLAGS $INCICONV; do | |
7892 | ||
7893 | acl_save_prefix="$prefix" | |
7894 | prefix="$acl_final_prefix" | |
7895 | acl_save_exec_prefix="$exec_prefix" | |
7896 | exec_prefix="$acl_final_exec_prefix" | |
7897 | eval x=\"$x\" | |
7898 | exec_prefix="$acl_save_exec_prefix" | |
7899 | prefix="$acl_save_prefix" | |
7900 | ||
7901 | if test "X$x" = "X-I$additional_includedir"; then | |
7902 | haveit=yes | |
7903 | break | |
7904 | fi | |
7905 | done | |
7906 | if test -z "$haveit"; then | |
7907 | if test -d "$additional_includedir"; then | |
7908 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
7909 | fi | |
7910 | fi | |
7911 | fi | |
7912 | fi | |
7913 | fi | |
7914 | if test -n "$found_la"; then | |
7915 | save_libdir="$libdir" | |
7916 | case "$found_la" in | |
7917 | */* | *\\*) . "$found_la" ;; | |
7918 | *) . "./$found_la" ;; | |
7919 | esac | |
7920 | libdir="$save_libdir" | |
7921 | for dep in $dependency_libs; do | |
7922 | case "$dep" in | |
7923 | -L*) | |
7924 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7925 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7926 | haveit= | |
7927 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7928 | if test -n "$GCC"; then | |
7929 | case $host_os in | |
7930 | linux*) haveit=yes;; | |
7931 | esac | |
7932 | fi | |
7933 | fi | |
7934 | if test -z "$haveit"; then | |
7935 | haveit= | |
7936 | for x in $LDFLAGS $LIBICONV; do | |
7937 | ||
7938 | acl_save_prefix="$prefix" | |
7939 | prefix="$acl_final_prefix" | |
7940 | acl_save_exec_prefix="$exec_prefix" | |
7941 | exec_prefix="$acl_final_exec_prefix" | |
7942 | eval x=\"$x\" | |
7943 | exec_prefix="$acl_save_exec_prefix" | |
7944 | prefix="$acl_save_prefix" | |
7945 | ||
7946 | if test "X$x" = "X-L$additional_libdir"; then | |
7947 | haveit=yes | |
7948 | break | |
7949 | fi | |
7950 | done | |
7951 | if test -z "$haveit"; then | |
7952 | if test -d "$additional_libdir"; then | |
7953 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
7954 | fi | |
7955 | fi | |
7956 | haveit= | |
7957 | for x in $LDFLAGS $LTLIBICONV; do | |
7958 | ||
7959 | acl_save_prefix="$prefix" | |
7960 | prefix="$acl_final_prefix" | |
7961 | acl_save_exec_prefix="$exec_prefix" | |
7962 | exec_prefix="$acl_final_exec_prefix" | |
7963 | eval x=\"$x\" | |
7964 | exec_prefix="$acl_save_exec_prefix" | |
7965 | prefix="$acl_save_prefix" | |
7966 | ||
7967 | if test "X$x" = "X-L$additional_libdir"; then | |
7968 | haveit=yes | |
7969 | break | |
7970 | fi | |
7971 | done | |
7972 | if test -z "$haveit"; then | |
7973 | if test -d "$additional_libdir"; then | |
7974 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
7975 | fi | |
7976 | fi | |
7977 | fi | |
7978 | fi | |
7979 | ;; | |
7980 | -R*) | |
7981 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7982 | if test "$enable_rpath" != no; then | |
7983 | haveit= | |
7984 | for x in $rpathdirs; do | |
7985 | if test "X$x" = "X$dir"; then | |
7986 | haveit=yes | |
7987 | break | |
7988 | fi | |
7989 | done | |
7990 | if test -z "$haveit"; then | |
7991 | rpathdirs="$rpathdirs $dir" | |
7992 | fi | |
7993 | haveit= | |
7994 | for x in $ltrpathdirs; do | |
7995 | if test "X$x" = "X$dir"; then | |
7996 | haveit=yes | |
7997 | break | |
7998 | fi | |
7999 | done | |
8000 | if test -z "$haveit"; then | |
8001 | ltrpathdirs="$ltrpathdirs $dir" | |
8002 | fi | |
8003 | fi | |
8004 | ;; | |
8005 | -l*) | |
8006 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8007 | ;; | |
8008 | *.la) | |
8009 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8010 | ;; | |
8011 | *) | |
8012 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
8013 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
8014 | ;; | |
8015 | esac | |
8016 | done | |
8017 | fi | |
8018 | else | |
8019 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
8020 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
8021 | fi | |
8022 | fi | |
8023 | fi | |
8024 | done | |
8025 | done | |
8026 | if test "X$rpathdirs" != "X"; then | |
8027 | if test -n "$hardcode_libdir_separator"; then | |
8028 | alldirs= | |
8029 | for found_dir in $rpathdirs; do | |
8030 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8031 | done | |
8032 | acl_save_libdir="$libdir" | |
8033 | libdir="$alldirs" | |
8034 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8035 | libdir="$acl_save_libdir" | |
8036 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8037 | else | |
8038 | for found_dir in $rpathdirs; do | |
8039 | acl_save_libdir="$libdir" | |
8040 | libdir="$found_dir" | |
8041 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8042 | libdir="$acl_save_libdir" | |
8043 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
8044 | done | |
8045 | fi | |
8046 | fi | |
8047 | if test "X$ltrpathdirs" != "X"; then | |
8048 | for found_dir in $ltrpathdirs; do | |
8049 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
8050 | done | |
8051 | fi | |
8052 | ||
a82a04b3 CR |
8053 | |
8054 | ||
8055 | ||
1b1fe467 | 8056 | for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ |
7f947b68 | 8057 | stdlib.h string.h unistd.h sys/param.h |
1b1fe467 CR |
8058 | do : |
8059 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8060 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8061 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7f947b68 CR |
8062 | cat >>confdefs.h <<_ACEOF |
8063 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8064 | _ACEOF | |
abe2eb5b | 8065 | |
7f947b68 | 8066 | fi |
abe2eb5b | 8067 | |
7f947b68 | 8068 | done |
abe2eb5b | 8069 | |
1b1fe467 | 8070 | for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ |
7f947b68 CR |
8071 | geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \ |
8072 | strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \ | |
8073 | __fsetlocking | |
1b1fe467 CR |
8074 | do : |
8075 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
8076 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
8077 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7f947b68 CR |
8078 | cat >>confdefs.h <<_ACEOF |
8079 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
8080 | _ACEOF | |
abe2eb5b | 8081 | |
7f947b68 CR |
8082 | fi |
8083 | done | |
5e13499c | 8084 | |
a82a04b3 CR |
8085 | |
8086 | ||
8087 | ||
8088 | ||
8089 | ||
8090 | ||
5e13499c CR |
8091 | am_save_CPPFLAGS="$CPPFLAGS" |
8092 | ||
8093 | for element in $INCICONV; do | |
8094 | haveit= | |
8095 | for x in $CPPFLAGS; do | |
8096 | ||
8097 | acl_save_prefix="$prefix" | |
8098 | prefix="$acl_final_prefix" | |
8099 | acl_save_exec_prefix="$exec_prefix" | |
8100 | exec_prefix="$acl_final_exec_prefix" | |
8101 | eval x=\"$x\" | |
8102 | exec_prefix="$acl_save_exec_prefix" | |
8103 | prefix="$acl_save_prefix" | |
8104 | ||
8105 | if test "X$x" = "X$element"; then | |
8106 | haveit=yes | |
8107 | break | |
8108 | fi | |
8109 | done | |
8110 | if test -z "$haveit"; then | |
8111 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
8112 | fi | |
8113 | done | |
8114 | ||
a82a04b3 | 8115 | |
1b1fe467 | 8116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
dd4f3dd8 | 8117 | $as_echo_n "checking for iconv... " >&6; } |
1b1fe467 | 8118 | if ${am_cv_func_iconv+:} false; then : |
dd4f3dd8 | 8119 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
8120 | else |
8121 | ||
8122 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
8123 | am_cv_lib_iconv=no | |
1b1fe467 | 8124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 8125 | /* end confdefs.h. */ |
5e13499c CR |
8126 | #include <stdlib.h> |
8127 | #include <iconv.h> | |
8128 | int | |
8129 | main () | |
8130 | { | |
8131 | iconv_t cd = iconv_open("",""); | |
8132 | iconv(cd,NULL,NULL,NULL,NULL); | |
8133 | iconv_close(cd); | |
8134 | ; | |
8135 | return 0; | |
8136 | } | |
8137 | _ACEOF | |
1b1fe467 | 8138 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c | 8139 | am_cv_func_iconv=yes |
5e13499c | 8140 | fi |
1b1fe467 CR |
8141 | rm -f core conftest.err conftest.$ac_objext \ |
8142 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c CR |
8143 | if test "$am_cv_func_iconv" != yes; then |
8144 | am_save_LIBS="$LIBS" | |
8145 | LIBS="$LIBS $LIBICONV" | |
1b1fe467 | 8146 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 8147 | /* end confdefs.h. */ |
5e13499c CR |
8148 | #include <stdlib.h> |
8149 | #include <iconv.h> | |
8150 | int | |
8151 | main () | |
8152 | { | |
8153 | iconv_t cd = iconv_open("",""); | |
8154 | iconv(cd,NULL,NULL,NULL,NULL); | |
8155 | iconv_close(cd); | |
8156 | ; | |
8157 | return 0; | |
8158 | } | |
8159 | _ACEOF | |
1b1fe467 | 8160 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c CR |
8161 | am_cv_lib_iconv=yes |
8162 | am_cv_func_iconv=yes | |
5e13499c | 8163 | fi |
1b1fe467 CR |
8164 | rm -f core conftest.err conftest.$ac_objext \ |
8165 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c CR |
8166 | LIBS="$am_save_LIBS" |
8167 | fi | |
8168 | ||
8169 | fi | |
1b1fe467 | 8170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
dd4f3dd8 | 8171 | $as_echo "$am_cv_func_iconv" >&6; } |
5e13499c CR |
8172 | if test "$am_cv_func_iconv" = yes; then |
8173 | ||
1b1fe467 | 8174 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
5e13499c CR |
8175 | |
8176 | fi | |
8177 | if test "$am_cv_lib_iconv" = yes; then | |
1b1fe467 | 8178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 |
dd4f3dd8 | 8179 | $as_echo_n "checking how to link with libiconv... " >&6; } |
1b1fe467 | 8180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 |
dd4f3dd8 | 8181 | $as_echo "$LIBICONV" >&6; } |
5e13499c CR |
8182 | else |
8183 | CPPFLAGS="$am_save_CPPFLAGS" | |
8184 | LIBICONV= | |
8185 | LTLIBICONV= | |
8186 | fi | |
8187 | ||
a82a04b3 CR |
8188 | |
8189 | ||
5e13499c | 8190 | if test "$am_cv_func_iconv" = yes; then |
1b1fe467 | 8191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
dd4f3dd8 | 8192 | $as_echo_n "checking for iconv declaration... " >&6; } |
1b1fe467 | 8193 | if ${am_cv_proto_iconv+:} false; then : |
dd4f3dd8 | 8194 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
8195 | else |
8196 | ||
1b1fe467 | 8197 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 8198 | /* end confdefs.h. */ |
5e13499c CR |
8199 | |
8200 | #include <stdlib.h> | |
8201 | #include <iconv.h> | |
8202 | extern | |
8203 | #ifdef __cplusplus | |
8204 | "C" | |
8205 | #endif | |
8206 | #if defined(__STDC__) || defined(__cplusplus) | |
8207 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8208 | #else | |
8209 | size_t iconv(); | |
8210 | #endif | |
8211 | ||
8212 | int | |
8213 | main () | |
8214 | { | |
8215 | ||
8216 | ; | |
8217 | return 0; | |
8218 | } | |
8219 | _ACEOF | |
1b1fe467 | 8220 | if ac_fn_c_try_compile "$LINENO"; then : |
5e13499c CR |
8221 | am_cv_proto_iconv_arg1="" |
8222 | else | |
1b1fe467 | 8223 | am_cv_proto_iconv_arg1="const" |
5e13499c | 8224 | fi |
b709b946 | 8225 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5e13499c CR |
8226 | 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);" |
8227 | fi | |
8228 | ||
8229 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
1b1fe467 | 8230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
5e13499c | 8231 | }$am_cv_proto_iconv" >&5 |
dd4f3dd8 | 8232 | $as_echo "${ac_t:- |
b709b946 | 8233 | }$am_cv_proto_iconv" >&6; } |
5e13499c | 8234 | |
a82a04b3 | 8235 | cat >>confdefs.h <<_ACEOF |
5e13499c | 8236 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
a82a04b3 | 8237 | _ACEOF |
5e13499c CR |
8238 | |
8239 | fi | |
8240 | ||
a82a04b3 | 8241 | |
1b1fe467 | 8242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
dd4f3dd8 | 8243 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } |
1b1fe467 | 8244 | if ${am_cv_langinfo_codeset+:} false; then : |
dd4f3dd8 | 8245 | $as_echo_n "(cached) " >&6 |
5e13499c | 8246 | else |
1b1fe467 | 8247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 8248 | /* end confdefs.h. */ |
5e13499c CR |
8249 | #include <langinfo.h> |
8250 | int | |
8251 | main () | |
8252 | { | |
8253 | char* cs = nl_langinfo(CODESET); | |
8254 | ; | |
8255 | return 0; | |
8256 | } | |
8257 | _ACEOF | |
1b1fe467 | 8258 | if ac_fn_c_try_link "$LINENO"; then : |
abe2eb5b | 8259 | am_cv_langinfo_codeset=yes |
5e13499c | 8260 | else |
1b1fe467 | 8261 | am_cv_langinfo_codeset=no |
5e13499c | 8262 | fi |
1b1fe467 CR |
8263 | rm -f core conftest.err conftest.$ac_objext \ |
8264 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c CR |
8265 | |
8266 | fi | |
1b1fe467 | 8267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
dd4f3dd8 | 8268 | $as_echo "$am_cv_langinfo_codeset" >&6; } |
5e13499c CR |
8269 | if test $am_cv_langinfo_codeset = yes; then |
8270 | ||
1b1fe467 | 8271 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
5e13499c CR |
8272 | |
8273 | fi | |
8274 | ||
8275 | if test $ac_cv_header_locale_h = yes; then | |
8276 | ||
1b1fe467 | 8277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
dd4f3dd8 | 8278 | $as_echo_n "checking for LC_MESSAGES... " >&6; } |
1b1fe467 | 8279 | if ${am_cv_val_LC_MESSAGES+:} false; then : |
dd4f3dd8 | 8280 | $as_echo_n "(cached) " >&6 |
5e13499c | 8281 | else |
1b1fe467 | 8282 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 8283 | /* end confdefs.h. */ |
5e13499c CR |
8284 | #include <locale.h> |
8285 | int | |
8286 | main () | |
8287 | { | |
8288 | return LC_MESSAGES | |
8289 | ; | |
8290 | return 0; | |
8291 | } | |
8292 | _ACEOF | |
1b1fe467 | 8293 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c CR |
8294 | am_cv_val_LC_MESSAGES=yes |
8295 | else | |
1b1fe467 | 8296 | am_cv_val_LC_MESSAGES=no |
5e13499c | 8297 | fi |
1b1fe467 CR |
8298 | rm -f core conftest.err conftest.$ac_objext \ |
8299 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c | 8300 | fi |
1b1fe467 | 8301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
dd4f3dd8 | 8302 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } |
5e13499c CR |
8303 | if test $am_cv_val_LC_MESSAGES = yes; then |
8304 | ||
1b1fe467 | 8305 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
5e13499c CR |
8306 | |
8307 | fi | |
8308 | ||
8309 | fi | |
8310 | ||
8311 | for ac_prog in bison | |
8312 | do | |
8313 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8314 | set dummy $ac_prog; ac_word=$2 | |
1b1fe467 | 8315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
dd4f3dd8 | 8316 | $as_echo_n "checking for $ac_word... " >&6; } |
1b1fe467 | 8317 | if ${ac_cv_prog_INTLBISON+:} false; then : |
dd4f3dd8 | 8318 | $as_echo_n "(cached) " >&6 |
5e13499c CR |
8319 | else |
8320 | if test -n "$INTLBISON"; then | |
8321 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
8322 | else | |
a82a04b3 CR |
8323 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
8324 | for as_dir in $PATH | |
8325 | do | |
8326 | IFS=$as_save_IFS | |
8327 | test -z "$as_dir" && as_dir=. | |
1b1fe467 | 8328 | for ac_exec_ext in '' $ac_executable_extensions; do |
0ee50808 | 8329 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
a82a04b3 | 8330 | ac_cv_prog_INTLBISON="$ac_prog" |
1b1fe467 | 8331 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a82a04b3 CR |
8332 | break 2 |
8333 | fi | |
8334 | done | |
1b1fe467 | 8335 | done |
b709b946 | 8336 | IFS=$as_save_IFS |
5e13499c CR |
8337 | |
8338 | fi | |
8339 | fi | |
8340 | INTLBISON=$ac_cv_prog_INTLBISON | |
8341 | if test -n "$INTLBISON"; then | |
1b1fe467 | 8342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 |
dd4f3dd8 | 8343 | $as_echo "$INTLBISON" >&6; } |
5e13499c | 8344 | else |
1b1fe467 | 8345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
dd4f3dd8 | 8346 | $as_echo "no" >&6; } |
5e13499c CR |
8347 | fi |
8348 | ||
b709b946 | 8349 | |
5e13499c CR |
8350 | test -n "$INTLBISON" && break |
8351 | done | |
8352 | ||
8353 | if test -z "$INTLBISON"; then | |
8354 | ac_verc_fail=yes | |
8355 | else | |
1b1fe467 | 8356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5 |
dd4f3dd8 | 8357 | $as_echo_n "checking version of bison... " >&6; } |
e624d0f7 CR |
8358 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
8359 | case $ac_prog_version in | |
8360 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
8361 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
8362 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
8363 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
8364 | esac | |
1b1fe467 | 8365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 |
dd4f3dd8 | 8366 | $as_echo "$ac_prog_version" >&6; } |
e624d0f7 CR |
8367 | fi |
8368 | if test $ac_verc_fail = yes; then | |
8369 | INTLBISON=: | |
8370 | fi | |
545f34cf | 8371 | |
a82a04b3 CR |
8372 | |
8373 | ||
8374 | ||
8375 | ||
8376 | ||
8377 | ||
8378 | ||
8379 | ||
8380 | ||
8381 | ||
8382 | ||
8383 | ||
8384 | ||
8385 | ||
8386 | ||
1b1fe467 | 8387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
dd4f3dd8 | 8388 | $as_echo_n "checking whether NLS is requested... " >&6; } |
b709b946 | 8389 | # Check whether --enable-nls was given. |
1b1fe467 | 8390 | if test "${enable_nls+set}" = set; then : |
b709b946 | 8391 | enableval=$enable_nls; USE_NLS=$enableval |
5e13499c CR |
8392 | else |
8393 | USE_NLS=yes | |
b709b946 CR |
8394 | fi |
8395 | ||
1b1fe467 | 8396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 |
dd4f3dd8 | 8397 | $as_echo "$USE_NLS" >&6; } |
5e13499c | 8398 | |
a82a04b3 CR |
8399 | |
8400 | ||
8401 | ||
5e13499c CR |
8402 | BUILD_INCLUDED_LIBINTL=no |
8403 | USE_INCLUDED_LIBINTL=no | |
8404 | ||
8405 | LIBINTL= | |
8406 | LTLIBINTL= | |
8407 | POSUB= | |
8408 | ||
8409 | if test "$USE_NLS" = "yes"; then | |
8410 | gt_use_preinstalled_gnugettext=no | |
8411 | ||
1b1fe467 | 8412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 |
dd4f3dd8 | 8413 | $as_echo_n "checking whether included gettext is requested... " >&6; } |
5e13499c | 8414 | |
b709b946 | 8415 | # Check whether --with-included-gettext was given. |
1b1fe467 | 8416 | if test "${with_included_gettext+set}" = set; then : |
b709b946 | 8417 | withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval |
5e13499c CR |
8418 | else |
8419 | nls_cv_force_use_gnu_gettext=no | |
b709b946 CR |
8420 | fi |
8421 | ||
1b1fe467 | 8422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 |
dd4f3dd8 | 8423 | $as_echo "$nls_cv_force_use_gnu_gettext" >&6; } |
5e13499c CR |
8424 | |
8425 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
8426 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
8427 | ||
a82a04b3 CR |
8428 | |
8429 | ||
8430 | ||
8431 | ||
8432 | ||
1b1fe467 | 8433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 |
dd4f3dd8 | 8434 | $as_echo_n "checking for GNU gettext in libc... " >&6; } |
1b1fe467 | 8435 | if ${gt_cv_func_gnugettext2_libc+:} false; then : |
dd4f3dd8 | 8436 | $as_echo_n "(cached) " >&6 |
5e13499c | 8437 | else |
1b1fe467 | 8438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 8439 | /* end confdefs.h. */ |
5e13499c CR |
8440 | #include <libintl.h> |
8441 | extern int _nl_msg_cat_cntr; | |
8442 | extern int *_nl_domain_bindings; | |
8443 | int | |
8444 | main () | |
8445 | { | |
8446 | bindtextdomain ("", ""); | |
8447 | return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings | |
8448 | ; | |
8449 | return 0; | |
8450 | } | |
8451 | _ACEOF | |
1b1fe467 | 8452 | if ac_fn_c_try_link "$LINENO"; then : |
5e13499c CR |
8453 | gt_cv_func_gnugettext2_libc=yes |
8454 | else | |
1b1fe467 | 8455 | gt_cv_func_gnugettext2_libc=no |
5e13499c | 8456 | fi |
1b1fe467 CR |
8457 | rm -f core conftest.err conftest.$ac_objext \ |
8458 | conftest$ac_exeext conftest.$ac_ext | |
5e13499c | 8459 | fi |
1b1fe467 | 8460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libc" >&5 |
dd4f3dd8 | 8461 | $as_echo "$gt_cv_func_gnugettext2_libc" >&6; } |
5e13499c CR |
8462 | |
8463 | if test "$gt_cv_func_gnugettext2_libc" != "yes"; then | |
8464 | ||
a82a04b3 CR |
8465 | |
8466 | ||
5e13499c CR |
8467 | use_additional=yes |
8468 | ||
8469 | acl_save_prefix="$prefix" | |
8470 | prefix="$acl_final_prefix" | |
8471 | acl_save_exec_prefix="$exec_prefix" | |
8472 | exec_prefix="$acl_final_exec_prefix" | |
8473 | ||
8474 | eval additional_includedir=\"$includedir\" | |
8475 | eval additional_libdir=\"$libdir\" | |
8476 | ||
8477 | exec_prefix="$acl_save_exec_prefix" | |
8478 | prefix="$acl_save_prefix" | |
8479 | ||
a82a04b3 | 8480 | |
b709b946 | 8481 | # Check whether --with-libintl-prefix was given. |
1b1fe467 | 8482 | if test "${with_libintl_prefix+set}" = set; then : |
b709b946 | 8483 | withval=$with_libintl_prefix; |
5e13499c CR |
8484 | if test "X$withval" = "Xno"; then |
8485 | use_additional=no | |
8486 | else | |
8487 | if test "X$withval" = "X"; then | |
8488 | ||
8489 | acl_save_prefix="$prefix" | |
8490 | prefix="$acl_final_prefix" | |
8491 | acl_save_exec_prefix="$exec_prefix" | |
8492 | exec_prefix="$acl_final_exec_prefix" | |
8493 | ||
8494 | eval additional_includedir=\"$includedir\" | |
8495 | eval additional_libdir=\"$libdir\" | |
8496 | ||
8497 | exec_prefix="$acl_save_exec_prefix" | |
8498 | prefix="$acl_save_prefix" | |
8499 | ||
8500 | else | |
8501 | additional_includedir="$withval/include" | |
8502 | additional_libdir="$withval/lib" | |
8503 | fi | |
8504 | fi | |
8505 | ||
b709b946 CR |
8506 | fi |
8507 | ||
5e13499c CR |
8508 | LIBINTL= |
8509 | LTLIBINTL= | |
8510 | INCINTL= | |
8511 | rpathdirs= | |
8512 | ltrpathdirs= | |
8513 | names_already_handled= | |
8514 | names_next_round='intl ' | |
8515 | while test -n "$names_next_round"; do | |
8516 | names_this_round="$names_next_round" | |
8517 | names_next_round= | |
8518 | for name in $names_this_round; do | |
8519 | already_handled= | |
8520 | for n in $names_already_handled; do | |
8521 | if test "$n" = "$name"; then | |
8522 | already_handled=yes | |
8523 | break | |
8524 | fi | |
8525 | done | |
8526 | if test -z "$already_handled"; then | |
8527 | names_already_handled="$names_already_handled $name" | |
8528 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
8529 | eval value=\"\$HAVE_LIB$uppername\" | |
8530 | if test -n "$value"; then | |
8531 | if test "$value" = yes; then | |
8532 | eval value=\"\$LIB$uppername\" | |
8533 | test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" | |
8534 | eval value=\"\$LTLIB$uppername\" | |
8535 | test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" | |
8536 | else | |
8537 | : | |
8538 | fi | |
8539 | else | |
8540 | found_dir= | |
8541 | found_la= | |
8542 | found_so= | |
8543 | found_a= | |
8544 | if test $use_additional = yes; then | |
f4f5e1c2 | 8545 | if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then |
5e13499c CR |
8546 | found_dir="$additional_libdir" |
8547 | found_so="$additional_libdir/lib$name.$shlibext" | |
8548 | if test -f "$additional_libdir/lib$name.la"; then | |
8549 | found_la="$additional_libdir/lib$name.la" | |
8550 | fi | |
8551 | else | |
8552 | if test -f "$additional_libdir/lib$name.$libext"; then | |
8553 | found_dir="$additional_libdir" | |
8554 | found_a="$additional_libdir/lib$name.$libext" | |
8555 | if test -f "$additional_libdir/lib$name.la"; then | |
8556 | found_la="$additional_libdir/lib$name.la" | |
8557 | fi | |
8558 | fi | |
8559 | fi | |
8560 | fi | |
8561 | if test "X$found_dir" = "X"; then | |
8562 | for x in $LDFLAGS $LTLIBINTL; do | |
8563 | ||
8564 | acl_save_prefix="$prefix" | |
8565 | prefix="$acl_final_prefix" | |
8566 | acl_save_exec_prefix="$exec_prefix" | |
8567 | exec_prefix="$acl_final_exec_prefix" | |
8568 | eval x=\"$x\" | |
8569 | exec_prefix="$acl_save_exec_prefix" | |
8570 | prefix="$acl_save_prefix" | |
8571 | ||
8572 | case "$x" in | |
8573 | -L*) | |
8574 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
f4f5e1c2 | 8575 | if test "X$prefer_shared" = "Xyes" && test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then |
5e13499c CR |
8576 | found_dir="$dir" |
8577 | found_so="$dir/lib$name.$shlibext" | |
8578 | if test -f "$dir/lib$name.la"; then | |
8579 | found_la="$dir/lib$name.la" | |
8580 | fi | |
8581 | else | |
8582 | if test -f "$dir/lib$name.$libext"; then | |
8583 | found_dir="$dir" | |
8584 | found_a="$dir/lib$name.$libext" | |
8585 | if test -f "$dir/lib$name.la"; then | |
8586 | found_la="$dir/lib$name.la" | |
8587 | fi | |
8588 | fi | |
8589 | fi | |
8590 | ;; | |
8591 | esac | |
8592 | if test "X$found_dir" != "X"; then | |
8593 | break | |
8594 | fi | |
8595 | done | |
8596 | fi | |
8597 | if test "X$found_dir" != "X"; then | |
8598 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" | |
8599 | if test "X$found_so" != "X"; then | |
8600 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
8601 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
8602 | else | |
8603 | haveit= | |
8604 | for x in $ltrpathdirs; do | |
8605 | if test "X$x" = "X$found_dir"; then | |
8606 | haveit=yes | |
8607 | break | |
8608 | fi | |
8609 | done | |
8610 | if test -z "$haveit"; then | |
8611 | ltrpathdirs="$ltrpathdirs $found_dir" | |
8612 | fi | |
8613 | if test "$hardcode_direct" = yes; then | |
8614 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
8615 | else | |
8616 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
8617 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
8618 | haveit= | |
8619 | for x in $rpathdirs; do | |
8620 | if test "X$x" = "X$found_dir"; then | |
8621 | haveit=yes | |
8622 | break | |
8623 | fi | |
8624 | done | |
8625 | if test -z "$haveit"; then | |
8626 | rpathdirs="$rpathdirs $found_dir" | |
8627 | fi | |
8628 | else | |
8629 | haveit= | |
8630 | for x in $LDFLAGS $LIBINTL; do | |
8631 | ||
8632 | acl_save_prefix="$prefix" | |
8633 | prefix="$acl_final_prefix" | |
8634 | acl_save_exec_prefix="$exec_prefix" | |
8635 | exec_prefix="$acl_final_exec_prefix" | |
8636 | eval x=\"$x\" | |
8637 | exec_prefix="$acl_save_exec_prefix" | |
8638 | prefix="$acl_save_prefix" | |
8639 | ||
8640 | if test "X$x" = "X-L$found_dir"; then | |
8641 | haveit=yes | |
8642 | break | |
8643 | fi | |
8644 | done | |
8645 | if test -z "$haveit"; then | |
8646 | LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" | |
8647 | fi | |
8648 | if test "$hardcode_minus_L" != no; then | |
8649 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
8650 | else | |
8651 | LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" | |
8652 | fi | |
8653 | fi | |
8654 | fi | |
8655 | fi | |
8656 | else | |
8657 | if test "X$found_a" != "X"; then | |
8658 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" | |
8659 | else | |
8660 | LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" | |
8661 | fi | |
8662 | fi | |
8663 | additional_includedir= | |
8664 | case "$found_dir" in | |
8665 | */lib | */lib/) | |
8666 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
8667 | additional_includedir="$basedir/include" | |
8668 | ;; | |
8669 | esac | |
8670 | if test "X$additional_includedir" != "X"; then | |
8671 | if test "X$additional_includedir" != "X/usr/include"; then | |
8672 | haveit= | |
8673 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
8674 | if test -n "$GCC"; then | |
8675 | case $host_os in | |
8676 | linux*) haveit=yes;; | |
8677 | esac | |
8678 | fi | |
8679 | fi | |
8680 | if test -z "$haveit"; then | |
8681 | for x in $CPPFLAGS $INCINTL; do | |
8682 | ||
8683 | acl_save_prefix="$prefix" | |
8684 | prefix="$acl_final_prefix" | |
8685 | acl_save_exec_prefix="$exec_prefix" | |
8686 | exec_prefix="$acl_final_exec_prefix" | |
8687 | eval x=\"$x\" | |
8688 | exec_prefix="$acl_save_exec_prefix" | |
8689 | prefix="$acl_save_prefix" | |
8690 | ||
8691 | if test "X$x" = "X-I$additional_includedir"; then | |
8692 | haveit=yes | |
8693 | break | |
8694 | fi | |
8695 | done | |
8696 | if test -z "$haveit"; then | |
8697 | if test -d "$additional_includedir"; then | |
8698 | INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" | |
8699 | fi | |
8700 | fi | |
8701 | fi | |
8702 | fi | |
8703 | fi | |
8704 | if test -n "$found_la"; then | |
8705 | save_libdir="$libdir" | |
8706 | case "$found_la" in | |
8707 | */* | *\\*) . "$found_la" ;; | |
8708 | *) . "./$found_la" ;; | |
8709 | esac | |
8710 | libdir="$save_libdir" | |
8711 | for dep in $dependency_libs; do | |
8712 | case "$dep" in | |
8713 | -L*) | |
8714 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
8715 | if test "X$additional_libdir" != "X/usr/lib"; then | |
8716 | haveit= | |
8717 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
8718 | if test -n "$GCC"; then | |
8719 | case $host_os in | |
8720 | linux*) haveit=yes;; | |
8721 | esac | |
8722 | fi | |
8723 | fi | |
8724 | if test -z "$haveit"; then | |
8725 | haveit= | |
8726 | for x in $LDFLAGS $LIBINTL; do | |
8727 | ||
8728 | acl_save_prefix="$prefix" | |
8729 | prefix="$acl_final_prefix" | |
8730 | acl_save_exec_prefix="$exec_prefix" | |
8731 | exec_prefix="$acl_final_exec_prefix" | |
8732 | eval x=\"$x\" | |
8733 | exec_prefix="$acl_save_exec_prefix" | |
8734 | prefix="$acl_save_prefix" | |
8735 | ||
8736 | if test "X$x" = "X-L$additional_libdir"; then | |
8737 | haveit=yes | |
8738 | break | |
8739 | fi | |
8740 | done | |
8741 | if test -z "$haveit"; then | |
8742 | if test -d "$additional_libdir"; then | |
8743 | LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" | |
8744 | fi | |
8745 | fi | |
8746 | haveit= | |
8747 | for x in $LDFLAGS $LTLIBINTL; do | |
8748 | ||
8749 | acl_save_prefix="$prefix" | |
8750 | prefix="$acl_final_prefix" | |
8751 | acl_save_exec_prefix="$exec_prefix" | |
8752 | exec_prefix="$acl_final_exec_prefix" | |
8753 | eval x=\"$x\" | |
8754 | exec_prefix="$acl_save_exec_prefix" | |
8755 | prefix="$acl_save_prefix" | |
8756 | ||
8757 | if test "X$x" = "X-L$additional_libdir"; then | |
8758 | haveit=yes | |
8759 | break | |
8760 | fi | |
8761 | done | |
8762 | if test -z "$haveit"; then | |
8763 | if test -d "$additional_libdir"; then | |
8764 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" | |
8765 | fi | |
8766 | fi | |
8767 | fi | |
8768 | fi | |
8769 | ;; | |
8770 | -R*) | |
8771 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
8772 | if test "$enable_rpath" != no; then | |
8773 | haveit= | |
8774 | for x in $rpathdirs; do | |
8775 | if test "X$x" = "X$dir"; then | |
8776 | haveit=yes | |
8777 | break | |
8778 | fi | |
8779 | done | |
8780 | if test -z "$haveit"; then | |
8781 | rpathdirs="$rpathdirs $dir" | |
8782 | fi | |
8783 | haveit= | |
8784 | for x in $ltrpathdirs; do | |
8785 | if test "X$x" = "X$dir"; then | |
8786 | haveit=yes | |
8787 | break | |
8788 | fi | |
8789 | done | |
8790 | if test -z "$haveit"; then | |
8791 | ltrpathdirs="$ltrpathdirs $dir" | |
8792 | fi | |
8793 | fi | |
8794 | ;; | |
8795 | -l*) | |
8796 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
8797 | ;; | |
7f947b68 CR |
8798 | *.la) |
8799 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
8800 | ;; | |
8801 | *) | |
8802 | LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" | |
8803 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" | |
8804 | ;; | |
8805 | esac | |
8806 | done | |
8807 | fi | |
8808 | else | |
8809 | LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" | |
8810 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" | |
8811 | fi | |
8812 | fi | |
8813 | fi | |
8814 | done | |
8815 | done | |
8816 | if test "X$rpathdirs" != "X"; then | |
8817 | if test -n "$hardcode_libdir_separator"; then | |
8818 | alldirs= | |
8819 | for found_dir in $rpathdirs; do | |
8820 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
8821 | done | |
8822 | acl_save_libdir="$libdir" | |
8823 | libdir="$alldirs" | |
8824 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8825 | libdir="$acl_save_libdir" | |
8826 | LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" | |
8827 | else | |
8828 | for found_dir in $rpathdirs; do | |
8829 | acl_save_libdir="$libdir" | |
1b1fe467 CR |
8830 | libdir="$found_dir" |
8831 | eval flag=\"$hardcode_libdir_flag_spec\" | |
8832 | libdir="$acl_save_libdir" | |
8833 | LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" | |
8834 | done | |
8835 | fi | |
8836 | fi | |
8837 | if test "X$ltrpathdirs" != "X"; then | |
8838 | for found_dir in $ltrpathdirs; do | |
8839 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" | |
8840 | done | |
8841 | fi | |
7f947b68 | 8842 | |
1b1fe467 CR |
8843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 |
8844 | $as_echo_n "checking for GNU gettext in libintl... " >&6; } | |
8845 | if ${gt_cv_func_gnugettext2_libintl+:} false; then : | |
7175a77f CR |
8846 | $as_echo_n "(cached) " >&6 |
8847 | else | |
1b1fe467 CR |
8848 | gt_save_CPPFLAGS="$CPPFLAGS" |
8849 | CPPFLAGS="$CPPFLAGS $INCINTL" | |
8850 | gt_save_LIBS="$LIBS" | |
8851 | LIBS="$LIBS $LIBINTL" | |
8852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 8853 | /* end confdefs.h. */ |
1b1fe467 CR |
8854 | #include <libintl.h> |
8855 | extern int _nl_msg_cat_cntr; | |
8856 | extern | |
8857 | #ifdef __cplusplus | |
8858 | "C" | |
8859 | #endif | |
8860 | const char *_nl_expand_alias (); | |
7175a77f CR |
8861 | int |
8862 | main () | |
8863 | { | |
1b1fe467 CR |
8864 | bindtextdomain ("", ""); |
8865 | return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0) | |
7175a77f CR |
8866 | ; |
8867 | return 0; | |
8868 | } | |
8869 | _ACEOF | |
1b1fe467 CR |
8870 | if ac_fn_c_try_link "$LINENO"; then : |
8871 | gt_cv_func_gnugettext2_libintl=yes | |
7175a77f | 8872 | else |
1b1fe467 | 8873 | gt_cv_func_gnugettext2_libintl=no |
7175a77f | 8874 | fi |
1b1fe467 CR |
8875 | rm -f core conftest.err conftest.$ac_objext \ |
8876 | conftest$ac_exeext conftest.$ac_ext | |
8877 | if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then | |
8878 | LIBS="$LIBS $LIBICONV" | |
8879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7610e0c5 | 8880 | /* end confdefs.h. */ |
1b1fe467 CR |
8881 | #include <libintl.h> |
8882 | extern int _nl_msg_cat_cntr; | |
8883 | extern | |
8884 | #ifdef __cplusplus | |
8885 | "C" | |
8886 | #endif | |
8887 | const char *_nl_expand_alias (); | |
abe2eb5b CR |
8888 | int |
8889 | main () | |
2dead0c4 | 8890 | { |
1b1fe467 CR |
8891 | bindtextdomain ("", ""); |
8892 | return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0) | |
abe2eb5b CR |
8893 | ; |
8894 | return 0; | |
2dead0c4 | 8895 | } |
abe2eb5b | 8896 | _ACEOF |
1b1fe467 CR |
8897 | if ac_fn_c_try_link "$LINENO"; then : |
8898 | LIBINTL="$LIBINTL $LIBICONV" | |
8899 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | |
8900 | gt_cv_func_gnugettext2_libintl=yes | |
7175a77f | 8901 | |
7f947b68 | 8902 | fi |
1b1fe467 CR |
8903 | rm -f core conftest.err conftest.$ac_objext \ |
8904 | conftest$ac_exeext conftest.$ac_ext | |
8905 | fi | |
8906 | CPPFLAGS="$gt_save_CPPFLAGS" | |
8907 | LIBS="$gt_save_LIBS" | |
7f947b68 | 8908 | fi |
1b1fe467 CR |
8909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext2_libintl" >&5 |
8910 | $as_echo "$gt_cv_func_gnugettext2_libintl" >&6; } | |
8911 | fi | |
7175a77f | 8912 | |
1b1fe467 CR |
8913 | if test "$gt_cv_func_gnugettext2_libc" = "yes" \ |
8914 | || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \ | |
8915 | && test "$PACKAGE" != gettext-runtime \ | |
8916 | && test "$PACKAGE" != gettext-tools; }; then | |
8917 | gt_use_preinstalled_gnugettext=yes | |
8918 | else | |
8919 | LIBINTL= | |
8920 | LTLIBINTL= | |
8921 | INCINTL= | |
8922 | fi | |
abe2eb5b | 8923 | |
2dead0c4 | 8924 | |
1b1fe467 CR |
8925 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then |
8926 | nls_cv_use_gnu_gettext=yes | |
8927 | fi | |
8928 | fi | |
7f947b68 | 8929 | |
1b1fe467 CR |
8930 | if test "$nls_cv_use_gnu_gettext" = "yes"; then |
8931 | BUILD_INCLUDED_LIBINTL=yes | |
8932 | USE_INCLUDED_LIBINTL=yes | |
8933 | LIBINTL="lib/intl/libintl.a $LIBICONV" | |
8934 | LTLIBINTL="lib/intl/libintl.a $LTLIBICONV" | |
8935 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | |
8936 | fi | |
7175a77f | 8937 | |
1b1fe467 CR |
8938 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
8939 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | |
8940 | CATOBJEXT=.gmo | |
8941 | fi | |
f73dda09 | 8942 | |
c920c360 | 8943 | |
1b1fe467 CR |
8944 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
8945 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | |
8946 | ||
8947 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h | |
8948 | ||
8949 | else | |
8950 | USE_NLS=no | |
8951 | fi | |
8952 | fi | |
8953 | ||
8954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 | |
8955 | $as_echo_n "checking whether to use NLS... " >&6; } | |
8956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 | |
8957 | $as_echo "$USE_NLS" >&6; } | |
8958 | if test "$USE_NLS" = "yes"; then | |
8959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 | |
8960 | $as_echo_n "checking where the gettext function comes from... " >&6; } | |
8961 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | |
8962 | if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then | |
8963 | gt_source="external libintl" | |
8964 | else | |
8965 | gt_source="libc" | |
8966 | fi | |
8967 | else | |
8968 | gt_source="included intl directory" | |
8969 | fi | |
8970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 | |
8971 | $as_echo "$gt_source" >&6; } | |
8972 | fi | |
8973 | ||
8974 | if test "$USE_NLS" = "yes"; then | |
8975 | ||
8976 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | |
8977 | if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then | |
8978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 | |
8979 | $as_echo_n "checking how to link with libintl... " >&6; } | |
8980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 | |
8981 | $as_echo "$LIBINTL" >&6; } | |
8982 | ||
8983 | for element in $INCINTL; do | |
8984 | haveit= | |
8985 | for x in $CPPFLAGS; do | |
8986 | ||
8987 | acl_save_prefix="$prefix" | |
8988 | prefix="$acl_final_prefix" | |
8989 | acl_save_exec_prefix="$exec_prefix" | |
8990 | exec_prefix="$acl_final_exec_prefix" | |
8991 | eval x=\"$x\" | |
8992 | exec_prefix="$acl_save_exec_prefix" | |
8993 | prefix="$acl_save_prefix" | |
8994 | ||
8995 | if test "X$x" = "X$element"; then | |
8996 | haveit=yes | |
8997 | break | |
8998 | fi | |
8999 | done | |
9000 | if test -z "$haveit"; then | |
9001 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
9002 | fi | |
9003 | done | |
9004 | ||
9005 | fi | |
9006 | ||
2dead0c4 | 9007 | |
1b1fe467 | 9008 | $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h |
b709b946 | 9009 | |
2dead0c4 | 9010 | |
1b1fe467 | 9011 | $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h |
7f947b68 | 9012 | |
1b1fe467 | 9013 | fi |
2dead0c4 | 9014 | |
1b1fe467 CR |
9015 | POSUB=po |
9016 | fi | |
2dead0c4 | 9017 | |
7f947b68 | 9018 | |
1b1fe467 CR |
9019 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then |
9020 | BUILD_INCLUDED_LIBINTL=yes | |
9021 | fi | |
7f947b68 | 9022 | |
7f947b68 | 9023 | |
7f947b68 | 9024 | |
1b1fe467 CR |
9025 | |
9026 | ||
9027 | nls_cv_header_intl= | |
9028 | nls_cv_header_libgt= | |
9029 | ||
9030 | DATADIRNAME=share | |
9031 | ||
9032 | ||
9033 | INSTOBJEXT=.mo | |
9034 | ||
9035 | ||
9036 | GENCAT=gencat | |
9037 | ||
9038 | ||
9039 | if test "$USE_INCLUDED_LIBINTL" = yes; then | |
9040 | INTLOBJS="\$(GETTOBJS)" | |
9041 | fi | |
9042 | ||
9043 | ||
9044 | INTL_LIBTOOL_SUFFIX_PREFIX= | |
9045 | ||
9046 | ||
9047 | ||
9048 | INTLLIBS="$LIBINTL" | |
9049 | ||
9050 | ||
9051 | ||
9052 | ||
9053 | ||
9054 | ||
9055 | ||
9056 | ac_header_dirent=no | |
9057 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
9058 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
9059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
9060 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
9061 | if eval \${$as_ac_Header+:} false; then : | |
7175a77f CR |
9062 | $as_echo_n "(cached) " >&6 |
9063 | else | |
1b1fe467 | 9064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 9065 | /* end confdefs.h. */ |
1b1fe467 CR |
9066 | #include <sys/types.h> |
9067 | #include <$ac_hdr> | |
7f947b68 | 9068 | |
7175a77f CR |
9069 | int |
9070 | main () | |
9071 | { | |
1b1fe467 CR |
9072 | if ((DIR *) 0) |
9073 | return 0; | |
7175a77f CR |
9074 | ; |
9075 | return 0; | |
9076 | } | |
9077 | _ACEOF | |
1b1fe467 CR |
9078 | if ac_fn_c_try_compile "$LINENO"; then : |
9079 | eval "$as_ac_Header=yes" | |
7175a77f | 9080 | else |
1b1fe467 CR |
9081 | eval "$as_ac_Header=no" |
9082 | fi | |
9083 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9084 | fi | |
9085 | eval ac_res=\$$as_ac_Header | |
9086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
9087 | $as_echo "$ac_res" >&6; } | |
9088 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9089 | cat >>confdefs.h <<_ACEOF | |
9090 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
9091 | _ACEOF | |
7f947b68 | 9092 | |
1b1fe467 | 9093 | ac_header_dirent=$ac_hdr; break |
7f947b68 CR |
9094 | fi |
9095 | ||
1b1fe467 CR |
9096 | done |
9097 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
9098 | if test $ac_header_dirent = dirent.h; then | |
9099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
9100 | $as_echo_n "checking for library containing opendir... " >&6; } | |
9101 | if ${ac_cv_search_opendir+:} false; then : | |
9102 | $as_echo_n "(cached) " >&6 | |
7175a77f | 9103 | else |
1b1fe467 CR |
9104 | ac_func_search_save_LIBS=$LIBS |
9105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 9106 | /* end confdefs.h. */ |
7f947b68 | 9107 | |
1b1fe467 CR |
9108 | /* Override any GCC internal prototype to avoid an error. |
9109 | Use char because int might match the return type of a GCC | |
9110 | builtin and then its argument prototype would still apply. */ | |
9111 | #ifdef __cplusplus | |
9112 | extern "C" | |
9113 | #endif | |
9114 | char opendir (); | |
abe2eb5b CR |
9115 | int |
9116 | main () | |
9117 | { | |
1b1fe467 | 9118 | return opendir (); |
abe2eb5b CR |
9119 | ; |
9120 | return 0; | |
9121 | } | |
71412226 | 9122 | _ACEOF |
1b1fe467 CR |
9123 | for ac_lib in '' dir; do |
9124 | if test -z "$ac_lib"; then | |
9125 | ac_res="none required" | |
9126 | else | |
9127 | ac_res=-l$ac_lib | |
9128 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9129 | fi | |
9130 | if ac_fn_c_try_link "$LINENO"; then : | |
9131 | ac_cv_search_opendir=$ac_res | |
7f947b68 | 9132 | fi |
1b1fe467 CR |
9133 | rm -f core conftest.err conftest.$ac_objext \ |
9134 | conftest$ac_exeext | |
9135 | if ${ac_cv_search_opendir+:} false; then : | |
9136 | break | |
9137 | fi | |
9138 | done | |
9139 | if ${ac_cv_search_opendir+:} false; then : | |
7f947b68 | 9140 | |
7175a77f | 9141 | else |
1b1fe467 CR |
9142 | ac_cv_search_opendir=no |
9143 | fi | |
9144 | rm conftest.$ac_ext | |
9145 | LIBS=$ac_func_search_save_LIBS | |
d166f048 | 9146 | fi |
1b1fe467 CR |
9147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
9148 | $as_echo "$ac_cv_search_opendir" >&6; } | |
9149 | ac_res=$ac_cv_search_opendir | |
9150 | if test "$ac_res" != no; then : | |
9151 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b709b946 | 9152 | |
7175a77f | 9153 | fi |
7f947b68 | 9154 | |
1b1fe467 CR |
9155 | else |
9156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
9157 | $as_echo_n "checking for library containing opendir... " >&6; } | |
9158 | if ${ac_cv_search_opendir+:} false; then : | |
9159 | $as_echo_n "(cached) " >&6 | |
9160 | else | |
9161 | ac_func_search_save_LIBS=$LIBS | |
9162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 9163 | /* end confdefs.h. */ |
1b1fe467 CR |
9164 | |
9165 | /* Override any GCC internal prototype to avoid an error. | |
9166 | Use char because int might match the return type of a GCC | |
9167 | builtin and then its argument prototype would still apply. */ | |
9168 | #ifdef __cplusplus | |
9169 | extern "C" | |
9170 | #endif | |
9171 | char opendir (); | |
abe2eb5b CR |
9172 | int |
9173 | main () | |
9174 | { | |
1b1fe467 | 9175 | return opendir (); |
abe2eb5b CR |
9176 | ; |
9177 | return 0; | |
9178 | } | |
2dead0c4 | 9179 | _ACEOF |
1b1fe467 CR |
9180 | for ac_lib in '' x; do |
9181 | if test -z "$ac_lib"; then | |
9182 | ac_res="none required" | |
9183 | else | |
9184 | ac_res=-l$ac_lib | |
9185 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9186 | fi | |
9187 | if ac_fn_c_try_link "$LINENO"; then : | |
9188 | ac_cv_search_opendir=$ac_res | |
9189 | fi | |
9190 | rm -f core conftest.err conftest.$ac_objext \ | |
9191 | conftest$ac_exeext | |
9192 | if ${ac_cv_search_opendir+:} false; then : | |
9193 | break | |
9194 | fi | |
9195 | done | |
9196 | if ${ac_cv_search_opendir+:} false; then : | |
9197 | ||
7f947b68 | 9198 | else |
1b1fe467 CR |
9199 | ac_cv_search_opendir=no |
9200 | fi | |
9201 | rm conftest.$ac_ext | |
9202 | LIBS=$ac_func_search_save_LIBS | |
9203 | fi | |
9204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
9205 | $as_echo "$ac_cv_search_opendir" >&6; } | |
9206 | ac_res=$ac_cv_search_opendir | |
9207 | if test "$ac_res" != no; then : | |
9208 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7f947b68 | 9209 | |
7175a77f | 9210 | fi |
7f947b68 | 9211 | |
1b1fe467 CR |
9212 | fi |
9213 | ||
9214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 | |
9215 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
9216 | if ${ac_cv_header_time+:} false; then : | |
9217 | $as_echo_n "(cached) " >&6 | |
7f947b68 | 9218 | else |
1b1fe467 | 9219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7f947b68 | 9220 | /* end confdefs.h. */ |
1b1fe467 CR |
9221 | #include <sys/types.h> |
9222 | #include <sys/time.h> | |
9223 | #include <time.h> | |
9224 | ||
7175a77f CR |
9225 | int |
9226 | main () | |
9227 | { | |
1b1fe467 CR |
9228 | if ((struct tm *) 0) |
9229 | return 0; | |
7175a77f CR |
9230 | ; |
9231 | return 0; | |
9232 | } | |
7f947b68 | 9233 | _ACEOF |
1b1fe467 CR |
9234 | if ac_fn_c_try_compile "$LINENO"; then : |
9235 | ac_cv_header_time=yes | |
7f947b68 | 9236 | else |
1b1fe467 | 9237 | ac_cv_header_time=no |
7f947b68 | 9238 | fi |
1b1fe467 | 9239 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7175a77f | 9240 | fi |
1b1fe467 CR |
9241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
9242 | $as_echo "$ac_cv_header_time" >&6; } | |
9243 | if test $ac_cv_header_time = yes; then | |
9244 | ||
9245 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h | |
9246 | ||
7175a77f | 9247 | fi |
7175a77f CR |
9248 | |
9249 | ||
abe2eb5b | 9250 | |
1b1fe467 CR |
9251 | for ac_header in inttypes.h |
9252 | do : | |
9253 | ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" | |
9254 | if test "x$ac_cv_header_inttypes_h" = xyes; then : | |
9255 | cat >>confdefs.h <<_ACEOF | |
9256 | #define HAVE_INTTYPES_H 1 | |
2dead0c4 | 9257 | _ACEOF |
c920c360 | 9258 | |
1b1fe467 | 9259 | fi |
d166f048 | 9260 | |
1b1fe467 CR |
9261 | done |
9262 | ||
9263 | ||
9264 | ||
9265 | for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \ | |
9266 | memory.h locale.h termcap.h termio.h termios.h dlfcn.h \ | |
9267 | stdbool.h stddef.h stdint.h netdb.h pwd.h grp.h strings.h \ | |
9268 | regex.h syslog.h ulimit.h | |
9269 | do : | |
9270 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9271 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9272 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9273 | cat >>confdefs.h <<_ACEOF | |
9274 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7175a77f | 9275 | _ACEOF |
7f947b68 | 9276 | |
1b1fe467 CR |
9277 | fi |
9278 | ||
9279 | done | |
9280 | ||
9281 | for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h \ | |
9282 | sys/resource.h sys/param.h sys/socket.h sys/stat.h \ | |
9283 | sys/time.h sys/times.h sys/types.h sys/wait.h | |
9284 | do : | |
9285 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9286 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9287 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9288 | cat >>confdefs.h <<_ACEOF | |
9289 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7175a77f | 9290 | _ACEOF |
1b1fe467 CR |
9291 | |
9292 | fi | |
9293 | ||
9294 | done | |
9295 | ||
9296 | for ac_header in netinet/in.h arpa/inet.h | |
9297 | do : | |
9298 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9299 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9300 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
9301 | cat >>confdefs.h <<_ACEOF | |
9302 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7175a77f | 9303 | _ACEOF |
1b1fe467 CR |
9304 | |
9305 | fi | |
9306 | ||
9307 | done | |
9308 | ||
9309 | ||
9310 | ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" " | |
9311 | #if HAVE_SYS_STREAM_H | |
9312 | # include <sys/stream.h> | |
9313 | #endif | |
9314 | ||
9315 | " | |
9316 | if test "x$ac_cv_header_sys_ptem_h" = xyes; then : | |
9317 | ||
9318 | fi | |
9319 | ||
9320 | ||
9321 | ||
9322 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
9323 | # for constant arguments. Useless! | |
9324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
9325 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9326 | if ${ac_cv_working_alloca_h+:} false; then : | |
9327 | $as_echo_n "(cached) " >&6 | |
9328 | else | |
9329 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 9330 | /* end confdefs.h. */ |
1b1fe467 | 9331 | #include <alloca.h> |
abe2eb5b CR |
9332 | int |
9333 | main () | |
9334 | { | |
1b1fe467 CR |
9335 | char *p = (char *) alloca (2 * sizeof (int)); |
9336 | if (p) return 0; | |
7175a77f CR |
9337 | ; |
9338 | return 0; | |
abe2eb5b CR |
9339 | } |
9340 | _ACEOF | |
1b1fe467 CR |
9341 | if ac_fn_c_try_link "$LINENO"; then : |
9342 | ac_cv_working_alloca_h=yes | |
abe2eb5b | 9343 | else |
1b1fe467 CR |
9344 | ac_cv_working_alloca_h=no |
9345 | fi | |
9346 | rm -f core conftest.err conftest.$ac_objext \ | |
9347 | conftest$ac_exeext conftest.$ac_ext | |
9348 | fi | |
9349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
9350 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
9351 | if test $ac_cv_working_alloca_h = yes; then | |
9352 | ||
9353 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
d166f048 JA |
9354 | |
9355 | fi | |
9356 | ||
1b1fe467 CR |
9357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9358 | $as_echo_n "checking for alloca... " >&6; } | |
9359 | if ${ac_cv_func_alloca_works+:} false; then : | |
9360 | $as_echo_n "(cached) " >&6 | |
7175a77f | 9361 | else |
1b1fe467 | 9362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 9363 | /* end confdefs.h. */ |
1b1fe467 CR |
9364 | #ifdef __GNUC__ |
9365 | # define alloca __builtin_alloca | |
9366 | #else | |
9367 | # ifdef _MSC_VER | |
9368 | # include <malloc.h> | |
9369 | # define alloca _alloca | |
9370 | # else | |
9371 | # ifdef HAVE_ALLOCA_H | |
9372 | # include <alloca.h> | |
9373 | # else | |
9374 | # ifdef _AIX | |
9375 | #pragma alloca | |
9376 | # else | |
9377 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9378 | void *alloca (size_t); | |
9379 | # endif | |
9380 | # endif | |
9381 | # endif | |
9382 | # endif | |
9383 | #endif | |
7f947b68 | 9384 | |
abe2eb5b CR |
9385 | int |
9386 | main () | |
9387 | { | |
1b1fe467 CR |
9388 | char *p = (char *) alloca (1); |
9389 | if (p) return 0; | |
abe2eb5b CR |
9390 | ; |
9391 | return 0; | |
9392 | } | |
9393 | _ACEOF | |
1b1fe467 CR |
9394 | if ac_fn_c_try_link "$LINENO"; then : |
9395 | ac_cv_func_alloca_works=yes | |
7f947b68 | 9396 | else |
1b1fe467 CR |
9397 | ac_cv_func_alloca_works=no |
9398 | fi | |
9399 | rm -f core conftest.err conftest.$ac_objext \ | |
9400 | conftest$ac_exeext conftest.$ac_ext | |
7f947b68 | 9401 | fi |
1b1fe467 CR |
9402 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
9403 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
9404 | ||
9405 | if test $ac_cv_func_alloca_works = yes; then | |
9406 | ||
9407 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h | |
7f947b68 | 9408 | |
7f947b68 | 9409 | else |
1b1fe467 CR |
9410 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
9411 | # that cause trouble. Some versions do not even contain alloca or | |
9412 | # contain a buggy version. If you still want to use their alloca, | |
9413 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
9414 | ||
9415 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
9416 | ||
9417 | $as_echo "#define C_ALLOCA 1" >>confdefs.h | |
9418 | ||
9419 | ||
9420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 | |
9421 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9422 | if ${ac_cv_os_cray+:} false; then : | |
9423 | $as_echo_n "(cached) " >&6 | |
9424 | else | |
9425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9426 | /* end confdefs.h. */ | |
9427 | #if defined CRAY && ! defined CRAY2 | |
9428 | webecray | |
9429 | #else | |
9430 | wenotbecray | |
9431 | #endif | |
7f947b68 | 9432 | |
1b1fe467 CR |
9433 | _ACEOF |
9434 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
9435 | $EGREP "webecray" >/dev/null 2>&1; then : | |
9436 | ac_cv_os_cray=yes | |
9437 | else | |
9438 | ac_cv_os_cray=no | |
7f947b68 | 9439 | fi |
1b1fe467 | 9440 | rm -f conftest* |
7f947b68 CR |
9441 | |
9442 | fi | |
1b1fe467 CR |
9443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
9444 | $as_echo "$ac_cv_os_cray" >&6; } | |
9445 | if test $ac_cv_os_cray = yes; then | |
9446 | for ac_func in _getb67 GETB67 getb67; do | |
9447 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9448 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9449 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
7f947b68 | 9450 | |
1b1fe467 CR |
9451 | cat >>confdefs.h <<_ACEOF |
9452 | #define CRAY_STACKSEG_END $ac_func | |
7175a77f | 9453 | _ACEOF |
7175a77f | 9454 | |
1b1fe467 CR |
9455 | break |
9456 | fi | |
e3db237e | 9457 | |
1b1fe467 | 9458 | done |
d166f048 | 9459 | fi |
e3db237e | 9460 | |
1b1fe467 CR |
9461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
9462 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9463 | if ${ac_cv_c_stack_direction+:} false; then : | |
9464 | $as_echo_n "(cached) " >&6 | |
abe2eb5b | 9465 | else |
1b1fe467 CR |
9466 | if test "$cross_compiling" = yes; then : |
9467 | ac_cv_c_stack_direction=0 | |
9468 | else | |
9469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
abe2eb5b | 9470 | /* end confdefs.h. */ |
7175a77f | 9471 | $ac_includes_default |
abe2eb5b | 9472 | int |
0ee50808 | 9473 | find_stack_direction (int *addr, int depth) |
abe2eb5b | 9474 | { |
0ee50808 CR |
9475 | int dir, dummy = 0; |
9476 | if (! addr) | |
9477 | addr = &dummy; | |
9478 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
9479 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
9480 | return dir + dummy; | |
1b1fe467 | 9481 | } |
7175a77f | 9482 | |
1b1fe467 | 9483 | int |
0ee50808 | 9484 | main (int argc, char **argv) |
1b1fe467 | 9485 | { |
0ee50808 | 9486 | return find_stack_direction (0, argc + !argv + 20) < 0; |
abe2eb5b CR |
9487 | } |
9488 | _ACEOF | |
1b1fe467 CR |
9489 | if ac_fn_c_try_run "$LINENO"; then : |
9490 | ac_cv_c_stack_direction=1 | |
abe2eb5b | 9491 | else |
1b1fe467 | 9492 | ac_cv_c_stack_direction=-1 |
7610e0c5 | 9493 | fi |
1b1fe467 CR |
9494 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9495 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2dead0c4 | 9496 | fi |
2dead0c4 | 9497 | |
1b1fe467 CR |
9498 | fi |
9499 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
9500 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
7175a77f | 9501 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 9502 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
7175a77f | 9503 | _ACEOF |
7f947b68 | 9504 | |
7f947b68 | 9505 | |
1b1fe467 CR |
9506 | fi |
9507 | ||
9508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 | |
9509 | $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } | |
9510 | if ${ac_cv_func_getpgrp_void+:} false; then : | |
7175a77f | 9511 | $as_echo_n "(cached) " >&6 |
7f947b68 | 9512 | else |
1b1fe467 CR |
9513 | # Use it with a single arg. |
9514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f CR |
9515 | /* end confdefs.h. */ |
9516 | $ac_includes_default | |
9517 | int | |
9518 | main () | |
9519 | { | |
1b1fe467 | 9520 | getpgrp (0); |
7175a77f CR |
9521 | ; |
9522 | return 0; | |
9523 | } | |
9524 | _ACEOF | |
1b1fe467 CR |
9525 | if ac_fn_c_try_compile "$LINENO"; then : |
9526 | ac_cv_func_getpgrp_void=no | |
9527 | else | |
9528 | ac_cv_func_getpgrp_void=yes | |
9529 | fi | |
9530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9531 | ||
9532 | fi | |
9533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 | |
9534 | $as_echo "$ac_cv_func_getpgrp_void" >&6; } | |
9535 | if test $ac_cv_func_getpgrp_void = yes; then | |
9536 | ||
9537 | $as_echo "#define GETPGRP_VOID 1" >>confdefs.h | |
9538 | ||
9539 | fi | |
9540 | ||
9541 | if ${ac_cv_func_setvbuf_reversed+:} false; then : | |
9542 | $as_echo_n "(cached) " >&6 | |
9543 | else | |
9544 | ac_cv_func_setvbuf_reversed=no | |
9545 | fi | |
9546 | ||
9547 | ||
9548 | for ac_func in vprintf | |
9549 | do : | |
9550 | ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" | |
9551 | if test "x$ac_cv_func_vprintf" = xyes; then : | |
9552 | cat >>confdefs.h <<_ACEOF | |
9553 | #define HAVE_VPRINTF 1 | |
7175a77f | 9554 | _ACEOF |
1b1fe467 CR |
9555 | |
9556 | ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" | |
9557 | if test "x$ac_cv_func__doprnt" = xyes; then : | |
9558 | ||
9559 | $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h | |
9560 | ||
9561 | fi | |
9562 | ||
9563 | fi | |
9564 | done | |
9565 | ||
9566 | ||
9567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 | |
9568 | $as_echo_n "checking for working strcoll... " >&6; } | |
9569 | if ${ac_cv_func_strcoll_works+:} false; then : | |
9570 | $as_echo_n "(cached) " >&6 | |
9571 | else | |
9572 | if test "$cross_compiling" = yes; then : | |
9573 | ac_cv_func_strcoll_works=no | |
9574 | else | |
9575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f CR |
9576 | /* end confdefs.h. */ |
9577 | $ac_includes_default | |
9578 | int | |
9579 | main () | |
9580 | { | |
1b1fe467 CR |
9581 | return (strcoll ("abc", "def") >= 0 || |
9582 | strcoll ("ABC", "DEF") >= 0 || | |
9583 | strcoll ("123", "456") >= 0) | |
7175a77f CR |
9584 | ; |
9585 | return 0; | |
9586 | } | |
abe2eb5b | 9587 | _ACEOF |
1b1fe467 CR |
9588 | if ac_fn_c_try_run "$LINENO"; then : |
9589 | ac_cv_func_strcoll_works=yes | |
7175a77f | 9590 | else |
1b1fe467 CR |
9591 | ac_cv_func_strcoll_works=no |
9592 | fi | |
9593 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
9594 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
9595 | fi | |
2dead0c4 | 9596 | |
7f947b68 | 9597 | fi |
1b1fe467 CR |
9598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5 |
9599 | $as_echo "$ac_cv_func_strcoll_works" >&6; } | |
9600 | if test $ac_cv_func_strcoll_works = yes; then | |
7f947b68 | 9601 | |
1b1fe467 | 9602 | $as_echo "#define HAVE_STRCOLL 1" >>confdefs.h |
7f947b68 | 9603 | |
1b1fe467 CR |
9604 | fi |
9605 | ||
9606 | ||
9607 | ||
9608 | if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then | |
9609 | MALLOC_TARGET=alloca | |
9610 | MALLOC_SRC=alloca.c | |
9611 | ||
9612 | MALLOC_LIB='-lmalloc' | |
9613 | MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' | |
9614 | MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' | |
9615 | MALLOC_DEP='$(MALLOC_LIBRARY)' | |
9616 | fi | |
9617 | ||
9618 | if test "$ac_cv_func_vprintf" = no; then | |
9619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5 | |
9620 | $as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; } | |
9621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 9622 | /* end confdefs.h. */ |
1b1fe467 | 9623 | #include <stdio.h> |
7f947b68 | 9624 | |
abe2eb5b | 9625 | _ACEOF |
1b1fe467 CR |
9626 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
9627 | $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then : | |
9628 | ac_cv_func_vprintf=yes | |
9629 | fi | |
9630 | rm -f conftest* | |
9631 | ||
9632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5 | |
9633 | $as_echo "$ac_cv_func_vprintf" >&6; } | |
9634 | if test $ac_cv_func_vprintf = yes; then | |
9635 | $as_echo "#define HAVE_VPRINTF 1" >>confdefs.h | |
9636 | ||
9637 | fi | |
9638 | fi | |
9639 | ||
9640 | if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then | |
9641 | case " $LIBOBJS " in | |
9642 | *" vprint.$ac_objext "* ) ;; | |
9643 | *) LIBOBJS="$LIBOBJS vprint.$ac_objext" | |
9644 | ;; | |
7175a77f | 9645 | esac |
1b1fe467 CR |
9646 | |
9647 | fi | |
9648 | ||
9649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | |
9650 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9651 | if ${ac_cv_type_signal+:} false; then : | |
9652 | $as_echo_n "(cached) " >&6 | |
9653 | else | |
9654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 9655 | /* end confdefs.h. */ |
1b1fe467 CR |
9656 | #include <sys/types.h> |
9657 | #include <signal.h> | |
9658 | ||
7175a77f CR |
9659 | int |
9660 | main () | |
9661 | { | |
1b1fe467 | 9662 | return *(signal (0, 0)) (0) == 1; |
7175a77f CR |
9663 | ; |
9664 | return 0; | |
9665 | } | |
9666 | _ACEOF | |
1b1fe467 CR |
9667 | if ac_fn_c_try_compile "$LINENO"; then : |
9668 | ac_cv_type_signal=int | |
7175a77f | 9669 | else |
1b1fe467 CR |
9670 | ac_cv_type_signal=void |
9671 | fi | |
9672 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9673 | fi | |
9674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 | |
9675 | $as_echo "$ac_cv_type_signal" >&6; } | |
9676 | ||
9677 | cat >>confdefs.h <<_ACEOF | |
9678 | #define RETSIGTYPE $ac_cv_type_signal | |
9679 | _ACEOF | |
9680 | ||
9681 | ||
9682 | ||
9683 | ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype" | |
9684 | if test "x$ac_cv_func___setostype" = xyes; then : | |
9685 | $as_echo "#define HAVE_SETOSTYPE 1" >>confdefs.h | |
7f947b68 CR |
9686 | |
9687 | fi | |
9688 | ||
1b1fe467 CR |
9689 | ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" |
9690 | if test "x$ac_cv_func_wait3" = xyes; then : | |
9691 | $as_echo "#define HAVE_WAIT3 1" >>confdefs.h | |
2dead0c4 CR |
9692 | |
9693 | fi | |
9694 | ||
1b1fe467 CR |
9695 | |
9696 | ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" | |
9697 | if test "x$ac_cv_func_mkfifo" = xyes; then : | |
9698 | $as_echo "#define HAVE_MKFIFO 1" >>confdefs.h | |
9699 | ||
9700 | else | |
9701 | $as_echo "#define MKFIFO_MISSING 1" >>confdefs.h | |
9702 | ||
7175a77f | 9703 | fi |
7f947b68 | 9704 | |
7f947b68 | 9705 | |
1b1fe467 CR |
9706 | for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \ |
9707 | getpagesize getpeername getrlimit getrusage gettimeofday \ | |
9708 | kill killpg lstat readlink sbrk select setdtablesize \ | |
9709 | setitimer tcgetpgrp uname ulimit waitpid | |
9710 | do : | |
9711 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9712 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9713 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9714 | cat >>confdefs.h <<_ACEOF | |
9715 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7175a77f | 9716 | _ACEOF |
1b1fe467 CR |
9717 | |
9718 | fi | |
9719 | done | |
9720 | ||
9721 | ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename" | |
9722 | if test "x$ac_cv_func_rename" = xyes; then : | |
9723 | $as_echo "#define HAVE_RENAME 1" >>confdefs.h | |
9724 | ||
7175a77f | 9725 | else |
1b1fe467 CR |
9726 | case " $LIBOBJS " in |
9727 | *" rename.$ac_objext "* ) ;; | |
9728 | *) LIBOBJS="$LIBOBJS rename.$ac_objext" | |
9729 | ;; | |
9730 | esac | |
2dead0c4 | 9731 | |
7f947b68 | 9732 | fi |
2dead0c4 | 9733 | |
1b1fe467 CR |
9734 | |
9735 | ||
9736 | for ac_func in bcopy bzero confstr faccessat fnmatch \ | |
9737 | getaddrinfo gethostbyname getservbyname getservent inet_aton \ | |
9738 | imaxdiv memmove pathconf putenv raise regcomp regexec \ | |
9739 | setenv setlinebuf setlocale setvbuf siginterrupt strchr \ | |
9740 | sysconf syslog tcgetattr times ttyname tzset unsetenv | |
9741 | do : | |
9742 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9743 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9744 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9745 | cat >>confdefs.h <<_ACEOF | |
9746 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9747 | _ACEOF | |
9748 | ||
9749 | fi | |
7175a77f | 9750 | done |
1b1fe467 CR |
9751 | |
9752 | ||
9753 | for ac_func in vasprintf asprintf | |
9754 | do : | |
9755 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9756 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9757 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9758 | cat >>confdefs.h <<_ACEOF | |
9759 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7175a77f | 9760 | _ACEOF |
abe2eb5b | 9761 | |
1b1fe467 CR |
9762 | fi |
9763 | done | |
7f947b68 | 9764 | |
1b1fe467 CR |
9765 | for ac_func in isascii isblank isgraph isprint isspace isxdigit |
9766 | do : | |
9767 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9768 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9769 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9770 | cat >>confdefs.h <<_ACEOF | |
9771 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7175a77f | 9772 | _ACEOF |
1b1fe467 CR |
9773 | |
9774 | fi | |
9775 | done | |
9776 | ||
9777 | for ac_func in getpwent getpwnam getpwuid | |
9778 | do : | |
9779 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9780 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9781 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
9782 | cat >>confdefs.h <<_ACEOF | |
9783 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9784 | _ACEOF | |
9785 | ||
9786 | fi | |
9787 | done | |
9788 | ||
9789 | ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" | |
9790 | if test "x$ac_cv_func_getcwd" = xyes; then : | |
9791 | $as_echo "#define HAVE_GETCWD 1" >>confdefs.h | |
9792 | ||
9793 | else | |
9794 | case " $LIBOBJS " in | |
9795 | *" getcwd.$ac_objext "* ) ;; | |
9796 | *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" | |
9797 | ;; | |
abe2eb5b | 9798 | esac |
1b1fe467 CR |
9799 | |
9800 | fi | |
9801 | ||
9802 | ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" | |
9803 | if test "x$ac_cv_func_memset" = xyes; then : | |
9804 | $as_echo "#define HAVE_MEMSET 1" >>confdefs.h | |
9805 | ||
7175a77f | 9806 | else |
1b1fe467 CR |
9807 | case " $LIBOBJS " in |
9808 | *" memset.$ac_objext "* ) ;; | |
9809 | *) LIBOBJS="$LIBOBJS memset.$ac_objext" | |
9810 | ;; | |
9811 | esac | |
7f947b68 | 9812 | |
7175a77f | 9813 | fi |
1b1fe467 CR |
9814 | |
9815 | ||
9816 | ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" | |
9817 | if test "x$ac_cv_func_strcasecmp" = xyes; then : | |
9818 | $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h | |
9819 | ||
9820 | else | |
9821 | case " $LIBOBJS " in | |
9822 | *" strcasecmp.$ac_objext "* ) ;; | |
9823 | *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" | |
9824 | ;; | |
9825 | esac | |
9826 | ||
7175a77f | 9827 | fi |
1b1fe467 CR |
9828 | |
9829 | ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" | |
9830 | if test "x$ac_cv_func_strcasestr" = xyes; then : | |
9831 | $as_echo "#define HAVE_STRCASESTR 1" >>confdefs.h | |
9832 | ||
9833 | else | |
9834 | case " $LIBOBJS " in | |
9835 | *" strcasestr.$ac_objext "* ) ;; | |
9836 | *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" | |
9837 | ;; | |
9838 | esac | |
9839 | ||
7f947b68 CR |
9840 | fi |
9841 | ||
1b1fe467 CR |
9842 | ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" |
9843 | if test "x$ac_cv_func_strerror" = xyes; then : | |
9844 | $as_echo "#define HAVE_STRERROR 1" >>confdefs.h | |
7f947b68 | 9845 | |
1b1fe467 CR |
9846 | else |
9847 | case " $LIBOBJS " in | |
9848 | *" strerror.$ac_objext "* ) ;; | |
9849 | *) LIBOBJS="$LIBOBJS strerror.$ac_objext" | |
9850 | ;; | |
9851 | esac | |
e8ce775d | 9852 | |
1b1fe467 | 9853 | fi |
71412226 | 9854 | |
1b1fe467 CR |
9855 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" |
9856 | if test "x$ac_cv_func_strftime" = xyes; then : | |
9857 | $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h | |
7f947b68 | 9858 | |
abe2eb5b | 9859 | else |
1b1fe467 CR |
9860 | case " $LIBOBJS " in |
9861 | *" strftime.$ac_objext "* ) ;; | |
9862 | *) LIBOBJS="$LIBOBJS strftime.$ac_objext" | |
9863 | ;; | |
9864 | esac | |
cce855bc | 9865 | |
1b1fe467 CR |
9866 | fi |
9867 | ||
9868 | ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" | |
9869 | if test "x$ac_cv_func_strnlen" = xyes; then : | |
9870 | $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h | |
9871 | ||
9872 | else | |
9873 | case " $LIBOBJS " in | |
9874 | *" strnlen.$ac_objext "* ) ;; | |
9875 | *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" | |
9876 | ;; | |
7175a77f | 9877 | esac |
7f947b68 | 9878 | |
1b1fe467 CR |
9879 | fi |
9880 | ||
9881 | ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk" | |
9882 | if test "x$ac_cv_func_strpbrk" = xyes; then : | |
9883 | $as_echo "#define HAVE_STRPBRK 1" >>confdefs.h | |
9884 | ||
9885 | else | |
9886 | case " $LIBOBJS " in | |
9887 | *" strpbrk.$ac_objext "* ) ;; | |
9888 | *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext" | |
9889 | ;; | |
7f947b68 | 9890 | esac |
1b1fe467 CR |
9891 | |
9892 | fi | |
9893 | ||
9894 | ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" | |
9895 | if test "x$ac_cv_func_strstr" = xyes; then : | |
9896 | $as_echo "#define HAVE_STRSTR 1" >>confdefs.h | |
9897 | ||
7175a77f | 9898 | else |
1b1fe467 CR |
9899 | case " $LIBOBJS " in |
9900 | *" strstr.$ac_objext "* ) ;; | |
9901 | *) LIBOBJS="$LIBOBJS strstr.$ac_objext" | |
9902 | ;; | |
9903 | esac | |
7f947b68 | 9904 | |
abe2eb5b | 9905 | fi |
71412226 | 9906 | |
1b1fe467 CR |
9907 | |
9908 | ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" | |
9909 | if test "x$ac_cv_func_strtod" = xyes; then : | |
9910 | $as_echo "#define HAVE_STRTOD 1" >>confdefs.h | |
9911 | ||
7f947b68 | 9912 | else |
1b1fe467 CR |
9913 | case " $LIBOBJS " in |
9914 | *" strtod.$ac_objext "* ) ;; | |
9915 | *) LIBOBJS="$LIBOBJS strtod.$ac_objext" | |
9916 | ;; | |
9917 | esac | |
7f947b68 | 9918 | |
1b1fe467 | 9919 | fi |
7f947b68 | 9920 | |
1b1fe467 CR |
9921 | ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" |
9922 | if test "x$ac_cv_func_strtol" = xyes; then : | |
9923 | $as_echo "#define HAVE_STRTOL 1" >>confdefs.h | |
9924 | ||
9925 | else | |
9926 | case " $LIBOBJS " in | |
9927 | *" strtol.$ac_objext "* ) ;; | |
9928 | *) LIBOBJS="$LIBOBJS strtol.$ac_objext" | |
9929 | ;; | |
7175a77f | 9930 | esac |
7f947b68 | 9931 | |
1b1fe467 CR |
9932 | fi |
9933 | ||
9934 | ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" | |
9935 | if test "x$ac_cv_func_strtoul" = xyes; then : | |
9936 | $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h | |
9937 | ||
9938 | else | |
9939 | case " $LIBOBJS " in | |
9940 | *" strtoul.$ac_objext "* ) ;; | |
9941 | *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" | |
9942 | ;; | |
7f947b68 | 9943 | esac |
1b1fe467 CR |
9944 | |
9945 | fi | |
9946 | ||
9947 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
9948 | if test "x$ac_cv_func_strtoll" = xyes; then : | |
9949 | $as_echo "#define HAVE_STRTOLL 1" >>confdefs.h | |
9950 | ||
2dead0c4 | 9951 | else |
1b1fe467 CR |
9952 | case " $LIBOBJS " in |
9953 | *" strtoll.$ac_objext "* ) ;; | |
9954 | *) LIBOBJS="$LIBOBJS strtoll.$ac_objext" | |
9955 | ;; | |
9956 | esac | |
2dead0c4 | 9957 | |
7f947b68 | 9958 | fi |
2dead0c4 | 9959 | |
1b1fe467 CR |
9960 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" |
9961 | if test "x$ac_cv_func_strtoull" = xyes; then : | |
9962 | $as_echo "#define HAVE_STRTOULL 1" >>confdefs.h | |
9963 | ||
7f947b68 | 9964 | else |
1b1fe467 CR |
9965 | case " $LIBOBJS " in |
9966 | *" strtoull.$ac_objext "* ) ;; | |
9967 | *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" | |
9968 | ;; | |
9969 | esac | |
7f947b68 CR |
9970 | |
9971 | fi | |
9972 | ||
1b1fe467 CR |
9973 | ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" |
9974 | if test "x$ac_cv_func_strtoimax" = xyes; then : | |
9975 | $as_echo "#define HAVE_STRTOIMAX 1" >>confdefs.h | |
9976 | ||
9977 | else | |
9978 | case " $LIBOBJS " in | |
9979 | *" strtoimax.$ac_objext "* ) ;; | |
9980 | *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext" | |
9981 | ;; | |
9982 | esac | |
9983 | ||
2dead0c4 | 9984 | fi |
7f947b68 | 9985 | |
1b1fe467 CR |
9986 | ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" |
9987 | if test "x$ac_cv_func_strtoumax" = xyes; then : | |
9988 | $as_echo "#define HAVE_STRTOUMAX 1" >>confdefs.h | |
7f947b68 | 9989 | |
1b1fe467 CR |
9990 | else |
9991 | case " $LIBOBJS " in | |
9992 | *" strtoumax.$ac_objext "* ) ;; | |
9993 | *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext" | |
9994 | ;; | |
7f947b68 | 9995 | esac |
1b1fe467 CR |
9996 | |
9997 | fi | |
9998 | ||
9999 | ||
10000 | ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf" | |
10001 | if test "x$ac_cv_func_dprintf" = xyes; then : | |
10002 | $as_echo "#define HAVE_DPRINTF 1" >>confdefs.h | |
10003 | ||
7f947b68 | 10004 | else |
1b1fe467 CR |
10005 | case " $LIBOBJS " in |
10006 | *" dprintf.$ac_objext "* ) ;; | |
10007 | *) LIBOBJS="$LIBOBJS dprintf.$ac_objext" | |
10008 | ;; | |
10009 | esac | |
7f947b68 | 10010 | |
abe2eb5b | 10011 | fi |
2dead0c4 | 10012 | |
1b1fe467 CR |
10013 | |
10014 | ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" | |
10015 | if test "x$ac_cv_func_strchrnul" = xyes; then : | |
10016 | $as_echo "#define HAVE_STRCHRNUL 1" >>confdefs.h | |
10017 | ||
10018 | else | |
10019 | case " $LIBOBJS " in | |
10020 | *" strchrnul.$ac_objext "* ) ;; | |
10021 | *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext" | |
10022 | ;; | |
7f947b68 | 10023 | esac |
1b1fe467 CR |
10024 | |
10025 | fi | |
10026 | ||
10027 | ||
10028 | ||
10029 | ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h> | |
10030 | " | |
10031 | if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then : | |
10032 | ac_have_decl=1 | |
ccc6cda3 | 10033 | else |
1b1fe467 CR |
10034 | ac_have_decl=0 |
10035 | fi | |
10036 | ||
10037 | cat >>confdefs.h <<_ACEOF | |
10038 | #define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl | |
7175a77f | 10039 | _ACEOF |
2dead0c4 | 10040 | |
7610e0c5 | 10041 | |
1b1fe467 CR |
10042 | ac_fn_c_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default" |
10043 | if test "x$ac_cv_have_decl_confstr" = xyes; then : | |
10044 | ac_have_decl=1 | |
7175a77f | 10045 | else |
1b1fe467 | 10046 | ac_have_decl=0 |
2dead0c4 | 10047 | fi |
1b1fe467 CR |
10048 | |
10049 | cat >>confdefs.h <<_ACEOF | |
10050 | #define HAVE_DECL_CONFSTR $ac_have_decl | |
10051 | _ACEOF | |
10052 | ||
10053 | ac_fn_c_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default" | |
10054 | if test "x$ac_cv_have_decl_printf" = xyes; then : | |
10055 | ac_have_decl=1 | |
10056 | else | |
10057 | ac_have_decl=0 | |
7175a77f | 10058 | fi |
7f947b68 | 10059 | |
1b1fe467 CR |
10060 | cat >>confdefs.h <<_ACEOF |
10061 | #define HAVE_DECL_PRINTF $ac_have_decl | |
10062 | _ACEOF | |
7f947b68 | 10063 | |
1b1fe467 CR |
10064 | ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" |
10065 | if test "x$ac_cv_have_decl_sbrk" = xyes; then : | |
10066 | ac_have_decl=1 | |
10067 | else | |
10068 | ac_have_decl=0 | |
10069 | fi | |
7f947b68 | 10070 | |
abe2eb5b | 10071 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 10072 | #define HAVE_DECL_SBRK $ac_have_decl |
2dead0c4 | 10073 | _ACEOF |
c920c360 | 10074 | |
1b1fe467 CR |
10075 | ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" |
10076 | if test "x$ac_cv_have_decl_setregid" = xyes; then : | |
10077 | ac_have_decl=1 | |
10078 | else | |
10079 | ac_have_decl=0 | |
10080 | fi | |
c920c360 | 10081 | |
1b1fe467 CR |
10082 | cat >>confdefs.h <<_ACEOF |
10083 | #define HAVE_DECL_SETREGID $ac_have_decl | |
10084 | _ACEOF | |
10085 | ||
10086 | ac_fn_c_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default" | |
10087 | if test "x$ac_cv_have_decl_strcpy" = xyes; then : | |
10088 | ac_have_decl=1 | |
c920c360 | 10089 | else |
1b1fe467 CR |
10090 | ac_have_decl=0 |
10091 | fi | |
10092 | ||
10093 | cat >>confdefs.h <<_ACEOF | |
10094 | #define HAVE_DECL_STRCPY $ac_have_decl | |
2dead0c4 | 10095 | _ACEOF |
c920c360 | 10096 | |
1b1fe467 CR |
10097 | ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" |
10098 | if test "x$ac_cv_have_decl_strsignal" = xyes; then : | |
10099 | ac_have_decl=1 | |
10100 | else | |
10101 | ac_have_decl=0 | |
10102 | fi | |
10103 | ||
10104 | cat >>confdefs.h <<_ACEOF | |
10105 | #define HAVE_DECL_STRSIGNAL $ac_have_decl | |
7175a77f | 10106 | _ACEOF |
1b1fe467 CR |
10107 | |
10108 | ||
10109 | ac_fn_c_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default" | |
10110 | if test "x$ac_cv_have_decl_strtold" = xyes; then : | |
10111 | ac_have_decl=1 | |
10112 | else | |
10113 | ac_have_decl=0 | |
10114 | fi | |
10115 | ||
10116 | cat >>confdefs.h <<_ACEOF | |
10117 | #define HAVE_DECL_STRTOLD $ac_have_decl | |
7f947b68 | 10118 | _ACEOF |
1b1fe467 CR |
10119 | if test $ac_have_decl = 1; then : |
10120 | ||
10121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5 | |
10122 | $as_echo_n "checking for broken strtold... " >&6; } | |
10123 | if ${bash_cv_strtold_broken+:} false; then : | |
10124 | $as_echo_n "(cached) " >&6 | |
10125 | else | |
10126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 10127 | /* end confdefs.h. */ |
1b1fe467 | 10128 | #include <stdlib.h> |
7175a77f CR |
10129 | int |
10130 | main () | |
10131 | { | |
1b1fe467 | 10132 | int main() { long double r; char *foo, bar; r = strtold(foo, &bar);} |
7175a77f CR |
10133 | ; |
10134 | return 0; | |
10135 | } | |
10136 | _ACEOF | |
1b1fe467 CR |
10137 | if ac_fn_c_try_compile "$LINENO"; then : |
10138 | bash_cv_strtold_broken=no | |
abe2eb5b | 10139 | else |
1b1fe467 CR |
10140 | bash_cv_strtold_broken=yes |
10141 | fi | |
10142 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10143 | ||
2dead0c4 | 10144 | |
7175a77f | 10145 | fi |
2dead0c4 | 10146 | |
1b1fe467 CR |
10147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5 |
10148 | $as_echo "$bash_cv_strtold_broken" >&6; } | |
10149 | if test "$bash_cv_strtold_broken" = "yes" ; then | |
10150 | $as_echo "#define STRTOLD_BROKEN 1" >>confdefs.h | |
71412226 | 10151 | |
1b1fe467 CR |
10152 | fi |
10153 | ||
10154 | fi | |
10155 | ||
10156 | ||
10157 | ||
10158 | ||
10159 | ||
10160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoimax" >&5 | |
10161 | $as_echo_n "checking for declaration of strtoimax... " >&6; } | |
10162 | if ${bash_cv_decl_strtoimax+:} false; then : | |
10163 | $as_echo_n "(cached) " >&6 | |
10164 | else | |
10165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 10166 | /* end confdefs.h. */ |
1b1fe467 CR |
10167 | |
10168 | #if STDC_HEADERS | |
10169 | # include <stdlib.h> | |
10170 | #endif | |
10171 | #if HAVE_INTTYPES_H | |
10172 | # include <inttypes.h> | |
10173 | #endif | |
10174 | ||
7175a77f CR |
10175 | int |
10176 | main () | |
10177 | { | |
1b1fe467 | 10178 | return !strtoimax; |
7175a77f CR |
10179 | ; |
10180 | return 0; | |
10181 | } | |
e3db237e | 10182 | _ACEOF |
1b1fe467 CR |
10183 | if ac_fn_c_try_link "$LINENO"; then : |
10184 | bash_cv_decl_strtoimax=yes | |
10185 | else | |
10186 | bash_cv_decl_strtoimax=no | |
10187 | fi | |
10188 | rm -f core conftest.err conftest.$ac_objext \ | |
10189 | conftest$ac_exeext conftest.$ac_ext | |
10190 | fi | |
10191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoimax" >&5 | |
10192 | $as_echo "$bash_cv_decl_strtoimax" >&6; } | |
10193 | bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
10194 | if test $bash_cv_decl_strtoimax = yes; then | |
10195 | cat >>confdefs.h <<_ACEOF | |
10196 | #define $bash_tr_func 1 | |
10197 | _ACEOF | |
10198 | ||
10199 | else | |
10200 | cat >>confdefs.h <<_ACEOF | |
10201 | #define $bash_tr_func 0 | |
7175a77f | 10202 | _ACEOF |
1b1fe467 CR |
10203 | |
10204 | fi | |
10205 | ||
10206 | ||
10207 | ||
10208 | ||
10209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtol" >&5 | |
10210 | $as_echo_n "checking for declaration of strtol... " >&6; } | |
10211 | if ${bash_cv_decl_strtol+:} false; then : | |
10212 | $as_echo_n "(cached) " >&6 | |
10213 | else | |
10214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 10215 | /* end confdefs.h. */ |
1b1fe467 CR |
10216 | |
10217 | #if STDC_HEADERS | |
10218 | # include <stdlib.h> | |
10219 | #endif | |
10220 | #if HAVE_INTTYPES_H | |
10221 | # include <inttypes.h> | |
10222 | #endif | |
10223 | ||
7175a77f CR |
10224 | int |
10225 | main () | |
10226 | { | |
1b1fe467 | 10227 | return !strtol; |
7175a77f CR |
10228 | ; |
10229 | return 0; | |
10230 | } | |
10231 | _ACEOF | |
1b1fe467 CR |
10232 | if ac_fn_c_try_link "$LINENO"; then : |
10233 | bash_cv_decl_strtol=yes | |
7f947b68 | 10234 | else |
1b1fe467 | 10235 | bash_cv_decl_strtol=no |
abe2eb5b | 10236 | fi |
1b1fe467 CR |
10237 | rm -f core conftest.err conftest.$ac_objext \ |
10238 | conftest$ac_exeext conftest.$ac_ext | |
10239 | fi | |
10240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtol" >&5 | |
10241 | $as_echo "$bash_cv_decl_strtol" >&6; } | |
10242 | bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
10243 | if test $bash_cv_decl_strtol = yes; then | |
10244 | cat >>confdefs.h <<_ACEOF | |
10245 | #define $bash_tr_func 1 | |
10246 | _ACEOF | |
71412226 | 10247 | |
7175a77f | 10248 | else |
1b1fe467 CR |
10249 | cat >>confdefs.h <<_ACEOF |
10250 | #define $bash_tr_func 0 | |
10251 | _ACEOF | |
71412226 | 10252 | |
7175a77f | 10253 | fi |
ccc6cda3 | 10254 | |
7f947b68 | 10255 | |
1b1fe467 CR |
10256 | |
10257 | ||
10258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoll" >&5 | |
10259 | $as_echo_n "checking for declaration of strtoll... " >&6; } | |
10260 | if ${bash_cv_decl_strtoll+:} false; then : | |
10261 | $as_echo_n "(cached) " >&6 | |
10262 | else | |
10263 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
abe2eb5b | 10264 | /* end confdefs.h. */ |
1b1fe467 CR |
10265 | |
10266 | #if STDC_HEADERS | |
10267 | # include <stdlib.h> | |
10268 | #endif | |
10269 | #if HAVE_INTTYPES_H | |
10270 | # include <inttypes.h> | |
10271 | #endif | |
10272 | ||
abe2eb5b | 10273 | int |
7f947b68 CR |
10274 | main () |
10275 | { | |
1b1fe467 | 10276 | return !strtoll; |
7f947b68 CR |
10277 | ; |
10278 | return 0; | |
10279 | } | |
10280 | _ACEOF | |
1b1fe467 CR |
10281 | if ac_fn_c_try_link "$LINENO"; then : |
10282 | bash_cv_decl_strtoll=yes | |
e3db237e | 10283 | else |
1b1fe467 CR |
10284 | bash_cv_decl_strtoll=no |
10285 | fi | |
10286 | rm -f core conftest.err conftest.$ac_objext \ | |
10287 | conftest$ac_exeext conftest.$ac_ext | |
abe2eb5b | 10288 | fi |
1b1fe467 CR |
10289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoll" >&5 |
10290 | $as_echo "$bash_cv_decl_strtoll" >&6; } | |
10291 | bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
10292 | if test $bash_cv_decl_strtoll = yes; then | |
10293 | cat >>confdefs.h <<_ACEOF | |
10294 | #define $bash_tr_func 1 | |
10295 | _ACEOF | |
abe2eb5b | 10296 | |
c920c360 | 10297 | else |
1b1fe467 CR |
10298 | cat >>confdefs.h <<_ACEOF |
10299 | #define $bash_tr_func 0 | |
7175a77f | 10300 | _ACEOF |
1b1fe467 CR |
10301 | |
10302 | fi | |
10303 | ||
10304 | ||
10305 | ||
10306 | ||
10307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoul" >&5 | |
10308 | $as_echo_n "checking for declaration of strtoul... " >&6; } | |
10309 | if ${bash_cv_decl_strtoul+:} false; then : | |
10310 | $as_echo_n "(cached) " >&6 | |
10311 | else | |
10312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e3db237e | 10313 | /* end confdefs.h. */ |
1b1fe467 CR |
10314 | |
10315 | #if STDC_HEADERS | |
10316 | # include <stdlib.h> | |
10317 | #endif | |
10318 | #if HAVE_INTTYPES_H | |
10319 | # include <inttypes.h> | |
10320 | #endif | |
10321 | ||
e3db237e CR |
10322 | int |
10323 | main () | |
10324 | { | |
1b1fe467 | 10325 | return !strtoul; |
e3db237e CR |
10326 | ; |
10327 | return 0; | |
10328 | } | |
10329 | _ACEOF | |
1b1fe467 CR |
10330 | if ac_fn_c_try_link "$LINENO"; then : |
10331 | bash_cv_decl_strtoul=yes | |
7f947b68 | 10332 | else |
1b1fe467 CR |
10333 | bash_cv_decl_strtoul=no |
10334 | fi | |
10335 | rm -f core conftest.err conftest.$ac_objext \ | |
10336 | conftest$ac_exeext conftest.$ac_ext | |
10337 | fi | |
10338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoul" >&5 | |
10339 | $as_echo "$bash_cv_decl_strtoul" >&6; } | |
10340 | bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
10341 | if test $bash_cv_decl_strtoul = yes; then | |
10342 | cat >>confdefs.h <<_ACEOF | |
10343 | #define $bash_tr_func 1 | |
10344 | _ACEOF | |
10345 | ||
10346 | else | |
10347 | cat >>confdefs.h <<_ACEOF | |
10348 | #define $bash_tr_func 0 | |
10349 | _ACEOF | |
7175a77f | 10350 | |
7f947b68 | 10351 | fi |
7175a77f | 10352 | |
7f947b68 CR |
10353 | |
10354 | ||
7f947b68 | 10355 | |
1b1fe467 CR |
10356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoull" >&5 |
10357 | $as_echo_n "checking for declaration of strtoull... " >&6; } | |
10358 | if ${bash_cv_decl_strtoull+:} false; then : | |
7f947b68 CR |
10359 | $as_echo_n "(cached) " >&6 |
10360 | else | |
1b1fe467 | 10361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e3db237e | 10362 | /* end confdefs.h. */ |
1b1fe467 CR |
10363 | |
10364 | #if STDC_HEADERS | |
10365 | # include <stdlib.h> | |
10366 | #endif | |
10367 | #if HAVE_INTTYPES_H | |
10368 | # include <inttypes.h> | |
10369 | #endif | |
10370 | ||
e3db237e CR |
10371 | int |
10372 | main () | |
10373 | { | |
1b1fe467 | 10374 | return !strtoull; |
e3db237e CR |
10375 | ; |
10376 | return 0; | |
10377 | } | |
7610e0c5 | 10378 | _ACEOF |
1b1fe467 CR |
10379 | if ac_fn_c_try_link "$LINENO"; then : |
10380 | bash_cv_decl_strtoull=yes | |
10381 | else | |
10382 | bash_cv_decl_strtoull=no | |
10383 | fi | |
10384 | rm -f core conftest.err conftest.$ac_objext \ | |
10385 | conftest$ac_exeext conftest.$ac_ext | |
10386 | fi | |
10387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoull" >&5 | |
10388 | $as_echo "$bash_cv_decl_strtoull" >&6; } | |
10389 | bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
10390 | if test $bash_cv_decl_strtoull = yes; then | |
10391 | cat >>confdefs.h <<_ACEOF | |
10392 | #define $bash_tr_func 1 | |
10393 | _ACEOF | |
10394 | ||
10395 | else | |
10396 | cat >>confdefs.h <<_ACEOF | |
10397 | #define $bash_tr_func 0 | |
7f947b68 | 10398 | _ACEOF |
1b1fe467 CR |
10399 | |
10400 | fi | |
10401 | ||
10402 | ||
10403 | ||
10404 | ||
10405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for declaration of strtoumax" >&5 | |
10406 | $as_echo_n "checking for declaration of strtoumax... " >&6; } | |
10407 | if ${bash_cv_decl_strtoumax+:} false; then : | |
10408 | $as_echo_n "(cached) " >&6 | |
10409 | else | |
10410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
e3db237e | 10411 | /* end confdefs.h. */ |
1b1fe467 CR |
10412 | |
10413 | #if STDC_HEADERS | |
10414 | # include <stdlib.h> | |
10415 | #endif | |
10416 | #if HAVE_INTTYPES_H | |
10417 | # include <inttypes.h> | |
10418 | #endif | |
10419 | ||
e3db237e CR |
10420 | int |
10421 | main () | |
10422 | { | |
1b1fe467 | 10423 | return !strtoumax; |
e3db237e CR |
10424 | ; |
10425 | return 0; | |
10426 | } | |
f73dda09 | 10427 | _ACEOF |
1b1fe467 CR |
10428 | if ac_fn_c_try_link "$LINENO"; then : |
10429 | bash_cv_decl_strtoumax=yes | |
7f947b68 | 10430 | else |
1b1fe467 CR |
10431 | bash_cv_decl_strtoumax=no |
10432 | fi | |
10433 | rm -f core conftest.err conftest.$ac_objext \ | |
10434 | conftest$ac_exeext conftest.$ac_ext | |
10435 | fi | |
10436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_strtoumax" >&5 | |
10437 | $as_echo "$bash_cv_decl_strtoumax" >&6; } | |
10438 | bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
10439 | if test $bash_cv_decl_strtoumax = yes; then | |
10440 | cat >>confdefs.h <<_ACEOF | |
10441 | #define $bash_tr_func 1 | |
10442 | _ACEOF | |
10443 | ||
10444 | else | |
10445 | cat >>confdefs.h <<_ACEOF | |
10446 | #define $bash_tr_func 0 | |
10447 | _ACEOF | |
7f947b68 CR |
10448 | |
10449 | fi | |
10450 | ||
1b1fe467 CR |
10451 | |
10452 | ||
10453 | ||
10454 | ||
10455 | ||
10456 | ||
10457 | for ac_func in $ac_func_list | |
10458 | do : | |
10459 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10460 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10461 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
10462 | cat >>confdefs.h <<_ACEOF | |
10463 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10464 | _ACEOF | |
10465 | ||
10466 | fi | |
10467 | done | |
10468 | ||
10469 | ||
10470 | ||
10471 | ||
10472 | ||
10473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
10474 | $as_echo_n "checking for working mktime... " >&6; } | |
10475 | if ${ac_cv_func_working_mktime+:} false; then : | |
10476 | $as_echo_n "(cached) " >&6 | |
7f947b68 | 10477 | else |
1b1fe467 CR |
10478 | if test "$cross_compiling" = yes; then : |
10479 | ac_cv_func_working_mktime=no | |
10480 | else | |
10481 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10482 | /* end confdefs.h. */ | |
10483 | /* Test program from Paul Eggert and Tony Leneis. */ | |
10484 | #ifdef TIME_WITH_SYS_TIME | |
10485 | # include <sys/time.h> | |
10486 | # include <time.h> | |
10487 | #else | |
10488 | # ifdef HAVE_SYS_TIME_H | |
10489 | # include <sys/time.h> | |
10490 | # else | |
10491 | # include <time.h> | |
10492 | # endif | |
10493 | #endif | |
10494 | ||
10495 | #include <limits.h> | |
10496 | #include <stdlib.h> | |
10497 | ||
10498 | #ifdef HAVE_UNISTD_H | |
10499 | # include <unistd.h> | |
10500 | #endif | |
10501 | ||
10502 | #ifndef HAVE_ALARM | |
10503 | # define alarm(X) /* empty */ | |
10504 | #endif | |
10505 | ||
10506 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
10507 | #undef putenv | |
10508 | ||
10509 | static time_t time_t_max; | |
10510 | static time_t time_t_min; | |
10511 | ||
10512 | /* Values we'll use to set the TZ environment variable. */ | |
10513 | static const char *tz_strings[] = { | |
10514 | (const char *) 0, "TZ=GMT0", "TZ=JST-9", | |
10515 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
10516 | }; | |
10517 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
10518 | ||
10519 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
10520 | Based on a problem report from Andreas Jaeger. */ | |
10521 | static int | |
10522 | spring_forward_gap () | |
10523 | { | |
10524 | /* glibc (up to about 1998-10-07) failed this test. */ | |
10525 | struct tm tm; | |
10526 | ||
10527 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
10528 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
10529 | on systems that don't support the Olson extension, or don't have the | |
10530 | full zoneinfo tables installed. */ | |
10531 | putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); | |
10532 | ||
10533 | tm.tm_year = 98; | |
10534 | tm.tm_mon = 3; | |
10535 | tm.tm_mday = 5; | |
10536 | tm.tm_hour = 2; | |
10537 | tm.tm_min = 0; | |
10538 | tm.tm_sec = 0; | |
10539 | tm.tm_isdst = -1; | |
10540 | return mktime (&tm) != (time_t) -1; | |
10541 | } | |
10542 | ||
10543 | static int | |
10544 | mktime_test1 (time_t now) | |
10545 | { | |
10546 | struct tm *lt; | |
10547 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
10548 | } | |
10549 | ||
10550 | static int | |
10551 | mktime_test (time_t now) | |
10552 | { | |
10553 | return (mktime_test1 (now) | |
10554 | && mktime_test1 ((time_t) (time_t_max - now)) | |
10555 | && mktime_test1 ((time_t) (time_t_min + now))); | |
10556 | } | |
10557 | ||
10558 | static int | |
10559 | irix_6_4_bug () | |
10560 | { | |
10561 | /* Based on code from Ariel Faigon. */ | |
10562 | struct tm tm; | |
10563 | tm.tm_year = 96; | |
10564 | tm.tm_mon = 3; | |
10565 | tm.tm_mday = 0; | |
10566 | tm.tm_hour = 0; | |
10567 | tm.tm_min = 0; | |
10568 | tm.tm_sec = 0; | |
10569 | tm.tm_isdst = -1; | |
10570 | mktime (&tm); | |
10571 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
10572 | } | |
10573 | ||
10574 | static int | |
10575 | bigtime_test (int j) | |
10576 | { | |
10577 | struct tm tm; | |
10578 | time_t now; | |
10579 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
10580 | now = mktime (&tm); | |
10581 | if (now != (time_t) -1) | |
10582 | { | |
10583 | struct tm *lt = localtime (&now); | |
10584 | if (! (lt | |
10585 | && lt->tm_year == tm.tm_year | |
10586 | && lt->tm_mon == tm.tm_mon | |
10587 | && lt->tm_mday == tm.tm_mday | |
10588 | && lt->tm_hour == tm.tm_hour | |
10589 | && lt->tm_min == tm.tm_min | |
10590 | && lt->tm_sec == tm.tm_sec | |
10591 | && lt->tm_yday == tm.tm_yday | |
10592 | && lt->tm_wday == tm.tm_wday | |
10593 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
10594 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
10595 | return 0; | |
10596 | } | |
10597 | return 1; | |
10598 | } | |
10599 | ||
10600 | static int | |
10601 | year_2050_test () | |
10602 | { | |
10603 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
10604 | ignoring leap seconds. */ | |
10605 | unsigned long int answer = 2527315200UL; | |
10606 | ||
10607 | struct tm tm; | |
10608 | time_t t; | |
10609 | tm.tm_year = 2050 - 1900; | |
10610 | tm.tm_mon = 2 - 1; | |
10611 | tm.tm_mday = 1; | |
10612 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
10613 | tm.tm_isdst = -1; | |
10614 | ||
10615 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
10616 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
10617 | on systems that don't support the Olson extension, or don't have the | |
10618 | full zoneinfo tables installed. */ | |
10619 | putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); | |
7f947b68 | 10620 | |
1b1fe467 | 10621 | t = mktime (&tm); |
7f947b68 | 10622 | |
1b1fe467 CR |
10623 | /* Check that the result is either a failure, or close enough |
10624 | to the correct answer that we can assume the discrepancy is | |
10625 | due to leap seconds. */ | |
10626 | return (t == (time_t) -1 | |
10627 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
7175a77f | 10628 | } |
1b1fe467 | 10629 | |
abe2eb5b CR |
10630 | int |
10631 | main () | |
10632 | { | |
1b1fe467 CR |
10633 | time_t t, delta; |
10634 | int i, j; | |
7175a77f | 10635 | |
1b1fe467 CR |
10636 | /* This test makes some buggy mktime implementations loop. |
10637 | Give up after 60 seconds; a mktime slower than that | |
10638 | isn't worth using anyway. */ | |
10639 | alarm (60); | |
10640 | ||
10641 | for (;;) | |
10642 | { | |
10643 | t = (time_t_max << 1) + 1; | |
10644 | if (t <= time_t_max) | |
10645 | break; | |
10646 | time_t_max = t; | |
10647 | } | |
10648 | time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; | |
10649 | ||
10650 | delta = time_t_max / 997; /* a suitable prime number */ | |
10651 | for (i = 0; i < N_STRINGS; i++) | |
10652 | { | |
10653 | if (tz_strings[i]) | |
10654 | putenv ((char*) tz_strings[i]); | |
10655 | ||
10656 | for (t = 0; t <= time_t_max - delta; t += delta) | |
10657 | if (! mktime_test (t)) | |
10658 | return 1; | |
10659 | if (! (mktime_test ((time_t) 1) | |
10660 | && mktime_test ((time_t) (60 * 60)) | |
10661 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
10662 | return 1; | |
10663 | ||
10664 | for (j = 1; ; j <<= 1) | |
10665 | if (! bigtime_test (j)) | |
10666 | return 1; | |
10667 | else if (INT_MAX / 2 < j) | |
10668 | break; | |
10669 | if (! bigtime_test (INT_MAX)) | |
10670 | return 1; | |
10671 | } | |
10672 | return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); | |
abe2eb5b CR |
10673 | } |
10674 | _ACEOF | |
1b1fe467 CR |
10675 | if ac_fn_c_try_run "$LINENO"; then : |
10676 | ac_cv_func_working_mktime=yes | |
e3db237e | 10677 | else |
1b1fe467 CR |
10678 | ac_cv_func_working_mktime=no |
10679 | fi | |
10680 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10681 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c920c360 CR |
10682 | fi |
10683 | ||
ccc6cda3 | 10684 | fi |
1b1fe467 CR |
10685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 |
10686 | $as_echo "$ac_cv_func_working_mktime" >&6; } | |
10687 | if test $ac_cv_func_working_mktime = no; then | |
10688 | case " $LIBOBJS " in | |
10689 | *" mktime.$ac_objext "* ) ;; | |
10690 | *) LIBOBJS="$LIBOBJS mktime.$ac_objext" | |
10691 | ;; | |
10692 | esac | |
c920c360 | 10693 | |
7175a77f | 10694 | fi |
abe2eb5b | 10695 | |
7175a77f | 10696 | |
1b1fe467 CR |
10697 | |
10698 | for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h | |
10699 | do : | |
10700 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
10701 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
10702 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
10703 | cat >>confdefs.h <<_ACEOF | |
10704 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
e3db237e | 10705 | _ACEOF |
7f947b68 CR |
10706 | |
10707 | fi | |
10708 | ||
7175a77f | 10709 | done |
7175a77f | 10710 | |
7175a77f | 10711 | |
1b1fe467 CR |
10712 | |
10713 | for ac_func in getpagesize | |
10714 | do : | |
10715 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
10716 | if test "x$ac_cv_func_getpagesize" = xyes; then : | |
10717 | cat >>confdefs.h <<_ACEOF | |
10718 | #define HAVE_GETPAGESIZE 1 | |
abe2eb5b | 10719 | _ACEOF |
7175a77f | 10720 | |
c920c360 | 10721 | fi |
1b1fe467 | 10722 | done |
2dead0c4 | 10723 | |
1b1fe467 CR |
10724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
10725 | $as_echo_n "checking for working mmap... " >&6; } | |
10726 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : | |
10727 | $as_echo_n "(cached) " >&6 | |
10728 | else | |
10729 | if test "$cross_compiling" = yes; then : | |
10730 | ac_cv_func_mmap_fixed_mapped=no | |
10731 | else | |
10732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10733 | /* end confdefs.h. */ | |
10734 | $ac_includes_default | |
10735 | /* malloc might have been renamed as rpl_malloc. */ | |
10736 | #undef malloc | |
7610e0c5 | 10737 | |
1b1fe467 CR |
10738 | /* Thanks to Mike Haertel and Jim Avera for this test. |
10739 | Here is a matrix of mmap possibilities: | |
10740 | mmap private not fixed | |
10741 | mmap private fixed at somewhere currently unmapped | |
10742 | mmap private fixed at somewhere already mapped | |
10743 | mmap shared not fixed | |
10744 | mmap shared fixed at somewhere currently unmapped | |
10745 | mmap shared fixed at somewhere already mapped | |
10746 | For private mappings, we should verify that changes cannot be read() | |
10747 | back from the file, nor mmap's back from the file at a different | |
10748 | address. (There have been systems where private was not correctly | |
10749 | implemented like the infamous i386 svr4.0, and systems where the | |
10750 | VM page cache was not coherent with the file system buffer cache | |
10751 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
10752 | For shared mappings, we should conversely verify that changes get | |
10753 | propagated back to all the places they're supposed to be. | |
7f947b68 | 10754 | |
1b1fe467 CR |
10755 | Grep wants private fixed already mapped. |
10756 | The main things grep needs to know about mmap are: | |
10757 | * does it exist and is it safe to write into the mmap'd area | |
10758 | * how to use it (BSD variants) */ | |
10759 | ||
10760 | #include <fcntl.h> | |
10761 | #include <sys/mman.h> | |
10762 | ||
10763 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
10764 | char *malloc (); | |
10765 | #endif | |
10766 | ||
10767 | /* This mess was copied from the GNU getpagesize.h. */ | |
10768 | #ifndef HAVE_GETPAGESIZE | |
10769 | # ifdef _SC_PAGESIZE | |
10770 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
10771 | # else /* no _SC_PAGESIZE */ | |
10772 | # ifdef HAVE_SYS_PARAM_H | |
10773 | # include <sys/param.h> | |
10774 | # ifdef EXEC_PAGESIZE | |
10775 | # define getpagesize() EXEC_PAGESIZE | |
10776 | # else /* no EXEC_PAGESIZE */ | |
10777 | # ifdef NBPG | |
10778 | # define getpagesize() NBPG * CLSIZE | |
10779 | # ifndef CLSIZE | |
10780 | # define CLSIZE 1 | |
10781 | # endif /* no CLSIZE */ | |
10782 | # else /* no NBPG */ | |
10783 | # ifdef NBPC | |
10784 | # define getpagesize() NBPC | |
10785 | # else /* no NBPC */ | |
10786 | # ifdef PAGESIZE | |
10787 | # define getpagesize() PAGESIZE | |
10788 | # endif /* PAGESIZE */ | |
10789 | # endif /* no NBPC */ | |
10790 | # endif /* no NBPG */ | |
10791 | # endif /* no EXEC_PAGESIZE */ | |
10792 | # else /* no HAVE_SYS_PARAM_H */ | |
10793 | # define getpagesize() 8192 /* punt totally */ | |
10794 | # endif /* no HAVE_SYS_PARAM_H */ | |
10795 | # endif /* no _SC_PAGESIZE */ | |
2dead0c4 | 10796 | |
1b1fe467 | 10797 | #endif /* no HAVE_GETPAGESIZE */ |
7f947b68 | 10798 | |
7175a77f CR |
10799 | int |
10800 | main () | |
10801 | { | |
1b1fe467 CR |
10802 | char *data, *data2, *data3; |
10803 | const char *cdata2; | |
10804 | int i, pagesize; | |
10805 | int fd, fd2; | |
7f947b68 | 10806 | |
1b1fe467 | 10807 | pagesize = getpagesize (); |
7175a77f | 10808 | |
1b1fe467 CR |
10809 | /* First, make a file with some known garbage in it. */ |
10810 | data = (char *) malloc (pagesize); | |
10811 | if (!data) | |
10812 | return 1; | |
10813 | for (i = 0; i < pagesize; ++i) | |
10814 | *(data + i) = rand (); | |
10815 | umask (0); | |
10816 | fd = creat ("conftest.mmap", 0600); | |
10817 | if (fd < 0) | |
10818 | return 2; | |
10819 | if (write (fd, data, pagesize) != pagesize) | |
10820 | return 3; | |
10821 | close (fd); | |
10822 | ||
10823 | /* Next, check that the tail of a page is zero-filled. File must have | |
10824 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
10825 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
10826 | if (fd2 < 0) | |
10827 | return 4; | |
10828 | cdata2 = ""; | |
10829 | if (write (fd2, cdata2, 1) != 1) | |
10830 | return 5; | |
10831 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
10832 | if (data2 == MAP_FAILED) | |
10833 | return 6; | |
10834 | for (i = 0; i < pagesize; ++i) | |
10835 | if (*(data2 + i)) | |
10836 | return 7; | |
10837 | close (fd2); | |
10838 | if (munmap (data2, pagesize)) | |
10839 | return 8; | |
10840 | ||
10841 | /* Next, try to mmap the file at a fixed address which already has | |
10842 | something else allocated at it. If we can, also make sure that | |
10843 | we see the same garbage. */ | |
10844 | fd = open ("conftest.mmap", O_RDWR); | |
10845 | if (fd < 0) | |
10846 | return 9; | |
10847 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
10848 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
10849 | return 10; | |
10850 | for (i = 0; i < pagesize; ++i) | |
10851 | if (*(data + i) != *(data2 + i)) | |
10852 | return 11; | |
10853 | ||
10854 | /* Finally, make sure that changes to the mapped area do not | |
10855 | percolate back to the file as seen by read(). (This is a bug on | |
10856 | some variants of i386 svr4.0.) */ | |
10857 | for (i = 0; i < pagesize; ++i) | |
10858 | *(data2 + i) = *(data2 + i) + 1; | |
10859 | data3 = (char *) malloc (pagesize); | |
10860 | if (!data3) | |
10861 | return 12; | |
10862 | if (read (fd, data3, pagesize) != pagesize) | |
10863 | return 13; | |
10864 | for (i = 0; i < pagesize; ++i) | |
10865 | if (*(data + i) != *(data3 + i)) | |
10866 | return 14; | |
10867 | close (fd); | |
7175a77f CR |
10868 | return 0; |
10869 | } | |
10870 | _ACEOF | |
1b1fe467 CR |
10871 | if ac_fn_c_try_run "$LINENO"; then : |
10872 | ac_cv_func_mmap_fixed_mapped=yes | |
7175a77f | 10873 | else |
1b1fe467 CR |
10874 | ac_cv_func_mmap_fixed_mapped=no |
10875 | fi | |
10876 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
10877 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7175a77f | 10878 | fi |
7f947b68 | 10879 | |
1b1fe467 CR |
10880 | fi |
10881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
10882 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
10883 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
7f947b68 | 10884 | |
1b1fe467 | 10885 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
7f947b68 | 10886 | |
1b1fe467 CR |
10887 | fi |
10888 | rm -f conftest.mmap conftest.txt | |
7f947b68 | 10889 | |
1b1fe467 CR |
10890 | for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \ |
10891 | munmap stpcpy strcspn strdup | |
10892 | do : | |
10893 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10894 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10895 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
10896 | cat >>confdefs.h <<_ACEOF | |
10897 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7175a77f | 10898 | _ACEOF |
7f947b68 | 10899 | |
7175a77f | 10900 | fi |
1b1fe467 | 10901 | done |
7f947b68 | 10902 | |
7f947b68 | 10903 | |
1b1fe467 CR |
10904 | INTL_DEP= INTL_INC= LIBINTL_H= |
10905 | if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then | |
10906 | INTL_DEP='${INTL_LIBDIR}/libintl.a' | |
10907 | INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}' | |
10908 | LIBINTL_H='${INTL_BUILDDIR}/libintl.h' | |
7175a77f | 10909 | fi |
7f947b68 | 10910 | |
7f947b68 | 10911 | |
7175a77f | 10912 | |
1b1fe467 CR |
10913 | |
10914 | ||
10915 | ||
10916 | for ac_header in wctype.h | |
10917 | do : | |
10918 | ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" | |
10919 | if test "x$ac_cv_header_wctype_h" = xyes; then : | |
10920 | cat >>confdefs.h <<_ACEOF | |
10921 | #define HAVE_WCTYPE_H 1 | |
7175a77f | 10922 | _ACEOF |
7175a77f | 10923 | |
7175a77f | 10924 | fi |
7f947b68 | 10925 | |
7175a77f | 10926 | done |
1b1fe467 CR |
10927 | |
10928 | for ac_header in wchar.h | |
10929 | do : | |
10930 | ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" | |
10931 | if test "x$ac_cv_header_wchar_h" = xyes; then : | |
10932 | cat >>confdefs.h <<_ACEOF | |
10933 | #define HAVE_WCHAR_H 1 | |
7175a77f | 10934 | _ACEOF |
7f947b68 | 10935 | |
1b1fe467 | 10936 | fi |
7175a77f | 10937 | |
1b1fe467 CR |
10938 | done |
10939 | ||
10940 | for ac_header in langinfo.h | |
10941 | do : | |
10942 | ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" | |
10943 | if test "x$ac_cv_header_langinfo_h" = xyes; then : | |
10944 | cat >>confdefs.h <<_ACEOF | |
10945 | #define HAVE_LANGINFO_H 1 | |
10946 | _ACEOF | |
7175a77f | 10947 | |
7f947b68 | 10948 | fi |
1b1fe467 CR |
10949 | |
10950 | done | |
10951 | ||
10952 | ||
10953 | ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen" | |
10954 | if test "x$ac_cv_func_mbrlen" = xyes; then : | |
10955 | $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h | |
10956 | ||
7f947b68 | 10957 | fi |
1b1fe467 CR |
10958 | |
10959 | ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp" | |
10960 | if test "x$ac_cv_func_mbscasecmp" = xyes; then : | |
10961 | $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h | |
10962 | ||
7f947b68 | 10963 | fi |
7175a77f | 10964 | |
1b1fe467 CR |
10965 | ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp" |
10966 | if test "x$ac_cv_func_mbscmp" = xyes; then : | |
10967 | $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h | |
7610e0c5 | 10968 | |
1b1fe467 | 10969 | fi |
a82a04b3 | 10970 | |
1b1fe467 CR |
10971 | ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" |
10972 | if test "x$ac_cv_func_mbsnrtowcs" = xyes; then : | |
10973 | $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h | |
71412226 | 10974 | |
1b1fe467 | 10975 | fi |
f73dda09 | 10976 | |
1b1fe467 CR |
10977 | ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs" |
10978 | if test "x$ac_cv_func_mbsrtowcs" = xyes; then : | |
10979 | $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h | |
10980 | ||
10981 | fi | |
10982 | ||
10983 | ||
10984 | ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr" | |
10985 | if test "x$ac_cv_func_mbschr" = xyes; then : | |
10986 | $as_echo "#define HAVE_MBSCHR 1" >>confdefs.h | |
7175a77f | 10987 | |
7175a77f | 10988 | else |
1b1fe467 CR |
10989 | case " $LIBOBJS " in |
10990 | *" mbschr.$ac_objext "* ) ;; | |
10991 | *) LIBOBJS="$LIBOBJS mbschr.$ac_objext" | |
10992 | ;; | |
7175a77f | 10993 | esac |
a82a04b3 | 10994 | |
abe2eb5b | 10995 | fi |
7610e0c5 | 10996 | |
7f947b68 CR |
10997 | |
10998 | ||
1b1fe467 CR |
10999 | ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" |
11000 | if test "x$ac_cv_func_wcrtomb" = xyes; then : | |
11001 | $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h | |
11002 | ||
7175a77f | 11003 | fi |
7f947b68 | 11004 | |
1b1fe467 CR |
11005 | ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" |
11006 | if test "x$ac_cv_func_wcscoll" = xyes; then : | |
11007 | $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h | |
11008 | ||
7175a77f | 11009 | fi |
7175a77f | 11010 | |
1b1fe467 CR |
11011 | ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup" |
11012 | if test "x$ac_cv_func_wcsdup" = xyes; then : | |
11013 | $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h | |
f73dda09 | 11014 | |
2dead0c4 CR |
11015 | fi |
11016 | ||
1b1fe467 CR |
11017 | ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" |
11018 | if test "x$ac_cv_func_wcwidth" = xyes; then : | |
11019 | $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h | |
11020 | ||
11021 | fi | |
11022 | ||
11023 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" | |
11024 | if test "x$ac_cv_func_wctype" = xyes; then : | |
11025 | $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h | |
11026 | ||
11027 | fi | |
11028 | ||
11029 | ||
11030 | ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth" | |
11031 | if test "x$ac_cv_func_wcswidth" = xyes; then : | |
11032 | $as_echo "#define HAVE_WCSWIDTH 1" >>confdefs.h | |
11033 | ||
e3db237e | 11034 | else |
1b1fe467 CR |
11035 | case " $LIBOBJS " in |
11036 | *" wcswidth.$ac_objext "* ) ;; | |
11037 | *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext" | |
11038 | ;; | |
7175a77f | 11039 | esac |
1b1fe467 CR |
11040 | |
11041 | fi | |
11042 | ||
11043 | ||
11044 | ||
11045 | ||
11046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 | |
11047 | $as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } | |
11048 | if ${ac_cv_func_mbrtowc+:} false; then : | |
11049 | $as_echo_n "(cached) " >&6 | |
11050 | else | |
11051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11052 | /* end confdefs.h. */ |
1b1fe467 | 11053 | #include <wchar.h> |
7175a77f CR |
11054 | int |
11055 | main () | |
11056 | { | |
1b1fe467 CR |
11057 | wchar_t wc; |
11058 | char const s[] = ""; | |
11059 | size_t n = 1; | |
11060 | mbstate_t state; | |
11061 | return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); | |
7175a77f CR |
11062 | ; |
11063 | return 0; | |
11064 | } | |
11065 | _ACEOF | |
1b1fe467 CR |
11066 | if ac_fn_c_try_link "$LINENO"; then : |
11067 | ac_cv_func_mbrtowc=yes | |
7175a77f | 11068 | else |
1b1fe467 CR |
11069 | ac_cv_func_mbrtowc=no |
11070 | fi | |
11071 | rm -f core conftest.err conftest.$ac_objext \ | |
11072 | conftest$ac_exeext conftest.$ac_ext | |
7175a77f | 11073 | fi |
1b1fe467 CR |
11074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 |
11075 | $as_echo "$ac_cv_func_mbrtowc" >&6; } | |
11076 | if test $ac_cv_func_mbrtowc = yes; then | |
7f947b68 | 11077 | |
1b1fe467 | 11078 | $as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h |
7f947b68 | 11079 | |
1b1fe467 | 11080 | fi |
7f947b68 | 11081 | |
1b1fe467 CR |
11082 | if test $ac_cv_func_mbrtowc = yes; then |
11083 | $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h | |
7f947b68 | 11084 | |
7175a77f | 11085 | fi |
7f947b68 | 11086 | |
1b1fe467 CR |
11087 | for ac_func in iswlower iswupper towlower towupper iswctype |
11088 | do : | |
11089 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11090 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11091 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
11092 | cat >>confdefs.h <<_ACEOF | |
11093 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7175a77f | 11094 | _ACEOF |
7f947b68 | 11095 | |
7175a77f | 11096 | fi |
1b1fe467 | 11097 | done |
7f947b68 | 11098 | |
7f947b68 | 11099 | |
1b1fe467 CR |
11100 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
11101 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
11102 | if ${bash_cv_langinfo_codeset+:} false; then : | |
7175a77f CR |
11103 | $as_echo_n "(cached) " >&6 |
11104 | else | |
1b1fe467 | 11105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 11106 | /* end confdefs.h. */ |
1b1fe467 | 11107 | #include <langinfo.h> |
7175a77f CR |
11108 | int |
11109 | main () | |
11110 | { | |
1b1fe467 | 11111 | char* cs = nl_langinfo(CODESET); |
7175a77f CR |
11112 | ; |
11113 | return 0; | |
11114 | } | |
11115 | _ACEOF | |
1b1fe467 CR |
11116 | if ac_fn_c_try_link "$LINENO"; then : |
11117 | bash_cv_langinfo_codeset=yes | |
11118 | else | |
11119 | bash_cv_langinfo_codeset=no | |
11120 | fi | |
11121 | rm -f core conftest.err conftest.$ac_objext \ | |
11122 | conftest$ac_exeext conftest.$ac_ext | |
11123 | fi | |
11124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5 | |
11125 | $as_echo "$bash_cv_langinfo_codeset" >&6; } | |
11126 | if test $bash_cv_langinfo_codeset = yes; then | |
11127 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
11128 | ||
11129 | fi | |
11130 | ||
11131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5 | |
11132 | $as_echo_n "checking for wchar_t in wchar.h... " >&6; } | |
11133 | if ${bash_cv_type_wchar_t+:} false; then : | |
11134 | $as_echo_n "(cached) " >&6 | |
11135 | else | |
11136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11137 | /* end confdefs.h. */ |
1b1fe467 CR |
11138 | #include <wchar.h> |
11139 | ||
7175a77f CR |
11140 | int |
11141 | main () | |
11142 | { | |
1b1fe467 CR |
11143 | |
11144 | wchar_t foo; | |
11145 | foo = 0; | |
11146 | ||
7175a77f | 11147 | ; |
abe2eb5b CR |
11148 | return 0; |
11149 | } | |
11150 | _ACEOF | |
1b1fe467 CR |
11151 | if ac_fn_c_try_compile "$LINENO"; then : |
11152 | bash_cv_type_wchar_t=yes | |
e3db237e | 11153 | else |
1b1fe467 CR |
11154 | bash_cv_type_wchar_t=no |
11155 | fi | |
11156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11157 | fi | |
11158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5 | |
11159 | $as_echo "$bash_cv_type_wchar_t" >&6; } | |
11160 | if test $bash_cv_type_wchar_t = yes; then | |
11161 | ||
11162 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h | |
f73dda09 | 11163 | |
c920c360 | 11164 | fi |
7610e0c5 | 11165 | |
1b1fe467 CR |
11166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5 |
11167 | $as_echo_n "checking for wctype_t in wctype.h... " >&6; } | |
11168 | if ${bash_cv_type_wctype_t+:} false; then : | |
11169 | $as_echo_n "(cached) " >&6 | |
7175a77f | 11170 | else |
1b1fe467 CR |
11171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11172 | /* end confdefs.h. */ | |
11173 | #include <wctype.h> | |
11174 | int | |
11175 | main () | |
11176 | { | |
7610e0c5 | 11177 | |
1b1fe467 CR |
11178 | wctype_t foo; |
11179 | foo = 0; | |
f73dda09 | 11180 | |
1b1fe467 CR |
11181 | ; |
11182 | return 0; | |
11183 | } | |
11184 | _ACEOF | |
11185 | if ac_fn_c_try_compile "$LINENO"; then : | |
11186 | bash_cv_type_wctype_t=yes | |
11187 | else | |
11188 | bash_cv_type_wctype_t=no | |
e3db237e | 11189 | fi |
7175a77f | 11190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
abe2eb5b | 11191 | fi |
1b1fe467 CR |
11192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5 |
11193 | $as_echo "$bash_cv_type_wctype_t" >&6; } | |
11194 | if test $bash_cv_type_wctype_t = yes; then | |
7610e0c5 | 11195 | |
1b1fe467 | 11196 | $as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h |
f73dda09 | 11197 | |
71412226 | 11198 | fi |
7610e0c5 | 11199 | |
1b1fe467 CR |
11200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5 |
11201 | $as_echo_n "checking for wint_t in wctype.h... " >&6; } | |
11202 | if ${bash_cv_type_wint_t+:} false; then : | |
7175a77f CR |
11203 | $as_echo_n "(cached) " >&6 |
11204 | else | |
1b1fe467 | 11205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 11206 | /* end confdefs.h. */ |
1b1fe467 | 11207 | #include <wctype.h> |
7175a77f CR |
11208 | int |
11209 | main () | |
11210 | { | |
1b1fe467 CR |
11211 | |
11212 | wint_t foo; | |
11213 | foo = 0; | |
11214 | ||
7175a77f CR |
11215 | ; |
11216 | return 0; | |
11217 | } | |
11218 | _ACEOF | |
1b1fe467 CR |
11219 | if ac_fn_c_try_compile "$LINENO"; then : |
11220 | bash_cv_type_wint_t=yes | |
11221 | else | |
11222 | bash_cv_type_wint_t=no | |
11223 | fi | |
11224 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11225 | fi | |
11226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5 | |
11227 | $as_echo "$bash_cv_type_wint_t" >&6; } | |
11228 | if test $bash_cv_type_wint_t = yes; then | |
11229 | ||
11230 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h | |
11231 | ||
11232 | fi | |
11233 | ||
11234 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5 | |
11235 | $as_echo_n "checking for wcwidth broken with unicode combining characters... " >&6; } | |
11236 | if ${bash_cv_wcwidth_broken+:} false; then : | |
11237 | $as_echo_n "(cached) " >&6 | |
11238 | else | |
11239 | if test "$cross_compiling" = yes; then : | |
d76edd30 | 11240 | bash_cv_wcwidth_broken=no |
1b1fe467 CR |
11241 | else |
11242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11243 | /* end confdefs.h. */ |
1b1fe467 CR |
11244 | |
11245 | #include <unistd.h> | |
11246 | #include <stdlib.h> | |
11247 | #include <stdio.h> | |
11248 | ||
11249 | #include <locale.h> | |
11250 | #include <wchar.h> | |
11251 | ||
11252 | main(c, v) | |
11253 | int c; | |
11254 | char **v; | |
7175a77f | 11255 | { |
1b1fe467 CR |
11256 | int w; |
11257 | ||
11258 | setlocale(LC_ALL, "en_US.UTF-8"); | |
11259 | w = wcwidth (0x0301); | |
11260 | exit (w == 0); /* exit 0 if wcwidth broken */ | |
7175a77f | 11261 | } |
1b1fe467 | 11262 | |
7f947b68 | 11263 | _ACEOF |
1b1fe467 CR |
11264 | if ac_fn_c_try_run "$LINENO"; then : |
11265 | bash_cv_wcwidth_broken=yes | |
7175a77f | 11266 | else |
1b1fe467 CR |
11267 | bash_cv_wcwdith_broken=no |
11268 | fi | |
11269 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11270 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11271 | fi | |
7f947b68 | 11272 | |
abe2eb5b | 11273 | fi |
1b1fe467 CR |
11274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5 |
11275 | $as_echo "$bash_cv_wcwidth_broken" >&6; } | |
c7e43312 | 11276 | if test "$bash_cv_wcwidth_broken" = yes; then |
abe2eb5b | 11277 | |
1b1fe467 CR |
11278 | $as_echo "#define WCWIDTH_BROKEN 1" >>confdefs.h |
11279 | ||
11280 | fi | |
2dead0c4 | 11281 | |
1b1fe467 CR |
11282 | if test "$am_cv_func_iconv" = yes; then |
11283 | OLDLIBS="$LIBS" | |
11284 | LIBS="$LIBS $LIBICONV" | |
11285 | for ac_func in locale_charset | |
11286 | do : | |
11287 | ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" | |
11288 | if test "x$ac_cv_func_locale_charset" = xyes; then : | |
11289 | cat >>confdefs.h <<_ACEOF | |
11290 | #define HAVE_LOCALE_CHARSET 1 | |
11291 | _ACEOF | |
2dead0c4 | 11292 | |
c920c360 | 11293 | fi |
1b1fe467 | 11294 | done |
71412226 | 11295 | |
1b1fe467 | 11296 | LIBS="$OLDLIBS" |
7175a77f | 11297 | fi |
c920c360 | 11298 | |
71412226 | 11299 | |
71412226 | 11300 | |
1b1fe467 CR |
11301 | if test "$opt_static_link" != yes; then |
11302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
11303 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
11304 | if ${ac_cv_lib_dl_dlopen+:} false; then : | |
7175a77f CR |
11305 | $as_echo_n "(cached) " >&6 |
11306 | else | |
1b1fe467 CR |
11307 | ac_check_lib_save_LIBS=$LIBS |
11308 | LIBS="-ldl $LIBS" | |
11309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11310 | /* end confdefs.h. */ |
1b1fe467 CR |
11311 | |
11312 | /* Override any GCC internal prototype to avoid an error. | |
11313 | Use char because int might match the return type of a GCC | |
11314 | builtin and then its argument prototype would still apply. */ | |
11315 | #ifdef __cplusplus | |
11316 | extern "C" | |
11317 | #endif | |
11318 | char dlopen (); | |
7175a77f CR |
11319 | int |
11320 | main () | |
11321 | { | |
1b1fe467 | 11322 | return dlopen (); |
7175a77f CR |
11323 | ; |
11324 | return 0; | |
11325 | } | |
11326 | _ACEOF | |
1b1fe467 CR |
11327 | if ac_fn_c_try_link "$LINENO"; then : |
11328 | ac_cv_lib_dl_dlopen=yes | |
7175a77f | 11329 | else |
1b1fe467 CR |
11330 | ac_cv_lib_dl_dlopen=no |
11331 | fi | |
11332 | rm -f core conftest.err conftest.$ac_objext \ | |
11333 | conftest$ac_exeext conftest.$ac_ext | |
11334 | LIBS=$ac_check_lib_save_LIBS | |
abe2eb5b | 11335 | fi |
1b1fe467 CR |
11336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
11337 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
11338 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : | |
11339 | cat >>confdefs.h <<_ACEOF | |
11340 | #define HAVE_LIBDL 1 | |
11341 | _ACEOF | |
c920c360 | 11342 | |
1b1fe467 CR |
11343 | LIBS="-ldl $LIBS" |
11344 | ||
11345 | fi | |
7175a77f | 11346 | |
1b1fe467 CR |
11347 | for ac_func in dlopen dlclose dlsym |
11348 | do : | |
11349 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11350 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
11351 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : | |
11352 | cat >>confdefs.h <<_ACEOF | |
11353 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11354 | _ACEOF | |
7610e0c5 | 11355 | |
71412226 | 11356 | fi |
1b1fe467 | 11357 | done |
7610e0c5 | 11358 | |
7f947b68 | 11359 | fi |
1b1fe467 CR |
11360 | |
11361 | ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h> | |
11362 | /* NetBSD declares sys_siglist in unistd.h. */ | |
11363 | #ifdef HAVE_UNISTD_H | |
11364 | # include <unistd.h> | |
11365 | #endif | |
11366 | ||
11367 | " | |
11368 | if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : | |
11369 | ac_have_decl=1 | |
7175a77f | 11370 | else |
1b1fe467 CR |
11371 | ac_have_decl=0 |
11372 | fi | |
7f947b68 | 11373 | |
7175a77f | 11374 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 11375 | #define HAVE_DECL_SYS_SIGLIST $ac_have_decl |
7175a77f | 11376 | _ACEOF |
7f947b68 | 11377 | |
7f947b68 CR |
11378 | |
11379 | ||
1b1fe467 | 11380 | if test "$ac_cv_func_inet_aton" != 'yes'; then |
7f947b68 | 11381 | |
1b1fe467 CR |
11382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 |
11383 | $as_echo_n "checking for inet_aton... " >&6; } | |
11384 | if ${bash_cv_func_inet_aton+:} false; then : | |
7175a77f | 11385 | $as_echo_n "(cached) " >&6 |
e3db237e | 11386 | else |
1b1fe467 | 11387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 11388 | /* end confdefs.h. */ |
1b1fe467 CR |
11389 | |
11390 | #include <sys/types.h> | |
11391 | #include <netinet/in.h> | |
11392 | #include <arpa/inet.h> | |
11393 | struct in_addr ap; | |
7175a77f CR |
11394 | int |
11395 | main () | |
11396 | { | |
1b1fe467 | 11397 | inet_aton("127.0.0.1", &ap); |
7175a77f CR |
11398 | ; |
11399 | return 0; | |
11400 | } | |
11401 | _ACEOF | |
1b1fe467 CR |
11402 | if ac_fn_c_try_link "$LINENO"; then : |
11403 | bash_cv_func_inet_aton=yes | |
7175a77f | 11404 | else |
1b1fe467 | 11405 | bash_cv_func_inet_aton=no |
71412226 | 11406 | fi |
1b1fe467 CR |
11407 | rm -f core conftest.err conftest.$ac_objext \ |
11408 | conftest$ac_exeext conftest.$ac_ext | |
e3db237e | 11409 | fi |
1b1fe467 CR |
11410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5 |
11411 | $as_echo "$bash_cv_func_inet_aton" >&6; } | |
11412 | if test $bash_cv_func_inet_aton = yes; then | |
11413 | $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h | |
abe2eb5b | 11414 | |
7175a77f | 11415 | else |
1b1fe467 CR |
11416 | case " $LIBOBJS " in |
11417 | *" inet_aton.$ac_objext "* ) ;; | |
11418 | *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" | |
11419 | ;; | |
11420 | esac | |
7f947b68 | 11421 | |
1b1fe467 | 11422 | fi |
7f947b68 CR |
11423 | |
11424 | fi | |
11425 | ||
1b1fe467 CR |
11426 | case "$host_os" in |
11427 | irix4*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5 | |
11428 | $as_echo_n "checking for getpwent in -lsun... " >&6; } | |
11429 | if ${ac_cv_lib_sun_getpwent+:} false; then : | |
7175a77f CR |
11430 | $as_echo_n "(cached) " >&6 |
11431 | else | |
1b1fe467 CR |
11432 | ac_check_lib_save_LIBS=$LIBS |
11433 | LIBS="-lsun $LIBS" | |
11434 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11435 | /* end confdefs.h. */ |
1b1fe467 CR |
11436 | |
11437 | /* Override any GCC internal prototype to avoid an error. | |
11438 | Use char because int might match the return type of a GCC | |
11439 | builtin and then its argument prototype would still apply. */ | |
11440 | #ifdef __cplusplus | |
11441 | extern "C" | |
11442 | #endif | |
11443 | char getpwent (); | |
7175a77f CR |
11444 | int |
11445 | main () | |
11446 | { | |
1b1fe467 | 11447 | return getpwent (); |
7175a77f CR |
11448 | ; |
11449 | return 0; | |
11450 | } | |
11451 | _ACEOF | |
1b1fe467 CR |
11452 | if ac_fn_c_try_link "$LINENO"; then : |
11453 | ac_cv_lib_sun_getpwent=yes | |
11454 | else | |
11455 | ac_cv_lib_sun_getpwent=no | |
11456 | fi | |
11457 | rm -f core conftest.err conftest.$ac_objext \ | |
11458 | conftest$ac_exeext conftest.$ac_ext | |
11459 | LIBS=$ac_check_lib_save_LIBS | |
11460 | fi | |
11461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5 | |
11462 | $as_echo "$ac_cv_lib_sun_getpwent" >&6; } | |
11463 | if test "x$ac_cv_lib_sun_getpwent" = xyes; then : | |
11464 | cat >>confdefs.h <<_ACEOF | |
11465 | #define HAVE_LIBSUN 1 | |
7175a77f | 11466 | _ACEOF |
1b1fe467 CR |
11467 | |
11468 | LIBS="-lsun $LIBS" | |
11469 | ||
11470 | fi | |
11471 | ;; | |
11472 | esac | |
11473 | ||
11474 | if test "$ac_cv_func_getpeername" = no; then | |
11475 | ||
11476 | if test "X$bash_cv_have_socklib" = "X"; then | |
11477 | _bash_needmsg= | |
11478 | else | |
11479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5 | |
11480 | $as_echo_n "checking for socket library... " >&6; } | |
11481 | _bash_needmsg=yes | |
11482 | fi | |
11483 | if ${bash_cv_have_socklib+:} false; then : | |
11484 | $as_echo_n "(cached) " >&6 | |
11485 | else | |
11486 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5 | |
11487 | $as_echo_n "checking for getpeername in -lsocket... " >&6; } | |
11488 | if ${ac_cv_lib_socket_getpeername+:} false; then : | |
11489 | $as_echo_n "(cached) " >&6 | |
11490 | else | |
11491 | ac_check_lib_save_LIBS=$LIBS | |
11492 | LIBS="-lsocket -lnsl $LIBS" | |
11493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11494 | /* end confdefs.h. */ |
1b1fe467 CR |
11495 | |
11496 | /* Override any GCC internal prototype to avoid an error. | |
11497 | Use char because int might match the return type of a GCC | |
11498 | builtin and then its argument prototype would still apply. */ | |
11499 | #ifdef __cplusplus | |
11500 | extern "C" | |
11501 | #endif | |
11502 | char getpeername (); | |
7175a77f CR |
11503 | int |
11504 | main () | |
11505 | { | |
1b1fe467 | 11506 | return getpeername (); |
7175a77f CR |
11507 | ; |
11508 | return 0; | |
11509 | } | |
11510 | _ACEOF | |
1b1fe467 CR |
11511 | if ac_fn_c_try_link "$LINENO"; then : |
11512 | ac_cv_lib_socket_getpeername=yes | |
7175a77f | 11513 | else |
1b1fe467 | 11514 | ac_cv_lib_socket_getpeername=no |
abe2eb5b | 11515 | fi |
1b1fe467 CR |
11516 | rm -f core conftest.err conftest.$ac_objext \ |
11517 | conftest$ac_exeext conftest.$ac_ext | |
11518 | LIBS=$ac_check_lib_save_LIBS | |
11519 | fi | |
11520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5 | |
11521 | $as_echo "$ac_cv_lib_socket_getpeername" >&6; } | |
11522 | if test "x$ac_cv_lib_socket_getpeername" = xyes; then : | |
11523 | bash_cv_have_socklib=yes | |
abe2eb5b | 11524 | else |
1b1fe467 | 11525 | bash_cv_have_socklib=no |
7f947b68 CR |
11526 | fi |
11527 | ||
7175a77f | 11528 | fi |
7f947b68 | 11529 | |
1b1fe467 CR |
11530 | if test "X$_bash_needmsg" = Xyes; then |
11531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5 | |
11532 | $as_echo "$bash_cv_have_socklib" >&6; } | |
11533 | _bash_needmsg= | |
7175a77f | 11534 | fi |
1b1fe467 CR |
11535 | if test $bash_cv_have_socklib = yes; then |
11536 | # check for libnsl, add it to LIBS if present | |
11537 | if test "X$bash_cv_have_libnsl" = "X"; then | |
11538 | _bash_needmsg= | |
11539 | else | |
11540 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 | |
11541 | $as_echo_n "checking for libnsl... " >&6; } | |
11542 | _bash_needmsg=yes | |
11543 | fi | |
11544 | if ${bash_cv_have_libnsl+:} false; then : | |
11545 | $as_echo_n "(cached) " >&6 | |
7175a77f | 11546 | else |
1b1fe467 CR |
11547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 |
11548 | $as_echo_n "checking for t_open in -lnsl... " >&6; } | |
11549 | if ${ac_cv_lib_nsl_t_open+:} false; then : | |
e3db237e CR |
11550 | $as_echo_n "(cached) " >&6 |
11551 | else | |
1b1fe467 CR |
11552 | ac_check_lib_save_LIBS=$LIBS |
11553 | LIBS="-lnsl $LIBS" | |
11554 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11555 | /* end confdefs.h. */ |
1b1fe467 CR |
11556 | |
11557 | /* Override any GCC internal prototype to avoid an error. | |
11558 | Use char because int might match the return type of a GCC | |
11559 | builtin and then its argument prototype would still apply. */ | |
11560 | #ifdef __cplusplus | |
11561 | extern "C" | |
11562 | #endif | |
11563 | char t_open (); | |
7175a77f CR |
11564 | int |
11565 | main () | |
11566 | { | |
1b1fe467 | 11567 | return t_open (); |
7175a77f CR |
11568 | ; |
11569 | return 0; | |
11570 | } | |
11571 | _ACEOF | |
1b1fe467 CR |
11572 | if ac_fn_c_try_link "$LINENO"; then : |
11573 | ac_cv_lib_nsl_t_open=yes | |
c920c360 | 11574 | else |
1b1fe467 | 11575 | ac_cv_lib_nsl_t_open=no |
e3db237e | 11576 | fi |
1b1fe467 CR |
11577 | rm -f core conftest.err conftest.$ac_objext \ |
11578 | conftest$ac_exeext conftest.$ac_ext | |
11579 | LIBS=$ac_check_lib_save_LIBS | |
11580 | fi | |
11581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 | |
11582 | $as_echo "$ac_cv_lib_nsl_t_open" >&6; } | |
11583 | if test "x$ac_cv_lib_nsl_t_open" = xyes; then : | |
11584 | bash_cv_have_libnsl=yes | |
7175a77f | 11585 | else |
1b1fe467 | 11586 | bash_cv_have_libnsl=no |
7175a77f | 11587 | fi |
71412226 CR |
11588 | |
11589 | fi | |
c920c360 | 11590 | |
1b1fe467 CR |
11591 | if test "X$_bash_needmsg" = Xyes; then |
11592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5 | |
11593 | $as_echo "$bash_cv_have_libnsl" >&6; } | |
11594 | _bash_needmsg= | |
11595 | fi | |
11596 | if test $bash_cv_have_libnsl = yes; then | |
11597 | LIBS="-lsocket -lnsl $LIBS" | |
11598 | else | |
11599 | LIBS="-lsocket $LIBS" | |
11600 | fi | |
11601 | $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h | |
2dead0c4 | 11602 | |
1b1fe467 | 11603 | $as_echo "#define HAVE_GETPEERNAME 1" >>confdefs.h |
7175a77f CR |
11604 | |
11605 | fi | |
5f8cde23 | 11606 | |
1b1fe467 CR |
11607 | fi |
11608 | if test "$ac_cv_func_gethostbyname" = no; then | |
11609 | if test "X$bash_cv_have_gethostbyname" = "X"; then | |
11610 | _bash_needmsg=yes | |
11611 | else | |
11612 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 | |
11613 | $as_echo_n "checking for gethostbyname in socket library... " >&6; } | |
11614 | _bash_needmsg= | |
11615 | fi | |
11616 | if ${bash_cv_have_gethostbyname+:} false; then : | |
c920c360 CR |
11617 | $as_echo_n "(cached) " >&6 |
11618 | else | |
1b1fe467 | 11619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b | 11620 | /* end confdefs.h. */ |
1b1fe467 | 11621 | #include <netdb.h> |
abe2eb5b CR |
11622 | int |
11623 | main () | |
11624 | { | |
1b1fe467 CR |
11625 | struct hostent *hp; |
11626 | hp = gethostbyname("localhost"); | |
11627 | ||
abe2eb5b CR |
11628 | ; |
11629 | return 0; | |
11630 | } | |
11631 | _ACEOF | |
1b1fe467 CR |
11632 | if ac_fn_c_try_link "$LINENO"; then : |
11633 | bash_cv_have_gethostbyname=yes | |
7175a77f | 11634 | else |
1b1fe467 | 11635 | bash_cv_have_gethostbyname=no |
7175a77f | 11636 | fi |
1b1fe467 CR |
11637 | rm -f core conftest.err conftest.$ac_objext \ |
11638 | conftest$ac_exeext conftest.$ac_ext | |
7175a77f | 11639 | |
1b1fe467 | 11640 | fi |
7175a77f | 11641 | |
1b1fe467 CR |
11642 | if test "X$_bash_needmsg" = Xyes; then |
11643 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 | |
11644 | $as_echo_n "checking for gethostbyname in socket library... " >&6; } | |
11645 | fi | |
11646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5 | |
11647 | $as_echo "$bash_cv_have_gethostbyname" >&6; } | |
11648 | if test "$bash_cv_have_gethostbyname" = yes; then | |
11649 | $as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h | |
7175a77f | 11650 | |
7f947b68 | 11651 | fi |
7175a77f | 11652 | |
7f947b68 | 11653 | fi |
1b1fe467 CR |
11654 | |
11655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 | |
11656 | $as_echo_n "checking for uid_t in sys/types.h... " >&6; } | |
11657 | if ${ac_cv_type_uid_t+:} false; then : | |
11658 | $as_echo_n "(cached) " >&6 | |
7175a77f | 11659 | else |
1b1fe467 CR |
11660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11661 | /* end confdefs.h. */ | |
11662 | #include <sys/types.h> | |
7f947b68 | 11663 | |
7175a77f | 11664 | _ACEOF |
1b1fe467 CR |
11665 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11666 | $EGREP "uid_t" >/dev/null 2>&1; then : | |
11667 | ac_cv_type_uid_t=yes | |
11668 | else | |
11669 | ac_cv_type_uid_t=no | |
11670 | fi | |
11671 | rm -f conftest* | |
2dead0c4 | 11672 | |
c920c360 | 11673 | fi |
1b1fe467 CR |
11674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 |
11675 | $as_echo "$ac_cv_type_uid_t" >&6; } | |
11676 | if test $ac_cv_type_uid_t = no; then | |
5f8cde23 | 11677 | |
1b1fe467 CR |
11678 | $as_echo "#define uid_t int" >>confdefs.h |
11679 | ||
11680 | ||
11681 | $as_echo "#define gid_t int" >>confdefs.h | |
11682 | ||
11683 | fi | |
11684 | ||
11685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 | |
11686 | $as_echo_n "checking type of array argument to getgroups... " >&6; } | |
11687 | if ${ac_cv_type_getgroups+:} false; then : | |
7f947b68 | 11688 | $as_echo_n "(cached) " >&6 |
71412226 | 11689 | else |
1b1fe467 CR |
11690 | if test "$cross_compiling" = yes; then : |
11691 | ac_cv_type_getgroups=cross | |
11692 | else | |
11693 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7f947b68 | 11694 | /* end confdefs.h. */ |
1b1fe467 | 11695 | /* Thanks to Mike Rendell for this test. */ |
7175a77f | 11696 | $ac_includes_default |
1b1fe467 CR |
11697 | #define NGID 256 |
11698 | #undef MAX | |
11699 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
11700 | ||
7f947b68 CR |
11701 | int |
11702 | main () | |
11703 | { | |
1b1fe467 CR |
11704 | gid_t gidset[NGID]; |
11705 | int i, n; | |
11706 | union { gid_t gval; long int lval; } val; | |
11707 | ||
11708 | val.lval = -1; | |
11709 | for (i = 0; i < NGID; i++) | |
11710 | gidset[i] = val.gval; | |
11711 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
11712 | gidset); | |
11713 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
11714 | happens when gid_t is short int but getgroups modifies an array | |
11715 | of ints. */ | |
11716 | return n > 0 && gidset[n] != val.gval; | |
7f947b68 CR |
11717 | } |
11718 | _ACEOF | |
1b1fe467 CR |
11719 | if ac_fn_c_try_run "$LINENO"; then : |
11720 | ac_cv_type_getgroups=gid_t | |
11721 | else | |
11722 | ac_cv_type_getgroups=int | |
11723 | fi | |
11724 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11725 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11726 | fi | |
11727 | ||
11728 | if test $ac_cv_type_getgroups = cross; then | |
11729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
abe2eb5b | 11730 | /* end confdefs.h. */ |
1b1fe467 CR |
11731 | #include <unistd.h> |
11732 | ||
abe2eb5b | 11733 | _ACEOF |
1b1fe467 CR |
11734 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11735 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : | |
11736 | ac_cv_type_getgroups=gid_t | |
7f947b68 | 11737 | else |
1b1fe467 CR |
11738 | ac_cv_type_getgroups=int |
11739 | fi | |
11740 | rm -f conftest* | |
7f947b68 CR |
11741 | |
11742 | fi | |
1b1fe467 CR |
11743 | fi |
11744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 | |
11745 | $as_echo "$ac_cv_type_getgroups" >&6; } | |
11746 | ||
11747 | cat >>confdefs.h <<_ACEOF | |
11748 | #define GETGROUPS_T $ac_cv_type_getgroups | |
11749 | _ACEOF | |
11750 | ||
11751 | ||
11752 | ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" | |
11753 | if test "x$ac_cv_type_off_t" = xyes; then : | |
7f947b68 | 11754 | |
7f947b68 | 11755 | else |
7f947b68 | 11756 | |
1b1fe467 CR |
11757 | cat >>confdefs.h <<_ACEOF |
11758 | #define off_t long int | |
11759 | _ACEOF | |
e3db237e | 11760 | |
71412226 | 11761 | fi |
7f947b68 | 11762 | |
1b1fe467 CR |
11763 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" |
11764 | if test "x$ac_cv_type_mode_t" = xyes; then : | |
11765 | ||
7175a77f | 11766 | else |
2dead0c4 | 11767 | |
7175a77f | 11768 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 11769 | #define mode_t int |
7f947b68 | 11770 | _ACEOF |
2dead0c4 | 11771 | |
abe2eb5b | 11772 | fi |
5f8cde23 | 11773 | |
1b1fe467 CR |
11774 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 |
11775 | $as_echo_n "checking for uid_t in sys/types.h... " >&6; } | |
11776 | if ${ac_cv_type_uid_t+:} false; then : | |
2dead0c4 CR |
11777 | $as_echo_n "(cached) " >&6 |
11778 | else | |
1b1fe467 | 11779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b | 11780 | /* end confdefs.h. */ |
1b1fe467 CR |
11781 | #include <sys/types.h> |
11782 | ||
abe2eb5b | 11783 | _ACEOF |
1b1fe467 CR |
11784 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
11785 | $EGREP "uid_t" >/dev/null 2>&1; then : | |
11786 | ac_cv_type_uid_t=yes | |
2dead0c4 | 11787 | else |
1b1fe467 CR |
11788 | ac_cv_type_uid_t=no |
11789 | fi | |
11790 | rm -f conftest* | |
7f947b68 CR |
11791 | |
11792 | fi | |
1b1fe467 CR |
11793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 |
11794 | $as_echo "$ac_cv_type_uid_t" >&6; } | |
11795 | if test $ac_cv_type_uid_t = no; then | |
2dead0c4 | 11796 | |
1b1fe467 | 11797 | $as_echo "#define uid_t int" >>confdefs.h |
2dead0c4 CR |
11798 | |
11799 | ||
1b1fe467 | 11800 | $as_echo "#define gid_t int" >>confdefs.h |
7f947b68 | 11801 | |
7f947b68 | 11802 | fi |
1b1fe467 CR |
11803 | |
11804 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" | |
11805 | if test "x$ac_cv_type_pid_t" = xyes; then : | |
11806 | ||
7175a77f | 11807 | else |
c920c360 | 11808 | |
abe2eb5b | 11809 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 11810 | #define pid_t int |
abe2eb5b | 11811 | _ACEOF |
c920c360 | 11812 | |
7175a77f | 11813 | fi |
c920c360 | 11814 | |
1b1fe467 CR |
11815 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
11816 | if test "x$ac_cv_type_size_t" = xyes; then : | |
5f8cde23 | 11817 | |
abe2eb5b | 11818 | else |
1b1fe467 CR |
11819 | |
11820 | cat >>confdefs.h <<_ACEOF | |
11821 | #define size_t unsigned int | |
abe2eb5b | 11822 | _ACEOF |
7175a77f | 11823 | |
7f947b68 | 11824 | fi |
7f947b68 | 11825 | |
1b1fe467 CR |
11826 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" |
11827 | if test "x$ac_cv_type_ssize_t" = xyes; then : | |
11828 | ||
7175a77f | 11829 | else |
7f947b68 | 11830 | |
1b1fe467 CR |
11831 | cat >>confdefs.h <<_ACEOF |
11832 | #define ssize_t int | |
11833 | _ACEOF | |
7f947b68 | 11834 | |
7175a77f | 11835 | fi |
7f947b68 | 11836 | |
1b1fe467 CR |
11837 | ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" |
11838 | if test "x$ac_cv_type_time_t" = xyes; then : | |
11839 | ||
7f947b68 | 11840 | else |
7175a77f CR |
11841 | |
11842 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 11843 | #define time_t long |
7175a77f CR |
11844 | _ACEOF |
11845 | ||
11846 | fi | |
11847 | ||
1b1fe467 CR |
11848 | |
11849 | ||
11850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 | |
11851 | $as_echo_n "checking for long long... " >&6; } | |
11852 | if ${bash_cv_type_long_long+:} false; then : | |
7f947b68 CR |
11853 | $as_echo_n "(cached) " >&6 |
11854 | else | |
1b1fe467 | 11855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b | 11856 | /* end confdefs.h. */ |
1b1fe467 CR |
11857 | |
11858 | long long ll = 1; int i = 63; | |
abe2eb5b CR |
11859 | int |
11860 | main () | |
11861 | { | |
1b1fe467 CR |
11862 | |
11863 | long long llm = (long long) -1; | |
11864 | return ll << i | ll >> i | llm / ll | llm % ll; | |
11865 | ||
abe2eb5b CR |
11866 | ; |
11867 | return 0; | |
11868 | } | |
e3db237e | 11869 | _ACEOF |
1b1fe467 CR |
11870 | if ac_fn_c_try_link "$LINENO"; then : |
11871 | bash_cv_type_long_long='long long' | |
11872 | else | |
11873 | bash_cv_type_long_long='long' | |
11874 | fi | |
11875 | rm -f core conftest.err conftest.$ac_objext \ | |
11876 | conftest$ac_exeext conftest.$ac_ext | |
11877 | fi | |
11878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_long_long" >&5 | |
11879 | $as_echo "$bash_cv_type_long_long" >&6; } | |
11880 | if test "$bash_cv_type_long_long" = 'long long'; then | |
11881 | $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h | |
11882 | ||
11883 | fi | |
11884 | ||
11885 | ||
11886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long" >&5 | |
11887 | $as_echo_n "checking for unsigned long long... " >&6; } | |
11888 | if ${bash_cv_type_unsigned_long_long+:} false; then : | |
11889 | $as_echo_n "(cached) " >&6 | |
11890 | else | |
11891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
abe2eb5b | 11892 | /* end confdefs.h. */ |
1b1fe467 CR |
11893 | |
11894 | unsigned long long ull = 1; int i = 63; | |
abe2eb5b CR |
11895 | int |
11896 | main () | |
11897 | { | |
1b1fe467 CR |
11898 | |
11899 | unsigned long long ullmax = (unsigned long long) -1; | |
11900 | return ull << i | ull >> i | ullmax / ull | ullmax % ull; | |
11901 | ||
abe2eb5b CR |
11902 | ; |
11903 | return 0; | |
11904 | } | |
7610e0c5 | 11905 | _ACEOF |
1b1fe467 CR |
11906 | if ac_fn_c_try_link "$LINENO"; then : |
11907 | bash_cv_type_unsigned_long_long='unsigned long long' | |
abe2eb5b | 11908 | else |
1b1fe467 | 11909 | bash_cv_type_unsigned_long_long='unsigned long' |
7f947b68 | 11910 | fi |
1b1fe467 CR |
11911 | rm -f core conftest.err conftest.$ac_objext \ |
11912 | conftest$ac_exeext conftest.$ac_ext | |
2dead0c4 | 11913 | fi |
1b1fe467 CR |
11914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_unsigned_long_long" >&5 |
11915 | $as_echo "$bash_cv_type_unsigned_long_long" >&6; } | |
11916 | if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then | |
11917 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>confdefs.h | |
2dead0c4 | 11918 | |
7175a77f | 11919 | fi |
2dead0c4 | 11920 | |
2dead0c4 | 11921 | |
1b1fe467 CR |
11922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
11923 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
11924 | if ${ac_cv_type_signal+:} false; then : | |
abe2eb5b | 11925 | $as_echo_n "(cached) " >&6 |
7610e0c5 | 11926 | else |
1b1fe467 | 11927 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b | 11928 | /* end confdefs.h. */ |
1b1fe467 CR |
11929 | #include <sys/types.h> |
11930 | #include <signal.h> | |
11931 | ||
abe2eb5b CR |
11932 | int |
11933 | main () | |
11934 | { | |
1b1fe467 | 11935 | return *(signal (0, 0)) (0) == 1; |
abe2eb5b CR |
11936 | ; |
11937 | return 0; | |
11938 | } | |
11939 | _ACEOF | |
1b1fe467 CR |
11940 | if ac_fn_c_try_compile "$LINENO"; then : |
11941 | ac_cv_type_signal=int | |
11942 | else | |
11943 | ac_cv_type_signal=void | |
11944 | fi | |
11945 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
11946 | fi | |
11947 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 | |
11948 | $as_echo "$ac_cv_type_signal" >&6; } | |
11949 | ||
11950 | cat >>confdefs.h <<_ACEOF | |
11951 | #define RETSIGTYPE $ac_cv_type_signal | |
7175a77f | 11952 | _ACEOF |
1b1fe467 CR |
11953 | |
11954 | ||
11955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 | |
11956 | $as_echo_n "checking for sig_atomic_t in signal.h... " >&6; } | |
11957 | if ${ac_cv_have_sig_atomic_t+:} false; then : | |
11958 | $as_echo_n "(cached) " >&6 | |
11959 | else | |
11960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7175a77f | 11961 | /* end confdefs.h. */ |
1b1fe467 CR |
11962 | |
11963 | #include <signal.h> | |
11964 | ||
7175a77f CR |
11965 | int |
11966 | main () | |
11967 | { | |
1b1fe467 | 11968 | sig_atomic_t x; |
7175a77f CR |
11969 | ; |
11970 | return 0; | |
11971 | } | |
11972 | _ACEOF | |
1b1fe467 CR |
11973 | if ac_fn_c_try_link "$LINENO"; then : |
11974 | ac_cv_have_sig_atomic_t=yes | |
11975 | else | |
11976 | ac_cv_have_sig_atomic_t=no | |
11977 | fi | |
11978 | rm -f core conftest.err conftest.$ac_objext \ | |
11979 | conftest$ac_exeext conftest.$ac_ext | |
11980 | fi | |
11981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5 | |
11982 | $as_echo "$ac_cv_have_sig_atomic_t" >&6; } | |
11983 | if test "$ac_cv_have_sig_atomic_t" = "no" | |
11984 | then | |
11985 | ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default" | |
11986 | if test "x$ac_cv_type_sig_atomic_t" = xyes; then : | |
11987 | ||
abe2eb5b | 11988 | else |
7610e0c5 | 11989 | |
1b1fe467 CR |
11990 | cat >>confdefs.h <<_ACEOF |
11991 | #define sig_atomic_t int | |
11992 | _ACEOF | |
11993 | ||
11994 | fi | |
11995 | ||
7f947b68 | 11996 | fi |
7610e0c5 CR |
11997 | |
11998 | ||
1b1fe467 CR |
11999 | # The cast to long int works around a bug in the HP C Compiler |
12000 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12001 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12002 | # This bug is HP SR number 8606223364. | |
12003 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 | |
12004 | $as_echo_n "checking size of char... " >&6; } | |
12005 | if ${ac_cv_sizeof_char+:} false; then : | |
12006 | $as_echo_n "(cached) " >&6 | |
12007 | else | |
12008 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : | |
7610e0c5 | 12009 | |
1b1fe467 CR |
12010 | else |
12011 | if test "$ac_cv_type_char" = yes; then | |
12012 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12013 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12014 | as_fn_error 77 "cannot compute sizeof (char) | |
12015 | See \`config.log' for more details" "$LINENO" 5; } | |
12016 | else | |
12017 | ac_cv_sizeof_char=0 | |
12018 | fi | |
2dead0c4 | 12019 | fi |
7f947b68 | 12020 | |
7175a77f | 12021 | fi |
1b1fe467 CR |
12022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 |
12023 | $as_echo "$ac_cv_sizeof_char" >&6; } | |
12024 | ||
12025 | ||
e3db237e | 12026 | |
7175a77f | 12027 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 12028 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
2dead0c4 CR |
12029 | _ACEOF |
12030 | ||
1b1fe467 CR |
12031 | |
12032 | # The cast to long int works around a bug in the HP C Compiler | |
12033 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12034 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12035 | # This bug is HP SR number 8606223364. | |
12036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 | |
12037 | $as_echo_n "checking size of short... " >&6; } | |
12038 | if ${ac_cv_sizeof_short+:} false; then : | |
12039 | $as_echo_n "(cached) " >&6 | |
12040 | else | |
12041 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : | |
12042 | ||
12043 | else | |
12044 | if test "$ac_cv_type_short" = yes; then | |
12045 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12046 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12047 | as_fn_error 77 "cannot compute sizeof (short) | |
12048 | See \`config.log' for more details" "$LINENO" 5; } | |
12049 | else | |
12050 | ac_cv_sizeof_short=0 | |
12051 | fi | |
7610e0c5 | 12052 | fi |
7f947b68 CR |
12053 | |
12054 | fi | |
1b1fe467 CR |
12055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 |
12056 | $as_echo "$ac_cv_sizeof_short" >&6; } | |
7f947b68 | 12057 | |
7175a77f | 12058 | |
1b1fe467 CR |
12059 | |
12060 | cat >>confdefs.h <<_ACEOF | |
12061 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
2dead0c4 | 12062 | _ACEOF |
e3db237e | 12063 | |
71412226 | 12064 | |
1b1fe467 CR |
12065 | # The cast to long int works around a bug in the HP C Compiler |
12066 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12067 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12068 | # This bug is HP SR number 8606223364. | |
12069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 | |
12070 | $as_echo_n "checking size of int... " >&6; } | |
12071 | if ${ac_cv_sizeof_int+:} false; then : | |
12072 | $as_echo_n "(cached) " >&6 | |
71412226 | 12073 | else |
1b1fe467 | 12074 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : |
7610e0c5 | 12075 | |
1b1fe467 CR |
12076 | else |
12077 | if test "$ac_cv_type_int" = yes; then | |
12078 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12079 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12080 | as_fn_error 77 "cannot compute sizeof (int) | |
12081 | See \`config.log' for more details" "$LINENO" 5; } | |
12082 | else | |
12083 | ac_cv_sizeof_int=0 | |
12084 | fi | |
2dead0c4 | 12085 | fi |
5f8cde23 | 12086 | |
7175a77f | 12087 | fi |
1b1fe467 CR |
12088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 |
12089 | $as_echo "$ac_cv_sizeof_int" >&6; } | |
12090 | ||
12091 | ||
e3db237e | 12092 | |
7f947b68 | 12093 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 12094 | #define SIZEOF_INT $ac_cv_sizeof_int |
7f947b68 | 12095 | _ACEOF |
71412226 | 12096 | |
7f947b68 | 12097 | |
1b1fe467 CR |
12098 | # The cast to long int works around a bug in the HP C Compiler |
12099 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12100 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12101 | # This bug is HP SR number 8606223364. | |
12102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
12103 | $as_echo_n "checking size of long... " >&6; } | |
12104 | if ${ac_cv_sizeof_long+:} false; then : | |
abe2eb5b CR |
12105 | $as_echo_n "(cached) " >&6 |
12106 | else | |
1b1fe467 CR |
12107 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
12108 | ||
abe2eb5b | 12109 | else |
1b1fe467 CR |
12110 | if test "$ac_cv_type_long" = yes; then |
12111 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12112 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12113 | as_fn_error 77 "cannot compute sizeof (long) | |
12114 | See \`config.log' for more details" "$LINENO" 5; } | |
12115 | else | |
12116 | ac_cv_sizeof_long=0 | |
12117 | fi | |
12118 | fi | |
71412226 | 12119 | |
2dead0c4 | 12120 | fi |
1b1fe467 CR |
12121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
12122 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
e3db237e | 12123 | |
e3db237e | 12124 | |
5f8cde23 | 12125 | |
1b1fe467 CR |
12126 | cat >>confdefs.h <<_ACEOF |
12127 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
12128 | _ACEOF | |
12129 | ||
12130 | ||
12131 | # The cast to long int works around a bug in the HP C Compiler | |
12132 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12133 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12134 | # This bug is HP SR number 8606223364. | |
12135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 | |
12136 | $as_echo_n "checking size of char *... " >&6; } | |
12137 | if ${ac_cv_sizeof_char_p+:} false; then : | |
12138 | $as_echo_n "(cached) " >&6 | |
12139 | else | |
12140 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then : | |
12141 | ||
12142 | else | |
12143 | if test "$ac_cv_type_char_p" = yes; then | |
12144 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12145 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12146 | as_fn_error 77 "cannot compute sizeof (char *) | |
12147 | See \`config.log' for more details" "$LINENO" 5; } | |
12148 | else | |
12149 | ac_cv_sizeof_char_p=0 | |
12150 | fi | |
abe2eb5b | 12151 | fi |
7f947b68 | 12152 | |
7175a77f | 12153 | fi |
1b1fe467 CR |
12154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5 |
12155 | $as_echo "$ac_cv_sizeof_char_p" >&6; } | |
12156 | ||
12157 | ||
e3db237e | 12158 | |
2dead0c4 | 12159 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 12160 | #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p |
2dead0c4 | 12161 | _ACEOF |
5f8cde23 | 12162 | |
e3db237e | 12163 | |
1b1fe467 CR |
12164 | # The cast to long int works around a bug in the HP C Compiler |
12165 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12166 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12167 | # This bug is HP SR number 8606223364. | |
12168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 | |
12169 | $as_echo_n "checking size of double... " >&6; } | |
12170 | if ${ac_cv_sizeof_double+:} false; then : | |
7175a77f CR |
12171 | $as_echo_n "(cached) " >&6 |
12172 | else | |
1b1fe467 CR |
12173 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : |
12174 | ||
12175 | else | |
12176 | if test "$ac_cv_type_double" = yes; then | |
12177 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12178 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12179 | as_fn_error 77 "cannot compute sizeof (double) | |
12180 | See \`config.log' for more details" "$LINENO" 5; } | |
12181 | else | |
12182 | ac_cv_sizeof_double=0 | |
12183 | fi | |
12184 | fi | |
12185 | ||
12186 | fi | |
12187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 | |
12188 | $as_echo "$ac_cv_sizeof_double" >&6; } | |
12189 | ||
12190 | ||
12191 | ||
12192 | cat >>confdefs.h <<_ACEOF | |
12193 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double | |
7175a77f | 12194 | _ACEOF |
1b1fe467 CR |
12195 | |
12196 | ||
12197 | # The cast to long int works around a bug in the HP C Compiler | |
12198 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
12199 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
12200 | # This bug is HP SR number 8606223364. | |
12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
12202 | $as_echo_n "checking size of long long... " >&6; } | |
12203 | if ${ac_cv_sizeof_long_long+:} false; then : | |
12204 | $as_echo_n "(cached) " >&6 | |
2dead0c4 | 12205 | else |
1b1fe467 | 12206 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
7f947b68 | 12207 | |
1b1fe467 CR |
12208 | else |
12209 | if test "$ac_cv_type_long_long" = yes; then | |
12210 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
12211 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
12212 | as_fn_error 77 "cannot compute sizeof (long long) | |
12213 | See \`config.log' for more details" "$LINENO" 5; } | |
12214 | else | |
12215 | ac_cv_sizeof_long_long=0 | |
12216 | fi | |
2dead0c4 | 12217 | fi |
c920c360 | 12218 | |
1b1fe467 CR |
12219 | fi |
12220 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
12221 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
2dead0c4 | 12222 | |
c920c360 | 12223 | |
c920c360 | 12224 | |
1b1fe467 CR |
12225 | cat >>confdefs.h <<_ACEOF |
12226 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
12227 | _ACEOF | |
12228 | ||
12229 | ||
12230 | ||
12231 | ac_fn_c_check_type "$LINENO" "u_int" "ac_cv_type_u_int" "$ac_includes_default" | |
12232 | if test "x$ac_cv_type_u_int" = xyes; then : | |
12233 | ||
ccc6cda3 | 12234 | else |
2dead0c4 CR |
12235 | |
12236 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 12237 | #define u_int unsigned int |
7610e0c5 | 12238 | _ACEOF |
e3db237e | 12239 | |
c920c360 | 12240 | fi |
e3db237e | 12241 | |
1b1fe467 CR |
12242 | ac_fn_c_check_type "$LINENO" "u_long" "ac_cv_type_u_long" "$ac_includes_default" |
12243 | if test "x$ac_cv_type_u_long" = xyes; then : | |
12244 | ||
abe2eb5b | 12245 | else |
1b1fe467 CR |
12246 | |
12247 | cat >>confdefs.h <<_ACEOF | |
12248 | #define u_long unsigned long | |
abe2eb5b | 12249 | _ACEOF |
7175a77f | 12250 | |
c920c360 | 12251 | fi |
7175a77f | 12252 | |
1b1fe467 CR |
12253 | |
12254 | ||
12255 | if test "$ac_cv_sizeof_short" = 2; then | |
12256 | ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" | |
12257 | if test "x$ac_cv_type_bits16_t" = xyes; then : | |
12258 | ||
7175a77f | 12259 | else |
7175a77f | 12260 | |
1b1fe467 CR |
12261 | cat >>confdefs.h <<_ACEOF |
12262 | #define bits16_t short | |
12263 | _ACEOF | |
7175a77f | 12264 | |
abe2eb5b | 12265 | fi |
2dead0c4 | 12266 | |
1b1fe467 CR |
12267 | elif test "$ac_cv_sizeof_char" = 2; then |
12268 | ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" | |
12269 | if test "x$ac_cv_type_bits16_t" = xyes; then : | |
12270 | ||
7175a77f CR |
12271 | else |
12272 | ||
12273 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 12274 | #define bits16_t char |
7175a77f | 12275 | _ACEOF |
f73dda09 | 12276 | |
7175a77f | 12277 | fi |
a82a04b3 | 12278 | |
7175a77f | 12279 | else |
1b1fe467 CR |
12280 | ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" |
12281 | if test "x$ac_cv_type_bits16_t" = xyes; then : | |
12282 | ||
abe2eb5b | 12283 | else |
1b1fe467 CR |
12284 | |
12285 | cat >>confdefs.h <<_ACEOF | |
12286 | #define bits16_t short | |
abe2eb5b | 12287 | _ACEOF |
7175a77f | 12288 | |
abe2eb5b | 12289 | fi |
7f947b68 | 12290 | |
1b1fe467 CR |
12291 | fi |
12292 | ||
12293 | ||
12294 | if test "$ac_cv_sizeof_short" = 2; then | |
12295 | ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" | |
12296 | if test "x$ac_cv_type_u_bits16_t" = xyes; then : | |
12297 | ||
c920c360 | 12298 | else |
e3db237e | 12299 | |
1b1fe467 CR |
12300 | cat >>confdefs.h <<_ACEOF |
12301 | #define u_bits16_t unsigned short | |
12302 | _ACEOF | |
e3db237e | 12303 | |
c920c360 | 12304 | fi |
c920c360 | 12305 | |
1b1fe467 CR |
12306 | elif test "$ac_cv_sizeof_char" = 2; then |
12307 | ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" | |
12308 | if test "x$ac_cv_type_u_bits16_t" = xyes; then : | |
12309 | ||
12310 | else | |
12311 | ||
12312 | cat >>confdefs.h <<_ACEOF | |
12313 | #define u_bits16_t unsigned char | |
12314 | _ACEOF | |
12315 | ||
c920c360 | 12316 | fi |
1b1fe467 CR |
12317 | |
12318 | else | |
12319 | ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" | |
12320 | if test "x$ac_cv_type_u_bits16_t" = xyes; then : | |
12321 | ||
7f947b68 | 12322 | else |
2dead0c4 | 12323 | |
7f947b68 | 12324 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 12325 | #define u_bits16_t unsigned short |
5e4a95c7 | 12326 | _ACEOF |
7f947b68 | 12327 | |
c920c360 | 12328 | fi |
abe2eb5b | 12329 | |
c920c360 | 12330 | fi |
e3db237e | 12331 | |
7f947b68 | 12332 | |
1b1fe467 CR |
12333 | if test "$ac_cv_sizeof_int" = 4; then |
12334 | ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" | |
12335 | if test "x$ac_cv_type_bits32_t" = xyes; then : | |
2dead0c4 | 12336 | |
2dead0c4 | 12337 | else |
1b1fe467 CR |
12338 | |
12339 | cat >>confdefs.h <<_ACEOF | |
12340 | #define bits32_t int | |
7175a77f | 12341 | _ACEOF |
7175a77f | 12342 | |
7175a77f | 12343 | fi |
2dead0c4 | 12344 | |
1b1fe467 CR |
12345 | elif test "$ac_cv_sizeof_long" = 4; then |
12346 | ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" | |
12347 | if test "x$ac_cv_type_bits32_t" = xyes; then : | |
12348 | ||
7f947b68 | 12349 | else |
2dead0c4 | 12350 | |
1b1fe467 CR |
12351 | cat >>confdefs.h <<_ACEOF |
12352 | #define bits32_t long | |
12353 | _ACEOF | |
7f947b68 | 12354 | |
7175a77f | 12355 | fi |
7f947b68 | 12356 | |
1b1fe467 CR |
12357 | else |
12358 | ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" | |
12359 | if test "x$ac_cv_type_bits32_t" = xyes; then : | |
12360 | ||
7175a77f | 12361 | else |
7f947b68 CR |
12362 | |
12363 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 12364 | #define bits32_t int |
7610e0c5 | 12365 | _ACEOF |
7f947b68 | 12366 | |
7175a77f | 12367 | fi |
7f947b68 | 12368 | |
1b1fe467 CR |
12369 | fi |
12370 | ||
12371 | ||
12372 | if test "$ac_cv_sizeof_int" = 4; then | |
12373 | ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" | |
12374 | if test "x$ac_cv_type_u_bits32_t" = xyes; then : | |
12375 | ||
7f947b68 | 12376 | else |
abe2eb5b | 12377 | |
1b1fe467 CR |
12378 | cat >>confdefs.h <<_ACEOF |
12379 | #define u_bits32_t unsigned int | |
12380 | _ACEOF | |
12381 | ||
c920c360 | 12382 | fi |
7f947b68 | 12383 | |
1b1fe467 CR |
12384 | elif test "$ac_cv_sizeof_long" = 4; then |
12385 | ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" | |
12386 | if test "x$ac_cv_type_u_bits32_t" = xyes; then : | |
12387 | ||
7175a77f | 12388 | else |
7175a77f | 12389 | |
1b1fe467 CR |
12390 | cat >>confdefs.h <<_ACEOF |
12391 | #define u_bits32_t unsigned long | |
12392 | _ACEOF | |
7175a77f CR |
12393 | |
12394 | fi | |
7f947b68 | 12395 | |
1b1fe467 CR |
12396 | else |
12397 | ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" | |
12398 | if test "x$ac_cv_type_u_bits32_t" = xyes; then : | |
12399 | ||
7175a77f | 12400 | else |
7f947b68 CR |
12401 | |
12402 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 12403 | #define u_bits32_t unsigned int |
abe2eb5b | 12404 | _ACEOF |
7610e0c5 | 12405 | |
7175a77f | 12406 | fi |
7f947b68 | 12407 | |
1b1fe467 CR |
12408 | fi |
12409 | ||
12410 | ||
12411 | if test "$ac_cv_sizeof_char_p" = 8; then | |
12412 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
12413 | if test "x$ac_cv_type_bits64_t" = xyes; then : | |
12414 | ||
7f947b68 | 12415 | else |
1b1fe467 CR |
12416 | |
12417 | cat >>confdefs.h <<_ACEOF | |
12418 | #define bits64_t char * | |
7175a77f | 12419 | _ACEOF |
7610e0c5 | 12420 | |
2dead0c4 | 12421 | fi |
c920c360 | 12422 | |
1b1fe467 CR |
12423 | elif test "$ac_cv_sizeof_double" = 8; then |
12424 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
12425 | if test "x$ac_cv_type_bits64_t" = xyes; then : | |
12426 | ||
7175a77f | 12427 | else |
7175a77f | 12428 | |
1b1fe467 CR |
12429 | cat >>confdefs.h <<_ACEOF |
12430 | #define bits64_t double | |
12431 | _ACEOF | |
7175a77f CR |
12432 | |
12433 | fi | |
c920c360 | 12434 | |
1b1fe467 CR |
12435 | elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then |
12436 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
12437 | if test "x$ac_cv_type_bits64_t" = xyes; then : | |
12438 | ||
12439 | else | |
12440 | ||
12441 | cat >>confdefs.h <<_ACEOF | |
12442 | #define bits64_t long long | |
12443 | _ACEOF | |
12444 | ||
7175a77f | 12445 | fi |
1b1fe467 CR |
12446 | |
12447 | elif test "$ac_cv_sizeof_long" = 8; then | |
12448 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
12449 | if test "x$ac_cv_type_bits64_t" = xyes; then : | |
12450 | ||
7175a77f | 12451 | else |
7f947b68 CR |
12452 | |
12453 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 12454 | #define bits64_t long |
7f947b68 CR |
12455 | _ACEOF |
12456 | ||
7175a77f | 12457 | fi |
7f947b68 | 12458 | |
7175a77f | 12459 | else |
1b1fe467 CR |
12460 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" |
12461 | if test "x$ac_cv_type_bits64_t" = xyes; then : | |
12462 | ||
7610e0c5 | 12463 | else |
1b1fe467 CR |
12464 | |
12465 | cat >>confdefs.h <<_ACEOF | |
12466 | #define bits64_t double | |
7175a77f | 12467 | _ACEOF |
1b1fe467 CR |
12468 | |
12469 | fi | |
12470 | ||
12471 | fi | |
12472 | ||
12473 | ||
12474 | ||
12475 | if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then | |
12476 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
12477 | if test "x$ac_cv_type_ptrdiff_t" = xyes; then : | |
12478 | ||
2dead0c4 | 12479 | else |
2dead0c4 | 12480 | |
1b1fe467 CR |
12481 | cat >>confdefs.h <<_ACEOF |
12482 | #define ptrdiff_t int | |
12483 | _ACEOF | |
12484 | ||
7f947b68 | 12485 | fi |
7f947b68 | 12486 | |
1b1fe467 CR |
12487 | elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then |
12488 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
12489 | if test "x$ac_cv_type_ptrdiff_t" = xyes; then : | |
12490 | ||
7175a77f | 12491 | else |
7f947b68 | 12492 | |
1b1fe467 CR |
12493 | cat >>confdefs.h <<_ACEOF |
12494 | #define ptrdiff_t long | |
12495 | _ACEOF | |
7f947b68 | 12496 | |
7175a77f | 12497 | fi |
7f947b68 | 12498 | |
1b1fe467 CR |
12499 | elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then |
12500 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
12501 | if test "x$ac_cv_type_ptrdiff_t" = xyes; then : | |
12502 | ||
12503 | else | |
12504 | ||
12505 | cat >>confdefs.h <<_ACEOF | |
12506 | #define ptrdiff_t long long | |
12507 | _ACEOF | |
12508 | ||
7175a77f | 12509 | fi |
1b1fe467 CR |
12510 | |
12511 | else | |
12512 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
12513 | if test "x$ac_cv_type_ptrdiff_t" = xyes; then : | |
12514 | ||
c920c360 | 12515 | else |
abe2eb5b | 12516 | |
7f947b68 | 12517 | cat >>confdefs.h <<_ACEOF |
7175a77f | 12518 | #define ptrdiff_t int |
7f947b68 CR |
12519 | _ACEOF |
12520 | ||
5e4a95c7 | 12521 | fi |
b709b946 | 12522 | |
7175a77f | 12523 | fi |
abe2eb5b | 12524 | |
e3db237e | 12525 | |
1b1fe467 | 12526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
7175a77f | 12527 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } |
1b1fe467 | 12528 | if ${ac_cv_header_stat_broken+:} false; then : |
7175a77f CR |
12529 | $as_echo_n "(cached) " >&6 |
12530 | else | |
1b1fe467 | 12531 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
12532 | /* end confdefs.h. */ |
12533 | #include <sys/types.h> | |
12534 | #include <sys/stat.h> | |
e3db237e | 12535 | |
7175a77f CR |
12536 | #if defined S_ISBLK && defined S_IFDIR |
12537 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
12538 | #endif | |
e3db237e | 12539 | |
7175a77f CR |
12540 | #if defined S_ISBLK && defined S_IFCHR |
12541 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
12542 | #endif | |
7f947b68 | 12543 | |
7175a77f CR |
12544 | #if defined S_ISLNK && defined S_IFREG |
12545 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
12546 | #endif | |
7f947b68 | 12547 | |
7175a77f CR |
12548 | #if defined S_ISSOCK && defined S_IFREG |
12549 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
12550 | #endif | |
7f947b68 | 12551 | |
7175a77f | 12552 | _ACEOF |
1b1fe467 | 12553 | if ac_fn_c_try_compile "$LINENO"; then : |
7175a77f | 12554 | ac_cv_header_stat_broken=no |
2dead0c4 | 12555 | else |
1b1fe467 | 12556 | ac_cv_header_stat_broken=yes |
7175a77f | 12557 | fi |
7175a77f CR |
12558 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12559 | fi | |
1b1fe467 | 12560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 |
7175a77f CR |
12561 | $as_echo "$ac_cv_header_stat_broken" >&6; } |
12562 | if test $ac_cv_header_stat_broken = yes; then | |
12563 | ||
1b1fe467 | 12564 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
2dead0c4 | 12565 | |
7f947b68 CR |
12566 | fi |
12567 | ||
e3db237e | 12568 | |
1b1fe467 | 12569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 |
7175a77f | 12570 | $as_echo_n "checking whether #! works in shell scripts... " >&6; } |
1b1fe467 | 12571 | if ${ac_cv_sys_interpreter+:} false; then : |
7175a77f CR |
12572 | $as_echo_n "(cached) " >&6 |
12573 | else | |
12574 | echo '#! /bin/cat | |
12575 | exit 69 | |
12576 | ' >conftest | |
12577 | chmod u+x conftest | |
12578 | (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1) | |
12579 | if test $? -ne 69; then | |
12580 | ac_cv_sys_interpreter=yes | |
7f947b68 | 12581 | else |
7175a77f CR |
12582 | ac_cv_sys_interpreter=no |
12583 | fi | |
12584 | rm -f conftest | |
12585 | fi | |
1b1fe467 | 12586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 |
7175a77f CR |
12587 | $as_echo "$ac_cv_sys_interpreter" >&6; } |
12588 | interpval=$ac_cv_sys_interpreter | |
7f947b68 | 12589 | |
7175a77f | 12590 | if test $ac_cv_sys_interpreter = yes; then |
1b1fe467 | 12591 | $as_echo "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h |
7f947b68 CR |
12592 | |
12593 | fi | |
12594 | ||
7175a77f | 12595 | if test "$ac_cv_func_lstat" = "no"; then |
1b1fe467 | 12596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 |
7175a77f | 12597 | $as_echo_n "checking for lstat... " >&6; } |
1b1fe467 | 12598 | if ${bash_cv_func_lstat+:} false; then : |
7175a77f | 12599 | $as_echo_n "(cached) " >&6 |
7f947b68 | 12600 | else |
1b1fe467 | 12601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 12602 | /* end confdefs.h. */ |
7f947b68 | 12603 | |
7175a77f CR |
12604 | #include <sys/types.h> |
12605 | #include <sys/stat.h> | |
abe2eb5b | 12606 | |
7175a77f CR |
12607 | int |
12608 | main () | |
12609 | { | |
12610 | lstat(".",(struct stat *)0); | |
12611 | ; | |
12612 | return 0; | |
12613 | } | |
7f947b68 | 12614 | _ACEOF |
1b1fe467 | 12615 | if ac_fn_c_try_link "$LINENO"; then : |
7175a77f CR |
12616 | bash_cv_func_lstat=yes |
12617 | else | |
1b1fe467 | 12618 | bash_cv_func_lstat=no |
e3db237e | 12619 | fi |
1b1fe467 CR |
12620 | rm -f core conftest.err conftest.$ac_objext \ |
12621 | conftest$ac_exeext conftest.$ac_ext | |
e3db237e | 12622 | fi |
1b1fe467 | 12623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5 |
7175a77f CR |
12624 | $as_echo "$bash_cv_func_lstat" >&6; } |
12625 | if test $bash_cv_func_lstat = yes; then | |
1b1fe467 | 12626 | $as_echo "#define HAVE_LSTAT 1" >>confdefs.h |
2dead0c4 CR |
12627 | |
12628 | fi | |
e3db237e | 12629 | |
7f947b68 | 12630 | fi |
e3db237e | 12631 | |
e3db237e | 12632 | |
1b1fe467 | 12633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5 |
7175a77f | 12634 | $as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; } |
1b1fe467 | 12635 | if ${bash_cv_func_ctype_nonascii+:} false; then : |
7175a77f | 12636 | $as_echo_n "(cached) " >&6 |
7f947b68 | 12637 | else |
1b1fe467 CR |
12638 | if test "$cross_compiling" = yes; then : |
12639 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5 | |
7175a77f CR |
12640 | $as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;} |
12641 | bash_cv_func_ctype_nonascii=no | |
e3db237e | 12642 | |
7175a77f | 12643 | else |
1b1fe467 | 12644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 12645 | /* end confdefs.h. */ |
e3db237e | 12646 | |
7175a77f CR |
12647 | #ifdef HAVE_LOCALE_H |
12648 | #include <locale.h> | |
12649 | #endif | |
12650 | #include <stdio.h> | |
12651 | #include <ctype.h> | |
7f947b68 | 12652 | |
7175a77f CR |
12653 | main(c, v) |
12654 | int c; | |
12655 | char *v[]; | |
12656 | { | |
12657 | char *deflocale; | |
12658 | unsigned char x; | |
12659 | int r1, r2; | |
7f947b68 | 12660 | |
7175a77f CR |
12661 | #ifdef HAVE_SETLOCALE |
12662 | /* We take a shot here. If that locale is not known, try the | |
12663 | system default. We try this one because '\342' (226) is | |
12664 | known to be a printable character in that locale. */ | |
12665 | deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); | |
12666 | if (deflocale == 0) | |
12667 | deflocale = setlocale(LC_ALL, ""); | |
12668 | #endif | |
e3db237e | 12669 | |
7175a77f CR |
12670 | x = '\342'; |
12671 | r1 = isprint(x); | |
12672 | x -= 128; | |
12673 | r2 = isprint(x); | |
12674 | exit (r1 == 0 || r2 == 0); | |
12675 | } | |
abe2eb5b | 12676 | |
7f947b68 | 12677 | _ACEOF |
1b1fe467 | 12678 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f CR |
12679 | bash_cv_func_ctype_nonascii=yes |
12680 | else | |
1b1fe467 | 12681 | bash_cv_func_ctype_nonascii=no |
7175a77f | 12682 | fi |
1b1fe467 CR |
12683 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12684 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
e3db237e CR |
12685 | fi |
12686 | ||
7175a77f | 12687 | fi |
2dead0c4 | 12688 | |
1b1fe467 | 12689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5 |
7175a77f CR |
12690 | $as_echo "$bash_cv_func_ctype_nonascii" >&6; } |
12691 | if test $bash_cv_func_ctype_nonascii = yes; then | |
1b1fe467 | 12692 | $as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h |
abe2eb5b | 12693 | |
c920c360 CR |
12694 | fi |
12695 | ||
1b1fe467 | 12696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5 |
7175a77f | 12697 | $as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; } |
1b1fe467 | 12698 | if ${bash_cv_dup2_broken+:} false; then : |
7175a77f | 12699 | $as_echo_n "(cached) " >&6 |
7f947b68 | 12700 | else |
1b1fe467 CR |
12701 | if test "$cross_compiling" = yes; then : |
12702 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 | |
7175a77f CR |
12703 | $as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;} |
12704 | bash_cv_dup2_broken=no | |
7f947b68 | 12705 | else |
1b1fe467 | 12706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
12707 | /* end confdefs.h. */ |
12708 | ||
12709 | #include <sys/types.h> | |
12710 | #include <fcntl.h> | |
12711 | main() | |
12712 | { | |
12713 | int fd1, fd2, fl; | |
12714 | fd1 = open("/dev/null", 2); | |
12715 | if (fcntl(fd1, 2, 1) < 0) | |
12716 | exit(1); | |
12717 | fd2 = dup2(fd1, 1); | |
12718 | if (fd2 < 0) | |
12719 | exit(2); | |
12720 | fl = fcntl(fd2, 1, 0); | |
12721 | /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ | |
12722 | exit(fl != 1); | |
12723 | } | |
7f947b68 | 12724 | |
abe2eb5b | 12725 | _ACEOF |
1b1fe467 | 12726 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f CR |
12727 | bash_cv_dup2_broken=yes |
12728 | else | |
1b1fe467 | 12729 | bash_cv_dup2_broken=no |
2dead0c4 | 12730 | fi |
1b1fe467 CR |
12731 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12732 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7f947b68 CR |
12733 | fi |
12734 | ||
12735 | ||
7175a77f | 12736 | fi |
2dead0c4 | 12737 | |
1b1fe467 | 12738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5 |
7175a77f CR |
12739 | $as_echo "$bash_cv_dup2_broken" >&6; } |
12740 | if test $bash_cv_dup2_broken = yes; then | |
1b1fe467 | 12741 | $as_echo "#define DUP2_BROKEN 1" >>confdefs.h |
e3db237e | 12742 | |
7f947b68 | 12743 | fi |
71412226 | 12744 | |
abe2eb5b | 12745 | |
1b1fe467 | 12746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5 |
7175a77f | 12747 | $as_echo_n "checking whether pgrps need synchronization... " >&6; } |
1b1fe467 | 12748 | if ${bash_cv_pgrp_pipe+:} false; then : |
7175a77f | 12749 | $as_echo_n "(cached) " >&6 |
7f947b68 | 12750 | else |
1b1fe467 CR |
12751 | if test "$cross_compiling" = yes; then : |
12752 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 | |
7175a77f CR |
12753 | $as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;} |
12754 | bash_cv_pgrp_pipe=no | |
12755 | else | |
1b1fe467 | 12756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 12757 | /* end confdefs.h. */ |
ccc6cda3 | 12758 | |
7175a77f CR |
12759 | #ifdef HAVE_UNISTD_H |
12760 | # include <unistd.h> | |
12761 | #endif | |
12762 | main() | |
12763 | { | |
12764 | # ifdef GETPGRP_VOID | |
12765 | # define getpgID() getpgrp() | |
12766 | # else | |
12767 | # define getpgID() getpgrp(0) | |
12768 | # define setpgid(x,y) setpgrp(x,y) | |
12769 | # endif | |
12770 | int pid1, pid2, fds[2]; | |
12771 | int status; | |
12772 | char ok; | |
c920c360 | 12773 | |
7175a77f CR |
12774 | switch (pid1 = fork()) { |
12775 | case -1: | |
12776 | exit(1); | |
12777 | case 0: | |
12778 | setpgid(0, getpid()); | |
12779 | exit(0); | |
12780 | } | |
12781 | setpgid(pid1, pid1); | |
12782 | ||
12783 | sleep(2); /* let first child die */ | |
abe2eb5b | 12784 | |
7175a77f CR |
12785 | if (pipe(fds) < 0) |
12786 | exit(2); | |
12787 | ||
12788 | switch (pid2 = fork()) { | |
12789 | case -1: | |
12790 | exit(3); | |
12791 | case 0: | |
12792 | setpgid(0, pid1); | |
12793 | ok = getpgID() == pid1; | |
12794 | write(fds[1], &ok, 1); | |
12795 | exit(0); | |
12796 | } | |
12797 | setpgid(pid2, pid1); | |
12798 | ||
12799 | close(fds[1]); | |
12800 | if (read(fds[0], &ok, 1) != 1) | |
12801 | exit(4); | |
12802 | wait(&status); | |
12803 | wait(&status); | |
12804 | exit(ok ? 0 : 5); | |
12805 | } | |
12806 | ||
1b1fe467 CR |
12807 | _ACEOF |
12808 | if ac_fn_c_try_run "$LINENO"; then : | |
12809 | bash_cv_pgrp_pipe=no | |
12810 | else | |
12811 | bash_cv_pgrp_pipe=yes | |
7f947b68 | 12812 | fi |
1b1fe467 CR |
12813 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12814 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7f947b68 CR |
12815 | fi |
12816 | ||
c920c360 | 12817 | |
7175a77f | 12818 | fi |
abe2eb5b | 12819 | |
1b1fe467 | 12820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5 |
7175a77f CR |
12821 | $as_echo "$bash_cv_pgrp_pipe" >&6; } |
12822 | if test $bash_cv_pgrp_pipe = yes; then | |
1b1fe467 | 12823 | $as_echo "#define PGRP_PIPE 1" >>confdefs.h |
71412226 | 12824 | |
c920c360 | 12825 | fi |
abe2eb5b | 12826 | |
71412226 | 12827 | |
1b1fe467 | 12828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 |
7175a77f | 12829 | $as_echo_n "checking for type of signal functions... " >&6; } |
1b1fe467 | 12830 | if ${bash_cv_signal_vintage+:} false; then : |
7175a77f | 12831 | $as_echo_n "(cached) " >&6 |
7f947b68 | 12832 | else |
abe2eb5b | 12833 | |
1b1fe467 | 12834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
12835 | /* end confdefs.h. */ |
12836 | #include <signal.h> | |
12837 | int | |
12838 | main () | |
12839 | { | |
7610e0c5 | 12840 | |
7175a77f CR |
12841 | sigset_t ss; |
12842 | struct sigaction sa; | |
12843 | sigemptyset(&ss); sigsuspend(&ss); | |
12844 | sigaction(SIGINT, &sa, (struct sigaction *) 0); | |
12845 | sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); | |
f73dda09 | 12846 | |
7175a77f CR |
12847 | ; |
12848 | return 0; | |
12849 | } | |
12850 | _ACEOF | |
1b1fe467 | 12851 | if ac_fn_c_try_link "$LINENO"; then : |
7175a77f | 12852 | bash_cv_signal_vintage=posix |
7f947b68 | 12853 | else |
a82a04b3 | 12854 | |
1b1fe467 | 12855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
12856 | /* end confdefs.h. */ |
12857 | #include <signal.h> | |
12858 | int | |
12859 | main () | |
12860 | { | |
2dead0c4 | 12861 | |
7175a77f CR |
12862 | int mask = sigmask(SIGINT); |
12863 | sigsetmask(mask); sigblock(mask); sigpause(mask); | |
7f947b68 | 12864 | |
7175a77f CR |
12865 | ; |
12866 | return 0; | |
12867 | } | |
12868 | _ACEOF | |
1b1fe467 | 12869 | if ac_fn_c_try_link "$LINENO"; then : |
7175a77f | 12870 | bash_cv_signal_vintage=4.2bsd |
7f947b68 CR |
12871 | else |
12872 | ||
1b1fe467 | 12873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 12874 | /* end confdefs.h. */ |
2dead0c4 | 12875 | |
7175a77f CR |
12876 | #include <signal.h> |
12877 | RETSIGTYPE foo() { } | |
12878 | int | |
12879 | main () | |
12880 | { | |
2dead0c4 | 12881 | |
7175a77f CR |
12882 | int mask = sigmask(SIGINT); |
12883 | sigset(SIGINT, foo); sigrelse(SIGINT); | |
12884 | sighold(SIGINT); sigpause(SIGINT); | |
7f947b68 | 12885 | |
7175a77f CR |
12886 | ; |
12887 | return 0; | |
12888 | } | |
e3db237e | 12889 | _ACEOF |
1b1fe467 | 12890 | if ac_fn_c_try_link "$LINENO"; then : |
7175a77f CR |
12891 | bash_cv_signal_vintage=svr3 |
12892 | else | |
1b1fe467 | 12893 | bash_cv_signal_vintage=v7 |
abe2eb5b | 12894 | |
2dead0c4 | 12895 | fi |
1b1fe467 CR |
12896 | rm -f core conftest.err conftest.$ac_objext \ |
12897 | conftest$ac_exeext conftest.$ac_ext | |
7f947b68 | 12898 | |
7175a77f | 12899 | fi |
1b1fe467 CR |
12900 | rm -f core conftest.err conftest.$ac_objext \ |
12901 | conftest$ac_exeext conftest.$ac_ext | |
7f947b68 | 12902 | |
7175a77f | 12903 | fi |
1b1fe467 CR |
12904 | rm -f core conftest.err conftest.$ac_objext \ |
12905 | conftest$ac_exeext conftest.$ac_ext | |
7610e0c5 | 12906 | |
2dead0c4 | 12907 | fi |
7610e0c5 | 12908 | |
1b1fe467 | 12909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5 |
7175a77f CR |
12910 | $as_echo "$bash_cv_signal_vintage" >&6; } |
12911 | if test "$bash_cv_signal_vintage" = posix; then | |
1b1fe467 | 12912 | $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h |
2dead0c4 | 12913 | |
7175a77f | 12914 | elif test "$bash_cv_signal_vintage" = "4.2bsd"; then |
1b1fe467 | 12915 | $as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h |
e3db237e | 12916 | |
7175a77f | 12917 | elif test "$bash_cv_signal_vintage" = svr3; then |
1b1fe467 | 12918 | $as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h |
abe2eb5b | 12919 | |
c920c360 CR |
12920 | fi |
12921 | ||
abe2eb5b | 12922 | |
1b1fe467 | 12923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5 |
7175a77f | 12924 | $as_echo_n "checking for sys_errlist and sys_nerr... " >&6; } |
1b1fe467 | 12925 | if ${bash_cv_sys_errlist+:} false; then : |
7175a77f | 12926 | $as_echo_n "(cached) " >&6 |
7f947b68 | 12927 | else |
1b1fe467 | 12928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
12929 | /* end confdefs.h. */ |
12930 | #include <errno.h> | |
12931 | int | |
12932 | main () | |
12933 | { | |
12934 | extern char *sys_errlist[]; | |
12935 | extern int sys_nerr; | |
12936 | char *msg = sys_errlist[sys_nerr - 1]; | |
12937 | ; | |
12938 | return 0; | |
12939 | } | |
12940 | _ACEOF | |
1b1fe467 | 12941 | if ac_fn_c_try_link "$LINENO"; then : |
7175a77f | 12942 | bash_cv_sys_errlist=yes |
2dead0c4 | 12943 | else |
1b1fe467 | 12944 | bash_cv_sys_errlist=no |
7175a77f | 12945 | fi |
1b1fe467 CR |
12946 | rm -f core conftest.err conftest.$ac_objext \ |
12947 | conftest$ac_exeext conftest.$ac_ext | |
2dead0c4 | 12948 | fi |
1b1fe467 | 12949 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5 |
7175a77f CR |
12950 | $as_echo "$bash_cv_sys_errlist" >&6; } |
12951 | if test $bash_cv_sys_errlist = yes; then | |
1b1fe467 | 12952 | $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h |
2dead0c4 CR |
12953 | |
12954 | fi | |
12955 | ||
12956 | ||
1b1fe467 | 12957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5 |
7175a77f | 12958 | $as_echo_n "checking for sys_siglist in system C library... " >&6; } |
1b1fe467 | 12959 | if ${bash_cv_sys_siglist+:} false; then : |
2dead0c4 CR |
12960 | $as_echo_n "(cached) " >&6 |
12961 | else | |
1b1fe467 CR |
12962 | if test "$cross_compiling" = yes; then : |
12963 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 | |
7175a77f CR |
12964 | $as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} |
12965 | bash_cv_sys_siglist=no | |
12966 | else | |
1b1fe467 | 12967 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e3db237e | 12968 | /* end confdefs.h. */ |
7f947b68 | 12969 | |
7175a77f CR |
12970 | #include <sys/types.h> |
12971 | #include <signal.h> | |
12972 | #ifdef HAVE_UNISTD_H | |
12973 | #include <unistd.h> | |
7f947b68 | 12974 | #endif |
7175a77f CR |
12975 | #if !HAVE_DECL_SYS_SIGLIST |
12976 | extern char *sys_siglist[]; | |
7f947b68 | 12977 | #endif |
7175a77f CR |
12978 | main() |
12979 | { | |
12980 | char *msg = sys_siglist[2]; | |
12981 | exit(msg == 0); | |
12982 | } | |
5e4a95c7 | 12983 | _ACEOF |
1b1fe467 | 12984 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f | 12985 | bash_cv_sys_siglist=yes |
f73dda09 | 12986 | else |
1b1fe467 | 12987 | bash_cv_sys_siglist=no |
7175a77f | 12988 | fi |
1b1fe467 CR |
12989 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12990 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
e3db237e CR |
12991 | fi |
12992 | ||
7f947b68 | 12993 | fi |
7f947b68 | 12994 | |
1b1fe467 | 12995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5 |
7175a77f CR |
12996 | $as_echo "$bash_cv_sys_siglist" >&6; } |
12997 | if test $bash_cv_sys_siglist = yes; then | |
1b1fe467 | 12998 | $as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h |
e3db237e | 12999 | |
2dead0c4 | 13000 | fi |
e3db237e | 13001 | |
1b1fe467 | 13002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5 |
7175a77f | 13003 | $as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; } |
1b1fe467 | 13004 | if ${bash_cv_decl_under_sys_siglist+:} false; then : |
2dead0c4 CR |
13005 | $as_echo_n "(cached) " >&6 |
13006 | else | |
1b1fe467 | 13007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e3db237e | 13008 | /* end confdefs.h. */ |
7f947b68 | 13009 | |
2dead0c4 | 13010 | #include <sys/types.h> |
7175a77f CR |
13011 | #include <signal.h> |
13012 | #ifdef HAVE_UNISTD_H | |
13013 | #include <unistd.h> | |
13014 | #endif | |
e3db237e CR |
13015 | int |
13016 | main () | |
13017 | { | |
7175a77f | 13018 | char *msg = _sys_siglist[2]; |
e3db237e CR |
13019 | ; |
13020 | return 0; | |
13021 | } | |
13022 | _ACEOF | |
1b1fe467 | 13023 | if ac_fn_c_try_compile "$LINENO"; then : |
7175a77f | 13024 | bash_cv_decl_under_sys_siglist=yes |
e3db237e | 13025 | else |
1b1fe467 | 13026 | bash_cv_decl_under_sys_siglist=no |
2dead0c4 | 13027 | fi |
7175a77f | 13028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
e3db237e | 13029 | fi |
1b1fe467 | 13030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5 |
7175a77f CR |
13031 | $as_echo "$bash_cv_decl_under_sys_siglist" >&6; } |
13032 | if test $bash_cv_decl_under_sys_siglist = yes; then | |
1b1fe467 | 13033 | $as_echo "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h |
e3db237e | 13034 | |
7f947b68 | 13035 | fi |
2dead0c4 CR |
13036 | |
13037 | ||
1b1fe467 | 13038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5 |
7175a77f | 13039 | $as_echo_n "checking for _sys_siglist in system C library... " >&6; } |
1b1fe467 | 13040 | if ${bash_cv_under_sys_siglist+:} false; then : |
2dead0c4 | 13041 | $as_echo_n "(cached) " >&6 |
e3db237e | 13042 | else |
1b1fe467 CR |
13043 | if test "$cross_compiling" = yes; then : |
13044 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 | |
7175a77f CR |
13045 | $as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} |
13046 | bash_cv_under_sys_siglist=no | |
7f947b68 | 13047 | else |
1b1fe467 | 13048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2dead0c4 | 13049 | /* end confdefs.h. */ |
7f947b68 | 13050 | |
7175a77f CR |
13051 | #include <sys/types.h> |
13052 | #include <signal.h> | |
13053 | #ifdef HAVE_UNISTD_H | |
13054 | #include <unistd.h> | |
2dead0c4 | 13055 | #endif |
7175a77f CR |
13056 | #ifndef UNDER_SYS_SIGLIST_DECLARED |
13057 | extern char *_sys_siglist[]; | |
2dead0c4 | 13058 | #endif |
7175a77f CR |
13059 | main() |
13060 | { | |
13061 | char *msg = (char *)_sys_siglist[2]; | |
13062 | exit(msg == 0); | |
7f947b68 | 13063 | } |
2dead0c4 | 13064 | _ACEOF |
1b1fe467 | 13065 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f | 13066 | bash_cv_under_sys_siglist=yes |
2dead0c4 | 13067 | else |
1b1fe467 | 13068 | bash_cv_under_sys_siglist=no |
71412226 | 13069 | fi |
1b1fe467 CR |
13070 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13071 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5e4a95c7 | 13072 | fi |
b709b946 | 13073 | |
abe2eb5b CR |
13074 | fi |
13075 | ||
1b1fe467 | 13076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5 |
7175a77f CR |
13077 | $as_echo "$bash_cv_under_sys_siglist" >&6; } |
13078 | if test $bash_cv_under_sys_siglist = yes; then | |
1b1fe467 | 13079 | $as_echo "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h |
abe2eb5b | 13080 | |
7f947b68 | 13081 | fi |
abe2eb5b | 13082 | |
7175a77f | 13083 | |
1b1fe467 | 13084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5 |
7175a77f | 13085 | $as_echo_n "checking whether signal handlers are of type void... " >&6; } |
1b1fe467 | 13086 | if ${bash_cv_void_sighandler+:} false; then : |
abe2eb5b CR |
13087 | $as_echo_n "(cached) " >&6 |
13088 | else | |
1b1fe467 | 13089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b CR |
13090 | /* end confdefs.h. */ |
13091 | #include <sys/types.h> | |
7175a77f CR |
13092 | #include <signal.h> |
13093 | #ifdef signal | |
13094 | #undef signal | |
13095 | #endif | |
13096 | #ifdef __cplusplus | |
13097 | extern "C" | |
13098 | #endif | |
13099 | void (*signal ()) (); | |
13100 | int | |
13101 | main () | |
7f947b68 | 13102 | { |
7175a77f CR |
13103 | int i; |
13104 | ; | |
13105 | return 0; | |
7f947b68 | 13106 | } |
abe2eb5b | 13107 | _ACEOF |
1b1fe467 | 13108 | if ac_fn_c_try_compile "$LINENO"; then : |
7175a77f | 13109 | bash_cv_void_sighandler=yes |
abe2eb5b | 13110 | else |
1b1fe467 | 13111 | bash_cv_void_sighandler=no |
abe2eb5b | 13112 | fi |
7175a77f | 13113 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1b1fe467 CR |
13114 | fi |
13115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5 | |
13116 | $as_echo "$bash_cv_void_sighandler" >&6; } | |
13117 | if test $bash_cv_void_sighandler = yes; then | |
13118 | $as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h | |
2dead0c4 | 13119 | |
7175a77f | 13120 | fi |
2dead0c4 CR |
13121 | |
13122 | ||
c920c360 | 13123 | |
1b1fe467 CR |
13124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 |
13125 | $as_echo_n "checking for clock_t... " >&6; } | |
13126 | if ${bash_cv_type_clock_t+:} false; then : | |
7175a77f | 13127 | $as_echo_n "(cached) " >&6 |
c920c360 | 13128 | else |
1b1fe467 | 13129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f CR |
13130 | /* end confdefs.h. */ |
13131 | #include <sys/types.h> | |
13132 | #if STDC_HEADERS | |
13133 | #include <stdlib.h> | |
13134 | #include <stddef.h> | |
13135 | #endif | |
13136 | #if HAVE_INTTYPES_H | |
13137 | #include <inttypes.h> | |
13138 | #endif | |
13139 | #if HAVE_STDINT_H | |
13140 | #include <stdint.h> | |
13141 | #endif | |
1b1fe467 | 13142 | #include <sys/times.h> |
e3db237e | 13143 | |
7175a77f CR |
13144 | _ACEOF |
13145 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 CR |
13146 | $EGREP "clock_t" >/dev/null 2>&1; then : |
13147 | bash_cv_type_clock_t=yes | |
7175a77f | 13148 | else |
1b1fe467 | 13149 | bash_cv_type_clock_t=no |
7f947b68 | 13150 | fi |
7175a77f | 13151 | rm -f conftest* |
71412226 | 13152 | |
2dead0c4 | 13153 | fi |
71412226 | 13154 | |
1b1fe467 CR |
13155 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5 |
13156 | $as_echo "$bash_cv_type_clock_t" >&6; } | |
7f947b68 | 13157 | |
1b1fe467 | 13158 | if test $bash_cv_type_clock_t = no; then |
7175a77f | 13159 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 13160 | #define clock_t long |
7175a77f | 13161 | _ACEOF |
7f947b68 | 13162 | |
abe2eb5b | 13163 | fi |
7f947b68 CR |
13164 | |
13165 | ||
7175a77f | 13166 | |
1b1fe467 CR |
13167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5 |
13168 | $as_echo_n "checking for sigset_t... " >&6; } | |
13169 | if ${bash_cv_type_sigset_t+:} false; then : | |
c920c360 CR |
13170 | $as_echo_n "(cached) " >&6 |
13171 | else | |
1b1fe467 | 13172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
c920c360 | 13173 | /* end confdefs.h. */ |
7175a77f CR |
13174 | #include <sys/types.h> |
13175 | #if STDC_HEADERS | |
13176 | #include <stdlib.h> | |
13177 | #include <stddef.h> | |
13178 | #endif | |
13179 | #if HAVE_INTTYPES_H | |
13180 | #include <inttypes.h> | |
13181 | #endif | |
13182 | #if HAVE_STDINT_H | |
13183 | #include <stdint.h> | |
13184 | #endif | |
1b1fe467 | 13185 | #include <signal.h> |
7175a77f | 13186 | |
abe2eb5b | 13187 | _ACEOF |
7175a77f | 13188 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 CR |
13189 | $EGREP "sigset_t" >/dev/null 2>&1; then : |
13190 | bash_cv_type_sigset_t=yes | |
abe2eb5b | 13191 | else |
1b1fe467 | 13192 | bash_cv_type_sigset_t=no |
7f947b68 | 13193 | fi |
7175a77f CR |
13194 | rm -f conftest* |
13195 | ||
7f947b68 | 13196 | fi |
7175a77f | 13197 | |
1b1fe467 CR |
13198 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5 |
13199 | $as_echo "$bash_cv_type_sigset_t" >&6; } | |
7175a77f | 13200 | |
1b1fe467 | 13201 | if test $bash_cv_type_sigset_t = no; then |
7175a77f | 13202 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 13203 | #define sigset_t int |
7175a77f | 13204 | _ACEOF |
e3db237e | 13205 | |
7f947b68 | 13206 | fi |
e3db237e | 13207 | |
7175a77f | 13208 | |
7f947b68 | 13209 | |
73a146be CR |
13210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5 |
13211 | $as_echo_n "checking for sig_atomic_t... " >&6; } | |
13212 | if ${bash_cv_type_sig_atomic_t+:} false; then : | |
13213 | $as_echo_n "(cached) " >&6 | |
13214 | else | |
13215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13216 | /* end confdefs.h. */ | |
13217 | #include <sys/types.h> | |
13218 | #if STDC_HEADERS | |
13219 | #include <stdlib.h> | |
13220 | #include <stddef.h> | |
13221 | #endif | |
13222 | #if HAVE_INTTYPES_H | |
13223 | #include <inttypes.h> | |
13224 | #endif | |
13225 | #if HAVE_STDINT_H | |
13226 | #include <stdint.h> | |
13227 | #endif | |
13228 | #include <signal.h> | |
13229 | ||
13230 | _ACEOF | |
13231 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13232 | $EGREP "sig_atomic_t" >/dev/null 2>&1; then : | |
13233 | bash_cv_type_sig_atomic_t=yes | |
13234 | else | |
13235 | bash_cv_type_sig_atomic_t=no | |
13236 | fi | |
13237 | rm -f conftest* | |
13238 | ||
13239 | fi | |
13240 | ||
13241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5 | |
13242 | $as_echo "$bash_cv_type_sig_atomic_t" >&6; } | |
13243 | ||
13244 | if test $bash_cv_type_sig_atomic_t = no; then | |
13245 | cat >>confdefs.h <<_ACEOF | |
13246 | #define sig_atomic_t int | |
13247 | _ACEOF | |
13248 | ||
13249 | fi | |
13250 | ||
13251 | ||
13252 | ||
1b1fe467 CR |
13253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quad_t" >&5 |
13254 | $as_echo_n "checking for quad_t... " >&6; } | |
13255 | if ${bash_cv_type_quad_t+:} false; then : | |
7f947b68 | 13256 | $as_echo_n "(cached) " >&6 |
abe2eb5b | 13257 | else |
1b1fe467 | 13258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b | 13259 | /* end confdefs.h. */ |
abe2eb5b | 13260 | #include <sys/types.h> |
7175a77f CR |
13261 | #if STDC_HEADERS |
13262 | #include <stdlib.h> | |
13263 | #include <stddef.h> | |
7f947b68 | 13264 | #endif |
7175a77f CR |
13265 | #if HAVE_INTTYPES_H |
13266 | #include <inttypes.h> | |
7f947b68 | 13267 | #endif |
7175a77f CR |
13268 | #if HAVE_STDINT_H |
13269 | #include <stdint.h> | |
13270 | #endif | |
1b1fe467 | 13271 | |
7175a77f | 13272 | |
abe2eb5b | 13273 | _ACEOF |
7175a77f | 13274 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 CR |
13275 | $EGREP "quad_t" >/dev/null 2>&1; then : |
13276 | bash_cv_type_quad_t=yes | |
7610e0c5 | 13277 | else |
1b1fe467 | 13278 | bash_cv_type_quad_t=no |
2dead0c4 | 13279 | fi |
7175a77f | 13280 | rm -f conftest* |
2dead0c4 | 13281 | |
abe2eb5b CR |
13282 | fi |
13283 | ||
1b1fe467 CR |
13284 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_quad_t" >&5 |
13285 | $as_echo "$bash_cv_type_quad_t" >&6; } | |
13286 | if test $bash_cv_type_quad_t = yes; then | |
13287 | $as_echo "#define HAVE_QUAD_T 1" >>confdefs.h | |
7175a77f CR |
13288 | |
13289 | fi | |
1b1fe467 | 13290 | if test $bash_cv_type_quad_t = no; then |
7175a77f | 13291 | cat >>confdefs.h <<_ACEOF |
1b1fe467 | 13292 | #define quad_t long |
7175a77f | 13293 | _ACEOF |
2dead0c4 | 13294 | |
abe2eb5b | 13295 | fi |
2dead0c4 | 13296 | |
7f947b68 CR |
13297 | |
13298 | ||
1b1fe467 CR |
13299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 |
13300 | $as_echo_n "checking for intmax_t... " >&6; } | |
13301 | if ${bash_cv_type_intmax_t+:} false; then : | |
13302 | $as_echo_n "(cached) " >&6 | |
7f947b68 | 13303 | else |
1b1fe467 | 13304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
abe2eb5b | 13305 | /* end confdefs.h. */ |
7f947b68 | 13306 | #include <sys/types.h> |
1b1fe467 CR |
13307 | #if STDC_HEADERS |
13308 | #include <stdlib.h> | |
13309 | #include <stddef.h> | |
13310 | #endif | |
13311 | #if HAVE_INTTYPES_H | |
13312 | #include <inttypes.h> | |
13313 | #endif | |
13314 | #if HAVE_STDINT_H | |
13315 | #include <stdint.h> | |
7175a77f | 13316 | #endif |
7175a77f CR |
13317 | |
13318 | ||
1b1fe467 CR |
13319 | _ACEOF |
13320 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13321 | $EGREP "intmax_t" >/dev/null 2>&1; then : | |
13322 | bash_cv_type_intmax_t=yes | |
13323 | else | |
13324 | bash_cv_type_intmax_t=no | |
7f947b68 | 13325 | fi |
1b1fe467 | 13326 | rm -f conftest* |
7175a77f | 13327 | |
abe2eb5b CR |
13328 | fi |
13329 | ||
1b1fe467 CR |
13330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_intmax_t" >&5 |
13331 | $as_echo "$bash_cv_type_intmax_t" >&6; } | |
7175a77f | 13332 | |
1b1fe467 CR |
13333 | if test $bash_cv_type_intmax_t = no; then |
13334 | cat >>confdefs.h <<_ACEOF | |
13335 | #define intmax_t $bash_cv_type_long_long | |
7175a77f | 13336 | _ACEOF |
abe2eb5b | 13337 | |
7f947b68 | 13338 | fi |
abe2eb5b | 13339 | |
7f947b68 | 13340 | |
71412226 | 13341 | |
1b1fe467 CR |
13342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintmax_t" >&5 |
13343 | $as_echo_n "checking for uintmax_t... " >&6; } | |
13344 | if ${bash_cv_type_uintmax_t+:} false; then : | |
13345 | $as_echo_n "(cached) " >&6 | |
7175a77f | 13346 | else |
1b1fe467 | 13347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7175a77f | 13348 | /* end confdefs.h. */ |
1b1fe467 CR |
13349 | #include <sys/types.h> |
13350 | #if STDC_HEADERS | |
13351 | #include <stdlib.h> | |
13352 | #include <stddef.h> | |
13353 | #endif | |
13354 | #if HAVE_INTTYPES_H | |
13355 | #include <inttypes.h> | |
13356 | #endif | |
13357 | #if HAVE_STDINT_H | |
13358 | #include <stdint.h> | |
13359 | #endif | |
7f947b68 CR |
13360 | |
13361 | ||
1b1fe467 CR |
13362 | _ACEOF |
13363 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
13364 | $EGREP "uintmax_t" >/dev/null 2>&1; then : | |
13365 | bash_cv_type_uintmax_t=yes | |
7f947b68 | 13366 | else |
1b1fe467 | 13367 | bash_cv_type_uintmax_t=no |
7f947b68 | 13368 | fi |
1b1fe467 | 13369 | rm -f conftest* |
c920c360 CR |
13370 | |
13371 | fi | |
13372 | ||
1b1fe467 CR |
13373 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_uintmax_t" >&5 |
13374 | $as_echo "$bash_cv_type_uintmax_t" >&6; } | |
7f947b68 | 13375 | |
1b1fe467 CR |
13376 | if test $bash_cv_type_uintmax_t = no; then |
13377 | cat >>confdefs.h <<_ACEOF | |
13378 | #define uintmax_t $bash_cv_type_unsigned_long_long | |
abe2eb5b | 13379 | _ACEOF |
7f947b68 CR |
13380 | |
13381 | fi | |
13382 | ||
1b1fe467 CR |
13383 | if test "$ac_cv_header_sys_socket_h" = "yes"; then |
13384 | ||
13385 | ||
13386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 | |
13387 | $as_echo_n "checking for socklen_t... " >&6; } | |
13388 | if ${bash_cv_type_socklen_t+:} false; then : | |
13389 | $as_echo_n "(cached) " >&6 | |
7f947b68 | 13390 | else |
1b1fe467 | 13391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
e3db237e | 13392 | /* end confdefs.h. */ |
1b1fe467 CR |
13393 | #include <sys/types.h> |
13394 | #if STDC_HEADERS | |
2dead0c4 | 13395 | #include <stdlib.h> |
1b1fe467 CR |
13396 | #include <stddef.h> |
13397 | #endif | |
13398 | #if HAVE_INTTYPES_H | |
13399 | #include <inttypes.h> | |
13400 | #endif | |
13401 | #if HAVE_STDINT_H | |
13402 | #include <stdint.h> | |
13403 | #endif | |
13404 | #include <sys/socket.h> | |
2dead0c4 CR |
13405 | |
13406 | _ACEOF | |
1b1fe467 CR |
13407 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13408 | $EGREP "socklen_t" >/dev/null 2>&1; then : | |
13409 | bash_cv_type_socklen_t=yes | |
2dead0c4 | 13410 | else |
1b1fe467 | 13411 | bash_cv_type_socklen_t=no |
7175a77f | 13412 | fi |
1b1fe467 | 13413 | rm -f conftest* |
2dead0c4 | 13414 | |
1b1fe467 | 13415 | fi |
abe2eb5b | 13416 | |
1b1fe467 CR |
13417 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5 |
13418 | $as_echo "$bash_cv_type_socklen_t" >&6; } | |
13419 | if test $bash_cv_type_socklen_t = yes; then | |
13420 | $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h | |
7175a77f | 13421 | |
1b1fe467 CR |
13422 | fi |
13423 | if test $bash_cv_type_socklen_t = no; then | |
13424 | cat >>confdefs.h <<_ACEOF | |
c2fa6583 | 13425 | #define socklen_t unsigned int |
2dead0c4 | 13426 | _ACEOF |
c920c360 | 13427 | |
1b1fe467 | 13428 | fi |
c920c360 | 13429 | |
1b1fe467 CR |
13430 | fi |
13431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size and type of struct rlimit fields" >&5 | |
13432 | $as_echo_n "checking for size and type of struct rlimit fields... " >&6; } | |
13433 | if ${bash_cv_type_rlimit+:} false; then : | |
2dead0c4 CR |
13434 | $as_echo_n "(cached) " >&6 |
13435 | else | |
1b1fe467 | 13436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2dead0c4 CR |
13437 | /* end confdefs.h. */ |
13438 | #include <sys/types.h> | |
1b1fe467 | 13439 | #include <sys/resource.h> |
7175a77f CR |
13440 | int |
13441 | main () | |
13442 | { | |
1b1fe467 | 13443 | rlim_t xxx; |
7175a77f CR |
13444 | ; |
13445 | return 0; | |
13446 | } | |
7610e0c5 | 13447 | _ACEOF |
1b1fe467 CR |
13448 | if ac_fn_c_try_compile "$LINENO"; then : |
13449 | bash_cv_type_rlimit=rlim_t | |
e3db237e | 13450 | else |
71412226 | 13451 | |
1b1fe467 CR |
13452 | if test "$cross_compiling" = yes; then : |
13453 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5 | |
13454 | $as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;} | |
13455 | bash_cv_type_rlimit=long | |
13456 | else | |
13457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7f947b68 | 13458 | /* end confdefs.h. */ |
7175a77f | 13459 | |
c920c360 | 13460 | #include <sys/types.h> |
1b1fe467 CR |
13461 | #include <sys/time.h> |
13462 | #include <sys/resource.h> | |
13463 | main() | |
7175a77f | 13464 | { |
1b1fe467 CR |
13465 | #ifdef HAVE_QUAD_T |
13466 | struct rlimit rl; | |
13467 | if (sizeof(rl.rlim_cur) == sizeof(quad_t)) | |
13468 | exit(0); | |
13469 | #endif | |
13470 | exit(1); | |
7175a77f | 13471 | } |
e3db237e | 13472 | _ACEOF |
1b1fe467 CR |
13473 | if ac_fn_c_try_run "$LINENO"; then : |
13474 | bash_cv_type_rlimit=quad_t | |
e3db237e | 13475 | else |
1b1fe467 | 13476 | bash_cv_type_rlimit=long |
e3db237e | 13477 | fi |
1b1fe467 CR |
13478 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13479 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7175a77f | 13480 | fi |
7f947b68 | 13481 | |
7175a77f | 13482 | fi |
1b1fe467 | 13483 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2dead0c4 CR |
13484 | |
13485 | fi | |
13486 | ||
1b1fe467 CR |
13487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5 |
13488 | $as_echo "$bash_cv_type_rlimit" >&6; } | |
13489 | if test $bash_cv_type_rlimit = quad_t; then | |
13490 | $as_echo "#define RLIMTYPE quad_t" >>confdefs.h | |
2dead0c4 | 13491 | |
1b1fe467 CR |
13492 | elif test $bash_cv_type_rlimit = rlim_t; then |
13493 | $as_echo "#define RLIMTYPE rlim_t" >>confdefs.h | |
2dead0c4 | 13494 | |
1b1fe467 | 13495 | fi |
7f947b68 | 13496 | |
2dead0c4 | 13497 | |
1b1fe467 CR |
13498 | # The cast to long int works around a bug in the HP C Compiler |
13499 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
13500 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
13501 | # This bug is HP SR number 8606223364. | |
13502 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 | |
13503 | $as_echo_n "checking size of intmax_t... " >&6; } | |
13504 | if ${ac_cv_sizeof_intmax_t+:} false; then : | |
13505 | $as_echo_n "(cached) " >&6 | |
13506 | else | |
13507 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default"; then : | |
2dead0c4 | 13508 | |
abe2eb5b | 13509 | else |
1b1fe467 CR |
13510 | if test "$ac_cv_type_intmax_t" = yes; then |
13511 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
13512 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
13513 | as_fn_error 77 "cannot compute sizeof (intmax_t) | |
13514 | See \`config.log' for more details" "$LINENO" 5; } | |
13515 | else | |
13516 | ac_cv_sizeof_intmax_t=0 | |
13517 | fi | |
13518 | fi | |
c920c360 | 13519 | |
1b1fe467 CR |
13520 | fi |
13521 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 | |
13522 | $as_echo "$ac_cv_sizeof_intmax_t" >&6; } | |
2dead0c4 | 13523 | |
7175a77f CR |
13524 | |
13525 | ||
1b1fe467 CR |
13526 | cat >>confdefs.h <<_ACEOF |
13527 | #define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t | |
13528 | _ACEOF | |
7f947b68 | 13529 | |
7f947b68 | 13530 | |
7f947b68 | 13531 | |
1b1fe467 CR |
13532 | |
13533 | ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" " | |
13534 | #include <sys/types.h> | |
13535 | #include <termios.h> | |
13536 | ||
13537 | " | |
13538 | if test "x$ac_cv_member_struct_termios_c_line" = xyes; then : | |
13539 | $as_echo "#define TERMIOS_LDISC 1" >>confdefs.h | |
13540 | ||
7175a77f | 13541 | fi |
1b1fe467 CR |
13542 | |
13543 | ||
13544 | ||
13545 | ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" " | |
13546 | #include <sys/types.h> | |
13547 | #include <termio.h> | |
13548 | ||
13549 | " | |
13550 | if test "x$ac_cv_member_struct_termio_c_line" = xyes; then : | |
13551 | $as_echo "#define TERMIO_LDISC 1" >>confdefs.h | |
7f947b68 | 13552 | |
ccc6cda3 JA |
13553 | fi |
13554 | ||
a82a04b3 CR |
13555 | |
13556 | ||
1b1fe467 | 13557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5 |
dd4f3dd8 | 13558 | $as_echo_n "checking for struct dirent.d_ino... " >&6; } |
1b1fe467 | 13559 | if ${bash_cv_dirent_has_dino+:} false; then : |
dd4f3dd8 | 13560 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 13561 | else |
1b1fe467 | 13562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13563 | /* end confdefs.h. */ |
ccc6cda3 JA |
13564 | |
13565 | #include <stdio.h> | |
13566 | #include <sys/types.h> | |
13567 | #ifdef HAVE_UNISTD_H | |
13568 | # include <unistd.h> | |
13569 | #endif /* HAVE_UNISTD_H */ | |
13570 | #if defined(HAVE_DIRENT_H) | |
13571 | # include <dirent.h> | |
13572 | #else | |
13573 | # define dirent direct | |
13574 | # ifdef HAVE_SYS_NDIR_H | |
13575 | # include <sys/ndir.h> | |
13576 | # endif /* SYSNDIR */ | |
13577 | # ifdef HAVE_SYS_DIR_H | |
13578 | # include <sys/dir.h> | |
13579 | # endif /* SYSDIR */ | |
13580 | # ifdef HAVE_NDIR_H | |
13581 | # include <ndir.h> | |
13582 | # endif | |
13583 | #endif /* HAVE_DIRENT_H */ | |
13584 | ||
f73dda09 JA |
13585 | int |
13586 | main () | |
13587 | { | |
ccc6cda3 JA |
13588 | |
13589 | struct dirent d; int z; z = d.d_ino; | |
13590 | ||
f73dda09 JA |
13591 | ; |
13592 | return 0; | |
13593 | } | |
13594 | _ACEOF | |
1b1fe467 | 13595 | if ac_fn_c_try_compile "$LINENO"; then : |
ccc6cda3 JA |
13596 | bash_cv_dirent_has_dino=yes |
13597 | else | |
1b1fe467 | 13598 | bash_cv_dirent_has_dino=no |
ccc6cda3 | 13599 | fi |
b709b946 | 13600 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ccc6cda3 JA |
13601 | fi |
13602 | ||
1b1fe467 | 13603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5 |
dd4f3dd8 | 13604 | $as_echo "$bash_cv_dirent_has_dino" >&6; } |
ccc6cda3 | 13605 | if test $bash_cv_dirent_has_dino = yes; then |
1b1fe467 | 13606 | $as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h |
ccc6cda3 JA |
13607 | |
13608 | fi | |
13609 | ||
a82a04b3 | 13610 | |
1b1fe467 | 13611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5 |
dd4f3dd8 | 13612 | $as_echo_n "checking for struct dirent.d_fileno... " >&6; } |
1b1fe467 | 13613 | if ${bash_cv_dirent_has_d_fileno+:} false; then : |
dd4f3dd8 | 13614 | $as_echo_n "(cached) " >&6 |
d166f048 | 13615 | else |
1b1fe467 | 13616 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13617 | /* end confdefs.h. */ |
d166f048 JA |
13618 | |
13619 | #include <stdio.h> | |
13620 | #include <sys/types.h> | |
13621 | #ifdef HAVE_UNISTD_H | |
13622 | # include <unistd.h> | |
13623 | #endif /* HAVE_UNISTD_H */ | |
13624 | #if defined(HAVE_DIRENT_H) | |
13625 | # include <dirent.h> | |
13626 | #else | |
13627 | # define dirent direct | |
13628 | # ifdef HAVE_SYS_NDIR_H | |
13629 | # include <sys/ndir.h> | |
13630 | # endif /* SYSNDIR */ | |
13631 | # ifdef HAVE_SYS_DIR_H | |
13632 | # include <sys/dir.h> | |
13633 | # endif /* SYSDIR */ | |
13634 | # ifdef HAVE_NDIR_H | |
13635 | # include <ndir.h> | |
13636 | # endif | |
13637 | #endif /* HAVE_DIRENT_H */ | |
13638 | ||
f73dda09 JA |
13639 | int |
13640 | main () | |
13641 | { | |
d166f048 JA |
13642 | |
13643 | struct dirent d; int z; z = d.d_fileno; | |
13644 | ||
f73dda09 JA |
13645 | ; |
13646 | return 0; | |
13647 | } | |
5c26afb8 | 13648 | _ACEOF |
1b1fe467 | 13649 | if ac_fn_c_try_compile "$LINENO"; then : |
d166f048 JA |
13650 | bash_cv_dirent_has_d_fileno=yes |
13651 | else | |
1b1fe467 | 13652 | bash_cv_dirent_has_d_fileno=no |
d166f048 | 13653 | fi |
b709b946 | 13654 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d166f048 JA |
13655 | fi |
13656 | ||
1b1fe467 | 13657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5 |
dd4f3dd8 | 13658 | $as_echo "$bash_cv_dirent_has_d_fileno" >&6; } |
d166f048 | 13659 | if test $bash_cv_dirent_has_d_fileno = yes; then |
1b1fe467 | 13660 | $as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h |
4931aca6 CR |
13661 | |
13662 | fi | |
13663 | ||
a82a04b3 | 13664 | |
1b1fe467 | 13665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_namlen" >&5 |
dd4f3dd8 | 13666 | $as_echo_n "checking for struct dirent.d_namlen... " >&6; } |
1b1fe467 | 13667 | if ${bash_cv_dirent_has_d_namlen+:} false; then : |
dd4f3dd8 | 13668 | $as_echo_n "(cached) " >&6 |
4931aca6 | 13669 | else |
1b1fe467 | 13670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13671 | /* end confdefs.h. */ |
4931aca6 CR |
13672 | |
13673 | #include <stdio.h> | |
13674 | #include <sys/types.h> | |
13675 | #ifdef HAVE_UNISTD_H | |
13676 | # include <unistd.h> | |
13677 | #endif /* HAVE_UNISTD_H */ | |
13678 | #if defined(HAVE_DIRENT_H) | |
13679 | # include <dirent.h> | |
13680 | #else | |
13681 | # define dirent direct | |
13682 | # ifdef HAVE_SYS_NDIR_H | |
13683 | # include <sys/ndir.h> | |
13684 | # endif /* SYSNDIR */ | |
13685 | # ifdef HAVE_SYS_DIR_H | |
13686 | # include <sys/dir.h> | |
13687 | # endif /* SYSDIR */ | |
13688 | # ifdef HAVE_NDIR_H | |
13689 | # include <ndir.h> | |
13690 | # endif | |
13691 | #endif /* HAVE_DIRENT_H */ | |
13692 | ||
13693 | int | |
13694 | main () | |
13695 | { | |
13696 | ||
13697 | struct dirent d; int z; z = d.d_namlen; | |
13698 | ||
13699 | ; | |
13700 | return 0; | |
13701 | } | |
13702 | _ACEOF | |
1b1fe467 | 13703 | if ac_fn_c_try_compile "$LINENO"; then : |
4931aca6 CR |
13704 | bash_cv_dirent_has_d_namlen=yes |
13705 | else | |
1b1fe467 | 13706 | bash_cv_dirent_has_d_namlen=no |
4931aca6 | 13707 | fi |
b709b946 | 13708 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4931aca6 CR |
13709 | fi |
13710 | ||
1b1fe467 | 13711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_namlen" >&5 |
dd4f3dd8 | 13712 | $as_echo "$bash_cv_dirent_has_d_namlen" >&6; } |
4931aca6 | 13713 | if test $bash_cv_dirent_has_d_namlen = yes; then |
1b1fe467 | 13714 | $as_echo "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h |
d166f048 JA |
13715 | |
13716 | fi | |
13717 | ||
1b1fe467 | 13718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5 |
dd4f3dd8 | 13719 | $as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; } |
1b1fe467 | 13720 | if ${bash_cv_struct_winsize_header+:} false; then : |
dd4f3dd8 | 13721 | $as_echo_n "(cached) " >&6 |
d166f048 | 13722 | else |
1b1fe467 | 13723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13724 | /* end confdefs.h. */ |
d166f048 JA |
13725 | #include <sys/types.h> |
13726 | #include <sys/ioctl.h> | |
f73dda09 JA |
13727 | int |
13728 | main () | |
13729 | { | |
d166f048 | 13730 | struct winsize x; |
f73dda09 JA |
13731 | ; |
13732 | return 0; | |
13733 | } | |
13734 | _ACEOF | |
1b1fe467 | 13735 | if ac_fn_c_try_compile "$LINENO"; then : |
cce855bc JA |
13736 | bash_cv_struct_winsize_header=ioctl_h |
13737 | else | |
1b1fe467 | 13738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13739 | /* end confdefs.h. */ |
cce855bc JA |
13740 | #include <sys/types.h> |
13741 | #include <termios.h> | |
f73dda09 JA |
13742 | int |
13743 | main () | |
13744 | { | |
cce855bc | 13745 | struct winsize x; |
f73dda09 JA |
13746 | ; |
13747 | return 0; | |
13748 | } | |
13749 | _ACEOF | |
1b1fe467 | 13750 | if ac_fn_c_try_compile "$LINENO"; then : |
cce855bc | 13751 | bash_cv_struct_winsize_header=termios_h |
d166f048 | 13752 | else |
1b1fe467 | 13753 | bash_cv_struct_winsize_header=other |
cce855bc | 13754 | fi |
b709b946 | 13755 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
cce855bc | 13756 | |
d166f048 | 13757 | fi |
b709b946 | 13758 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d166f048 JA |
13759 | fi |
13760 | ||
cce855bc | 13761 | if test $bash_cv_struct_winsize_header = ioctl_h; then |
1b1fe467 | 13762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5 |
dd4f3dd8 | 13763 | $as_echo "sys/ioctl.h" >&6; } |
1b1fe467 | 13764 | $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h |
d166f048 | 13765 | |
cce855bc | 13766 | elif test $bash_cv_struct_winsize_header = termios_h; then |
1b1fe467 | 13767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5 |
dd4f3dd8 | 13768 | $as_echo "termios.h" >&6; } |
1b1fe467 | 13769 | $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h |
cce855bc JA |
13770 | |
13771 | else | |
1b1fe467 | 13772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 |
dd4f3dd8 | 13773 | $as_echo "not found" >&6; } |
d166f048 JA |
13774 | fi |
13775 | ||
1b1fe467 | 13776 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5 |
dd4f3dd8 | 13777 | $as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; } |
1b1fe467 | 13778 | if ${bash_cv_struct_timeval+:} false; then : |
dd4f3dd8 | 13779 | $as_echo_n "(cached) " >&6 |
bb70624e | 13780 | else |
f73dda09 | 13781 | |
1b1fe467 | 13782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13783 | /* end confdefs.h. */ |
bb70624e | 13784 | #include <sys/time.h> |
f73dda09 JA |
13785 | |
13786 | _ACEOF | |
bb70624e | 13787 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 | 13788 | $EGREP "struct timeval" >/dev/null 2>&1; then : |
bb70624e JA |
13789 | bash_cv_struct_timeval=yes |
13790 | else | |
1b1fe467 | 13791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13792 | /* end confdefs.h. */ |
bb70624e | 13793 | #include <time.h> |
f73dda09 JA |
13794 | |
13795 | _ACEOF | |
bb70624e | 13796 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 | 13797 | $EGREP "struct timeval" >/dev/null 2>&1; then : |
bb70624e JA |
13798 | bash_cv_struct_timeval=yes |
13799 | else | |
bb70624e JA |
13800 | bash_cv_struct_timeval=no |
13801 | fi | |
13802 | rm -f conftest* | |
13803 | ||
13804 | fi | |
13805 | rm -f conftest* | |
13806 | ||
a82a04b3 | 13807 | |
bb70624e JA |
13808 | fi |
13809 | ||
1b1fe467 | 13810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5 |
dd4f3dd8 | 13811 | $as_echo "$bash_cv_struct_timeval" >&6; } |
bb70624e | 13812 | if test $bash_cv_struct_timeval = yes; then |
1b1fe467 | 13813 | $as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h |
7175a77f | 13814 | |
7175a77f | 13815 | fi |
b709b946 | 13816 | |
1b1fe467 CR |
13817 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" |
13818 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : | |
f73dda09 | 13819 | |
a82a04b3 | 13820 | cat >>confdefs.h <<_ACEOF |
f73dda09 | 13821 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 |
a82a04b3 CR |
13822 | _ACEOF |
13823 | ||
f73dda09 JA |
13824 | |
13825 | fi | |
d166f048 | 13826 | |
1b1fe467 | 13827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 |
dd4f3dd8 | 13828 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } |
1b1fe467 | 13829 | if ${ac_cv_struct_tm+:} false; then : |
dd4f3dd8 | 13830 | $as_echo_n "(cached) " >&6 |
7117c2d2 | 13831 | else |
1b1fe467 | 13832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 13833 | /* end confdefs.h. */ |
7117c2d2 JA |
13834 | #include <sys/types.h> |
13835 | #include <time.h> | |
13836 | ||
13837 | int | |
13838 | main () | |
13839 | { | |
dd4f3dd8 CR |
13840 | struct tm tm; |
13841 | int *p = &tm.tm_sec; | |
13842 | return !p; | |
7117c2d2 JA |
13843 | ; |
13844 | return 0; | |
13845 | } | |
13846 | _ACEOF | |
1b1fe467 | 13847 | if ac_fn_c_try_compile "$LINENO"; then : |
7117c2d2 JA |
13848 | ac_cv_struct_tm=time.h |
13849 | else | |
1b1fe467 | 13850 | ac_cv_struct_tm=sys/time.h |
7117c2d2 | 13851 | fi |
b709b946 | 13852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7117c2d2 | 13853 | fi |
1b1fe467 | 13854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
dd4f3dd8 | 13855 | $as_echo "$ac_cv_struct_tm" >&6; } |
7117c2d2 JA |
13856 | if test $ac_cv_struct_tm = sys/time.h; then |
13857 | ||
1b1fe467 | 13858 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h |
7175a77f CR |
13859 | |
13860 | fi | |
13861 | ||
1b1fe467 | 13862 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
7175a77f CR |
13863 | #include <$ac_cv_struct_tm> |
13864 | ||
1b1fe467 CR |
13865 | " |
13866 | if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : | |
7175a77f CR |
13867 | |
13868 | cat >>confdefs.h <<_ACEOF | |
13869 | #define HAVE_STRUCT_TM_TM_ZONE 1 | |
13870 | _ACEOF | |
13871 | ||
13872 | ||
13873 | fi | |
13874 | ||
1b1fe467 CR |
13875 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
13876 | ||
13877 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h | |
d3ad40de | 13878 | |
1b1fe467 CR |
13879 | else |
13880 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
13881 | " | |
13882 | if test "x$ac_cv_have_decl_tzname" = xyes; then : | |
13883 | ac_have_decl=1 | |
13884 | else | |
13885 | ac_have_decl=0 | |
abe2eb5b CR |
13886 | fi |
13887 | ||
1b1fe467 CR |
13888 | cat >>confdefs.h <<_ACEOF |
13889 | #define HAVE_DECL_TZNAME $ac_have_decl | |
13890 | _ACEOF | |
9d6e5e30 | 13891 | |
1b1fe467 | 13892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
dd4f3dd8 | 13893 | $as_echo_n "checking for tzname... " >&6; } |
1b1fe467 | 13894 | if ${ac_cv_var_tzname+:} false; then : |
dd4f3dd8 | 13895 | $as_echo_n "(cached) " >&6 |
9d6e5e30 | 13896 | else |
1b1fe467 | 13897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9d6e5e30 CR |
13898 | /* end confdefs.h. */ |
13899 | #include <time.h> | |
b709b946 CR |
13900 | #if !HAVE_DECL_TZNAME |
13901 | extern char *tzname[]; | |
13902 | #endif | |
9d6e5e30 | 13903 | |
b709b946 CR |
13904 | int |
13905 | main () | |
13906 | { | |
13907 | return tzname[0][0]; | |
13908 | ; | |
13909 | return 0; | |
13910 | } | |
13911 | _ACEOF | |
1b1fe467 | 13912 | if ac_fn_c_try_link "$LINENO"; then : |
b709b946 CR |
13913 | ac_cv_var_tzname=yes |
13914 | else | |
1b1fe467 | 13915 | ac_cv_var_tzname=no |
b709b946 | 13916 | fi |
1b1fe467 CR |
13917 | rm -f core conftest.err conftest.$ac_objext \ |
13918 | conftest$ac_exeext conftest.$ac_ext | |
b709b946 | 13919 | fi |
1b1fe467 | 13920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
dd4f3dd8 | 13921 | $as_echo "$ac_cv_var_tzname" >&6; } |
b709b946 CR |
13922 | if test $ac_cv_var_tzname = yes; then |
13923 | ||
1b1fe467 | 13924 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h |
b709b946 CR |
13925 | |
13926 | fi | |
13927 | fi | |
13928 | ||
1b1fe467 | 13929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5 |
dd4f3dd8 | 13930 | $as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; } |
1b1fe467 | 13931 | if ${bash_cv_struct_timezone+:} false; then : |
dd4f3dd8 | 13932 | $as_echo_n "(cached) " >&6 |
b709b946 CR |
13933 | else |
13934 | ||
1b1fe467 | 13935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b709b946 CR |
13936 | /* end confdefs.h. */ |
13937 | #include <sys/time.h> | |
13938 | ||
13939 | _ACEOF | |
13940 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 13941 | $EGREP "struct timezone" >/dev/null 2>&1; then : |
b709b946 CR |
13942 | bash_cv_struct_timezone=yes |
13943 | else | |
1b1fe467 | 13944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b709b946 CR |
13945 | /* end confdefs.h. */ |
13946 | #include <time.h> | |
13947 | ||
13948 | _ACEOF | |
13949 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 13950 | $EGREP "struct timezone" >/dev/null 2>&1; then : |
d3a24ed2 CR |
13951 | bash_cv_struct_timezone=yes |
13952 | else | |
13953 | bash_cv_struct_timezone=no | |
13954 | fi | |
13955 | rm -f conftest* | |
13956 | ||
13957 | fi | |
13958 | rm -f conftest* | |
13959 | ||
a82a04b3 | 13960 | |
d3a24ed2 CR |
13961 | fi |
13962 | ||
1b1fe467 | 13963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5 |
dd4f3dd8 | 13964 | $as_echo "$bash_cv_struct_timezone" >&6; } |
d3a24ed2 | 13965 | if test $bash_cv_struct_timezone = yes; then |
1b1fe467 | 13966 | $as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h |
d3a24ed2 CR |
13967 | |
13968 | fi | |
13969 | ||
a82a04b3 | 13970 | |
1b1fe467 | 13971 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5 |
7d92f73f | 13972 | $as_echo_n "checking for offset of exit status in return status from wait... " >&6; } |
1b1fe467 | 13973 | if ${bash_cv_wexitstatus_offset+:} false; then : |
7d92f73f CR |
13974 | $as_echo_n "(cached) " >&6 |
13975 | else | |
1b1fe467 CR |
13976 | if test "$cross_compiling" = yes; then : |
13977 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5 | |
7d92f73f CR |
13978 | $as_echo "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;} |
13979 | bash_cv_wexitstatus_offset=0 | |
13980 | ||
13981 | else | |
1b1fe467 | 13982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
71412226 | 13983 | /* end confdefs.h. */ |
7d92f73f CR |
13984 | |
13985 | #include <stdlib.h> | |
13986 | #include <unistd.h> | |
13987 | ||
13988 | #include <sys/wait.h> | |
13989 | ||
13990 | main(c, v) | |
13991 | int c; | |
13992 | char **v; | |
13993 | { | |
13994 | pid_t pid, p; | |
13995 | int s, i, n; | |
13996 | ||
13997 | s = 0; | |
13998 | pid = fork(); | |
13999 | if (pid == 0) | |
14000 | exit (42); | |
14001 | ||
14002 | /* wait for the process */ | |
14003 | p = wait(&s); | |
14004 | if (p != pid) | |
14005 | exit (255); | |
14006 | ||
14007 | /* crack s */ | |
14008 | for (i = 0; i < (sizeof(s) - 8); i++) | |
14009 | { | |
14010 | n = (s >> i) & 0xff; | |
14011 | if (n == 42) | |
14012 | exit (i); | |
14013 | } | |
14014 | ||
7175a77f CR |
14015 | exit (254); |
14016 | } | |
14017 | ||
14018 | _ACEOF | |
1b1fe467 | 14019 | if ac_fn_c_try_run "$LINENO"; then : |
7175a77f CR |
14020 | bash_cv_wexitstatus_offset=0 |
14021 | else | |
1b1fe467 | 14022 | bash_cv_wexitstatus_offset=$? |
7175a77f | 14023 | fi |
1b1fe467 CR |
14024 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14025 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7175a77f CR |
14026 | fi |
14027 | ||
7175a77f CR |
14028 | fi |
14029 | ||
14030 | if test "$bash_cv_wexitstatus_offset" -gt 32 ; then | |
1b1fe467 CR |
14031 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5 |
14032 | $as_echo "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;} | |
14033 | bash_cv_wexitstatus_offset=0 | |
7d92f73f | 14034 | fi |
1b1fe467 CR |
14035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5 |
14036 | $as_echo "$bash_cv_wexitstatus_offset" >&6; } | |
7d92f73f CR |
14037 | |
14038 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 14039 | #define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset |
7d92f73f CR |
14040 | _ACEOF |
14041 | ||
1b1fe467 CR |
14042 | |
14043 | ||
14044 | ||
14045 | ||
14046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 | |
14047 | $as_echo_n "checking for struct timespec in <time.h>... " >&6; } | |
14048 | if ${bash_cv_sys_struct_timespec_in_time_h+:} false; then : | |
278286c9 CR |
14049 | $as_echo_n "(cached) " >&6 |
14050 | else | |
1b1fe467 | 14051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
278286c9 | 14052 | /* end confdefs.h. */ |
1b1fe467 | 14053 | #include <time.h> |
278286c9 CR |
14054 | |
14055 | int | |
14056 | main () | |
14057 | { | |
1b1fe467 | 14058 | static struct timespec x; x.tv_sec = x.tv_nsec; |
278286c9 CR |
14059 | ; |
14060 | return 0; | |
14061 | } | |
14062 | _ACEOF | |
1b1fe467 CR |
14063 | if ac_fn_c_try_compile "$LINENO"; then : |
14064 | bash_cv_sys_struct_timespec_in_time_h=yes | |
278286c9 | 14065 | else |
1b1fe467 | 14066 | bash_cv_sys_struct_timespec_in_time_h=no |
278286c9 CR |
14067 | fi |
14068 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14069 | fi | |
1b1fe467 CR |
14070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5 |
14071 | $as_echo "$bash_cv_sys_struct_timespec_in_time_h" >&6; } | |
278286c9 | 14072 | |
1b1fe467 CR |
14073 | HAVE_STRUCT_TIMESPEC=0 |
14074 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
14075 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
14076 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
14077 | if test $bash_cv_sys_struct_timespec_in_time_h = yes; then | |
14078 | $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h | |
278286c9 | 14079 | |
1b1fe467 CR |
14080 | $as_echo "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h |
14081 | ||
14082 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
14083 | else | |
14084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
14085 | $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } | |
14086 | if ${bash_cv_sys_struct_timespec_in_sys_time_h+:} false; then : | |
278286c9 CR |
14087 | $as_echo_n "(cached) " >&6 |
14088 | else | |
1b1fe467 | 14089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
278286c9 | 14090 | /* end confdefs.h. */ |
1b1fe467 | 14091 | #include <sys/time.h> |
278286c9 CR |
14092 | |
14093 | int | |
14094 | main () | |
14095 | { | |
1b1fe467 | 14096 | static struct timespec x; x.tv_sec = x.tv_nsec; |
278286c9 CR |
14097 | ; |
14098 | return 0; | |
14099 | } | |
14100 | _ACEOF | |
1b1fe467 CR |
14101 | if ac_fn_c_try_compile "$LINENO"; then : |
14102 | bash_cv_sys_struct_timespec_in_sys_time_h=yes | |
278286c9 | 14103 | else |
1b1fe467 CR |
14104 | bash_cv_sys_struct_timespec_in_sys_time_h=no |
14105 | fi | |
14106 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14107 | fi | |
14108 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
14109 | $as_echo "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
14110 | if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
14111 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
14112 | $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h | |
278286c9 | 14113 | |
1b1fe467 CR |
14114 | $as_echo "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h |
14115 | ||
14116 | else | |
14117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
14118 | $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } | |
14119 | if ${bash_cv_sys_struct_timespec_in_pthread_h+:} false; then : | |
14120 | $as_echo_n "(cached) " >&6 | |
14121 | else | |
14122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
278286c9 | 14123 | /* end confdefs.h. */ |
1b1fe467 | 14124 | #include <pthread.h> |
278286c9 CR |
14125 | |
14126 | int | |
14127 | main () | |
14128 | { | |
1b1fe467 | 14129 | static struct timespec x; x.tv_sec = x.tv_nsec; |
278286c9 CR |
14130 | ; |
14131 | return 0; | |
14132 | } | |
14133 | _ACEOF | |
1b1fe467 CR |
14134 | if ac_fn_c_try_compile "$LINENO"; then : |
14135 | bash_cv_sys_struct_timespec_in_pthread_h=yes | |
278286c9 | 14136 | else |
1b1fe467 | 14137 | bash_cv_sys_struct_timespec_in_pthread_h=no |
278286c9 CR |
14138 | fi |
14139 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14140 | fi | |
1b1fe467 CR |
14141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5 |
14142 | $as_echo "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
14143 | if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then | |
14144 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
14145 | $as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h | |
14146 | ||
14147 | $as_echo "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h | |
14148 | ||
14149 | fi | |
14150 | fi | |
14151 | fi | |
14152 | ||
14153 | ||
14154 | ||
278286c9 | 14155 | |
1b1fe467 CR |
14156 | |
14157 | ||
14158 | ||
14159 | ||
14160 | ||
14161 | 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> | |
14162 | #include <sys/stat.h> | |
14163 | " | |
14164 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : | |
278286c9 CR |
14165 | |
14166 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 14167 | #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 |
278286c9 CR |
14168 | _ACEOF |
14169 | ||
1b1fe467 CR |
14170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 |
14171 | $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
14172 | if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : | |
278286c9 CR |
14173 | $as_echo_n "(cached) " >&6 |
14174 | else | |
1b1fe467 | 14175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
278286c9 | 14176 | /* end confdefs.h. */ |
1b1fe467 CR |
14177 | |
14178 | #include <sys/types.h> | |
14179 | #include <sys/stat.h> | |
14180 | #if HAVE_SYS_TIME_H | |
14181 | # include <sys/time.h> | |
14182 | #endif | |
14183 | #include <time.h> | |
14184 | struct timespec ts; | |
14185 | struct stat st; | |
278286c9 CR |
14186 | |
14187 | int | |
14188 | main () | |
14189 | { | |
14190 | ||
1b1fe467 | 14191 | st.st_atim = ts; |
278286c9 CR |
14192 | |
14193 | ; | |
14194 | return 0; | |
14195 | } | |
14196 | _ACEOF | |
1b1fe467 CR |
14197 | if ac_fn_c_try_compile "$LINENO"; then : |
14198 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
278286c9 | 14199 | else |
1b1fe467 | 14200 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no |
278286c9 CR |
14201 | fi |
14202 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14203 | fi | |
1b1fe467 CR |
14204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 |
14205 | $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
14206 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
278286c9 | 14207 | |
1b1fe467 CR |
14208 | $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h |
14209 | ||
14210 | fi | |
14211 | else | |
14212 | 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> | |
14213 | #include <sys/stat.h> | |
14214 | " | |
14215 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : | |
7175a77f CR |
14216 | |
14217 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 14218 | #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 |
7175a77f CR |
14219 | _ACEOF |
14220 | ||
278286c9 | 14221 | |
278286c9 | 14222 | else |
1b1fe467 CR |
14223 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> |
14224 | #include <sys/stat.h> | |
14225 | " | |
14226 | if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : | |
278286c9 | 14227 | |
1b1fe467 CR |
14228 | cat >>confdefs.h <<_ACEOF |
14229 | #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 | |
278286c9 CR |
14230 | _ACEOF |
14231 | ||
14232 | ||
14233 | else | |
1b1fe467 CR |
14234 | 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> |
14235 | #include <sys/stat.h> | |
14236 | " | |
14237 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : | |
278286c9 CR |
14238 | |
14239 | cat >>confdefs.h <<_ACEOF | |
14240 | #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 | |
14241 | _ACEOF | |
14242 | ||
14243 | ||
14244 | fi | |
14245 | ||
14246 | fi | |
14247 | ||
14248 | fi | |
14249 | ||
14250 | fi | |
14251 | ||
14252 | ||
14253 | ||
1b1fe467 | 14254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5 |
dd4f3dd8 | 14255 | $as_echo_n "checking for the existence of strsignal... " >&6; } |
1b1fe467 | 14256 | if ${bash_cv_have_strsignal+:} false; then : |
dd4f3dd8 | 14257 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14258 | else |
1b1fe467 | 14259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14260 | /* end confdefs.h. */ |
ccc6cda3 JA |
14261 | #include <sys/types.h> |
14262 | #include <signal.h> | |
f73dda09 JA |
14263 | int |
14264 | main () | |
14265 | { | |
ccc6cda3 | 14266 | char *s = (char *)strsignal(2); |
1b1fe467 CR |
14267 | ; |
14268 | return 0; | |
14269 | } | |
14270 | _ACEOF | |
14271 | if ac_fn_c_try_link "$LINENO"; then : | |
ccc6cda3 JA |
14272 | bash_cv_have_strsignal=yes |
14273 | else | |
1b1fe467 | 14274 | bash_cv_have_strsignal=no |
ccc6cda3 | 14275 | fi |
1b1fe467 CR |
14276 | rm -f core conftest.err conftest.$ac_objext \ |
14277 | conftest$ac_exeext conftest.$ac_ext | |
ccc6cda3 JA |
14278 | fi |
14279 | ||
1b1fe467 | 14280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5 |
dd4f3dd8 | 14281 | $as_echo "$bash_cv_have_strsignal" >&6; } |
ccc6cda3 | 14282 | if test $bash_cv_have_strsignal = yes; then |
1b1fe467 | 14283 | $as_echo "#define HAVE_STRSIGNAL 1" >>confdefs.h |
ccc6cda3 JA |
14284 | |
14285 | fi | |
14286 | ||
1b1fe467 | 14287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5 |
dd4f3dd8 | 14288 | $as_echo_n "checking if opendir() opens non-directories... " >&6; } |
1b1fe467 | 14289 | if ${bash_cv_opendir_not_robust+:} false; then : |
dd4f3dd8 | 14290 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14291 | else |
1b1fe467 CR |
14292 | if test "$cross_compiling" = yes; then : |
14293 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 14294 | $as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;} |
cce855bc JA |
14295 | bash_cv_opendir_not_robust=no |
14296 | ||
ccc6cda3 | 14297 | else |
1b1fe467 | 14298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14299 | /* end confdefs.h. */ |
ccc6cda3 JA |
14300 | |
14301 | #include <stdio.h> | |
14302 | #include <sys/types.h> | |
14303 | #include <fcntl.h> | |
14304 | #ifdef HAVE_UNISTD_H | |
14305 | # include <unistd.h> | |
14306 | #endif /* HAVE_UNISTD_H */ | |
14307 | #if defined(HAVE_DIRENT_H) | |
14308 | # include <dirent.h> | |
14309 | #else | |
14310 | # define dirent direct | |
14311 | # ifdef HAVE_SYS_NDIR_H | |
14312 | # include <sys/ndir.h> | |
14313 | # endif /* SYSNDIR */ | |
14314 | # ifdef HAVE_SYS_DIR_H | |
14315 | # include <sys/dir.h> | |
14316 | # endif /* SYSDIR */ | |
14317 | # ifdef HAVE_NDIR_H | |
14318 | # include <ndir.h> | |
14319 | # endif | |
14320 | #endif /* HAVE_DIRENT_H */ | |
14321 | main() | |
14322 | { | |
14323 | DIR *dir; | |
bb70624e | 14324 | int fd, err; |
30915f17 | 14325 | err = mkdir("bash-aclocal", 0700); |
bb70624e JA |
14326 | if (err < 0) { |
14327 | perror("mkdir"); | |
14328 | exit(1); | |
14329 | } | |
30915f17 CR |
14330 | unlink("bash-aclocal/not_a_directory"); |
14331 | fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666); | |
ccc6cda3 JA |
14332 | write(fd, "\n", 1); |
14333 | close(fd); | |
30915f17 CR |
14334 | dir = opendir("bash-aclocal/not_a_directory"); |
14335 | unlink("bash-aclocal/not_a_directory"); | |
14336 | rmdir("bash-aclocal"); | |
ccc6cda3 JA |
14337 | exit (dir == 0); |
14338 | } | |
f73dda09 | 14339 | _ACEOF |
1b1fe467 | 14340 | if ac_fn_c_try_run "$LINENO"; then : |
ccc6cda3 JA |
14341 | bash_cv_opendir_not_robust=yes |
14342 | else | |
1b1fe467 | 14343 | bash_cv_opendir_not_robust=no |
ccc6cda3 | 14344 | fi |
1b1fe467 CR |
14345 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14346 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 14347 | fi |
b709b946 | 14348 | |
ccc6cda3 JA |
14349 | fi |
14350 | ||
1b1fe467 | 14351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5 |
dd4f3dd8 | 14352 | $as_echo "$bash_cv_opendir_not_robust" >&6; } |
ccc6cda3 | 14353 | if test $bash_cv_opendir_not_robust = yes; then |
1b1fe467 | 14354 | $as_echo "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h |
ccc6cda3 JA |
14355 | |
14356 | fi | |
14357 | ||
1b1fe467 | 14358 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5 |
dd4f3dd8 | 14359 | $as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; } |
1b1fe467 | 14360 | if ${bash_cv_ulimit_maxfds+:} false; then : |
dd4f3dd8 | 14361 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14362 | else |
1b1fe467 CR |
14363 | if test "$cross_compiling" = yes; then : |
14364 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 14365 | $as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;} |
cce855bc JA |
14366 | bash_cv_ulimit_maxfds=no |
14367 | ||
ccc6cda3 | 14368 | else |
1b1fe467 | 14369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14370 | /* end confdefs.h. */ |
ccc6cda3 JA |
14371 | |
14372 | main() | |
14373 | { | |
14374 | long maxfds = ulimit(4, 0L); | |
14375 | exit (maxfds == -1L); | |
14376 | } | |
14377 | ||
f73dda09 | 14378 | _ACEOF |
1b1fe467 | 14379 | if ac_fn_c_try_run "$LINENO"; then : |
ccc6cda3 JA |
14380 | bash_cv_ulimit_maxfds=yes |
14381 | else | |
1b1fe467 | 14382 | bash_cv_ulimit_maxfds=no |
547ef914 | 14383 | fi |
1b1fe467 CR |
14384 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14385 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
09767ff0 CR |
14386 | fi |
14387 | ||
09767ff0 | 14388 | fi |
547ef914 | 14389 | |
1b1fe467 | 14390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5 |
dd4f3dd8 | 14391 | $as_echo "$bash_cv_ulimit_maxfds" >&6; } |
2e4498b3 | 14392 | if test $bash_cv_ulimit_maxfds = yes; then |
1b1fe467 | 14393 | $as_echo "#define ULIMIT_MAXFDS 1" >>confdefs.h |
2e4498b3 CR |
14394 | |
14395 | fi | |
14396 | ||
14397 | ||
14398 | ||
14399 | ||
14400 | ||
53ac45a3 CR |
14401 | |
14402 | ||
14403 | ||
1b1fe467 CR |
14404 | ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h> |
14405 | " | |
14406 | if test "x$ac_cv_have_decl_fpurge" = xyes; then : | |
14407 | ac_have_decl=1 | |
53ac45a3 | 14408 | else |
1b1fe467 | 14409 | ac_have_decl=0 |
53ac45a3 | 14410 | fi |
53ac45a3 CR |
14411 | |
14412 | cat >>confdefs.h <<_ACEOF | |
1b1fe467 | 14413 | #define HAVE_DECL_FPURGE $ac_have_decl |
7175a77f CR |
14414 | _ACEOF |
14415 | ||
14416 | ||
1b1fe467 | 14417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5 |
dd4f3dd8 | 14418 | $as_echo_n "checking to see if getenv can be redefined... " >&6; } |
1b1fe467 | 14419 | if ${bash_cv_getenv_redef+:} false; then : |
dd4f3dd8 | 14420 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14421 | else |
1b1fe467 CR |
14422 | if test "$cross_compiling" = yes; then : |
14423 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 | |
dd4f3dd8 | 14424 | $as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;} |
cce855bc JA |
14425 | bash_cv_getenv_redef=yes |
14426 | ||
ccc6cda3 | 14427 | else |
1b1fe467 | 14428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14429 | /* end confdefs.h. */ |
ccc6cda3 JA |
14430 | |
14431 | #ifdef HAVE_UNISTD_H | |
14432 | # include <unistd.h> | |
14433 | #endif | |
14434 | #ifndef __STDC__ | |
14435 | # ifndef const | |
14436 | # define const | |
14437 | # endif | |
14438 | #endif | |
14439 | char * | |
14440 | getenv (name) | |
14441 | #if defined (__linux__) || defined (__bsdi__) || defined (convex) | |
14442 | const char *name; | |
14443 | #else | |
14444 | char const *name; | |
14445 | #endif /* !__linux__ && !__bsdi__ && !convex */ | |
14446 | { | |
14447 | return "42"; | |
14448 | } | |
14449 | main() | |
14450 | { | |
14451 | char *s; | |
14452 | /* The next allows this program to run, but does not allow bash to link | |
14453 | when it redefines getenv. I'm not really interested in figuring out | |
14454 | why not. */ | |
14455 | #if defined (NeXT) | |
14456 | exit(1); | |
14457 | #endif | |
14458 | s = getenv("ABCDE"); | |
14459 | exit(s == 0); /* force optimizer to leave getenv in */ | |
14460 | } | |
14461 | ||
f73dda09 | 14462 | _ACEOF |
1b1fe467 | 14463 | if ac_fn_c_try_run "$LINENO"; then : |
ccc6cda3 JA |
14464 | bash_cv_getenv_redef=yes |
14465 | else | |
1b1fe467 | 14466 | bash_cv_getenv_redef=no |
ccc6cda3 | 14467 | fi |
1b1fe467 CR |
14468 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14469 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 14470 | fi |
b709b946 | 14471 | |
ccc6cda3 JA |
14472 | fi |
14473 | ||
1b1fe467 | 14474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5 |
dd4f3dd8 | 14475 | $as_echo "$bash_cv_getenv_redef" >&6; } |
ccc6cda3 | 14476 | if test $bash_cv_getenv_redef = yes; then |
1b1fe467 | 14477 | $as_echo "#define CAN_REDEFINE_GETENV 1" >>confdefs.h |
ccc6cda3 JA |
14478 | |
14479 | fi | |
14480 | ||
7117c2d2 | 14481 | if test "$ac_cv_func_getcwd" = "yes"; then |
1b1fe467 | 14482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5 |
dd4f3dd8 | 14483 | $as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; } |
1b1fe467 | 14484 | if ${bash_cv_getcwd_malloc+:} false; then : |
dd4f3dd8 | 14485 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14486 | else |
1b1fe467 CR |
14487 | if test "$cross_compiling" = yes; then : |
14488 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 14489 | $as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;} |
f085a21f | 14490 | bash_cv_getcwd_malloc=no |
cce855bc | 14491 | |
ccc6cda3 | 14492 | else |
1b1fe467 | 14493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14494 | /* end confdefs.h. */ |
ccc6cda3 JA |
14495 | |
14496 | #include <stdio.h> | |
14497 | #ifdef HAVE_UNISTD_H | |
14498 | #include <unistd.h> | |
14499 | #endif | |
14500 | ||
ccc6cda3 JA |
14501 | main() |
14502 | { | |
f085a21f CR |
14503 | char *xpwd; |
14504 | xpwd = getcwd(0, 0); | |
14505 | exit (xpwd == 0); | |
ccc6cda3 JA |
14506 | } |
14507 | ||
f73dda09 | 14508 | _ACEOF |
1b1fe467 | 14509 | if ac_fn_c_try_run "$LINENO"; then : |
f085a21f | 14510 | bash_cv_getcwd_malloc=yes |
ccc6cda3 | 14511 | else |
1b1fe467 | 14512 | bash_cv_getcwd_malloc=no |
ccc6cda3 | 14513 | fi |
1b1fe467 CR |
14514 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14515 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 14516 | fi |
b709b946 | 14517 | |
ccc6cda3 JA |
14518 | fi |
14519 | ||
1b1fe467 | 14520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5 |
dd4f3dd8 | 14521 | $as_echo "$bash_cv_getcwd_malloc" >&6; } |
f085a21f | 14522 | if test $bash_cv_getcwd_malloc = no; then |
1b1fe467 | 14523 | $as_echo "#define GETCWD_BROKEN 1" >>confdefs.h |
a82a04b3 | 14524 | |
b709b946 | 14525 | case " $LIBOBJS " in |
5e4a95c7 | 14526 | *" getcwd.$ac_objext "* ) ;; |
b709b946 CR |
14527 | *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" |
14528 | ;; | |
5e4a95c7 CR |
14529 | esac |
14530 | ||
ccc6cda3 JA |
14531 | fi |
14532 | ||
ccc6cda3 JA |
14533 | fi |
14534 | ||
1b1fe467 | 14535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 |
dd4f3dd8 | 14536 | $as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; } |
1b1fe467 | 14537 | if ${bash_cv_func_sigsetjmp+:} false; then : |
dd4f3dd8 | 14538 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14539 | else |
1b1fe467 CR |
14540 | if test "$cross_compiling" = yes; then : |
14541 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 | |
dd4f3dd8 | 14542 | $as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} |
cce855bc JA |
14543 | bash_cv_func_sigsetjmp=missing |
14544 | ||
ccc6cda3 | 14545 | else |
1b1fe467 | 14546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14547 | /* end confdefs.h. */ |
ccc6cda3 JA |
14548 | |
14549 | #ifdef HAVE_UNISTD_H | |
14550 | #include <unistd.h> | |
14551 | #endif | |
14552 | #include <sys/types.h> | |
14553 | #include <signal.h> | |
14554 | #include <setjmp.h> | |
14555 | ||
14556 | main() | |
14557 | { | |
14558 | #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) | |
14559 | exit (1); | |
14560 | #else | |
14561 | ||
14562 | int code; | |
14563 | sigset_t set, oset; | |
14564 | sigjmp_buf xx; | |
14565 | ||
14566 | /* get the mask */ | |
14567 | sigemptyset(&set); | |
14568 | sigemptyset(&oset); | |
14569 | sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); | |
14570 | sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); | |
14571 | ||
14572 | /* save it */ | |
14573 | code = sigsetjmp(xx, 1); | |
14574 | if (code) | |
14575 | exit(0); /* could get sigmask and compare to oset here. */ | |
14576 | ||
14577 | /* change it */ | |
14578 | sigaddset(&set, SIGINT); | |
14579 | sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); | |
14580 | ||
14581 | /* and siglongjmp */ | |
14582 | siglongjmp(xx, 10); | |
14583 | exit(1); | |
14584 | #endif | |
14585 | } | |
f73dda09 | 14586 | _ACEOF |
1b1fe467 | 14587 | if ac_fn_c_try_run "$LINENO"; then : |
ccc6cda3 JA |
14588 | bash_cv_func_sigsetjmp=present |
14589 | else | |
1b1fe467 | 14590 | bash_cv_func_sigsetjmp=missing |
ccc6cda3 | 14591 | fi |
1b1fe467 CR |
14592 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14593 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 14594 | fi |
b709b946 | 14595 | |
ccc6cda3 JA |
14596 | fi |
14597 | ||
1b1fe467 | 14598 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5 |
dd4f3dd8 | 14599 | $as_echo "$bash_cv_func_sigsetjmp" >&6; } |
ccc6cda3 | 14600 | if test $bash_cv_func_sigsetjmp = present; then |
1b1fe467 | 14601 | $as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h |
ccc6cda3 JA |
14602 | |
14603 | fi | |
14604 | ||
a82a04b3 | 14605 | |
1b1fe467 | 14606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5 |
dd4f3dd8 | 14607 | $as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; } |
1b1fe467 | 14608 | if ${bash_cv_func_strcoll_broken+:} false; then : |
dd4f3dd8 | 14609 | $as_echo_n "(cached) " >&6 |
d166f048 | 14610 | else |
1b1fe467 CR |
14611 | if test "$cross_compiling" = yes; then : |
14612 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 14613 | $as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} |
cce855bc JA |
14614 | bash_cv_func_strcoll_broken=no |
14615 | ||
d166f048 | 14616 | else |
1b1fe467 | 14617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14618 | /* end confdefs.h. */ |
d166f048 JA |
14619 | |
14620 | #include <stdio.h> | |
14621 | #if defined (HAVE_LOCALE_H) | |
14622 | #include <locale.h> | |
14623 | #endif | |
14624 | ||
14625 | main(c, v) | |
14626 | int c; | |
14627 | char *v[]; | |
14628 | { | |
14629 | int r1, r2; | |
14630 | char *deflocale, *defcoll; | |
14631 | ||
14632 | #ifdef HAVE_SETLOCALE | |
14633 | deflocale = setlocale(LC_ALL, ""); | |
14634 | defcoll = setlocale(LC_COLLATE, ""); | |
14635 | #endif | |
14636 | ||
14637 | #ifdef HAVE_STRCOLL | |
14638 | /* These two values are taken from tests/glob-test. */ | |
14639 | r1 = strcoll("abd", "aXd"); | |
14640 | #else | |
14641 | r1 = 0; | |
14642 | #endif | |
14643 | r2 = strcmp("abd", "aXd"); | |
14644 | ||
14645 | /* These two should both be greater than 0. It is permissible for | |
14646 | a system to return different values, as long as the sign is the | |
14647 | same. */ | |
14648 | ||
14649 | /* Exit with 1 (failure) if these two values are both > 0, since | |
14650 | this tests whether strcoll(3) is broken with respect to strcmp(3) | |
14651 | in the default locale. */ | |
14652 | exit (r1 > 0 && r2 > 0); | |
14653 | } | |
14654 | ||
f73dda09 | 14655 | _ACEOF |
1b1fe467 | 14656 | if ac_fn_c_try_run "$LINENO"; then : |
d166f048 JA |
14657 | bash_cv_func_strcoll_broken=yes |
14658 | else | |
1b1fe467 | 14659 | bash_cv_func_strcoll_broken=no |
d166f048 | 14660 | fi |
1b1fe467 CR |
14661 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14662 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
d166f048 | 14663 | fi |
b709b946 | 14664 | |
d166f048 JA |
14665 | fi |
14666 | ||
1b1fe467 | 14667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5 |
dd4f3dd8 | 14668 | $as_echo "$bash_cv_func_strcoll_broken" >&6; } |
d166f048 | 14669 | if test $bash_cv_func_strcoll_broken = yes; then |
1b1fe467 | 14670 | $as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h |
d166f048 JA |
14671 | |
14672 | fi | |
14673 | ||
a82a04b3 CR |
14674 | |
14675 | ||
cd0ef727 CR |
14676 | |
14677 | ||
cd0ef727 | 14678 | if test X$ac_cv_func_snprintf = Xyes; then |
1b1fe467 | 14679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5 |
cd0ef727 | 14680 | $as_echo_n "checking for standard-conformant snprintf... " >&6; } |
1b1fe467 | 14681 | if ${bash_cv_func_snprintf+:} false; then : |
cd0ef727 CR |
14682 | $as_echo_n "(cached) " >&6 |
14683 | else | |
1b1fe467 CR |
14684 | if test "$cross_compiling" = yes; then : |
14685 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5 | |
cd0ef727 CR |
14686 | $as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;} |
14687 | bash_cv_func_snprintf=yes | |
14688 | ||
14689 | else | |
1b1fe467 | 14690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
cd0ef727 CR |
14691 | /* end confdefs.h. */ |
14692 | ||
14693 | #include <stdio.h> | |
14694 | ||
14695 | main() | |
14696 | { | |
14697 | int n; | |
14698 | n = snprintf (0, 0, "%s", "0123456"); | |
14699 | exit(n != 7); | |
14700 | } | |
14701 | ||
14702 | _ACEOF | |
1b1fe467 | 14703 | if ac_fn_c_try_run "$LINENO"; then : |
cd0ef727 CR |
14704 | bash_cv_func_snprintf=yes |
14705 | else | |
1b1fe467 | 14706 | bash_cv_func_snprintf=no |
cd0ef727 | 14707 | fi |
1b1fe467 CR |
14708 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14709 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
cd0ef727 CR |
14710 | fi |
14711 | ||
cd0ef727 | 14712 | fi |
1b1fe467 | 14713 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5 |
cd0ef727 CR |
14714 | $as_echo "$bash_cv_func_snprintf" >&6; } |
14715 | if test $bash_cv_func_snprintf = no; then | |
14716 | ac_cv_func_snprintf=no | |
14717 | fi | |
14718 | fi | |
14719 | if test $ac_cv_func_snprintf = no; then | |
14720 | ||
1b1fe467 | 14721 | $as_echo "#define HAVE_SNPRINTF 0" >>confdefs.h |
cd0ef727 CR |
14722 | |
14723 | fi | |
14724 | ||
14725 | ||
14726 | ||
14727 | ||
14728 | ||
cd0ef727 | 14729 | if test X$ac_cv_func_vsnprintf = Xyes; then |
1b1fe467 | 14730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5 |
cd0ef727 | 14731 | $as_echo_n "checking for standard-conformant vsnprintf... " >&6; } |
1b1fe467 | 14732 | if ${bash_cv_func_vsnprintf+:} false; then : |
cd0ef727 CR |
14733 | $as_echo_n "(cached) " >&6 |
14734 | else | |
1b1fe467 CR |
14735 | if test "$cross_compiling" = yes; then : |
14736 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5 | |
cd0ef727 CR |
14737 | $as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;} |
14738 | bash_cv_func_vsnprintf=yes | |
14739 | ||
14740 | else | |
1b1fe467 | 14741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
cd0ef727 CR |
14742 | /* end confdefs.h. */ |
14743 | ||
14744 | #if HAVE_STDARG_H | |
14745 | #include <stdarg.h> | |
14746 | #else | |
14747 | #include <varargs.h> | |
14748 | #endif | |
14749 | #include <stdio.h> | |
14750 | #include <stdlib.h> | |
14751 | ||
14752 | static int | |
14753 | #if HAVE_STDARG_H | |
14754 | foo(const char *fmt, ...) | |
14755 | #else | |
14756 | foo(format, va_alist) | |
14757 | const char *format; | |
14758 | va_dcl | |
14759 | #endif | |
14760 | { | |
14761 | va_list args; | |
14762 | int n; | |
14763 | ||
14764 | #if HAVE_STDARG_H | |
14765 | va_start(args, fmt); | |
14766 | #else | |
14767 | va_start(args); | |
14768 | #endif | |
14769 | n = vsnprintf(0, 0, fmt, args); | |
14770 | va_end (args); | |
14771 | return n; | |
14772 | } | |
14773 | ||
14774 | main() | |
14775 | { | |
14776 | int n; | |
14777 | n = foo("%s", "0123456"); | |
14778 | exit(n != 7); | |
14779 | } | |
14780 | ||
14781 | _ACEOF | |
1b1fe467 | 14782 | if ac_fn_c_try_run "$LINENO"; then : |
cd0ef727 CR |
14783 | bash_cv_func_vsnprintf=yes |
14784 | else | |
1b1fe467 | 14785 | bash_cv_func_vsnprintf=no |
cd0ef727 | 14786 | fi |
1b1fe467 CR |
14787 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14788 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
cd0ef727 CR |
14789 | fi |
14790 | ||
cd0ef727 | 14791 | fi |
1b1fe467 | 14792 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5 |
cd0ef727 CR |
14793 | $as_echo "$bash_cv_func_vsnprintf" >&6; } |
14794 | if test $bash_cv_func_vsnprintf = no; then | |
14795 | ac_cv_func_vsnprintf=no | |
14796 | fi | |
14797 | fi | |
14798 | if test $ac_cv_func_vsnprintf = no; then | |
14799 | ||
1b1fe467 | 14800 | $as_echo "#define HAVE_VSNPRINTF 0" >>confdefs.h |
cd0ef727 CR |
14801 | |
14802 | fi | |
14803 | ||
14804 | ||
14805 | ||
7117c2d2 JA |
14806 | if test "$ac_cv_func_putenv" = "yes"; then |
14807 | ||
a82a04b3 CR |
14808 | |
14809 | ||
1b1fe467 | 14810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5 |
dd4f3dd8 | 14811 | $as_echo_n "checking for standard-conformant putenv declaration... " >&6; } |
1b1fe467 | 14812 | if ${bash_cv_std_putenv+:} false; then : |
dd4f3dd8 | 14813 | $as_echo_n "(cached) " >&6 |
7117c2d2 | 14814 | else |
1b1fe467 | 14815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14816 | /* end confdefs.h. */ |
7117c2d2 JA |
14817 | |
14818 | #if STDC_HEADERS | |
14819 | #include <stdlib.h> | |
14820 | #include <stddef.h> | |
14821 | #endif | |
14822 | #ifndef __STDC__ | |
14823 | # ifndef const | |
14824 | # define const | |
14825 | # endif | |
14826 | #endif | |
14827 | #ifdef PROTOTYPES | |
14828 | extern int putenv (char *); | |
14829 | #else | |
14830 | extern int putenv (); | |
14831 | #endif | |
14832 | ||
14833 | int | |
14834 | main () | |
14835 | { | |
14836 | return (putenv == 0); | |
14837 | ; | |
14838 | return 0; | |
14839 | } | |
14840 | _ACEOF | |
1b1fe467 | 14841 | if ac_fn_c_try_link "$LINENO"; then : |
7117c2d2 JA |
14842 | bash_cv_std_putenv=yes |
14843 | else | |
1b1fe467 | 14844 | bash_cv_std_putenv=no |
7117c2d2 JA |
14845 | |
14846 | fi | |
1b1fe467 CR |
14847 | rm -f core conftest.err conftest.$ac_objext \ |
14848 | conftest$ac_exeext conftest.$ac_ext | |
7117c2d2 | 14849 | fi |
1b1fe467 | 14850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5 |
dd4f3dd8 | 14851 | $as_echo "$bash_cv_std_putenv" >&6; } |
7117c2d2 | 14852 | if test $bash_cv_std_putenv = yes; then |
1b1fe467 | 14853 | $as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h |
7117c2d2 JA |
14854 | |
14855 | fi | |
14856 | ||
14857 | else | |
1b1fe467 | 14858 | $as_echo "#define HAVE_STD_PUTENV 1" >>confdefs.h |
7117c2d2 JA |
14859 | |
14860 | fi | |
14861 | if test "$ac_cv_func_unsetenv" = "yes"; then | |
14862 | ||
a82a04b3 CR |
14863 | |
14864 | ||
1b1fe467 | 14865 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5 |
dd4f3dd8 | 14866 | $as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; } |
1b1fe467 | 14867 | if ${bash_cv_std_unsetenv+:} false; then : |
dd4f3dd8 | 14868 | $as_echo_n "(cached) " >&6 |
7117c2d2 | 14869 | else |
1b1fe467 | 14870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14871 | /* end confdefs.h. */ |
7117c2d2 JA |
14872 | |
14873 | #if STDC_HEADERS | |
14874 | #include <stdlib.h> | |
14875 | #include <stddef.h> | |
14876 | #endif | |
14877 | #ifndef __STDC__ | |
14878 | # ifndef const | |
14879 | # define const | |
14880 | # endif | |
14881 | #endif | |
14882 | #ifdef PROTOTYPES | |
14883 | extern int unsetenv (const char *); | |
14884 | #else | |
14885 | extern int unsetenv (); | |
14886 | #endif | |
1b1fe467 CR |
14887 | |
14888 | int | |
14889 | main () | |
14890 | { | |
14891 | return (unsetenv == 0); | |
14892 | ; | |
14893 | return 0; | |
14894 | } | |
14895 | _ACEOF | |
14896 | if ac_fn_c_try_link "$LINENO"; then : | |
7117c2d2 JA |
14897 | bash_cv_std_unsetenv=yes |
14898 | else | |
1b1fe467 | 14899 | bash_cv_std_unsetenv=no |
7117c2d2 JA |
14900 | |
14901 | fi | |
1b1fe467 CR |
14902 | rm -f core conftest.err conftest.$ac_objext \ |
14903 | conftest$ac_exeext conftest.$ac_ext | |
7117c2d2 | 14904 | fi |
1b1fe467 | 14905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5 |
dd4f3dd8 | 14906 | $as_echo "$bash_cv_std_unsetenv" >&6; } |
7117c2d2 | 14907 | if test $bash_cv_std_unsetenv = yes; then |
1b1fe467 | 14908 | $as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h |
7117c2d2 JA |
14909 | |
14910 | fi | |
14911 | ||
14912 | else | |
1b1fe467 | 14913 | $as_echo "#define HAVE_STD_UNSETENV 1" >>confdefs.h |
7117c2d2 JA |
14914 | |
14915 | fi | |
14916 | ||
1b1fe467 | 14917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5 |
dd4f3dd8 | 14918 | $as_echo_n "checking for printf floating point output in hex notation... " >&6; } |
1b1fe467 | 14919 | if ${bash_cv_printf_a_format+:} false; then : |
dd4f3dd8 | 14920 | $as_echo_n "(cached) " >&6 |
f73dda09 | 14921 | else |
1b1fe467 CR |
14922 | if test "$cross_compiling" = yes; then : |
14923 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 14924 | $as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;} |
f73dda09 JA |
14925 | bash_cv_printf_a_format=no |
14926 | ||
14927 | else | |
1b1fe467 | 14928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14929 | /* end confdefs.h. */ |
f73dda09 JA |
14930 | |
14931 | #include <stdio.h> | |
14932 | #include <string.h> | |
14933 | ||
14934 | int | |
14935 | main() | |
14936 | { | |
14937 | double y = 0.0; | |
14938 | char abuf[1024]; | |
14939 | ||
14940 | sprintf(abuf, "%A", y); | |
14941 | exit(strchr(abuf, 'P') == (char *)0); | |
14942 | } | |
14943 | ||
14944 | _ACEOF | |
1b1fe467 | 14945 | if ac_fn_c_try_run "$LINENO"; then : |
f73dda09 JA |
14946 | bash_cv_printf_a_format=yes |
14947 | else | |
1b1fe467 | 14948 | bash_cv_printf_a_format=no |
f73dda09 | 14949 | fi |
1b1fe467 CR |
14950 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14951 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f73dda09 | 14952 | fi |
b709b946 | 14953 | |
f73dda09 | 14954 | fi |
d166f048 | 14955 | |
1b1fe467 | 14956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5 |
dd4f3dd8 | 14957 | $as_echo "$bash_cv_printf_a_format" >&6; } |
f73dda09 | 14958 | if test $bash_cv_printf_a_format = yes; then |
1b1fe467 | 14959 | $as_echo "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h |
d166f048 | 14960 | |
f73dda09 | 14961 | fi |
ccc6cda3 | 14962 | |
a82a04b3 CR |
14963 | |
14964 | ||
14965 | ||
1b1fe467 | 14966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5 |
dd4f3dd8 | 14967 | $as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; } |
1b1fe467 | 14968 | if ${bash_cv_must_reinstall_sighandlers+:} false; then : |
dd4f3dd8 | 14969 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 14970 | else |
1b1fe467 CR |
14971 | if test "$cross_compiling" = yes; then : |
14972 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 14973 | $as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} |
cce855bc JA |
14974 | bash_cv_must_reinstall_sighandlers=no |
14975 | ||
ccc6cda3 | 14976 | else |
1b1fe467 | 14977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 14978 | /* end confdefs.h. */ |
ccc6cda3 JA |
14979 | |
14980 | #include <signal.h> | |
14981 | #ifdef HAVE_UNISTD_H | |
14982 | #include <unistd.h> | |
14983 | #endif | |
14984 | ||
14985 | typedef RETSIGTYPE sigfunc(); | |
14986 | ||
14987 | int nsigint; | |
14988 | ||
14989 | #ifdef HAVE_POSIX_SIGNALS | |
14990 | sigfunc * | |
14991 | set_signal_handler(sig, handler) | |
14992 | int sig; | |
14993 | sigfunc *handler; | |
14994 | { | |
14995 | struct sigaction act, oact; | |
14996 | act.sa_handler = handler; | |
14997 | act.sa_flags = 0; | |
14998 | sigemptyset (&act.sa_mask); | |
14999 | sigemptyset (&oact.sa_mask); | |
15000 | sigaction (sig, &act, &oact); | |
15001 | return (oact.sa_handler); | |
15002 | } | |
15003 | #else | |
15004 | #define set_signal_handler(s, h) signal(s, h) | |
15005 | #endif | |
15006 | ||
15007 | RETSIGTYPE | |
15008 | sigint(s) | |
15009 | int s; | |
15010 | { | |
15011 | nsigint++; | |
15012 | } | |
15013 | ||
15014 | main() | |
15015 | { | |
15016 | nsigint = 0; | |
15017 | set_signal_handler(SIGINT, sigint); | |
15018 | kill((int)getpid(), SIGINT); | |
15019 | kill((int)getpid(), SIGINT); | |
15020 | exit(nsigint != 2); | |
15021 | } | |
15022 | ||
f73dda09 | 15023 | _ACEOF |
1b1fe467 | 15024 | if ac_fn_c_try_run "$LINENO"; then : |
ccc6cda3 JA |
15025 | bash_cv_must_reinstall_sighandlers=no |
15026 | else | |
1b1fe467 | 15027 | bash_cv_must_reinstall_sighandlers=yes |
ccc6cda3 | 15028 | fi |
1b1fe467 CR |
15029 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15030 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 15031 | fi |
b709b946 | 15032 | |
ccc6cda3 JA |
15033 | fi |
15034 | ||
1b1fe467 | 15035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5 |
dd4f3dd8 | 15036 | $as_echo "$bash_cv_must_reinstall_sighandlers" >&6; } |
ccc6cda3 | 15037 | if test $bash_cv_must_reinstall_sighandlers = yes; then |
1b1fe467 | 15038 | $as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h |
ccc6cda3 JA |
15039 | |
15040 | fi | |
15041 | ||
a82a04b3 | 15042 | |
1b1fe467 | 15043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5 |
dd4f3dd8 | 15044 | $as_echo_n "checking for presence of necessary job control definitions... " >&6; } |
1b1fe467 | 15045 | if ${bash_cv_job_control_missing+:} false; then : |
dd4f3dd8 | 15046 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15047 | else |
1b1fe467 CR |
15048 | if test "$cross_compiling" = yes; then : |
15049 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5 | |
dd4f3dd8 | 15050 | $as_echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;} |
cce855bc JA |
15051 | bash_cv_job_control_missing=missing |
15052 | ||
ccc6cda3 | 15053 | else |
1b1fe467 | 15054 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15055 | /* end confdefs.h. */ |
ccc6cda3 JA |
15056 | |
15057 | #include <sys/types.h> | |
15058 | #ifdef HAVE_SYS_WAIT_H | |
15059 | #include <sys/wait.h> | |
15060 | #endif | |
15061 | #ifdef HAVE_UNISTD_H | |
15062 | #include <unistd.h> | |
15063 | #endif | |
15064 | #include <signal.h> | |
15065 | ||
15066 | /* Add more tests in here as appropriate. */ | |
15067 | main() | |
15068 | { | |
15069 | /* signal type */ | |
15070 | #if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) | |
15071 | exit(1); | |
15072 | #endif | |
15073 | ||
15074 | /* signals and tty control. */ | |
15075 | #if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) | |
15076 | exit (1); | |
15077 | #endif | |
15078 | ||
15079 | /* process control */ | |
f73dda09 | 15080 | #if !defined (WNOHANG) || !defined (WUNTRACED) |
ccc6cda3 JA |
15081 | exit(1); |
15082 | #endif | |
15083 | ||
15084 | /* Posix systems have tcgetpgrp and waitpid. */ | |
15085 | #if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) | |
15086 | exit(1); | |
15087 | #endif | |
15088 | ||
15089 | #if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) | |
15090 | exit(1); | |
15091 | #endif | |
15092 | ||
15093 | /* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ | |
15094 | #if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) | |
15095 | exit(1); | |
15096 | #endif | |
15097 | ||
15098 | exit(0); | |
15099 | } | |
f73dda09 | 15100 | _ACEOF |
1b1fe467 | 15101 | if ac_fn_c_try_run "$LINENO"; then : |
ccc6cda3 JA |
15102 | bash_cv_job_control_missing=present |
15103 | else | |
1b1fe467 | 15104 | bash_cv_job_control_missing=missing |
ccc6cda3 | 15105 | fi |
1b1fe467 CR |
15106 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15107 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 15108 | fi |
b709b946 | 15109 | |
ccc6cda3 JA |
15110 | fi |
15111 | ||
1b1fe467 | 15112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5 |
dd4f3dd8 | 15113 | $as_echo "$bash_cv_job_control_missing" >&6; } |
ccc6cda3 | 15114 | if test $bash_cv_job_control_missing = missing; then |
1b1fe467 | 15115 | $as_echo "#define JOB_CONTROL_MISSING 1" >>confdefs.h |
ccc6cda3 JA |
15116 | |
15117 | fi | |
15118 | ||
1b1fe467 | 15119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5 |
dd4f3dd8 | 15120 | $as_echo_n "checking for presence of named pipes... " >&6; } |
1b1fe467 | 15121 | if ${bash_cv_sys_named_pipes+:} false; then : |
dd4f3dd8 | 15122 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15123 | else |
1b1fe467 CR |
15124 | if test "$cross_compiling" = yes; then : |
15125 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 | |
dd4f3dd8 | 15126 | $as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;} |
cce855bc JA |
15127 | bash_cv_sys_named_pipes=missing |
15128 | ||
ccc6cda3 | 15129 | else |
1b1fe467 | 15130 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15131 | /* end confdefs.h. */ |
ccc6cda3 JA |
15132 | |
15133 | #include <sys/types.h> | |
15134 | #include <sys/stat.h> | |
15135 | #ifdef HAVE_UNISTD_H | |
15136 | #include <unistd.h> | |
15137 | #endif | |
15138 | ||
15139 | /* Add more tests in here as appropriate. */ | |
15140 | main() | |
15141 | { | |
bb70624e | 15142 | int fd, err; |
ccc6cda3 JA |
15143 | |
15144 | #if defined (HAVE_MKFIFO) | |
15145 | exit (0); | |
15146 | #endif | |
15147 | ||
15148 | #if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO)) | |
15149 | exit (1); | |
15150 | #endif | |
15151 | ||
15152 | #if defined (NeXT) | |
15153 | exit (1); | |
15154 | #endif | |
30915f17 | 15155 | err = mkdir("bash-aclocal", 0700); |
bb70624e JA |
15156 | if (err < 0) { |
15157 | perror ("mkdir"); | |
15158 | exit(1); | |
15159 | } | |
30915f17 | 15160 | fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0); |
bb70624e | 15161 | if (fd == -1) { |
30915f17 | 15162 | rmdir ("bash-aclocal"); |
ccc6cda3 | 15163 | exit (1); |
bb70624e | 15164 | } |
ccc6cda3 | 15165 | close(fd); |
30915f17 CR |
15166 | unlink ("bash-aclocal/sh-np-autoconf"); |
15167 | rmdir ("bash-aclocal"); | |
ccc6cda3 JA |
15168 | exit(0); |
15169 | } | |
f73dda09 | 15170 | _ACEOF |
1b1fe467 | 15171 | if ac_fn_c_try_run "$LINENO"; then : |
5e4a95c7 | 15172 | bash_cv_sys_named_pipes=present |
ccc6cda3 | 15173 | else |
1b1fe467 | 15174 | bash_cv_sys_named_pipes=missing |
5e4a95c7 | 15175 | fi |
1b1fe467 CR |
15176 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15177 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
ccc6cda3 | 15178 | fi |
b709b946 | 15179 | |
ccc6cda3 JA |
15180 | fi |
15181 | ||
1b1fe467 | 15182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5 |
dd4f3dd8 | 15183 | $as_echo "$bash_cv_sys_named_pipes" >&6; } |
5e4a95c7 | 15184 | if test $bash_cv_sys_named_pipes = missing; then |
1b1fe467 | 15185 | $as_echo "#define NAMED_PIPES_MISSING 1" >>confdefs.h |
5e4a95c7 CR |
15186 | |
15187 | fi | |
15188 | ||
15189 | ||
1b1fe467 | 15190 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5 |
dd4f3dd8 | 15191 | $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; } |
1b1fe467 | 15192 | if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then : |
dd4f3dd8 | 15193 | $as_echo_n "(cached) " >&6 |
f73dda09 | 15194 | else |
1b1fe467 | 15195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15196 | /* end confdefs.h. */ |
f73dda09 JA |
15197 | #include <sys/types.h> |
15198 | #include <termios.h> | |
15199 | #ifdef TIOCGWINSZ | |
15200 | yes | |
15201 | #endif | |
15202 | ||
15203 | _ACEOF | |
15204 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 15205 | $EGREP "yes" >/dev/null 2>&1; then : |
f73dda09 JA |
15206 | ac_cv_sys_tiocgwinsz_in_termios_h=yes |
15207 | else | |
15208 | ac_cv_sys_tiocgwinsz_in_termios_h=no | |
15209 | fi | |
15210 | rm -f conftest* | |
15211 | ||
15212 | fi | |
1b1fe467 | 15213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 |
dd4f3dd8 | 15214 | $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; } |
d166f048 | 15215 | |
f73dda09 | 15216 | if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then |
1b1fe467 | 15217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 |
dd4f3dd8 | 15218 | $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; } |
1b1fe467 | 15219 | if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then : |
dd4f3dd8 | 15220 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15221 | else |
1b1fe467 | 15222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15223 | /* end confdefs.h. */ |
ccc6cda3 JA |
15224 | #include <sys/types.h> |
15225 | #include <sys/ioctl.h> | |
f73dda09 JA |
15226 | #ifdef TIOCGWINSZ |
15227 | yes | |
15228 | #endif | |
15229 | ||
15230 | _ACEOF | |
15231 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
1b1fe467 | 15232 | $EGREP "yes" >/dev/null 2>&1; then : |
f73dda09 | 15233 | ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes |
ccc6cda3 | 15234 | else |
f73dda09 | 15235 | ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no |
ccc6cda3 JA |
15236 | fi |
15237 | rm -f conftest* | |
f73dda09 | 15238 | |
ccc6cda3 | 15239 | fi |
1b1fe467 | 15240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 |
dd4f3dd8 | 15241 | $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; } |
f73dda09 JA |
15242 | |
15243 | if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then | |
ccc6cda3 | 15244 | |
1b1fe467 | 15245 | $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h |
ccc6cda3 | 15246 | |
f73dda09 | 15247 | fi |
ccc6cda3 JA |
15248 | fi |
15249 | ||
1b1fe467 | 15250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5 |
dd4f3dd8 | 15251 | $as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; } |
1b1fe467 | 15252 | if ${bash_cv_tiocstat_in_ioctl+:} false; then : |
dd4f3dd8 | 15253 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15254 | else |
1b1fe467 | 15255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15256 | /* end confdefs.h. */ |
ccc6cda3 JA |
15257 | #include <sys/types.h> |
15258 | #include <sys/ioctl.h> | |
f73dda09 JA |
15259 | int |
15260 | main () | |
15261 | { | |
ccc6cda3 | 15262 | int x = TIOCSTAT; |
f73dda09 JA |
15263 | ; |
15264 | return 0; | |
15265 | } | |
15266 | _ACEOF | |
1b1fe467 | 15267 | if ac_fn_c_try_compile "$LINENO"; then : |
ccc6cda3 JA |
15268 | bash_cv_tiocstat_in_ioctl=yes |
15269 | else | |
1b1fe467 | 15270 | bash_cv_tiocstat_in_ioctl=no |
ccc6cda3 | 15271 | fi |
b709b946 | 15272 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ccc6cda3 JA |
15273 | fi |
15274 | ||
1b1fe467 | 15275 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5 |
dd4f3dd8 | 15276 | $as_echo "$bash_cv_tiocstat_in_ioctl" >&6; } |
f73dda09 | 15277 | if test $bash_cv_tiocstat_in_ioctl = yes; then |
1b1fe467 | 15278 | $as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h |
ccc6cda3 JA |
15279 | |
15280 | fi | |
15281 | ||
1b1fe467 | 15282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5 |
dd4f3dd8 | 15283 | $as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; } |
1b1fe467 | 15284 | if ${bash_cv_fionread_in_ioctl+:} false; then : |
dd4f3dd8 | 15285 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15286 | else |
1b1fe467 | 15287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15288 | /* end confdefs.h. */ |
ccc6cda3 JA |
15289 | #include <sys/types.h> |
15290 | #include <sys/ioctl.h> | |
f73dda09 JA |
15291 | int |
15292 | main () | |
15293 | { | |
ccc6cda3 | 15294 | int x = FIONREAD; |
f73dda09 JA |
15295 | ; |
15296 | return 0; | |
15297 | } | |
15298 | _ACEOF | |
1b1fe467 | 15299 | if ac_fn_c_try_compile "$LINENO"; then : |
ccc6cda3 JA |
15300 | bash_cv_fionread_in_ioctl=yes |
15301 | else | |
1b1fe467 | 15302 | bash_cv_fionread_in_ioctl=no |
ccc6cda3 | 15303 | fi |
b709b946 | 15304 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ccc6cda3 JA |
15305 | fi |
15306 | ||
1b1fe467 | 15307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5 |
dd4f3dd8 | 15308 | $as_echo "$bash_cv_fionread_in_ioctl" >&6; } |
f73dda09 | 15309 | if test $bash_cv_fionread_in_ioctl = yes; then |
1b1fe467 | 15310 | $as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h |
ccc6cda3 JA |
15311 | |
15312 | fi | |
15313 | ||
a82a04b3 CR |
15314 | |
15315 | ||
1b1fe467 | 15316 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5 |
dd4f3dd8 | 15317 | $as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; } |
1b1fe467 | 15318 | if ${bash_cv_wcontinued_broken+:} false; then : |
dd4f3dd8 | 15319 | $as_echo_n "(cached) " >&6 |
cac4cdbf | 15320 | else |
1b1fe467 CR |
15321 | if test "$cross_compiling" = yes; then : |
15322 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5 | |
dd4f3dd8 | 15323 | $as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;} |
cac4cdbf CR |
15324 | bash_cv_wcontinued_broken=no |
15325 | ||
15326 | else | |
1b1fe467 | 15327 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15328 | /* end confdefs.h. */ |
cac4cdbf CR |
15329 | |
15330 | #include <sys/types.h> | |
15331 | #include <sys/wait.h> | |
15332 | #include <unistd.h> | |
15333 | #include <errno.h> | |
15334 | ||
15335 | #ifndef errno | |
15336 | extern int errno; | |
15337 | #endif | |
15338 | main() | |
15339 | { | |
15340 | int x; | |
15341 | ||
15342 | x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED); | |
15343 | if (x == -1 && errno == EINVAL) | |
15344 | exit (1); | |
15345 | else | |
15346 | exit (0); | |
15347 | } | |
15348 | ||
15349 | _ACEOF | |
1b1fe467 | 15350 | if ac_fn_c_try_run "$LINENO"; then : |
cac4cdbf CR |
15351 | bash_cv_wcontinued_broken=no |
15352 | else | |
1b1fe467 | 15353 | bash_cv_wcontinued_broken=yes |
cac4cdbf | 15354 | fi |
1b1fe467 CR |
15355 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15356 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
cac4cdbf | 15357 | fi |
b709b946 | 15358 | |
cac4cdbf CR |
15359 | fi |
15360 | ||
1b1fe467 | 15361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5 |
dd4f3dd8 | 15362 | $as_echo "$bash_cv_wcontinued_broken" >&6; } |
cac4cdbf | 15363 | if test $bash_cv_wcontinued_broken = yes; then |
1b1fe467 | 15364 | $as_echo "#define WCONTINUED_BROKEN 1" >>confdefs.h |
cac4cdbf CR |
15365 | |
15366 | fi | |
15367 | ||
a82a04b3 | 15368 | |
1b1fe467 | 15369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5 |
dd4f3dd8 | 15370 | $as_echo_n "checking for speed_t in sys/types.h... " >&6; } |
1b1fe467 | 15371 | if ${bash_cv_speed_t_in_sys_types+:} false; then : |
dd4f3dd8 | 15372 | $as_echo_n "(cached) " >&6 |
d166f048 | 15373 | else |
1b1fe467 | 15374 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15375 | /* end confdefs.h. */ |
d166f048 | 15376 | #include <sys/types.h> |
f73dda09 JA |
15377 | int |
15378 | main () | |
15379 | { | |
d166f048 | 15380 | speed_t x; |
f73dda09 JA |
15381 | ; |
15382 | return 0; | |
15383 | } | |
15384 | _ACEOF | |
1b1fe467 | 15385 | if ac_fn_c_try_compile "$LINENO"; then : |
d166f048 JA |
15386 | bash_cv_speed_t_in_sys_types=yes |
15387 | else | |
1b1fe467 | 15388 | bash_cv_speed_t_in_sys_types=no |
d166f048 | 15389 | fi |
b709b946 | 15390 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d166f048 JA |
15391 | fi |
15392 | ||
1b1fe467 | 15393 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5 |
dd4f3dd8 | 15394 | $as_echo "$bash_cv_speed_t_in_sys_types" >&6; } |
f73dda09 | 15395 | if test $bash_cv_speed_t_in_sys_types = yes; then |
1b1fe467 | 15396 | $as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h |
d166f048 JA |
15397 | |
15398 | fi | |
15399 | ||
1b1fe467 | 15400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5 |
dd4f3dd8 | 15401 | $as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; } |
1b1fe467 | 15402 | if ${bash_cv_getpw_declared+:} false; then : |
dd4f3dd8 | 15403 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15404 | else |
1b1fe467 | 15405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15406 | /* end confdefs.h. */ |
28ef6c31 | 15407 | |
ccc6cda3 | 15408 | #include <sys/types.h> |
28ef6c31 JA |
15409 | #ifdef HAVE_UNISTD_H |
15410 | # include <unistd.h> | |
15411 | #endif | |
ccc6cda3 | 15412 | #include <pwd.h> |
28ef6c31 | 15413 | |
f73dda09 | 15414 | _ACEOF |
28ef6c31 | 15415 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1b1fe467 | 15416 | $EGREP "getpwuid" >/dev/null 2>&1; then : |
28ef6c31 | 15417 | bash_cv_getpw_declared=yes |
ccc6cda3 | 15418 | else |
28ef6c31 | 15419 | bash_cv_getpw_declared=no |
ccc6cda3 JA |
15420 | fi |
15421 | rm -f conftest* | |
28ef6c31 | 15422 | |
ccc6cda3 JA |
15423 | fi |
15424 | ||
1b1fe467 | 15425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5 |
dd4f3dd8 | 15426 | $as_echo "$bash_cv_getpw_declared" >&6; } |
28ef6c31 | 15427 | if test $bash_cv_getpw_declared = yes; then |
1b1fe467 | 15428 | $as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h |
ccc6cda3 JA |
15429 | |
15430 | fi | |
15431 | ||
1b1fe467 | 15432 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5 |
dd4f3dd8 | 15433 | $as_echo_n "checking for unusable real-time signals due to large values... " >&6; } |
1b1fe467 | 15434 | if ${bash_cv_unusable_rtsigs+:} false; then : |
dd4f3dd8 | 15435 | $as_echo_n "(cached) " >&6 |
28ef6c31 | 15436 | else |
1b1fe467 CR |
15437 | if test "$cross_compiling" = yes; then : |
15438 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 | |
dd4f3dd8 | 15439 | $as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;} |
28ef6c31 JA |
15440 | bash_cv_unusable_rtsigs=yes |
15441 | ||
15442 | else | |
1b1fe467 | 15443 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15444 | /* end confdefs.h. */ |
28ef6c31 JA |
15445 | |
15446 | #include <sys/types.h> | |
15447 | #include <signal.h> | |
15448 | ||
15449 | #ifndef NSIG | |
15450 | # define NSIG 64 | |
15451 | #endif | |
15452 | ||
15453 | main () | |
15454 | { | |
15455 | int n_sigs = 2 * NSIG; | |
15456 | #ifdef SIGRTMIN | |
15457 | int rtmin = SIGRTMIN; | |
15458 | #else | |
15459 | int rtmin = 0; | |
15460 | #endif | |
15461 | ||
15462 | exit(rtmin < n_sigs); | |
15463 | } | |
f73dda09 | 15464 | _ACEOF |
1b1fe467 | 15465 | if ac_fn_c_try_run "$LINENO"; then : |
28ef6c31 JA |
15466 | bash_cv_unusable_rtsigs=yes |
15467 | else | |
1b1fe467 | 15468 | bash_cv_unusable_rtsigs=no |
28ef6c31 | 15469 | fi |
1b1fe467 CR |
15470 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15471 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
28ef6c31 | 15472 | fi |
b709b946 | 15473 | |
28ef6c31 JA |
15474 | fi |
15475 | ||
1b1fe467 | 15476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5 |
dd4f3dd8 | 15477 | $as_echo "$bash_cv_unusable_rtsigs" >&6; } |
28ef6c31 | 15478 | if test $bash_cv_unusable_rtsigs = yes; then |
1b1fe467 | 15479 | $as_echo "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h |
28ef6c31 JA |
15480 | |
15481 | fi | |
15482 | ||
a82a04b3 CR |
15483 | |
15484 | ||
15485 | ||
15486 | ||
f73dda09 JA |
15487 | if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then |
15488 | SIGLIST_O=siglist.o | |
15489 | else | |
15490 | SIGLIST_O= | |
15491 | fi | |
ccc6cda3 | 15492 | |
a82a04b3 CR |
15493 | |
15494 | ||
ccc6cda3 | 15495 | case "$host_os" in |
1b1fe467 | 15496 | hpux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 |
dd4f3dd8 | 15497 | $as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; } |
1b1fe467 | 15498 | if ${bash_cv_kernel_rlimit+:} false; then : |
dd4f3dd8 | 15499 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15500 | else |
1b1fe467 | 15501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15502 | /* end confdefs.h. */ |
ccc6cda3 JA |
15503 | |
15504 | #include <sys/types.h> | |
15505 | #include <sys/resource.h> | |
15506 | ||
f73dda09 JA |
15507 | int |
15508 | main () | |
15509 | { | |
ccc6cda3 JA |
15510 | |
15511 | int f; | |
15512 | f = RLIMIT_DATA; | |
15513 | ||
f73dda09 JA |
15514 | ; |
15515 | return 0; | |
15516 | } | |
15517 | _ACEOF | |
1b1fe467 | 15518 | if ac_fn_c_try_compile "$LINENO"; then : |
ccc6cda3 JA |
15519 | bash_cv_kernel_rlimit=no |
15520 | else | |
1b1fe467 | 15521 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15522 | /* end confdefs.h. */ |
ccc6cda3 | 15523 | |
cce855bc JA |
15524 | #include <sys/types.h> |
15525 | #define _KERNEL | |
15526 | #include <sys/resource.h> | |
15527 | #undef _KERNEL | |
15528 | ||
f73dda09 JA |
15529 | int |
15530 | main () | |
15531 | { | |
ccc6cda3 JA |
15532 | |
15533 | int f; | |
15534 | f = RLIMIT_DATA; | |
cce855bc | 15535 | |
f73dda09 JA |
15536 | ; |
15537 | return 0; | |
15538 | } | |
15539 | _ACEOF | |
1b1fe467 | 15540 | if ac_fn_c_try_compile "$LINENO"; then : |
ccc6cda3 JA |
15541 | bash_cv_kernel_rlimit=yes |
15542 | else | |
1b1fe467 | 15543 | bash_cv_kernel_rlimit=no |
ccc6cda3 | 15544 | fi |
b709b946 | 15545 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ccc6cda3 JA |
15546 | |
15547 | fi | |
b709b946 | 15548 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
ccc6cda3 JA |
15549 | fi |
15550 | ||
1b1fe467 | 15551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5 |
dd4f3dd8 | 15552 | $as_echo "$bash_cv_kernel_rlimit" >&6; } |
ccc6cda3 | 15553 | if test $bash_cv_kernel_rlimit = yes; then |
1b1fe467 | 15554 | $as_echo "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h |
ccc6cda3 JA |
15555 | |
15556 | fi | |
15557 | ;; | |
15558 | esac | |
15559 | ||
15560 | if test "$opt_readline" = yes; then | |
d166f048 JA |
15561 | case "$host_os" in |
15562 | aix*) prefer_curses=yes ;; | |
15563 | esac | |
ccc6cda3 JA |
15564 | |
15565 | if test "X$bash_cv_termcap_lib" = "X"; then | |
15566 | _bash_needmsg=yes | |
15567 | else | |
1b1fe467 | 15568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 |
dd4f3dd8 | 15569 | $as_echo_n "checking which library has the termcap functions... " >&6; } |
ccc6cda3 JA |
15570 | _bash_needmsg= |
15571 | fi | |
1b1fe467 CR |
15572 | if ${bash_cv_termcap_lib+:} false; then : |
15573 | $as_echo_n "(cached) " >&6 | |
15574 | else | |
15575 | ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" | |
15576 | if test "x$ac_cv_func_tgetent" = xyes; then : | |
d3a24ed2 CR |
15577 | bash_cv_termcap_lib=libc |
15578 | else | |
1b1fe467 | 15579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 |
dd4f3dd8 | 15580 | $as_echo_n "checking for tgetent in -ltermcap... " >&6; } |
1b1fe467 | 15581 | if ${ac_cv_lib_termcap_tgetent+:} false; then : |
dd4f3dd8 | 15582 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15583 | else |
f73dda09 | 15584 | ac_check_lib_save_LIBS=$LIBS |
ccc6cda3 | 15585 | LIBS="-ltermcap $LIBS" |
1b1fe467 | 15586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15587 | /* end confdefs.h. */ |
f73dda09 | 15588 | |
b709b946 CR |
15589 | /* Override any GCC internal prototype to avoid an error. |
15590 | Use char because int might match the return type of a GCC | |
15591 | builtin and then its argument prototype would still apply. */ | |
f73dda09 JA |
15592 | #ifdef __cplusplus |
15593 | extern "C" | |
15594 | #endif | |
f73dda09 JA |
15595 | char tgetent (); |
15596 | int | |
15597 | main () | |
15598 | { | |
b709b946 | 15599 | return tgetent (); |
f73dda09 JA |
15600 | ; |
15601 | return 0; | |
15602 | } | |
15603 | _ACEOF | |
1b1fe467 | 15604 | if ac_fn_c_try_link "$LINENO"; then : |
f73dda09 JA |
15605 | ac_cv_lib_termcap_tgetent=yes |
15606 | else | |
1b1fe467 | 15607 | ac_cv_lib_termcap_tgetent=no |
f73dda09 | 15608 | fi |
1b1fe467 CR |
15609 | rm -f core conftest.err conftest.$ac_objext \ |
15610 | conftest$ac_exeext conftest.$ac_ext | |
f73dda09 JA |
15611 | LIBS=$ac_check_lib_save_LIBS |
15612 | fi | |
1b1fe467 | 15613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 |
dd4f3dd8 | 15614 | $as_echo "$ac_cv_lib_termcap_tgetent" >&6; } |
1b1fe467 | 15615 | if test "x$ac_cv_lib_termcap_tgetent" = xyes; then : |
ccc6cda3 JA |
15616 | bash_cv_termcap_lib=libtermcap |
15617 | else | |
1b1fe467 | 15618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 |
dd4f3dd8 | 15619 | $as_echo_n "checking for tgetent in -ltinfo... " >&6; } |
1b1fe467 | 15620 | if ${ac_cv_lib_tinfo_tgetent+:} false; then : |
dd4f3dd8 | 15621 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15622 | else |
f73dda09 JA |
15623 | ac_check_lib_save_LIBS=$LIBS |
15624 | LIBS="-ltinfo $LIBS" | |
1b1fe467 | 15625 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15626 | /* end confdefs.h. */ |
f73dda09 | 15627 | |
b709b946 CR |
15628 | /* Override any GCC internal prototype to avoid an error. |
15629 | Use char because int might match the return type of a GCC | |
15630 | builtin and then its argument prototype would still apply. */ | |
f73dda09 JA |
15631 | #ifdef __cplusplus |
15632 | extern "C" | |
15633 | #endif | |
f73dda09 JA |
15634 | char tgetent (); |
15635 | int | |
15636 | main () | |
15637 | { | |
b709b946 | 15638 | return tgetent (); |
f73dda09 JA |
15639 | ; |
15640 | return 0; | |
15641 | } | |
15642 | _ACEOF | |
1b1fe467 | 15643 | if ac_fn_c_try_link "$LINENO"; then : |
f73dda09 JA |
15644 | ac_cv_lib_tinfo_tgetent=yes |
15645 | else | |
1b1fe467 | 15646 | ac_cv_lib_tinfo_tgetent=no |
f73dda09 | 15647 | fi |
1b1fe467 CR |
15648 | rm -f core conftest.err conftest.$ac_objext \ |
15649 | conftest$ac_exeext conftest.$ac_ext | |
f73dda09 JA |
15650 | LIBS=$ac_check_lib_save_LIBS |
15651 | fi | |
1b1fe467 | 15652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 |
dd4f3dd8 | 15653 | $as_echo "$ac_cv_lib_tinfo_tgetent" >&6; } |
1b1fe467 | 15654 | if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then : |
7117c2d2 | 15655 | bash_cv_termcap_lib=libtinfo |
f73dda09 | 15656 | else |
1b1fe467 | 15657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 |
dd4f3dd8 | 15658 | $as_echo_n "checking for tgetent in -lcurses... " >&6; } |
1b1fe467 | 15659 | if ${ac_cv_lib_curses_tgetent+:} false; then : |
dd4f3dd8 | 15660 | $as_echo_n "(cached) " >&6 |
f73dda09 JA |
15661 | else |
15662 | ac_check_lib_save_LIBS=$LIBS | |
15663 | LIBS="-lcurses $LIBS" | |
1b1fe467 | 15664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15665 | /* end confdefs.h. */ |
ccc6cda3 | 15666 | |
b709b946 CR |
15667 | /* Override any GCC internal prototype to avoid an error. |
15668 | Use char because int might match the return type of a GCC | |
15669 | builtin and then its argument prototype would still apply. */ | |
f73dda09 JA |
15670 | #ifdef __cplusplus |
15671 | extern "C" | |
15672 | #endif | |
f73dda09 JA |
15673 | char tgetent (); |
15674 | int | |
15675 | main () | |
15676 | { | |
b709b946 | 15677 | return tgetent (); |
f73dda09 JA |
15678 | ; |
15679 | return 0; | |
15680 | } | |
15681 | _ACEOF | |
1b1fe467 | 15682 | if ac_fn_c_try_link "$LINENO"; then : |
f73dda09 JA |
15683 | ac_cv_lib_curses_tgetent=yes |
15684 | else | |
1b1fe467 | 15685 | ac_cv_lib_curses_tgetent=no |
f73dda09 | 15686 | fi |
1b1fe467 CR |
15687 | rm -f core conftest.err conftest.$ac_objext \ |
15688 | conftest$ac_exeext conftest.$ac_ext | |
f73dda09 JA |
15689 | LIBS=$ac_check_lib_save_LIBS |
15690 | fi | |
1b1fe467 | 15691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 |
dd4f3dd8 | 15692 | $as_echo "$ac_cv_lib_curses_tgetent" >&6; } |
1b1fe467 | 15693 | if test "x$ac_cv_lib_curses_tgetent" = xyes; then : |
ccc6cda3 JA |
15694 | bash_cv_termcap_lib=libcurses |
15695 | else | |
1b1fe467 | 15696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 |
dd4f3dd8 | 15697 | $as_echo_n "checking for tgetent in -lncurses... " >&6; } |
1b1fe467 | 15698 | if ${ac_cv_lib_ncurses_tgetent+:} false; then : |
dd4f3dd8 | 15699 | $as_echo_n "(cached) " >&6 |
ccc6cda3 | 15700 | else |
f73dda09 | 15701 | ac_check_lib_save_LIBS=$LIBS |
ccc6cda3 | 15702 | LIBS="-lncurses $LIBS" |
1b1fe467 | 15703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5e4a95c7 | 15704 | /* end confdefs.h. */ |
f73dda09 | 15705 | |
b709b946 CR |
15706 | /* Override any GCC internal prototype to avoid an error. |
15707 | Use char because int might match the return type of a GCC | |
15708 | builtin and then its argument prototype would still apply. */ | |
f73dda09 JA |
15709 | #ifdef __cplusplus |
15710 | extern "C" | |
15711 | #endif | |
f73dda09 JA |
15712 | char tgetent (); |
15713 | int | |
15714 | main () | |
15715 | { | |
b709b946 | 15716 | return tgetent (); |
f73dda09 JA |
15717 | ; |
15718 | return 0; | |
15719 | } | |
15720 | _ACEOF | |
1b1fe467 | 15721 | if ac_fn_c_try_link "$LINENO"; then : |
f73dda09 JA |
15722 | ac_cv_lib_ncurses_tgetent=yes |
15723 | else | |
1b1fe467 | 15724 | ac_cv_lib_ncurses_tgetent=no |
f73dda09 | 15725 | fi |
1b1fe467 CR |
15726 | rm -f core conftest.err conftest.$ac_objext \ |
15727 | conftest$ac_exeext conftest.$ac_ext | |
f73dda09 JA |
15728 | LIBS=$ac_check_lib_save_LIBS |
15729 | fi | |
1b1fe467 | 15730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 |
dd4f3dd8 | 15731 | $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } |
1b1fe467 | 15732 | if test "x$ac_cv_lib_ncurses_tgetent" = xyes; then : |
f73dda09 | 15733 | bash_cv_termcap_lib=libncurses |
ccc6cda3 | 15734 | else |
f73dda09 | 15735 | bash_cv_termcap_lib=gnutermcap |
ccc6cda3 | 15736 | fi |
ccc6cda3 | 15737 | |
ccc6cda3 JA |
15738 | fi |
15739 | ||
15740 | fi | |
15741 | ||
15742 | fi | |
15743 | ||
15744 | fi | |
15745 | ||
d3a24ed2 CR |
15746 | fi |
15747 | ||
ccc6cda3 | 15748 | if test "X$_bash_needmsg" = "Xyes"; then |
1b1fe467 | 15749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 |
dd4f3dd8 | 15750 | $as_echo_n "checking which library has the termcap functions... " >&6; } |
ccc6cda3 | 15751 | fi |
1b1fe467 | 15752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 |
dd4f3dd8 | 15753 | $as_echo "using $bash_cv_termcap_lib" >&6; } |
cce855bc | 15754 | if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then |
ccc6cda3 JA |
15755 | LDFLAGS="$LDFLAGS -L./lib/termcap" |
15756 | TERMCAP_LIB="./lib/termcap/libtermcap.a" | |
15757 | TERMCAP_DEP="./lib/termcap/libtermcap.a" | |
d166f048 | 15758 | elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then |
ccc6cda3 JA |
15759 | TERMCAP_LIB=-ltermcap |
15760 | TERMCAP_DEP= | |
f73dda09 JA |
15761 | elif test $bash_cv_termcap_lib = libtinfo; then |
15762 | TERMCAP_LIB=-ltinfo | |
15763 | TERMCAP_DEP= | |
ccc6cda3 JA |
15764 | elif test $bash_cv_termcap_lib = libncurses; then |
15765 | TERMCAP_LIB=-lncurses | |
15766 | TERMCAP_DEP= | |
d3a24ed2 CR |
15767 | elif test $bash_cv_termcap_lib = libc; then |
15768 | TERMCAP_LIB= | |
15769 | TERMCAP_DEP= | |
ccc6cda3 JA |
15770 | else |
15771 | TERMCAP_LIB=-lcurses | |
15772 | TERMCAP_DEP= | |
15773 | fi | |
15774 | ||
15775 | fi | |
15776 | ||
a82a04b3 CR |
15777 | |
15778 | ||
1b1fe467 | 15779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5 |
dd4f3dd8 | 15780 | $as_echo_n "checking whether /dev/fd is available... " >&6; } |
1b1fe467 | 15781 | if ${bash_cv_dev_fd+:} false; then : |
dd4f3dd8 | 15782 | $as_echo_n "(cached) " >&6 |
d166f048 | 15783 | else |
d3ad40de CR |
15784 | bash_cv_dev_fd="" |
15785 | if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then | |
de3341d1 | 15786 | # check for systems like FreeBSD 5 that only provide /dev/fd/[012] |
d3ad40de | 15787 | if (exec test -r /dev/fd/3 3</dev/null) ; then |
de3341d1 CR |
15788 | bash_cv_dev_fd=standard |
15789 | else | |
15790 | bash_cv_dev_fd=absent | |
15791 | fi | |
d3ad40de CR |
15792 | fi |
15793 | if test -z "$bash_cv_dev_fd" ; then | |
15794 | if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then | |
15795 | bash_cv_dev_fd=whacky | |
15796 | else | |
15797 | bash_cv_dev_fd=absent | |
15798 | fi | |
15799 | fi | |
d166f048 JA |
15800 | |
15801 | fi | |
15802 | ||
1b1fe467 | 15803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5 |
dd4f3dd8 | 15804 | $as_echo "$bash_cv_dev_fd" >&6; } |
d166f048 | 15805 | if test $bash_cv_dev_fd = "standard"; then |
1b1fe467 | 15806 | $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h |
d166f048 | 15807 | |
1b1fe467 | 15808 | $as_echo "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h |
d166f048 JA |
15809 | |
15810 | elif test $bash_cv_dev_fd = "whacky"; then | |
1b1fe467 | 15811 | $as_echo "#define HAVE_DEV_FD 1" >>confdefs.h |
d166f048 | 15812 | |
1b1fe467 | 15813 | $as_echo "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h |
d166f048 JA |
15814 | |
15815 | fi | |
15816 | ||
1b1fe467 | 15817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5 |
dd4f3dd8 | 15818 | $as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; } |
1b1fe467 | 15819 | if ${bash_cv_dev_stdin+:} false; then : |
dd4f3dd8 | 15820 | $as_echo_n "(cached) " >&6 |
bb70624e | 15821 | else |
d3ad40de | 15822 | if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then |
bb70624e | 15823 | bash_cv_dev_stdin=present |
d3ad40de | 15824 | elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then |
bb70624e JA |
15825 | bash_cv_dev_stdin=present |
15826 | else | |
15827 | bash_cv_dev_stdin=absent | |
15828 | fi | |
15829 | ||
15830 | fi | |
15831 | ||
1b1fe467 | 15832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5 |
dd4f3dd8 | 15833 | $as_echo "$bash_cv_dev_stdin" >&6; } |
bb70624e | 15834 | if test $bash_cv_dev_stdin = "present"; then |
1b1fe467 | 15835 | $as_echo "#define HAVE_DEV_STDIN 1" >>confdefs.h |
bb70624e JA |
15836 | |
15837 | fi | |
15838 | ||
1b1fe467 | 15839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5 |
dd4f3dd8 | 15840 | $as_echo_n "checking for default mail directory... " >&6; } |
1b1fe467 | 15841 | if ${bash_cv_mail_dir+:} false; then : |
dd4f3dd8 | 15842 | $as_echo_n "(cached) " >&6 |
ccc6cda3 JA |
15843 | else |
15844 | if test -d /var/mail; then | |
15845 | bash_cv_mail_dir=/var/mail | |
ccc6cda3 JA |
15846 | elif test -d /var/spool/mail; then |
15847 | bash_cv_mail_dir=/var/spool/mail | |
7117c2d2 JA |
15848 | elif test -d /usr/mail; then |
15849 | bash_cv_mail_dir=/usr/mail | |
e8ce775d JA |
15850 | elif test -d /usr/spool/mail; then |
15851 | bash_cv_mail_dir=/usr/spool/mail | |
ccc6cda3 JA |
15852 | else |
15853 | bash_cv_mail_dir=unknown | |
15854 | fi | |
15855 | ||
15856 | fi | |
15857 | ||
1b1fe467 | 15858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5 |
dd4f3dd8 | 15859 | $as_echo "$bash_cv_mail_dir" >&6; } |
a82a04b3 | 15860 | cat >>confdefs.h <<_ACEOF |
7117c2d2 | 15861 | #define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir" |
a82a04b3 CR |
15862 | _ACEOF |
15863 | ||
15864 | ||
ccc6cda3 | 15865 | |
ccc6cda3 JA |
15866 | if test "$bash_cv_job_control_missing" = missing; then |
15867 | opt_job_control=no | |
15868 | fi | |
15869 | ||
15870 | if test "$opt_job_control" = yes; then | |
1b1fe467 | 15871 | $as_echo "#define JOB_CONTROL 1" >>confdefs.h |
ccc6cda3 JA |
15872 | |
15873 | JOBS_O=jobs.o | |
15874 | else | |
15875 | JOBS_O=nojobs.o | |
15876 | fi | |
15877 | ||
a82a04b3 CR |
15878 | |
15879 | ||
15880 | ||
d166f048 JA |
15881 | LOCAL_DEFS=-DSHELL |
15882 | ||
a82a04b3 | 15883 | |
b72432fd | 15884 | case "${host_os}" in |
1b1fe467 | 15885 | sysv4.2*) $as_echo "#define SVR4_2 1" >>confdefs.h |
ccc6cda3 | 15886 | |
1b1fe467 | 15887 | $as_echo "#define SVR4 1" >>confdefs.h |
ccc6cda3 | 15888 | ;; |
1b1fe467 | 15889 | sysv4*) $as_echo "#define SVR4 1" >>confdefs.h |
ccc6cda3 | 15890 | ;; |
1b1fe467 | 15891 | sysv5*) $as_echo "#define SVR5 1" >>confdefs.h |
b72432fd JA |
15892 | ;; |
15893 | hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;; | |
ccc6cda3 JA |
15894 | hpux*) LOCAL_CFLAGS=-DHPUX ;; |
15895 | dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; | |
bb70624e JA |
15896 | isc*) LOCAL_CFLAGS=-Disc386 ;; |
15897 | rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; | |
f73dda09 | 15898 | darwin*) LOCAL_CFLAGS=-DMACOSX ;; |
7117c2d2 JA |
15899 | sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; |
15900 | sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; | |
ccc6cda3 | 15901 | sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; |
d166f048 | 15902 | sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; |
d3ad40de | 15903 | solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;; |
db31fb26 CR |
15904 | solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;; |
15905 | solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;; | |
15906 | solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; | |
d3ad40de | 15907 | solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; |
b72432fd | 15908 | lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; |
3ffb039a CR |
15909 | linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading |
15910 | case "`uname -r`" in | |
1b1fe467 | 15911 | 2.[456789]*|3*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h |
3ffb039a CR |
15912 | ;; |
15913 | esac ;; | |
fd3925f1 | 15914 | *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; |
7117c2d2 | 15915 | *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; |
b72432fd | 15916 | powerux*) LOCAL_LIBS="-lgen" ;; |
d3a24ed2 | 15917 | cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; |
fd58d46e | 15918 | opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; |
10e78433 | 15919 | *openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; |
b72432fd JA |
15920 | esac |
15921 | ||
15922 | case "${host_os}-${CC}" in | |
15923 | aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;; | |
15924 | aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;; | |
15925 | bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux | |
ccc6cda3 JA |
15926 | esac |
15927 | ||
bb70624e | 15928 | case "${host_os}" in |
28ef6c31 JA |
15929 | freebsd[3-9]*) |
15930 | if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then | |
bb70624e JA |
15931 | LOCAL_LDFLAGS=-rdynamic # allow dynamic loading |
15932 | fi ;; | |
28ef6c31 | 15933 | freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading |
798a67db | 15934 | dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading |
bb70624e JA |
15935 | esac |
15936 | ||
ccc6cda3 JA |
15937 | case "$host_cpu" in |
15938 | *cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it | |
15939 | esac | |
15940 | ||
15941 | case "$host_cpu-$host_os" in | |
15942 | ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;; | |
15943 | esac | |
15944 | ||
15945 | case "$host_cpu-$host_vendor-$host_os" in | |
15946 | m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;; | |
15947 | mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; | |
15948 | esac | |
15949 | ||
b72432fd JA |
15950 | # |
15951 | # Shared object configuration section. These values are generated by | |
15952 | # ${srcdir}/support/shobj-conf | |
15953 | # | |
15954 | if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf | |
15955 | then | |
1b1fe467 | 15956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5 |
dd4f3dd8 | 15957 | $as_echo_n "checking shared object configuration for loadable builtins... " >&6; } |
28ef6c31 | 15958 | eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` |
f73dda09 | 15959 | |
a82a04b3 CR |
15960 | |
15961 | ||
15962 | ||
15963 | ||
15964 | ||
15965 | ||
1b1fe467 | 15966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5 |
dd4f3dd8 | 15967 | $as_echo "$SHOBJ_STATUS" >&6; } |
b72432fd JA |
15968 | fi |
15969 | ||
ccc6cda3 JA |
15970 | # try to create a directory tree if the source is elsewhere |
15971 | # this should be packaged into a script accessible via ${srcdir}/support | |
15972 | case "$srcdir" in | |
15973 | .) ;; | |
cce855bc | 15974 | *) for d in doc tests support lib examples; do # dirs |
ccc6cda3 JA |
15975 | test -d $d || mkdir $d |
15976 | done | |
cce855bc | 15977 | for ld in readline glob tilde malloc sh termcap; do # libdirs |
ccc6cda3 JA |
15978 | test -d lib/$ld || mkdir lib/$ld |
15979 | done | |
cce855bc | 15980 | test -d examples/loadables || mkdir examples/loadables # loadable builtins |
bb70624e | 15981 | test -d examples/loadables/perl || mkdir examples/loadables/perl |
ccc6cda3 JA |
15982 | ;; |
15983 | esac | |
15984 | ||
15985 | BUILD_DIR=`pwd` | |
10590446 CR |
15986 | case "$BUILD_DIR" in |
15987 | *\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;; | |
15988 | *) ;; | |
15989 | esac | |
ccc6cda3 | 15990 | |
c184f645 CR |
15991 | if test -z "$localedir"; then |
15992 | localedir='${datarootdir}/locale' | |
15993 | fi | |
15994 | if test -z "$datarootdir"; then | |
15995 | datarootdir='${prefix}/share' | |
15996 | fi | |
a82a04b3 CR |
15997 | |
15998 | ||
15999 | ||
16000 | ||
16001 | ||
16002 | ||
c184f645 CR |
16003 | # Some versions of autoconf don't substitute these automatically |
16004 | ||
a82a04b3 CR |
16005 | |
16006 | ||
16007 | ||
16008 | ||
16009 | ||
16010 | ||
16011 | ||
16012 | ||
16013 | ||
16014 | ||
16015 | ||
16016 | ||
16017 | ||
16018 | ||
16019 | ||
16020 | ||
16021 | ||
d166f048 | 16022 | |
d3ad40de | 16023 | |
d3ad40de | 16024 | |
c184f645 CR |
16025 | #AC_SUBST(ALLOCA_SOURCE) |
16026 | #AC_SUBST(ALLOCA_OBJECT) | |
16027 | ||
b709b946 CR |
16028 | ac_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/perl/Makefile" |
16029 | ||
16030 | ac_config_commands="$ac_config_commands default" | |
16031 | ||
f73dda09 | 16032 | cat >confcache <<\_ACEOF |
ccc6cda3 JA |
16033 | # This file is a shell script that caches the results of configure |
16034 | # tests run on this system so they can be shared between configure | |
f73dda09 JA |
16035 | # scripts and configure runs, see configure's option --config-cache. |
16036 | # It is not useful on other systems. If it contains results you don't | |
16037 | # want to keep, you may remove or edit it. | |
726f6388 | 16038 | # |
f73dda09 JA |
16039 | # config.status only pays attention to the cache file if you give it |
16040 | # the --recheck option to rerun configure. | |
ccc6cda3 | 16041 | # |
5e4a95c7 | 16042 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
f73dda09 JA |
16043 | # loading this file, other *unset* `ac_cv_foo' will be assigned the |
16044 | # following values. | |
16045 | ||
16046 | _ACEOF | |
16047 | ||
ccc6cda3 JA |
16048 | # The following way of writing the cache mishandles newlines in values, |
16049 | # but we know of no workaround that is simple, portable, and efficient. | |
b709b946 | 16050 | # So, we kill variables containing newlines. |
ccc6cda3 JA |
16051 | # Ultrix sh set writes to stderr and can't be redirected directly, |
16052 | # and sets the high bit in the cache file unless we assign to the vars. | |
b709b946 CR |
16053 | ( |
16054 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
16055 | eval ac_val=\$$ac_var | |
16056 | case $ac_val in #( | |
16057 | *${as_nl}*) | |
16058 | case $ac_var in #( | |
1b1fe467 | 16059 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
af98a2a6 | 16060 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
b709b946 CR |
16061 | esac |
16062 | case $ac_var in #( | |
16063 | _ | IFS | as_nl) ;; #( | |
dd4f3dd8 | 16064 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
1b1fe467 | 16065 | *) { eval $ac_var=; unset $ac_var;} ;; |
b709b946 CR |
16066 | esac ;; |
16067 | esac | |
16068 | done | |
16069 | ||
f73dda09 | 16070 | (set) 2>&1 | |
b709b946 CR |
16071 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
16072 | *${as_nl}ac_space=\ *) | |
1b1fe467 CR |
16073 | # `set' does not quote correctly, so add quotes: double-quote |
16074 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
f73dda09 | 16075 | sed -n \ |
5e4a95c7 CR |
16076 | "s/'/'\\\\''/g; |
16077 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
b709b946 | 16078 | ;; #( |
f73dda09 JA |
16079 | *) |
16080 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
b709b946 | 16081 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
f73dda09 | 16082 | ;; |
b709b946 CR |
16083 | esac | |
16084 | sort | |
16085 | ) | | |
f73dda09 | 16086 | sed ' |
b709b946 | 16087 | /^ac_cv_env_/b end |
f73dda09 | 16088 | t clear |
b709b946 | 16089 | :clear |
f73dda09 JA |
16090 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
16091 | t end | |
b709b946 CR |
16092 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
16093 | :end' >>confcache | |
16094 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
16095 | if test -w "$cache_file"; then | |
1b1fe467 CR |
16096 | if test "x$cache_file" != "x/dev/null"; then |
16097 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
dd4f3dd8 | 16098 | $as_echo "$as_me: updating cache $cache_file" >&6;} |
1b1fe467 CR |
16099 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
16100 | cat confcache >"$cache_file" | |
16101 | else | |
16102 | case $cache_file in #( | |
16103 | */* | ?:*) | |
16104 | mv -f confcache "$cache_file"$$ && | |
16105 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
16106 | *) | |
16107 | mv -f confcache "$cache_file" ;; | |
16108 | esac | |
16109 | fi | |
16110 | fi | |
ccc6cda3 | 16111 | else |
1b1fe467 | 16112 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
dd4f3dd8 | 16113 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
ccc6cda3 JA |
16114 | fi |
16115 | fi | |
16116 | rm -f confcache | |
16117 | ||
ccc6cda3 JA |
16118 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
16119 | # Let make expand exec_prefix. | |
16120 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16121 | ||
ccc6cda3 JA |
16122 | DEFS=-DHAVE_CONFIG_H |
16123 | ||
5e4a95c7 CR |
16124 | ac_libobjs= |
16125 | ac_ltlibobjs= | |
1b1fe467 | 16126 | U= |
5e4a95c7 CR |
16127 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
16128 | # 1. Remove the extension, and $U if already installed. | |
b709b946 | 16129 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
dd4f3dd8 | 16130 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` |
b709b946 CR |
16131 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR |
16132 | # will be set to the directory where LIBOBJS objects are built. | |
1b1fe467 CR |
16133 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" |
16134 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
5e4a95c7 CR |
16135 | done |
16136 | LIBOBJS=$ac_libobjs | |
16137 | ||
16138 | LTLIBOBJS=$ac_ltlibobjs | |
16139 | ||
16140 | ||
a82a04b3 | 16141 | |
af98a2a6 | 16142 | |
1b1fe467 | 16143 | : "${CONFIG_STATUS=./config.status}" |
dd4f3dd8 | 16144 | ac_write_fail=0 |
f73dda09 JA |
16145 | ac_clean_files_save=$ac_clean_files |
16146 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
1b1fe467 | 16147 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
dd4f3dd8 | 16148 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} |
1b1fe467 CR |
16149 | as_write_fail=0 |
16150 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
f73dda09 | 16151 | #! $SHELL |
a82a04b3 | 16152 | # Generated by $as_me. |
ccc6cda3 | 16153 | # Run this file to recreate the current configuration. |
ccc6cda3 | 16154 | # Compiler output produced by configure, useful for debugging |
f73dda09 | 16155 | # configure, is in config.log if it exists. |
ccc6cda3 | 16156 | |
f73dda09 | 16157 | debug=false |
5e4a95c7 CR |
16158 | ac_cs_recheck=false |
16159 | ac_cs_silent=false | |
7175a77f | 16160 | |
1b1fe467 CR |
16161 | SHELL=\${CONFIG_SHELL-$SHELL} |
16162 | export SHELL | |
16163 | _ASEOF | |
16164 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
16165 | ## -------------------- ## | |
16166 | ## M4sh Initialization. ## | |
16167 | ## -------------------- ## | |
a82a04b3 | 16168 | |
dd4f3dd8 CR |
16169 | # Be more Bourne compatible |
16170 | DUALCASE=1; export DUALCASE # for MKS sh | |
1b1fe467 | 16171 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
f73dda09 JA |
16172 | emulate sh |
16173 | NULLCMD=: | |
dd4f3dd8 | 16174 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
5e4a95c7 CR |
16175 | # is contrary to our usage. Disable this feature. |
16176 | alias -g '${1+"$@"}'='"$@"' | |
b709b946 CR |
16177 | setopt NO_GLOB_SUBST |
16178 | else | |
1b1fe467 CR |
16179 | case `(set -o) 2>/dev/null` in #( |
16180 | *posix*) : | |
16181 | set -o posix ;; #( | |
16182 | *) : | |
16183 | ;; | |
dd4f3dd8 | 16184 | esac |
f73dda09 | 16185 | fi |
dd4f3dd8 CR |
16186 | |
16187 | ||
dd4f3dd8 CR |
16188 | as_nl=' |
16189 | ' | |
16190 | export as_nl | |
16191 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
16192 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
16193 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
16194 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
1b1fe467 CR |
16195 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
16196 | # but without wasting forks for bash or zsh. | |
16197 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
16198 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
16199 | as_echo='print -r --' | |
16200 | as_echo_n='print -rn --' | |
16201 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
dd4f3dd8 CR |
16202 | as_echo='printf %s\n' |
16203 | as_echo_n='printf %s' | |
16204 | else | |
16205 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
16206 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
16207 | as_echo_n='/usr/ucb/echo -n' | |
b709b946 | 16208 | else |
dd4f3dd8 CR |
16209 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
16210 | as_echo_n_body='eval | |
16211 | arg=$1; | |
1b1fe467 | 16212 | case $arg in #( |
dd4f3dd8 CR |
16213 | *"$as_nl"*) |
16214 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
16215 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
16216 | esac; | |
16217 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
16218 | ' | |
16219 | export as_echo_n_body | |
16220 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
b709b946 | 16221 | fi |
dd4f3dd8 CR |
16222 | export as_echo_body |
16223 | as_echo='sh -c $as_echo_body as_echo' | |
16224 | fi | |
16225 | ||
16226 | # The user is always right. | |
16227 | if test "${PATH_SEPARATOR+set}" != set; then | |
16228 | PATH_SEPARATOR=: | |
16229 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
16230 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
16231 | PATH_SEPARATOR=';' | |
16232 | } | |
b709b946 CR |
16233 | fi |
16234 | ||
5e4a95c7 | 16235 | |
b709b946 CR |
16236 | # IFS |
16237 | # We need space, tab and new line, in precisely that order. Quoting is | |
16238 | # there to prevent editors from complaining about space-tab. | |
16239 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
16240 | # splitting by setting IFS to empty value.) | |
b709b946 CR |
16241 | IFS=" "" $as_nl" |
16242 | ||
16243 | # Find who we are. Look in the path if we contain no directory separator. | |
1b1fe467 CR |
16244 | as_myself= |
16245 | case $0 in #(( | |
b709b946 CR |
16246 | *[\\/]* ) as_myself=$0 ;; |
16247 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16248 | for as_dir in $PATH | |
16249 | do | |
16250 | IFS=$as_save_IFS | |
16251 | test -z "$as_dir" && as_dir=. | |
1b1fe467 CR |
16252 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
16253 | done | |
b709b946 CR |
16254 | IFS=$as_save_IFS |
16255 | ||
16256 | ;; | |
16257 | esac | |
16258 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16259 | # in which case we are not to be found in the path. | |
16260 | if test "x$as_myself" = x; then | |
16261 | as_myself=$0 | |
16262 | fi | |
16263 | if test ! -f "$as_myself"; then | |
dd4f3dd8 | 16264 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
1b1fe467 | 16265 | exit 1 |
b709b946 CR |
16266 | fi |
16267 | ||
1b1fe467 CR |
16268 | # Unset variables that we do not need and which cause bugs (e.g. in |
16269 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
16270 | # suppresses any "Segmentation fault" message there. '((' could | |
16271 | # trigger a bug in pdksh 5.2.14. | |
16272 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
16273 | do eval test x\${$as_var+set} = xset \ | |
16274 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
b709b946 | 16275 | done |
5e4a95c7 CR |
16276 | PS1='$ ' |
16277 | PS2='> ' | |
16278 | PS4='+ ' | |
16279 | ||
16280 | # NLS nuisances. | |
dd4f3dd8 CR |
16281 | LC_ALL=C |
16282 | export LC_ALL | |
16283 | LANGUAGE=C | |
16284 | export LANGUAGE | |
5e4a95c7 | 16285 | |
1b1fe467 CR |
16286 | # CDPATH. |
16287 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
16288 | ||
16289 | ||
16290 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
16291 | # ---------------------------------------- | |
16292 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
16293 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
16294 | # script with STATUS, using 1 if that was 0. | |
16295 | as_fn_error () | |
16296 | { | |
16297 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
16298 | if test "$4"; then | |
16299 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
16300 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
16301 | fi | |
16302 | $as_echo "$as_me: error: $2" >&2 | |
16303 | as_fn_exit $as_status | |
16304 | } # as_fn_error | |
16305 | ||
16306 | ||
16307 | # as_fn_set_status STATUS | |
16308 | # ----------------------- | |
16309 | # Set $? to STATUS, without forking. | |
16310 | as_fn_set_status () | |
16311 | { | |
16312 | return $1 | |
16313 | } # as_fn_set_status | |
16314 | ||
16315 | # as_fn_exit STATUS | |
16316 | # ----------------- | |
16317 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
16318 | as_fn_exit () | |
16319 | { | |
16320 | set +e | |
16321 | as_fn_set_status $1 | |
16322 | exit $1 | |
16323 | } # as_fn_exit | |
16324 | ||
16325 | # as_fn_unset VAR | |
16326 | # --------------- | |
16327 | # Portably unset VAR. | |
16328 | as_fn_unset () | |
16329 | { | |
16330 | { eval $1=; unset $1;} | |
16331 | } | |
16332 | as_unset=as_fn_unset | |
16333 | # as_fn_append VAR VALUE | |
16334 | # ---------------------- | |
16335 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
16336 | # advantage of any shell optimizations that allow amortized linear growth over | |
16337 | # repeated appends, instead of the typical quadratic growth present in naive | |
16338 | # implementations. | |
16339 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
16340 | eval 'as_fn_append () | |
16341 | { | |
16342 | eval $1+=\$2 | |
16343 | }' | |
16344 | else | |
16345 | as_fn_append () | |
16346 | { | |
16347 | eval $1=\$$1\$2 | |
16348 | } | |
16349 | fi # as_fn_append | |
16350 | ||
16351 | # as_fn_arith ARG... | |
16352 | # ------------------ | |
16353 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
16354 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
16355 | # must be portable across $(()) and expr. | |
16356 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
16357 | eval 'as_fn_arith () | |
16358 | { | |
16359 | as_val=$(( $* )) | |
16360 | }' | |
16361 | else | |
16362 | as_fn_arith () | |
16363 | { | |
16364 | as_val=`expr "$@" || test $? -eq 1` | |
16365 | } | |
16366 | fi # as_fn_arith | |
16367 | ||
16368 | ||
b709b946 CR |
16369 | if expr a : '\(a\)' >/dev/null 2>&1 && |
16370 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
5e4a95c7 CR |
16371 | as_expr=expr |
16372 | else | |
16373 | as_expr=false | |
16374 | fi | |
16375 | ||
b709b946 | 16376 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
5e4a95c7 CR |
16377 | as_basename=basename |
16378 | else | |
16379 | as_basename=false | |
16380 | fi | |
a82a04b3 | 16381 | |
1b1fe467 CR |
16382 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
16383 | as_dirname=dirname | |
16384 | else | |
16385 | as_dirname=false | |
16386 | fi | |
f73dda09 | 16387 | |
b709b946 | 16388 | as_me=`$as_basename -- "$0" || |
a82a04b3 CR |
16389 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
16390 | X"$0" : 'X\(//\)$' \| \ | |
b709b946 | 16391 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
dd4f3dd8 | 16392 | $as_echo X/"$0" | |
b709b946 CR |
16393 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
16394 | s//\1/ | |
16395 | q | |
16396 | } | |
16397 | /^X\/\(\/\/\)$/{ | |
16398 | s//\1/ | |
16399 | q | |
16400 | } | |
16401 | /^X\/\(\/\).*/{ | |
16402 | s//\1/ | |
16403 | q | |
16404 | } | |
16405 | s/.*/./; q'` | |
a82a04b3 | 16406 | |
1b1fe467 CR |
16407 | # Avoid depending upon Character Ranges. |
16408 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16409 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16410 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16411 | as_cr_digits='0123456789' | |
16412 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
b709b946 CR |
16413 | |
16414 | ECHO_C= ECHO_N= ECHO_T= | |
1b1fe467 | 16415 | case `echo -n x` in #((((( |
b709b946 | 16416 | -n*) |
1b1fe467 | 16417 | case `echo 'xy\c'` in |
b709b946 | 16418 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
1b1fe467 CR |
16419 | xy) ECHO_C='\c';; |
16420 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
16421 | ECHO_T=' ';; | |
b709b946 CR |
16422 | esac;; |
16423 | *) | |
16424 | ECHO_N='-n';; | |
a82a04b3 | 16425 | esac |
f73dda09 JA |
16426 | |
16427 | rm -f conf$$ conf$$.exe conf$$.file | |
b709b946 CR |
16428 | if test -d conf$$.dir; then |
16429 | rm -f conf$$.dir/conf$$.file | |
16430 | else | |
16431 | rm -f conf$$.dir | |
dd4f3dd8 CR |
16432 | mkdir conf$$.dir 2>/dev/null |
16433 | fi | |
16434 | if (echo >conf$$.file) 2>/dev/null; then | |
16435 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16436 | as_ln_s='ln -s' | |
16437 | # ... but there are two gotchas: | |
16438 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
16439 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
0ee50808 | 16440 | # In both cases, we have to default to `cp -pR'. |
dd4f3dd8 | 16441 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
0ee50808 | 16442 | as_ln_s='cp -pR' |
dd4f3dd8 CR |
16443 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16444 | as_ln_s=ln | |
16445 | else | |
0ee50808 | 16446 | as_ln_s='cp -pR' |
dd4f3dd8 | 16447 | fi |
f73dda09 | 16448 | else |
0ee50808 | 16449 | as_ln_s='cp -pR' |
f73dda09 | 16450 | fi |
b709b946 CR |
16451 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
16452 | rmdir conf$$.dir 2>/dev/null | |
f73dda09 | 16453 | |
1b1fe467 CR |
16454 | |
16455 | # as_fn_mkdir_p | |
16456 | # ------------- | |
16457 | # Create "$as_dir" as a directory, including parents if necessary. | |
16458 | as_fn_mkdir_p () | |
16459 | { | |
16460 | ||
16461 | case $as_dir in #( | |
16462 | -*) as_dir=./$as_dir;; | |
16463 | esac | |
16464 | test -d "$as_dir" || eval $as_mkdir_p || { | |
16465 | as_dirs= | |
16466 | while :; do | |
16467 | case $as_dir in #( | |
16468 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
16469 | *) as_qdir=$as_dir;; | |
16470 | esac | |
16471 | as_dirs="'$as_qdir' $as_dirs" | |
16472 | as_dir=`$as_dirname -- "$as_dir" || | |
16473 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
16474 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
16475 | X"$as_dir" : 'X\(//\)$' \| \ | |
16476 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
16477 | $as_echo X"$as_dir" | | |
16478 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16479 | s//\1/ | |
16480 | q | |
16481 | } | |
16482 | /^X\(\/\/\)[^/].*/{ | |
16483 | s//\1/ | |
16484 | q | |
16485 | } | |
16486 | /^X\(\/\/\)$/{ | |
16487 | s//\1/ | |
16488 | q | |
16489 | } | |
16490 | /^X\(\/\).*/{ | |
16491 | s//\1/ | |
16492 | q | |
16493 | } | |
16494 | s/.*/./; q'` | |
16495 | test -d "$as_dir" && break | |
16496 | done | |
16497 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
16498 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
16499 | ||
16500 | ||
16501 | } # as_fn_mkdir_p | |
5e4a95c7 | 16502 | if mkdir -p . 2>/dev/null; then |
1b1fe467 | 16503 | as_mkdir_p='mkdir -p "$as_dir"' |
5e4a95c7 CR |
16504 | else |
16505 | test -d ./-p && rmdir ./-p | |
16506 | as_mkdir_p=false | |
16507 | fi | |
16508 | ||
0ee50808 CR |
16509 | |
16510 | # as_fn_executable_p FILE | |
16511 | # ----------------------- | |
16512 | # Test if FILE is an executable regular file. | |
16513 | as_fn_executable_p () | |
16514 | { | |
16515 | test -f "$1" && test -x "$1" | |
16516 | } # as_fn_executable_p | |
16517 | as_test_x='test -x' | |
16518 | as_executable_p=as_fn_executable_p | |
a82a04b3 CR |
16519 | |
16520 | # Sed expression to map a string onto a valid CPP name. | |
5e4a95c7 | 16521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
a82a04b3 CR |
16522 | |
16523 | # Sed expression to map a string onto a valid variable name. | |
5e4a95c7 | 16524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
a82a04b3 | 16525 | |
f73dda09 | 16526 | |
f73dda09 | 16527 | exec 6>&1 |
1b1fe467 CR |
16528 | ## ----------------------------------- ## |
16529 | ## Main body of $CONFIG_STATUS script. ## | |
16530 | ## ----------------------------------- ## | |
16531 | _ASEOF | |
16532 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
f73dda09 | 16533 | |
1b1fe467 CR |
16534 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16535 | # Save the log message, to keep $0 and so on meaningful, and to | |
a82a04b3 | 16536 | # report actual input values of CONFIG_FILES etc. instead of their |
b709b946 CR |
16537 | # values after options handling. |
16538 | ac_log=" | |
39feef01 | 16539 | This file was extended by bash $as_me 4.3-rc1, which was |
0ee50808 | 16540 | generated by GNU Autoconf 2.69. Invocation command line was |
a82a04b3 CR |
16541 | |
16542 | CONFIG_FILES = $CONFIG_FILES | |
16543 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16544 | CONFIG_LINKS = $CONFIG_LINKS | |
16545 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16546 | $ $0 $@ | |
16547 | ||
b709b946 CR |
16548 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
16549 | " | |
16550 | ||
f73dda09 JA |
16551 | _ACEOF |
16552 | ||
af98a2a6 CR |
16553 | case $ac_config_files in *" |
16554 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
16555 | esac | |
16556 | ||
16557 | case $ac_config_headers in *" | |
16558 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
16559 | esac | |
16560 | ||
16561 | ||
dd4f3dd8 | 16562 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
f73dda09 | 16563 | # Files that config.status was made for. |
b709b946 CR |
16564 | config_files="$ac_config_files" |
16565 | config_headers="$ac_config_headers" | |
16566 | config_commands="$ac_config_commands" | |
c184f645 | 16567 | |
b709b946 | 16568 | _ACEOF |
f73dda09 | 16569 | |
dd4f3dd8 | 16570 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
f73dda09 | 16571 | ac_cs_usage="\ |
1b1fe467 CR |
16572 | \`$as_me' instantiates files and other configuration actions |
16573 | from templates according to the current configuration. Unless the files | |
16574 | and actions are specified as TAGs, all are instantiated by default. | |
f73dda09 | 16575 | |
1b1fe467 | 16576 | Usage: $0 [OPTION]... [TAG]... |
f73dda09 JA |
16577 | |
16578 | -h, --help print this help, then exit | |
dd4f3dd8 | 16579 | -V, --version print version number and configuration settings, then exit |
1b1fe467 | 16580 | --config print configuration, then exit |
af98a2a6 CR |
16581 | -q, --quiet, --silent |
16582 | do not print progress messages | |
f73dda09 JA |
16583 | -d, --debug don't remove temporary files |
16584 | --recheck update $as_me by reconfiguring in the same conditions | |
af98a2a6 | 16585 | --file=FILE[:TEMPLATE] |
dd4f3dd8 | 16586 | instantiate the configuration file FILE |
af98a2a6 | 16587 | --header=FILE[:TEMPLATE] |
dd4f3dd8 | 16588 | instantiate the configuration header FILE |
f73dda09 JA |
16589 | |
16590 | Configuration files: | |
16591 | $config_files | |
16592 | ||
16593 | Configuration headers: | |
16594 | $config_headers | |
16595 | ||
16596 | Configuration commands: | |
16597 | $config_commands | |
16598 | ||
1b1fe467 | 16599 | Report bugs to <bug-bash@gnu.org>." |
c184f645 | 16600 | |
b709b946 | 16601 | _ACEOF |
dd4f3dd8 | 16602 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
1b1fe467 | 16603 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
f73dda09 | 16604 | ac_cs_version="\\ |
39feef01 | 16605 | bash config.status 4.3-rc1 |
0ee50808 | 16606 | configured by $0, generated by GNU Autoconf 2.69, |
1b1fe467 | 16607 | with options \\"\$ac_cs_config\\" |
f73dda09 | 16608 | |
0ee50808 | 16609 | Copyright (C) 2012 Free Software Foundation, Inc. |
f73dda09 JA |
16610 | This config.status script is free software; the Free Software Foundation |
16611 | gives unlimited permission to copy, distribute and modify it." | |
b709b946 CR |
16612 | |
16613 | ac_pwd='$ac_pwd' | |
16614 | srcdir='$srcdir' | |
16615 | INSTALL='$INSTALL' | |
dd4f3dd8 | 16616 | test -n "\$AWK" || AWK=awk |
a82a04b3 | 16617 | _ACEOF |
f73dda09 | 16618 | |
dd4f3dd8 CR |
16619 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16620 | # The default lists apply if the user does not specify any file. | |
f73dda09 JA |
16621 | ac_need_defaults=: |
16622 | while test $# != 0 | |
ccc6cda3 | 16623 | do |
f73dda09 | 16624 | case $1 in |
1b1fe467 | 16625 | --*=?*) |
b709b946 CR |
16626 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
16627 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
5e4a95c7 CR |
16628 | ac_shift=: |
16629 | ;; | |
1b1fe467 CR |
16630 | --*=) |
16631 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
16632 | ac_optarg= | |
16633 | ac_shift=: | |
16634 | ;; | |
b709b946 | 16635 | *) |
5e4a95c7 CR |
16636 | ac_option=$1 |
16637 | ac_optarg=$2 | |
16638 | ac_shift=shift | |
f73dda09 | 16639 | ;; |
f73dda09 JA |
16640 | esac |
16641 | ||
5e4a95c7 | 16642 | case $ac_option in |
f73dda09 | 16643 | # Handling of the options. |
5e4a95c7 CR |
16644 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
16645 | ac_cs_recheck=: ;; | |
b709b946 | 16646 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
dd4f3dd8 | 16647 | $as_echo "$ac_cs_version"; exit ;; |
1b1fe467 CR |
16648 | --config | --confi | --conf | --con | --co | --c ) |
16649 | $as_echo "$ac_cs_config"; exit ;; | |
b709b946 | 16650 | --debug | --debu | --deb | --de | --d | -d ) |
f73dda09 JA |
16651 | debug=: ;; |
16652 | --file | --fil | --fi | --f ) | |
5e4a95c7 | 16653 | $ac_shift |
dd4f3dd8 CR |
16654 | case $ac_optarg in |
16655 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1b1fe467 | 16656 | '') as_fn_error $? "missing file argument" ;; |
dd4f3dd8 | 16657 | esac |
1b1fe467 | 16658 | as_fn_append CONFIG_FILES " '$ac_optarg'" |
f73dda09 JA |
16659 | ac_need_defaults=false;; |
16660 | --header | --heade | --head | --hea ) | |
5e4a95c7 | 16661 | $ac_shift |
dd4f3dd8 CR |
16662 | case $ac_optarg in |
16663 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
16664 | esac | |
1b1fe467 | 16665 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" |
f73dda09 | 16666 | ac_need_defaults=false;; |
b709b946 CR |
16667 | --he | --h) |
16668 | # Conflict between --help and --header | |
1b1fe467 CR |
16669 | as_fn_error $? "ambiguous option: \`$1' |
16670 | Try \`$0 --help' for more information.";; | |
b709b946 | 16671 | --help | --hel | -h ) |
dd4f3dd8 | 16672 | $as_echo "$ac_cs_usage"; exit ;; |
5e4a95c7 CR |
16673 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
16674 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16675 | ac_cs_silent=: ;; | |
f73dda09 JA |
16676 | |
16677 | # This is an error. | |
1b1fe467 CR |
16678 | -*) as_fn_error $? "unrecognized option: \`$1' |
16679 | Try \`$0 --help' for more information." ;; | |
f73dda09 | 16680 | |
1b1fe467 | 16681 | *) as_fn_append ac_config_targets " $1" |
b709b946 | 16682 | ac_need_defaults=false ;; |
f73dda09 | 16683 | |
ccc6cda3 | 16684 | esac |
f73dda09 | 16685 | shift |
ccc6cda3 JA |
16686 | done |
16687 | ||
5e4a95c7 CR |
16688 | ac_configure_extra_args= |
16689 | ||
16690 | if $ac_cs_silent; then | |
16691 | exec 6>/dev/null | |
16692 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
16693 | fi | |
16694 | ||
16695 | _ACEOF | |
dd4f3dd8 | 16696 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
5e4a95c7 | 16697 | if \$ac_cs_recheck; then |
0ee50808 | 16698 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
dd4f3dd8 CR |
16699 | shift |
16700 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
16701 | CONFIG_SHELL='$SHELL' | |
b709b946 | 16702 | export CONFIG_SHELL |
dd4f3dd8 | 16703 | exec "\$@" |
5e4a95c7 CR |
16704 | fi |
16705 | ||
f73dda09 | 16706 | _ACEOF |
dd4f3dd8 | 16707 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b709b946 CR |
16708 | exec 5>>config.log |
16709 | { | |
16710 | echo | |
16711 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16712 | ## Running $as_me. ## | |
16713 | _ASBOX | |
dd4f3dd8 | 16714 | $as_echo "$ac_log" |
b709b946 | 16715 | } >&5 |
ccc6cda3 | 16716 | |
b709b946 | 16717 | _ACEOF |
dd4f3dd8 | 16718 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
5e13499c | 16719 | # |
b709b946 | 16720 | # INIT-COMMANDS |
5e13499c | 16721 | # |
5e13499c CR |
16722 | # Capture the value of obsolete ALL_LINGUAS because we need it to compute |
16723 | # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it | |
16724 | # from automake. | |
16725 | eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' | |
16726 | # Capture the value of LINGUAS because we need it to compute CATALOGS. | |
16727 | LINGUAS="${LINGUAS-%UNSET%}" | |
16728 | ||
5e13499c | 16729 | |
a82a04b3 CR |
16730 | _ACEOF |
16731 | ||
dd4f3dd8 | 16732 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b709b946 CR |
16733 | |
16734 | # Handling of arguments. | |
f73dda09 JA |
16735 | for ac_config_target in $ac_config_targets |
16736 | do | |
b709b946 CR |
16737 | case $ac_config_target in |
16738 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; | |
16739 | "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; | |
16740 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
16741 | "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;; | |
16742 | "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;; | |
16743 | "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;; | |
16744 | "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;; | |
16745 | "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;; | |
16746 | "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;; | |
16747 | "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;; | |
16748 | "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;; | |
16749 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; | |
16750 | "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; | |
16751 | "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; | |
16752 | "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;; | |
16753 | "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; | |
16754 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16755 | ||
1b1fe467 | 16756 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
f73dda09 JA |
16757 | esac |
16758 | done | |
16759 | ||
b709b946 | 16760 | |
f73dda09 JA |
16761 | # If the user did not use the arguments to specify the items to instantiate, |
16762 | # then the envvar interface is used. Set only those that are not. | |
16763 | # We use the long form for the default assignment because of an extremely | |
16764 | # bizarre bug on SunOS 4.1.3. | |
16765 | if $ac_need_defaults; then | |
16766 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16767 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16768 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16769 | fi | |
16770 | ||
5e4a95c7 | 16771 | # Have a temporary directory for convenience. Make it in the build tree |
b709b946 | 16772 | # simply because there is no reason against having it here, and in addition, |
5e4a95c7 | 16773 | # creating and moving files from /tmp can sometimes cause problems. |
b709b946 CR |
16774 | # Hook for its removal unless debugging. |
16775 | # Note that there is a small window in which the directory will not be cleaned: | |
16776 | # after its creation but before its name has been assigned to `$tmp'. | |
f73dda09 JA |
16777 | $debug || |
16778 | { | |
1b1fe467 | 16779 | tmp= ac_tmp= |
b709b946 | 16780 | trap 'exit_status=$? |
1b1fe467 CR |
16781 | : "${ac_tmp:=$tmp}" |
16782 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
b709b946 | 16783 | ' 0 |
1b1fe467 | 16784 | trap 'as_fn_exit 1' 1 2 13 15 |
f73dda09 | 16785 | } |
f73dda09 | 16786 | # Create a (secure) tmp directory for tmp files. |
5e4a95c7 | 16787 | |
f73dda09 | 16788 | { |
b709b946 | 16789 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
1b1fe467 | 16790 | test -d "$tmp" |
f73dda09 JA |
16791 | } || |
16792 | { | |
b709b946 CR |
16793 | tmp=./conf$$-$RANDOM |
16794 | (umask 077 && mkdir "$tmp") | |
1b1fe467 CR |
16795 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
16796 | ac_tmp=$tmp | |
ccc6cda3 | 16797 | |
dd4f3dd8 CR |
16798 | # Set up the scripts for CONFIG_FILES section. |
16799 | # No need to generate them if there are no CONFIG_FILES. | |
16800 | # This happens for instance with `./config.status config.h'. | |
b709b946 CR |
16801 | if test -n "$CONFIG_FILES"; then |
16802 | ||
b709b946 | 16803 | |
1b1fe467 CR |
16804 | ac_cr=`echo X | tr X '\015'` |
16805 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
16806 | # But we know of no other shell where ac_cr would be empty at this | |
16807 | # point, so we can use a bashism as a fallback. | |
16808 | if test "x$ac_cr" = x; then | |
16809 | eval ac_cr=\$\'\\r\' | |
16810 | fi | |
dd4f3dd8 CR |
16811 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` |
16812 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
16813 | ac_cs_awk_cr='\\r' | |
16814 | else | |
16815 | ac_cs_awk_cr=$ac_cr | |
b709b946 CR |
16816 | fi |
16817 | ||
1b1fe467 | 16818 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
b709b946 CR |
16819 | _ACEOF |
16820 | ||
16821 | ||
dd4f3dd8 CR |
16822 | { |
16823 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
16824 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
16825 | echo "_ACEOF" | |
16826 | } >conf$$subs.sh || | |
1b1fe467 CR |
16827 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
16828 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
b709b946 CR |
16829 | ac_delim='%!_!# ' |
16830 | for ac_last_try in false false false false false :; do | |
dd4f3dd8 | 16831 | . ./conf$$subs.sh || |
1b1fe467 | 16832 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
dd4f3dd8 | 16833 | |
af98a2a6 CR |
16834 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` |
16835 | if test $ac_delim_n = $ac_delim_num; then | |
b709b946 CR |
16836 | break |
16837 | elif $ac_last_try; then | |
1b1fe467 | 16838 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
b709b946 CR |
16839 | else |
16840 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16841 | fi | |
16842 | done | |
dd4f3dd8 CR |
16843 | rm -f conf$$subs.sh |
16844 | ||
16845 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
1b1fe467 | 16846 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
dd4f3dd8 CR |
16847 | _ACEOF |
16848 | sed -n ' | |
16849 | h | |
16850 | s/^/S["/; s/!.*/"]=/ | |
16851 | p | |
16852 | g | |
16853 | s/^[^!]*!// | |
16854 | :repl | |
16855 | t repl | |
16856 | s/'"$ac_delim"'$// | |
16857 | t delim | |
16858 | :nl | |
16859 | h | |
1b1fe467 | 16860 | s/\(.\{148\}\)..*/\1/ |
dd4f3dd8 CR |
16861 | t more1 |
16862 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
16863 | p | |
16864 | n | |
16865 | b repl | |
16866 | :more1 | |
16867 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16868 | p | |
16869 | g | |
16870 | s/.\{148\}// | |
16871 | t nl | |
16872 | :delim | |
16873 | h | |
1b1fe467 | 16874 | s/\(.\{148\}\)..*/\1/ |
dd4f3dd8 CR |
16875 | t more2 |
16876 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
16877 | p | |
16878 | b | |
16879 | :more2 | |
16880 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
16881 | p | |
16882 | g | |
16883 | s/.\{148\}// | |
16884 | t delim | |
16885 | ' <conf$$subs.awk | sed ' | |
16886 | /^[^""]/{ | |
16887 | N | |
16888 | s/\n// | |
16889 | } | |
16890 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
16891 | rm -f conf$$subs.awk | |
16892 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16893 | _ACAWK | |
1b1fe467 | 16894 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
dd4f3dd8 CR |
16895 | for (key in S) S_is_set[key] = 1 |
16896 | FS = "\a" | |
16897 | ||
16898 | } | |
16899 | { | |
16900 | line = $ 0 | |
16901 | nfields = split(line, field, "@") | |
16902 | substed = 0 | |
16903 | len = length(field[1]) | |
16904 | for (i = 2; i < nfields; i++) { | |
16905 | key = field[i] | |
16906 | keylen = length(key) | |
16907 | if (S_is_set[key]) { | |
16908 | value = S[key] | |
16909 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
16910 | len += length(value) + length(field[++i]) | |
16911 | substed = 1 | |
16912 | } else | |
16913 | len += 1 + keylen | |
16914 | } | |
b709b946 | 16915 | |
dd4f3dd8 CR |
16916 | print line |
16917 | } | |
d3ad40de | 16918 | |
dd4f3dd8 | 16919 | _ACAWK |
b709b946 | 16920 | _ACEOF |
dd4f3dd8 CR |
16921 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16922 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
16923 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
16924 | else | |
16925 | cat | |
1b1fe467 CR |
16926 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
16927 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
a82a04b3 | 16928 | _ACEOF |
b709b946 | 16929 | |
1b1fe467 CR |
16930 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
16931 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
b709b946 CR |
16932 | # trailing colons and then remove the whole line if VPATH becomes empty |
16933 | # (actually we leave an empty line to preserve line numbers). | |
16934 | if test "x$srcdir" = x.; then | |
1b1fe467 CR |
16935 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
16936 | h | |
16937 | s/// | |
16938 | s/^/:/ | |
16939 | s/[ ]*$/:/ | |
16940 | s/:\$(srcdir):/:/g | |
16941 | s/:\${srcdir}:/:/g | |
16942 | s/:@srcdir@:/:/g | |
16943 | s/^:*// | |
b709b946 | 16944 | s/:*$// |
1b1fe467 CR |
16945 | x |
16946 | s/\(=[ ]*\).*/\1/ | |
16947 | G | |
16948 | s/\n// | |
b709b946 CR |
16949 | s/^[^=]*=[ ]*$// |
16950 | }' | |
16951 | fi | |
16952 | ||
dd4f3dd8 | 16953 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b709b946 CR |
16954 | fi # test -n "$CONFIG_FILES" |
16955 | ||
dd4f3dd8 CR |
16956 | # Set up the scripts for CONFIG_HEADERS section. |
16957 | # No need to generate them if there are no CONFIG_HEADERS. | |
16958 | # This happens for instance with `./config.status Makefile'. | |
16959 | if test -n "$CONFIG_HEADERS"; then | |
1b1fe467 | 16960 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
dd4f3dd8 CR |
16961 | BEGIN { |
16962 | _ACEOF | |
16963 | ||
16964 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
16965 | # here-document in config.status, that substitutes the proper values into | |
16966 | # config.h.in to produce config.h. | |
16967 | ||
16968 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
16969 | # handling of long lines. | |
16970 | ac_delim='%!_!# ' | |
16971 | for ac_last_try in false false :; do | |
1b1fe467 CR |
16972 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
16973 | if test -z "$ac_tt"; then | |
dd4f3dd8 CR |
16974 | break |
16975 | elif $ac_last_try; then | |
1b1fe467 | 16976 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
dd4f3dd8 CR |
16977 | else |
16978 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
16979 | fi | |
16980 | done | |
16981 | ||
16982 | # For the awk script, D is an array of macro values keyed by name, | |
16983 | # likewise P contains macro parameters if any. Preserve backslash | |
16984 | # newline sequences. | |
16985 | ||
16986 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
16987 | sed -n ' | |
16988 | s/.\{148\}/&'"$ac_delim"'/g | |
16989 | t rset | |
16990 | :rset | |
16991 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
16992 | t def | |
16993 | d | |
16994 | :def | |
16995 | s/\\$// | |
16996 | t bsnl | |
16997 | s/["\\]/\\&/g | |
16998 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
16999 | D["\1"]=" \3"/p | |
17000 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
17001 | d | |
17002 | :bsnl | |
17003 | s/["\\]/\\&/g | |
17004 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
17005 | D["\1"]=" \3\\\\\\n"\\/p | |
17006 | t cont | |
17007 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
17008 | t cont | |
17009 | d | |
17010 | :cont | |
17011 | n | |
17012 | s/.\{148\}/&'"$ac_delim"'/g | |
17013 | t clear | |
17014 | :clear | |
17015 | s/\\$// | |
17016 | t bsnlc | |
17017 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
17018 | d | |
17019 | :bsnlc | |
17020 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
17021 | b cont | |
17022 | ' <confdefs.h | sed ' | |
17023 | s/'"$ac_delim"'/"\\\ | |
17024 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
17025 | ||
17026 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
17027 | for (key in D) D_is_set[key] = 1 | |
17028 | FS = "\a" | |
17029 | } | |
17030 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
17031 | line = \$ 0 | |
17032 | split(line, arg, " ") | |
17033 | if (arg[1] == "#") { | |
17034 | defundef = arg[2] | |
17035 | mac1 = arg[3] | |
17036 | } else { | |
17037 | defundef = substr(arg[1], 2) | |
17038 | mac1 = arg[2] | |
17039 | } | |
17040 | split(mac1, mac2, "(") #) | |
17041 | macro = mac2[1] | |
af98a2a6 | 17042 | prefix = substr(line, 1, index(line, defundef) - 1) |
dd4f3dd8 CR |
17043 | if (D_is_set[macro]) { |
17044 | # Preserve the white space surrounding the "#". | |
dd4f3dd8 CR |
17045 | print prefix "define", macro P[macro] D[macro] |
17046 | next | |
17047 | } else { | |
17048 | # Replace #undef with comments. This is necessary, for example, | |
17049 | # in the case of _POSIX_SOURCE, which is predefined and required | |
17050 | # on some systems where configure will not decide to define it. | |
17051 | if (defundef == "undef") { | |
af98a2a6 | 17052 | print "/*", prefix defundef, macro, "*/" |
dd4f3dd8 CR |
17053 | next |
17054 | } | |
17055 | } | |
17056 | } | |
17057 | { print } | |
17058 | _ACAWK | |
17059 | _ACEOF | |
17060 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
1b1fe467 | 17061 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
dd4f3dd8 CR |
17062 | fi # test -n "$CONFIG_HEADERS" |
17063 | ||
b709b946 | 17064 | |
dd4f3dd8 CR |
17065 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" |
17066 | shift | |
17067 | for ac_tag | |
b709b946 CR |
17068 | do |
17069 | case $ac_tag in | |
17070 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
9d6e5e30 | 17071 | esac |
b709b946 CR |
17072 | case $ac_mode$ac_tag in |
17073 | :[FHL]*:*);; | |
1b1fe467 | 17074 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
b709b946 CR |
17075 | :[FH]-) ac_tag=-:-;; |
17076 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
17077 | esac | |
17078 | ac_save_IFS=$IFS | |
17079 | IFS=: | |
17080 | set x $ac_tag | |
17081 | IFS=$ac_save_IFS | |
17082 | shift | |
17083 | ac_file=$1 | |
17084 | shift | |
17085 | ||
17086 | case $ac_mode in | |
17087 | :L) ac_source=$1;; | |
17088 | :[FH]) | |
17089 | ac_file_inputs= | |
17090 | for ac_f | |
17091 | do | |
17092 | case $ac_f in | |
1b1fe467 | 17093 | -) ac_f="$ac_tmp/stdin";; |
b709b946 CR |
17094 | *) # Look for the file first in the build tree, then in the source tree |
17095 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
17096 | # because $ac_f cannot contain `:'. | |
17097 | test -f "$ac_f" || | |
17098 | case $ac_f in | |
17099 | [\\/$]*) false;; | |
17100 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
17101 | esac || | |
1b1fe467 | 17102 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
b709b946 | 17103 | esac |
dd4f3dd8 | 17104 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac |
1b1fe467 | 17105 | as_fn_append ac_file_inputs " '$ac_f'" |
b709b946 | 17106 | done |
9d6e5e30 | 17107 | |
b709b946 CR |
17108 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
17109 | # use $as_me), people would be surprised to read: | |
17110 | # /* config.h. Generated by config.status. */ | |
dd4f3dd8 CR |
17111 | configure_input='Generated from '` |
17112 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
17113 | `' by configure.' | |
b709b946 CR |
17114 | if test x"$ac_file" != x-; then |
17115 | configure_input="$ac_file. $configure_input" | |
1b1fe467 | 17116 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 |
dd4f3dd8 | 17117 | $as_echo "$as_me: creating $ac_file" >&6;} |
b709b946 | 17118 | fi |
dd4f3dd8 CR |
17119 | # Neutralize special characters interpreted by sed in replacement strings. |
17120 | case $configure_input in #( | |
17121 | *\&* | *\|* | *\\* ) | |
17122 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
17123 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
17124 | *) ac_sed_conf_input=$configure_input;; | |
17125 | esac | |
b709b946 CR |
17126 | |
17127 | case $ac_tag in | |
1b1fe467 CR |
17128 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
17129 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
b709b946 CR |
17130 | esac |
17131 | ;; | |
17132 | esac | |
17133 | ||
17134 | ac_dir=`$as_dirname -- "$ac_file" || | |
a82a04b3 | 17135 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
5e4a95c7 CR |
17136 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17137 | X"$ac_file" : 'X\(//\)$' \| \ | |
b709b946 | 17138 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
dd4f3dd8 | 17139 | $as_echo X"$ac_file" | |
b709b946 CR |
17140 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
17141 | s//\1/ | |
17142 | q | |
17143 | } | |
17144 | /^X\(\/\/\)[^/].*/{ | |
17145 | s//\1/ | |
17146 | q | |
17147 | } | |
17148 | /^X\(\/\/\)$/{ | |
17149 | s//\1/ | |
17150 | q | |
17151 | } | |
17152 | /^X\(\/\).*/{ | |
17153 | s//\1/ | |
17154 | q | |
17155 | } | |
17156 | s/.*/./; q'` | |
1b1fe467 | 17157 | as_dir="$ac_dir"; as_fn_mkdir_p |
a82a04b3 CR |
17158 | ac_builddir=. |
17159 | ||
b709b946 CR |
17160 | case "$ac_dir" in |
17161 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17162 | *) | |
dd4f3dd8 | 17163 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
b709b946 | 17164 | # A ".." for each directory in $ac_dir_suffix. |
dd4f3dd8 | 17165 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
b709b946 CR |
17166 | case $ac_top_builddir_sub in |
17167 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
17168 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
17169 | esac ;; | |
17170 | esac | |
17171 | ac_abs_top_builddir=$ac_pwd | |
17172 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
17173 | # for backward compatibility: | |
17174 | ac_top_builddir=$ac_top_build_prefix | |
a82a04b3 CR |
17175 | |
17176 | case $srcdir in | |
b709b946 | 17177 | .) # We are building in place. |
a82a04b3 | 17178 | ac_srcdir=. |
b709b946 CR |
17179 | ac_top_srcdir=$ac_top_builddir_sub |
17180 | ac_abs_top_srcdir=$ac_pwd ;; | |
17181 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
a82a04b3 | 17182 | ac_srcdir=$srcdir$ac_dir_suffix; |
b709b946 CR |
17183 | ac_top_srcdir=$srcdir |
17184 | ac_abs_top_srcdir=$srcdir ;; | |
17185 | *) # Relative name. | |
17186 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
17187 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
17188 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
a82a04b3 | 17189 | esac |
b709b946 | 17190 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
5e4a95c7 | 17191 | |
a82a04b3 | 17192 | |
b709b946 CR |
17193 | case $ac_mode in |
17194 | :F) | |
17195 | # | |
17196 | # CONFIG_FILE | |
17197 | # | |
ccc6cda3 | 17198 | |
f73dda09 JA |
17199 | case $INSTALL in |
17200 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
b709b946 | 17201 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
ccc6cda3 | 17202 | esac |
b709b946 | 17203 | _ACEOF |
ccc6cda3 | 17204 | |
dd4f3dd8 | 17205 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
b709b946 CR |
17206 | # If the template does not know about datarootdir, expand it. |
17207 | # FIXME: This hack should be removed a few years after 2.60. | |
17208 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
dd4f3dd8 CR |
17209 | ac_sed_dataroot=' |
17210 | /datarootdir/ { | |
b709b946 CR |
17211 | p |
17212 | q | |
17213 | } | |
17214 | /@datadir@/p | |
17215 | /@docdir@/p | |
17216 | /@infodir@/p | |
17217 | /@localedir@/p | |
1b1fe467 | 17218 | /@mandir@/p' |
dd4f3dd8 | 17219 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in |
b709b946 CR |
17220 | *datarootdir*) ac_datarootdir_seen=yes;; |
17221 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
1b1fe467 | 17222 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 |
dd4f3dd8 | 17223 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} |
9d6e5e30 | 17224 | _ACEOF |
dd4f3dd8 | 17225 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
b709b946 CR |
17226 | ac_datarootdir_hack=' |
17227 | s&@datadir@&$datadir&g | |
17228 | s&@docdir@&$docdir&g | |
17229 | s&@infodir@&$infodir&g | |
17230 | s&@localedir@&$localedir&g | |
17231 | s&@mandir@&$mandir&g | |
1b1fe467 | 17232 | s&\\\${datarootdir}&$datarootdir&g' ;; |
b709b946 CR |
17233 | esac |
17234 | _ACEOF | |
17235 | ||
17236 | # Neutralize VPATH when `$srcdir' = `.'. | |
17237 | # Shell code in configure.ac might set extrasub. | |
17238 | # FIXME: do we really want to maintain this feature? | |
dd4f3dd8 CR |
17239 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
17240 | ac_sed_extra="$ac_vpsub | |
f73dda09 | 17241 | $extrasub |
a82a04b3 | 17242 | _ACEOF |
dd4f3dd8 | 17243 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
f73dda09 JA |
17244 | :t |
17245 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
dd4f3dd8 | 17246 | s|@configure_input@|$ac_sed_conf_input|;t t |
b709b946 | 17247 | s&@top_builddir@&$ac_top_builddir_sub&;t t |
dd4f3dd8 | 17248 | s&@top_build_prefix@&$ac_top_build_prefix&;t t |
b709b946 CR |
17249 | s&@srcdir@&$ac_srcdir&;t t |
17250 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
17251 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
17252 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
17253 | s&@builddir@&$ac_builddir&;t t | |
17254 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
17255 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
17256 | s&@INSTALL@&$ac_INSTALL&;t t | |
17257 | $ac_datarootdir_hack | |
dd4f3dd8 | 17258 | " |
1b1fe467 CR |
17259 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
17260 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
b709b946 CR |
17261 | |
17262 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
1b1fe467 CR |
17263 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
17264 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
17265 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
17266 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
17267 | which seems to be undefined. Please make sure it is defined" >&5 | |
dd4f3dd8 | 17268 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
1b1fe467 | 17269 | which seems to be undefined. Please make sure it is defined" >&2;} |
b709b946 | 17270 | |
1b1fe467 | 17271 | rm -f "$ac_tmp/stdin" |
f73dda09 | 17272 | case $ac_file in |
1b1fe467 CR |
17273 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
17274 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
dd4f3dd8 | 17275 | esac \ |
1b1fe467 | 17276 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
b709b946 CR |
17277 | ;; |
17278 | :H) | |
17279 | # | |
17280 | # CONFIG_HEADER | |
17281 | # | |
f73dda09 | 17282 | if test x"$ac_file" != x-; then |
dd4f3dd8 CR |
17283 | { |
17284 | $as_echo "/* $configure_input */" \ | |
1b1fe467 CR |
17285 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
17286 | } >"$ac_tmp/config.h" \ | |
17287 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
17288 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
17289 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
dd4f3dd8 | 17290 | $as_echo "$as_me: $ac_file is unchanged" >&6;} |
f73dda09 | 17291 | else |
dd4f3dd8 | 17292 | rm -f "$ac_file" |
1b1fe467 CR |
17293 | mv "$ac_tmp/config.h" "$ac_file" \ |
17294 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
ccc6cda3 | 17295 | fi |
f73dda09 | 17296 | else |
dd4f3dd8 | 17297 | $as_echo "/* $configure_input */" \ |
1b1fe467 CR |
17298 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
17299 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
ccc6cda3 | 17300 | fi |
b709b946 | 17301 | ;; |
c184f645 | 17302 | |
1b1fe467 | 17303 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
dd4f3dd8 | 17304 | $as_echo "$as_me: executing $ac_file commands" >&6;} |
b709b946 CR |
17305 | ;; |
17306 | esac | |
a82a04b3 | 17307 | |
ccc6cda3 | 17308 | |
b709b946 CR |
17309 | case $ac_file$ac_mode in |
17310 | "default-1":C) | |
5e13499c CR |
17311 | for ac_file in $CONFIG_FILES; do |
17312 | # Support "outfile[:infile[:infile...]]" | |
17313 | case "$ac_file" in | |
17314 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
17315 | esac | |
17316 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
17317 | case "$ac_file" in */Makefile.in) | |
17318 | # Adjust a relative srcdir. | |
17319 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
17320 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
17321 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
17322 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
17323 | # In autoconf-2.50 it is called $srcdir. | |
17324 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
17325 | case "$ac_given_srcdir" in | |
17326 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
17327 | /*) top_srcdir="$ac_given_srcdir" ;; | |
17328 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
17329 | esac | |
17330 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
17331 | rm -f "$ac_dir/POTFILES" | |
17332 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
17333 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | |
17334 | POMAKEFILEDEPS="POTFILES.in" | |
17335 | # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend | |
17336 | # on $ac_dir but don't depend on user-specified configuration | |
17337 | # parameters. | |
17338 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | |
17339 | # The LINGUAS file contains the set of available languages. | |
17340 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | |
17341 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | |
17342 | fi | |
17343 | ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` | |
17344 | # Hide the ALL_LINGUAS assigment from automake. | |
17345 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | |
17346 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | |
17347 | else | |
17348 | # The set of available languages was given in configure.in. | |
17349 | eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' | |
17350 | fi | |
17351 | case "$ac_given_srcdir" in | |
17352 | .) srcdirpre= ;; | |
17353 | *) srcdirpre='$(srcdir)/' ;; | |
17354 | esac | |
17355 | POFILES= | |
17356 | GMOFILES= | |
17357 | UPDATEPOFILES= | |
17358 | DUMMYPOFILES= | |
17359 | for lang in $ALL_LINGUAS; do | |
17360 | POFILES="$POFILES $srcdirpre$lang.po" | |
17361 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | |
17362 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | |
17363 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | |
17364 | done | |
17365 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | |
17366 | # environment variable. | |
17367 | INST_LINGUAS= | |
17368 | if test -n "$ALL_LINGUAS"; then | |
17369 | for presentlang in $ALL_LINGUAS; do | |
17370 | useit=no | |
17371 | if test "%UNSET%" != "$LINGUAS"; then | |
17372 | desiredlanguages="$LINGUAS" | |
17373 | else | |
17374 | desiredlanguages="$ALL_LINGUAS" | |
17375 | fi | |
17376 | for desiredlang in $desiredlanguages; do | |
17377 | # Use the presentlang catalog if desiredlang is | |
17378 | # a. equal to presentlang, or | |
17379 | # b. a variant of presentlang (because in this case, | |
17380 | # presentlang can be used as a fallback for messages | |
17381 | # which are not translated in the desiredlang catalog). | |
17382 | case "$desiredlang" in | |
17383 | "$presentlang"*) useit=yes;; | |
17384 | esac | |
17385 | done | |
17386 | if test $useit = yes; then | |
17387 | INST_LINGUAS="$INST_LINGUAS $presentlang" | |
17388 | fi | |
17389 | done | |
17390 | fi | |
17391 | CATALOGS= | |
17392 | if test -n "$INST_LINGUAS"; then | |
17393 | for lang in $INST_LINGUAS; do | |
17394 | CATALOGS="$CATALOGS $lang.gmo" | |
17395 | done | |
17396 | fi | |
17397 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
17398 | sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
17399 | for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do | |
17400 | if test -f "$f"; then | |
17401 | case "$f" in | |
17402 | *.orig | *.bak | *~) ;; | |
17403 | *) cat "$f" >> "$ac_dir/Makefile" ;; | |
17404 | esac | |
17405 | fi | |
17406 | done | |
17407 | fi | |
17408 | ;; | |
17409 | esac | |
17410 | done ;; | |
b709b946 | 17411 | "default":C) |
ccc6cda3 JA |
17412 | # Makefile uses this timestamp file to record whether config.h is up to date. |
17413 | echo timestamp > stamp-h | |
f73dda09 | 17414 | ;; |
b709b946 | 17415 | |
f73dda09 | 17416 | esac |
b709b946 | 17417 | done # for ac_tag |
ccc6cda3 | 17418 | |
f73dda09 | 17419 | |
1b1fe467 | 17420 | as_fn_exit 0 |
a82a04b3 | 17421 | _ACEOF |
f73dda09 JA |
17422 | ac_clean_files=$ac_clean_files_save |
17423 | ||
dd4f3dd8 | 17424 | test $ac_write_fail = 0 || |
1b1fe467 | 17425 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
dd4f3dd8 | 17426 | |
a82a04b3 | 17427 | |
f73dda09 JA |
17428 | # configure is writing to config.log, and then calls config.status. |
17429 | # config.status does its own redirection, appending to config.log. | |
17430 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17431 | # by configure, so config.status won't be able to write to it; its | |
17432 | # output is simply discarded. So we exec the FD to /dev/null, | |
17433 | # effectively closing config.log, so it can be properly (re)opened and | |
17434 | # appended to by config.status. When coming back to configure, we | |
17435 | # need to make the FD available again. | |
17436 | if test "$no_create" != yes; then | |
17437 | ac_cs_success=: | |
5e4a95c7 CR |
17438 | ac_config_status_args= |
17439 | test "$silent" = yes && | |
17440 | ac_config_status_args="$ac_config_status_args --quiet" | |
f73dda09 | 17441 | exec 5>/dev/null |
5e4a95c7 | 17442 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false |
f73dda09 JA |
17443 | exec 5>>config.log |
17444 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17445 | # would make configure fail if this is the last instruction. | |
1b1fe467 | 17446 | $ac_cs_success || as_fn_exit 1 |
f73dda09 | 17447 | fi |
dd4f3dd8 | 17448 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
1b1fe467 | 17449 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 |
af98a2a6 | 17450 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} |
dd4f3dd8 | 17451 | fi |
bc7bed50 | 17452 |