]>
Commit | Line | Data |
---|---|---|
0bc0cd11 | 1 | #! /bin/sh |
0bc0cd11 | 2 | # Guess values for system-dependent variables and create Makefiles. |
22e05272 JM |
3 | # Generated by GNU Autoconf 2.69. |
4 | # | |
5 | # | |
6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. | |
5213506e | 7 | # |
0bc0cd11 JL |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
5213506e RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
238235ef | 14 | |
5213506e RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
238235ef DJ |
18 | emulate sh |
19 | NULLCMD=: | |
5213506e | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
238235ef DJ |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
5213506e RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
238235ef DJ |
31 | fi |
32 | ||
5213506e RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
238235ef DJ |
79 | fi |
80 | ||
81 | ||
5213506e RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
22e05272 | 90 | as_myself= |
5213506e RW |
91 | case $0 in #(( |
92 | *[\\/]* ) as_myself=$0 ;; | |
93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
94 | for as_dir in $PATH | |
95 | do | |
96 | IFS=$as_save_IFS | |
97 | test -z "$as_dir" && as_dir=. | |
98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
99 | done | |
100 | IFS=$as_save_IFS | |
101 | ||
102 | ;; | |
103 | esac | |
104 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
105 | # in which case we are not to be found in the path. | |
106 | if test "x$as_myself" = x; then | |
107 | as_myself=$0 | |
108 | fi | |
109 | if test ! -f "$as_myself"; then | |
110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
111 | exit 1 | |
112 | fi | |
113 | ||
114 | # Unset variables that we do not need and which cause bugs (e.g. in | |
115 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
116 | # suppresses any "Segmentation fault" message there. '((' could | |
117 | # trigger a bug in pdksh 5.2.14. | |
118 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
119 | do eval test x\${$as_var+set} = xset \ | |
120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
121 | done | |
238235ef DJ |
122 | PS1='$ ' |
123 | PS2='> ' | |
124 | PS4='+ ' | |
125 | ||
126 | # NLS nuisances. | |
5213506e RW |
127 | LC_ALL=C |
128 | export LC_ALL | |
129 | LANGUAGE=C | |
130 | export LANGUAGE | |
131 | ||
132 | # CDPATH. | |
133 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
134 | ||
22e05272 JM |
135 | # Use a proper internal environment variable to ensure we don't fall |
136 | # into an infinite loop, continuously re-executing ourselves. | |
137 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
138 | _as_can_reexec=no; export _as_can_reexec; | |
139 | # We cannot yet assume a decent shell, so we have to provide a | |
140 | # neutralization value for shells without unset; and this also | |
141 | # works around shells that cannot unset nonexistent variables. | |
142 | # Preserve -v and -x to the replacement shell. | |
143 | BASH_ENV=/dev/null | |
144 | ENV=/dev/null | |
145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
146 | case $- in # (((( | |
147 | *v*x* | *x*v* ) as_opts=-vx ;; | |
148 | *v* ) as_opts=-v ;; | |
149 | *x* ) as_opts=-x ;; | |
150 | * ) as_opts= ;; | |
151 | esac | |
152 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
153 | # Admittedly, this is quite paranoid, since all the known shells bail | |
154 | # out after a failed `exec'. | |
155 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
156 | as_fn_exit 255 | |
157 | fi | |
158 | # We don't want this to propagate to other subprocesses. | |
159 | { _as_can_reexec=; unset _as_can_reexec;} | |
5213506e RW |
160 | if test "x$CONFIG_SHELL" = x; then |
161 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
162 | emulate sh | |
163 | NULLCMD=: | |
164 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
165 | # is contrary to our usage. Disable this feature. | |
166 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
167 | setopt NO_GLOB_SUBST | |
168 | else | |
169 | case \`(set -o) 2>/dev/null\` in #( | |
170 | *posix*) : | |
171 | set -o posix ;; #( | |
172 | *) : | |
173 | ;; | |
174 | esac | |
175 | fi | |
176 | " | |
177 | as_required="as_fn_return () { (exit \$1); } | |
178 | as_fn_success () { as_fn_return 0; } | |
179 | as_fn_failure () { as_fn_return 1; } | |
180 | as_fn_ret_success () { return 0; } | |
181 | as_fn_ret_failure () { return 1; } | |
182 | ||
183 | exitcode=0 | |
184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
189 | ||
190 | else | |
191 | exitcode=1; echo positional parameters were not saved. | |
192 | fi | |
22e05272 JM |
193 | test x\$exitcode = x0 || exit 1 |
194 | test -x / || exit 1" | |
5213506e RW |
195 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO |
196 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
197 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
198 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
199 | test \$(( 1 + 1 )) = 2 || exit 1" | |
200 | if (eval "$as_required") 2>/dev/null; then : | |
201 | as_have_required=yes | |
202 | else | |
203 | as_have_required=no | |
204 | fi | |
205 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
206 | ||
207 | else | |
208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
209 | as_found=false | |
210 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
238235ef | 211 | do |
5213506e RW |
212 | IFS=$as_save_IFS |
213 | test -z "$as_dir" && as_dir=. | |
214 | as_found=: | |
215 | case $as_dir in #( | |
216 | /*) | |
217 | for as_base in sh bash ksh sh5; do | |
218 | # Try only shells that exist, to save several forks. | |
219 | as_shell=$as_dir/$as_base | |
220 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
221 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
222 | CONFIG_SHELL=$as_shell as_have_required=yes | |
223 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
224 | break 2 | |
225 | fi | |
226 | fi | |
227 | done;; | |
228 | esac | |
229 | as_found=false | |
230 | done | |
231 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
232 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
233 | CONFIG_SHELL=$SHELL as_have_required=yes | |
234 | fi; } | |
235 | IFS=$as_save_IFS | |
236 | ||
237 | ||
238 | if test "x$CONFIG_SHELL" != x; then : | |
22e05272 JM |
239 | export CONFIG_SHELL |
240 | # We cannot yet assume a decent shell, so we have to provide a | |
241 | # neutralization value for shells without unset; and this also | |
242 | # works around shells that cannot unset nonexistent variables. | |
243 | # Preserve -v and -x to the replacement shell. | |
244 | BASH_ENV=/dev/null | |
245 | ENV=/dev/null | |
246 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
247 | case $- in # (((( | |
248 | *v*x* | *x*v* ) as_opts=-vx ;; | |
249 | *v* ) as_opts=-v ;; | |
250 | *x* ) as_opts=-x ;; | |
251 | * ) as_opts= ;; | |
252 | esac | |
253 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
254 | # Admittedly, this is quite paranoid, since all the known shells bail | |
255 | # out after a failed `exec'. | |
256 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
257 | exit 255 | |
5213506e RW |
258 | fi |
259 | ||
260 | if test x$as_have_required = xno; then : | |
261 | $as_echo "$0: This script requires a shell more modern than all" | |
262 | $as_echo "$0: the shells that I found on your system." | |
263 | if test x${ZSH_VERSION+set} = xset ; then | |
264 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
265 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
238235ef | 266 | else |
5213506e RW |
267 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
268 | $0: including any error possibly output before this | |
269 | $0: message. Then install a modern shell, or manually run | |
270 | $0: the script under such a shell if you do have one." | |
238235ef | 271 | fi |
5213506e RW |
272 | exit 1 |
273 | fi | |
274 | fi | |
275 | fi | |
276 | SHELL=${CONFIG_SHELL-/bin/sh} | |
277 | export SHELL | |
278 | # Unset more variables known to interfere with behavior of common tools. | |
279 | CLICOLOR_FORCE= GREP_OPTIONS= | |
280 | unset CLICOLOR_FORCE GREP_OPTIONS | |
281 | ||
282 | ## --------------------- ## | |
283 | ## M4sh Shell Functions. ## | |
284 | ## --------------------- ## | |
285 | # as_fn_unset VAR | |
286 | # --------------- | |
287 | # Portably unset VAR. | |
288 | as_fn_unset () | |
289 | { | |
290 | { eval $1=; unset $1;} | |
291 | } | |
292 | as_unset=as_fn_unset | |
293 | ||
294 | # as_fn_set_status STATUS | |
295 | # ----------------------- | |
296 | # Set $? to STATUS, without forking. | |
297 | as_fn_set_status () | |
298 | { | |
299 | return $1 | |
300 | } # as_fn_set_status | |
301 | ||
302 | # as_fn_exit STATUS | |
303 | # ----------------- | |
304 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
305 | as_fn_exit () | |
306 | { | |
307 | set +e | |
308 | as_fn_set_status $1 | |
309 | exit $1 | |
310 | } # as_fn_exit | |
311 | ||
312 | # as_fn_mkdir_p | |
313 | # ------------- | |
314 | # Create "$as_dir" as a directory, including parents if necessary. | |
315 | as_fn_mkdir_p () | |
316 | { | |
317 | ||
318 | case $as_dir in #( | |
319 | -*) as_dir=./$as_dir;; | |
320 | esac | |
321 | test -d "$as_dir" || eval $as_mkdir_p || { | |
322 | as_dirs= | |
323 | while :; do | |
324 | case $as_dir in #( | |
325 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
326 | *) as_qdir=$as_dir;; | |
327 | esac | |
328 | as_dirs="'$as_qdir' $as_dirs" | |
329 | as_dir=`$as_dirname -- "$as_dir" || | |
330 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
331 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
332 | X"$as_dir" : 'X\(//\)$' \| \ | |
333 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
334 | $as_echo X"$as_dir" | | |
335 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
336 | s//\1/ | |
337 | q | |
338 | } | |
339 | /^X\(\/\/\)[^/].*/{ | |
340 | s//\1/ | |
341 | q | |
342 | } | |
343 | /^X\(\/\/\)$/{ | |
344 | s//\1/ | |
345 | q | |
346 | } | |
347 | /^X\(\/\).*/{ | |
348 | s//\1/ | |
349 | q | |
350 | } | |
351 | s/.*/./; q'` | |
352 | test -d "$as_dir" && break | |
353 | done | |
354 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
22e05272 | 355 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
5213506e RW |
356 | |
357 | ||
358 | } # as_fn_mkdir_p | |
22e05272 JM |
359 | |
360 | # as_fn_executable_p FILE | |
361 | # ----------------------- | |
362 | # Test if FILE is an executable regular file. | |
363 | as_fn_executable_p () | |
364 | { | |
365 | test -f "$1" && test -x "$1" | |
366 | } # as_fn_executable_p | |
5213506e RW |
367 | # as_fn_append VAR VALUE |
368 | # ---------------------- | |
369 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
370 | # advantage of any shell optimizations that allow amortized linear growth over | |
371 | # repeated appends, instead of the typical quadratic growth present in naive | |
372 | # implementations. | |
373 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
374 | eval 'as_fn_append () | |
375 | { | |
376 | eval $1+=\$2 | |
377 | }' | |
378 | else | |
379 | as_fn_append () | |
380 | { | |
381 | eval $1=\$$1\$2 | |
382 | } | |
383 | fi # as_fn_append | |
384 | ||
385 | # as_fn_arith ARG... | |
386 | # ------------------ | |
387 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
388 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
389 | # must be portable across $(()) and expr. | |
390 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
391 | eval 'as_fn_arith () | |
392 | { | |
393 | as_val=$(( $* )) | |
394 | }' | |
395 | else | |
396 | as_fn_arith () | |
397 | { | |
398 | as_val=`expr "$@" || test $? -eq 1` | |
399 | } | |
400 | fi # as_fn_arith | |
401 | ||
402 | ||
22e05272 JM |
403 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
404 | # ---------------------------------------- | |
5213506e RW |
405 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
406 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
22e05272 | 407 | # script with STATUS, using 1 if that was 0. |
5213506e RW |
408 | as_fn_error () |
409 | { | |
22e05272 JM |
410 | as_status=$1; test $as_status -eq 0 && as_status=1 |
411 | if test "$4"; then | |
412 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
413 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
5213506e | 414 | fi |
22e05272 | 415 | $as_echo "$as_me: error: $2" >&2 |
5213506e RW |
416 | as_fn_exit $as_status |
417 | } # as_fn_error | |
238235ef | 418 | |
5213506e RW |
419 | if expr a : '\(a\)' >/dev/null 2>&1 && |
420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
238235ef DJ |
421 | as_expr=expr |
422 | else | |
423 | as_expr=false | |
424 | fi | |
425 | ||
5213506e | 426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
238235ef DJ |
427 | as_basename=basename |
428 | else | |
429 | as_basename=false | |
430 | fi | |
431 | ||
5213506e RW |
432 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
433 | as_dirname=dirname | |
434 | else | |
435 | as_dirname=false | |
436 | fi | |
238235ef | 437 | |
5213506e | 438 | as_me=`$as_basename -- "$0" || |
238235ef DJ |
439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
440 | X"$0" : 'X\(//\)$' \| \ | |
5213506e RW |
441 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
442 | $as_echo X/"$0" | | |
443 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
444 | s//\1/ | |
445 | q | |
446 | } | |
447 | /^X\/\(\/\/\)$/{ | |
448 | s//\1/ | |
449 | q | |
450 | } | |
451 | /^X\/\(\/\).*/{ | |
452 | s//\1/ | |
453 | q | |
454 | } | |
455 | s/.*/./; q'` | |
238235ef | 456 | |
238235ef DJ |
457 | # Avoid depending upon Character Ranges. |
458 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
459 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
460 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
461 | as_cr_digits='0123456789' | |
462 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
463 | ||
238235ef | 464 | |
5213506e RW |
465 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
466 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
467 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
468 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
469 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
470 | sed -n ' | |
471 | p | |
472 | /[$]LINENO/= | |
473 | ' <$as_myself | | |
238235ef | 474 | sed ' |
5213506e RW |
475 | s/[$]LINENO.*/&-/ |
476 | t lineno | |
477 | b | |
478 | :lineno | |
238235ef | 479 | N |
5213506e RW |
480 | :loop |
481 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
238235ef | 482 | t loop |
5213506e | 483 | s/-\n.*// |
238235ef | 484 | ' >$as_me.lineno && |
5213506e RW |
485 | chmod +x "$as_me.lineno" || |
486 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
238235ef | 487 | |
22e05272 JM |
488 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have |
489 | # already done that, so ensure we don't try to do so again and fall | |
490 | # in an infinite loop. This has already happened in practice. | |
491 | _as_can_reexec=no; export _as_can_reexec | |
238235ef DJ |
492 | # Don't try to exec as it changes $[0], causing all sort of problems |
493 | # (the dirname of $[0] is not the place where we might find the | |
5213506e RW |
494 | # original and so on. Autoconf is especially sensitive to this). |
495 | . "./$as_me.lineno" | |
238235ef DJ |
496 | # Exit status is that of the last command. |
497 | exit | |
498 | } | |
499 | ||
5213506e RW |
500 | ECHO_C= ECHO_N= ECHO_T= |
501 | case `echo -n x` in #((((( | |
502 | -n*) | |
503 | case `echo 'xy\c'` in | |
504 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
505 | xy) ECHO_C='\c';; | |
506 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
507 | ECHO_T=' ';; | |
508 | esac;; | |
509 | *) | |
510 | ECHO_N='-n';; | |
238235ef DJ |
511 | esac |
512 | ||
5213506e RW |
513 | rm -f conf$$ conf$$.exe conf$$.file |
514 | if test -d conf$$.dir; then | |
515 | rm -f conf$$.dir/conf$$.file | |
238235ef | 516 | else |
5213506e RW |
517 | rm -f conf$$.dir |
518 | mkdir conf$$.dir 2>/dev/null | |
238235ef | 519 | fi |
5213506e RW |
520 | if (echo >conf$$.file) 2>/dev/null; then |
521 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
238235ef | 522 | as_ln_s='ln -s' |
5213506e RW |
523 | # ... but there are two gotchas: |
524 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
525 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
22e05272 | 526 | # In both cases, we have to default to `cp -pR'. |
5213506e | 527 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
22e05272 | 528 | as_ln_s='cp -pR' |
5213506e RW |
529 | elif ln conf$$.file conf$$ 2>/dev/null; then |
530 | as_ln_s=ln | |
531 | else | |
22e05272 | 532 | as_ln_s='cp -pR' |
238235ef | 533 | fi |
238235ef | 534 | else |
22e05272 | 535 | as_ln_s='cp -pR' |
238235ef | 536 | fi |
5213506e RW |
537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
538 | rmdir conf$$.dir 2>/dev/null | |
238235ef DJ |
539 | |
540 | if mkdir -p . 2>/dev/null; then | |
5213506e | 541 | as_mkdir_p='mkdir -p "$as_dir"' |
238235ef | 542 | else |
3beb1315 | 543 | test -d ./-p && rmdir ./-p |
238235ef DJ |
544 | as_mkdir_p=false |
545 | fi | |
546 | ||
22e05272 JM |
547 | as_test_x='test -x' |
548 | as_executable_p=as_fn_executable_p | |
238235ef DJ |
549 | |
550 | # Sed expression to map a string onto a valid CPP name. | |
3beb1315 | 551 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
238235ef DJ |
552 | |
553 | # Sed expression to map a string onto a valid variable name. | |
3beb1315 | 554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
238235ef DJ |
555 | |
556 | ||
22e05272 JM |
557 | test -n "$DJDIR" || exec 7<&0 </dev/null |
558 | exec 6>&1 | |
238235ef DJ |
559 | |
560 | # Name of the host. | |
22e05272 | 561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
238235ef DJ |
562 | # so uname gets run too. |
563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
564 | ||
238235ef DJ |
565 | # |
566 | # Initializations. | |
567 | # | |
0bc0cd11 | 568 | ac_default_prefix=/usr/local |
5213506e | 569 | ac_clean_files= |
238235ef | 570 | ac_config_libobj_dir=. |
5213506e | 571 | LIBOBJS= |
238235ef DJ |
572 | cross_compiling=no |
573 | subdirs= | |
574 | MFLAGS= | |
575 | MAKEFLAGS= | |
238235ef DJ |
576 | |
577 | # Identity of this package. | |
578 | PACKAGE_NAME= | |
579 | PACKAGE_TARNAME= | |
580 | PACKAGE_VERSION= | |
581 | PACKAGE_STRING= | |
582 | PACKAGE_BUGREPORT= | |
5213506e | 583 | PACKAGE_URL= |
238235ef DJ |
584 | |
585 | ac_unique_file="xmalloc.c" | |
586 | # Factoring default headers for most tests. | |
587 | ac_includes_default="\ | |
588 | #include <stdio.h> | |
5213506e | 589 | #ifdef HAVE_SYS_TYPES_H |
238235ef DJ |
590 | # include <sys/types.h> |
591 | #endif | |
5213506e | 592 | #ifdef HAVE_SYS_STAT_H |
238235ef DJ |
593 | # include <sys/stat.h> |
594 | #endif | |
5213506e | 595 | #ifdef STDC_HEADERS |
238235ef DJ |
596 | # include <stdlib.h> |
597 | # include <stddef.h> | |
598 | #else | |
5213506e | 599 | # ifdef HAVE_STDLIB_H |
238235ef DJ |
600 | # include <stdlib.h> |
601 | # endif | |
602 | #endif | |
5213506e RW |
603 | #ifdef HAVE_STRING_H |
604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
238235ef DJ |
605 | # include <memory.h> |
606 | # endif | |
607 | # include <string.h> | |
608 | #endif | |
5213506e | 609 | #ifdef HAVE_STRINGS_H |
238235ef DJ |
610 | # include <strings.h> |
611 | #endif | |
5213506e | 612 | #ifdef HAVE_INTTYPES_H |
238235ef | 613 | # include <inttypes.h> |
238235ef | 614 | #endif |
5213506e RW |
615 | #ifdef HAVE_STDINT_H |
616 | # include <stdint.h> | |
617 | #endif | |
618 | #ifdef HAVE_UNISTD_H | |
238235ef DJ |
619 | # include <unistd.h> |
620 | #endif" | |
621 | ||
22e05272 | 622 | ac_header_list= |
5213506e RW |
623 | ac_subst_vars='LTLIBOBJS |
624 | INSTALL_DEST | |
625 | pexecute | |
626 | target_header_dir | |
627 | CHECK | |
628 | LIBOBJS | |
8fc8bf80 | 629 | CET_HOST_FLAGS |
4f148bbc | 630 | NOASANFLAG |
5213506e RW |
631 | PICFLAG |
632 | INSTALL_DATA | |
633 | INSTALL_SCRIPT | |
634 | INSTALL_PROGRAM | |
5213506e RW |
635 | OUTPUT_OPTION |
636 | NO_MINUS_C_MINUS_O | |
637 | ac_libiberty_warn_cflags | |
f50f17e6 YJ |
638 | EGREP |
639 | GREP | |
5213506e RW |
640 | CPP |
641 | OBJEXT | |
642 | EXEEXT | |
643 | ac_ct_CC | |
644 | CPPFLAGS | |
645 | LDFLAGS | |
646 | CFLAGS | |
647 | CC | |
648 | RANLIB | |
649 | AR | |
650 | host_os | |
651 | host_vendor | |
652 | host_cpu | |
653 | host | |
654 | build_os | |
655 | build_vendor | |
656 | build_cpu | |
657 | build | |
658 | HAVE_PERL | |
659 | PERL | |
660 | BUILD_INFO | |
661 | MAKEINFO | |
909b30a1 | 662 | ETAGS |
5213506e RW |
663 | NOTMAINT |
664 | MAINT | |
665 | libiberty_topdir | |
1f5a932e ML |
666 | HAS_SPHINX_BUILD |
667 | SPHINX_BUILD | |
668 | CONFIGURE_SPHINX_BUILD | |
5213506e RW |
669 | target_alias |
670 | host_alias | |
671 | build_alias | |
672 | LIBS | |
673 | ECHO_T | |
674 | ECHO_N | |
675 | ECHO_C | |
676 | DEFS | |
677 | mandir | |
678 | localedir | |
679 | libdir | |
680 | psdir | |
681 | pdfdir | |
682 | dvidir | |
683 | htmldir | |
684 | infodir | |
685 | docdir | |
686 | oldincludedir | |
687 | includedir | |
688 | localstatedir | |
689 | sharedstatedir | |
690 | sysconfdir | |
691 | datadir | |
692 | datarootdir | |
693 | libexecdir | |
694 | sbindir | |
695 | bindir | |
696 | program_transform_name | |
697 | prefix | |
698 | exec_prefix | |
699 | PACKAGE_URL | |
700 | PACKAGE_BUGREPORT | |
701 | PACKAGE_STRING | |
702 | PACKAGE_VERSION | |
703 | PACKAGE_TARNAME | |
704 | PACKAGE_NAME | |
705 | PATH_SEPARATOR | |
706 | SHELL' | |
238235ef | 707 | ac_subst_files='host_makefile_frag' |
5213506e RW |
708 | ac_user_opts=' |
709 | enable_option_checking | |
710 | with_target_subdir | |
711 | with_build_subdir | |
712 | with_cross_host | |
713 | with_newlib | |
1f5a932e | 714 | with_sphinx_build |
5213506e RW |
715 | enable_maintainer_mode |
716 | enable_multilib | |
5213506e | 717 | enable_install_libiberty |
8c9fddf4 | 718 | enable_largefile |
8fc8bf80 | 719 | enable_cet |
5213506e RW |
720 | ' |
721 | ac_precious_vars='build_alias | |
722 | host_alias | |
723 | target_alias | |
724 | CC | |
725 | CFLAGS | |
726 | LDFLAGS | |
727 | LIBS | |
728 | CPPFLAGS | |
729 | CPP' | |
730 | ||
0bc0cd11 JL |
731 | |
732 | # Initialize some variables set by options. | |
238235ef DJ |
733 | ac_init_help= |
734 | ac_init_version=false | |
5213506e RW |
735 | ac_unrecognized_opts= |
736 | ac_unrecognized_sep= | |
0bc0cd11 JL |
737 | # The variables have the same names as the options, with |
738 | # dashes changed to underlines. | |
238235ef | 739 | cache_file=/dev/null |
0bc0cd11 | 740 | exec_prefix=NONE |
0bc0cd11 | 741 | no_create= |
0bc0cd11 JL |
742 | no_recursion= |
743 | prefix=NONE | |
744 | program_prefix=NONE | |
745 | program_suffix=NONE | |
746 | program_transform_name=s,x,x, | |
747 | silent= | |
748 | site= | |
749 | srcdir= | |
0bc0cd11 JL |
750 | verbose= |
751 | x_includes=NONE | |
752 | x_libraries=NONE | |
238235ef DJ |
753 | |
754 | # Installation directory options. | |
755 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
756 | # and all the variables that are supposed to be based on exec_prefix | |
757 | # by default will actually change. | |
758 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
5213506e | 759 | # (The list follows the same order as the GNU Coding Standards.) |
0bc0cd11 JL |
760 | bindir='${exec_prefix}/bin' |
761 | sbindir='${exec_prefix}/sbin' | |
762 | libexecdir='${exec_prefix}/libexec' | |
5213506e RW |
763 | datarootdir='${prefix}/share' |
764 | datadir='${datarootdir}' | |
0bc0cd11 JL |
765 | sysconfdir='${prefix}/etc' |
766 | sharedstatedir='${prefix}/com' | |
767 | localstatedir='${prefix}/var' | |
0bc0cd11 JL |
768 | includedir='${prefix}/include' |
769 | oldincludedir='/usr/include' | |
5213506e RW |
770 | docdir='${datarootdir}/doc/${PACKAGE}' |
771 | infodir='${datarootdir}/info' | |
772 | htmldir='${docdir}' | |
773 | dvidir='${docdir}' | |
774 | pdfdir='${docdir}' | |
775 | psdir='${docdir}' | |
776 | libdir='${exec_prefix}/lib' | |
777 | localedir='${datarootdir}/locale' | |
778 | mandir='${datarootdir}/man' | |
0bc0cd11 | 779 | |
0bc0cd11 | 780 | ac_prev= |
5213506e | 781 | ac_dashdash= |
0bc0cd11 JL |
782 | for ac_option |
783 | do | |
0bc0cd11 JL |
784 | # If the previous option needs an argument, assign it. |
785 | if test -n "$ac_prev"; then | |
5213506e | 786 | eval $ac_prev=\$ac_option |
0bc0cd11 JL |
787 | ac_prev= |
788 | continue | |
789 | fi | |
790 | ||
5213506e | 791 | case $ac_option in |
22e05272 JM |
792 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
793 | *=) ac_optarg= ;; | |
794 | *) ac_optarg=yes ;; | |
5213506e | 795 | esac |
0bc0cd11 JL |
796 | |
797 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
798 | ||
5213506e RW |
799 | case $ac_dashdash$ac_option in |
800 | --) | |
801 | ac_dashdash=yes ;; | |
0bc0cd11 JL |
802 | |
803 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
804 | ac_prev=bindir ;; | |
805 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
238235ef | 806 | bindir=$ac_optarg ;; |
0bc0cd11 JL |
807 | |
808 | -build | --build | --buil | --bui | --bu) | |
238235ef | 809 | ac_prev=build_alias ;; |
0bc0cd11 | 810 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
238235ef | 811 | build_alias=$ac_optarg ;; |
0bc0cd11 JL |
812 | |
813 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
814 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
815 | ac_prev=cache_file ;; | |
816 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
817 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
238235ef DJ |
818 | cache_file=$ac_optarg ;; |
819 | ||
820 | --config-cache | -C) | |
821 | cache_file=config.cache ;; | |
0bc0cd11 | 822 | |
5213506e | 823 | -datadir | --datadir | --datadi | --datad) |
0bc0cd11 | 824 | ac_prev=datadir ;; |
5213506e | 825 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
238235ef | 826 | datadir=$ac_optarg ;; |
0bc0cd11 | 827 | |
5213506e RW |
828 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
829 | | --dataroo | --dataro | --datar) | |
830 | ac_prev=datarootdir ;; | |
831 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
832 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
833 | datarootdir=$ac_optarg ;; | |
834 | ||
0bc0cd11 | 835 | -disable-* | --disable-*) |
5213506e | 836 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
0bc0cd11 | 837 | # Reject names that are not valid shell variable names. |
5213506e | 838 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
22e05272 | 839 | as_fn_error $? "invalid feature name: $ac_useropt" |
5213506e RW |
840 | ac_useropt_orig=$ac_useropt |
841 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
842 | case $ac_user_opts in | |
843 | *" | |
844 | "enable_$ac_useropt" | |
845 | "*) ;; | |
846 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
847 | ac_unrecognized_sep=', ';; | |
848 | esac | |
849 | eval enable_$ac_useropt=no ;; | |
850 | ||
851 | -docdir | --docdir | --docdi | --doc | --do) | |
852 | ac_prev=docdir ;; | |
853 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
854 | docdir=$ac_optarg ;; | |
855 | ||
856 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
857 | ac_prev=dvidir ;; | |
858 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
859 | dvidir=$ac_optarg ;; | |
0bc0cd11 JL |
860 | |
861 | -enable-* | --enable-*) | |
5213506e | 862 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
0bc0cd11 | 863 | # Reject names that are not valid shell variable names. |
5213506e | 864 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
22e05272 | 865 | as_fn_error $? "invalid feature name: $ac_useropt" |
5213506e RW |
866 | ac_useropt_orig=$ac_useropt |
867 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
868 | case $ac_user_opts in | |
869 | *" | |
870 | "enable_$ac_useropt" | |
871 | "*) ;; | |
872 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
873 | ac_unrecognized_sep=', ';; | |
0bc0cd11 | 874 | esac |
5213506e | 875 | eval enable_$ac_useropt=\$ac_optarg ;; |
0bc0cd11 JL |
876 | |
877 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
878 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
879 | | --exec | --exe | --ex) | |
880 | ac_prev=exec_prefix ;; | |
881 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
882 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
883 | | --exec=* | --exe=* | --ex=*) | |
238235ef | 884 | exec_prefix=$ac_optarg ;; |
0bc0cd11 JL |
885 | |
886 | -gas | --gas | --ga | --g) | |
887 | # Obsolete; use --with-gas. | |
888 | with_gas=yes ;; | |
889 | ||
238235ef DJ |
890 | -help | --help | --hel | --he | -h) |
891 | ac_init_help=long ;; | |
892 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
893 | ac_init_help=recursive ;; | |
894 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
895 | ac_init_help=short ;; | |
0bc0cd11 JL |
896 | |
897 | -host | --host | --hos | --ho) | |
238235ef | 898 | ac_prev=host_alias ;; |
0bc0cd11 | 899 | -host=* | --host=* | --hos=* | --ho=*) |
238235ef | 900 | host_alias=$ac_optarg ;; |
0bc0cd11 | 901 | |
5213506e RW |
902 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
903 | ac_prev=htmldir ;; | |
904 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
905 | | --ht=*) | |
906 | htmldir=$ac_optarg ;; | |
907 | ||
0bc0cd11 JL |
908 | -includedir | --includedir | --includedi | --included | --include \ |
909 | | --includ | --inclu | --incl | --inc) | |
910 | ac_prev=includedir ;; | |
911 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
912 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
238235ef | 913 | includedir=$ac_optarg ;; |
0bc0cd11 JL |
914 | |
915 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
916 | ac_prev=infodir ;; | |
917 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
238235ef | 918 | infodir=$ac_optarg ;; |
0bc0cd11 JL |
919 | |
920 | -libdir | --libdir | --libdi | --libd) | |
921 | ac_prev=libdir ;; | |
922 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
238235ef | 923 | libdir=$ac_optarg ;; |
0bc0cd11 JL |
924 | |
925 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
926 | | --libexe | --libex | --libe) | |
927 | ac_prev=libexecdir ;; | |
928 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
929 | | --libexe=* | --libex=* | --libe=*) | |
238235ef | 930 | libexecdir=$ac_optarg ;; |
0bc0cd11 | 931 | |
5213506e RW |
932 | -localedir | --localedir | --localedi | --localed | --locale) |
933 | ac_prev=localedir ;; | |
934 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
935 | localedir=$ac_optarg ;; | |
936 | ||
0bc0cd11 | 937 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
5213506e | 938 | | --localstate | --localstat | --localsta | --localst | --locals) |
0bc0cd11 JL |
939 | ac_prev=localstatedir ;; |
940 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
5213506e | 941 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
238235ef | 942 | localstatedir=$ac_optarg ;; |
0bc0cd11 JL |
943 | |
944 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
945 | ac_prev=mandir ;; | |
946 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
238235ef | 947 | mandir=$ac_optarg ;; |
0bc0cd11 JL |
948 | |
949 | -nfp | --nfp | --nf) | |
950 | # Obsolete; use --without-fp. | |
951 | with_fp=no ;; | |
952 | ||
953 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
238235ef | 954 | | --no-cr | --no-c | -n) |
0bc0cd11 JL |
955 | no_create=yes ;; |
956 | ||
957 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
958 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
959 | no_recursion=yes ;; | |
960 | ||
961 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
962 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
963 | | --oldin | --oldi | --old | --ol | --o) | |
964 | ac_prev=oldincludedir ;; | |
965 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
966 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
967 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
238235ef | 968 | oldincludedir=$ac_optarg ;; |
0bc0cd11 JL |
969 | |
970 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
971 | ac_prev=prefix ;; | |
972 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
238235ef | 973 | prefix=$ac_optarg ;; |
0bc0cd11 JL |
974 | |
975 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
976 | | --program-pre | --program-pr | --program-p) | |
977 | ac_prev=program_prefix ;; | |
978 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
979 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
238235ef | 980 | program_prefix=$ac_optarg ;; |
0bc0cd11 JL |
981 | |
982 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
983 | | --program-suf | --program-su | --program-s) | |
984 | ac_prev=program_suffix ;; | |
985 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
986 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
238235ef | 987 | program_suffix=$ac_optarg ;; |
0bc0cd11 JL |
988 | |
989 | -program-transform-name | --program-transform-name \ | |
990 | | --program-transform-nam | --program-transform-na \ | |
991 | | --program-transform-n | --program-transform- \ | |
992 | | --program-transform | --program-transfor \ | |
993 | | --program-transfo | --program-transf \ | |
994 | | --program-trans | --program-tran \ | |
995 | | --progr-tra | --program-tr | --program-t) | |
996 | ac_prev=program_transform_name ;; | |
997 | -program-transform-name=* | --program-transform-name=* \ | |
998 | | --program-transform-nam=* | --program-transform-na=* \ | |
999 | | --program-transform-n=* | --program-transform-=* \ | |
1000 | | --program-transform=* | --program-transfor=* \ | |
1001 | | --program-transfo=* | --program-transf=* \ | |
1002 | | --program-trans=* | --program-tran=* \ | |
1003 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
238235ef | 1004 | program_transform_name=$ac_optarg ;; |
0bc0cd11 | 1005 | |
5213506e RW |
1006 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1007 | ac_prev=pdfdir ;; | |
1008 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1009 | pdfdir=$ac_optarg ;; | |
1010 | ||
1011 | -psdir | --psdir | --psdi | --psd | --ps) | |
1012 | ac_prev=psdir ;; | |
1013 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1014 | psdir=$ac_optarg ;; | |
1015 | ||
0bc0cd11 JL |
1016 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1017 | | -silent | --silent | --silen | --sile | --sil) | |
1018 | silent=yes ;; | |
1019 | ||
1020 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1021 | ac_prev=sbindir ;; | |
1022 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1023 | | --sbi=* | --sb=*) | |
238235ef | 1024 | sbindir=$ac_optarg ;; |
0bc0cd11 JL |
1025 | |
1026 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1027 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1028 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1029 | | --sha | --sh) | |
1030 | ac_prev=sharedstatedir ;; | |
1031 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1032 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1033 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1034 | | --sha=* | --sh=*) | |
238235ef | 1035 | sharedstatedir=$ac_optarg ;; |
0bc0cd11 JL |
1036 | |
1037 | -site | --site | --sit) | |
1038 | ac_prev=site ;; | |
1039 | -site=* | --site=* | --sit=*) | |
238235ef | 1040 | site=$ac_optarg ;; |
0bc0cd11 JL |
1041 | |
1042 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
1043 | ac_prev=srcdir ;; | |
1044 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
238235ef | 1045 | srcdir=$ac_optarg ;; |
0bc0cd11 JL |
1046 | |
1047 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1048 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1049 | ac_prev=sysconfdir ;; | |
1050 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1051 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
238235ef | 1052 | sysconfdir=$ac_optarg ;; |
0bc0cd11 JL |
1053 | |
1054 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
238235ef | 1055 | ac_prev=target_alias ;; |
0bc0cd11 | 1056 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
238235ef | 1057 | target_alias=$ac_optarg ;; |
0bc0cd11 JL |
1058 | |
1059 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1060 | verbose=yes ;; | |
1061 | ||
238235ef DJ |
1062 | -version | --version | --versio | --versi | --vers | -V) |
1063 | ac_init_version=: ;; | |
0bc0cd11 JL |
1064 | |
1065 | -with-* | --with-*) | |
5213506e | 1066 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
0bc0cd11 | 1067 | # Reject names that are not valid shell variable names. |
5213506e | 1068 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
22e05272 | 1069 | as_fn_error $? "invalid package name: $ac_useropt" |
5213506e RW |
1070 | ac_useropt_orig=$ac_useropt |
1071 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1072 | case $ac_user_opts in | |
1073 | *" | |
1074 | "with_$ac_useropt" | |
1075 | "*) ;; | |
1076 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1077 | ac_unrecognized_sep=', ';; | |
0bc0cd11 | 1078 | esac |
5213506e | 1079 | eval with_$ac_useropt=\$ac_optarg ;; |
0bc0cd11 JL |
1080 | |
1081 | -without-* | --without-*) | |
5213506e | 1082 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
0bc0cd11 | 1083 | # Reject names that are not valid shell variable names. |
5213506e | 1084 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
22e05272 | 1085 | as_fn_error $? "invalid package name: $ac_useropt" |
5213506e RW |
1086 | ac_useropt_orig=$ac_useropt |
1087 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1088 | case $ac_user_opts in | |
1089 | *" | |
1090 | "with_$ac_useropt" | |
1091 | "*) ;; | |
1092 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1093 | ac_unrecognized_sep=', ';; | |
1094 | esac | |
1095 | eval with_$ac_useropt=no ;; | |
0bc0cd11 JL |
1096 | |
1097 | --x) | |
1098 | # Obsolete; use --with-x. | |
1099 | with_x=yes ;; | |
1100 | ||
1101 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1102 | | --x-incl | --x-inc | --x-in | --x-i) | |
1103 | ac_prev=x_includes ;; | |
1104 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1105 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
238235ef | 1106 | x_includes=$ac_optarg ;; |
0bc0cd11 JL |
1107 | |
1108 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1109 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1110 | ac_prev=x_libraries ;; | |
1111 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1112 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
238235ef | 1113 | x_libraries=$ac_optarg ;; |
0bc0cd11 | 1114 | |
22e05272 JM |
1115 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
1116 | Try \`$0 --help' for more information" | |
0bc0cd11 JL |
1117 | ;; |
1118 | ||
238235ef DJ |
1119 | *=*) |
1120 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1121 | # Reject names that are not valid shell variable names. | |
5213506e RW |
1122 | case $ac_envvar in #( |
1123 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
22e05272 | 1124 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
5213506e RW |
1125 | esac |
1126 | eval $ac_envvar=\$ac_optarg | |
238235ef DJ |
1127 | export $ac_envvar ;; |
1128 | ||
0bc0cd11 | 1129 | *) |
238235ef | 1130 | # FIXME: should be removed in autoconf 3.0. |
5213506e | 1131 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
238235ef | 1132 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
5213506e | 1133 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
22e05272 | 1134 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
0bc0cd11 JL |
1135 | ;; |
1136 | ||
1137 | esac | |
1138 | done | |
1139 | ||
1140 | if test -n "$ac_prev"; then | |
238235ef | 1141 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
22e05272 | 1142 | as_fn_error $? "missing argument to $ac_option" |
0bc0cd11 | 1143 | fi |
0bc0cd11 | 1144 | |
5213506e RW |
1145 | if test -n "$ac_unrecognized_opts"; then |
1146 | case $enable_option_checking in | |
1147 | no) ;; | |
22e05272 | 1148 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
5213506e | 1149 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
238235ef | 1150 | esac |
5213506e | 1151 | fi |
0bc0cd11 | 1152 | |
5213506e RW |
1153 | # Check all directory arguments for consistency. |
1154 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1155 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1156 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
fbb334a6 | 1157 | libdir localedir mandir |
0bc0cd11 | 1158 | do |
5213506e RW |
1159 | eval ac_val=\$$ac_var |
1160 | # Remove trailing slashes. | |
238235ef | 1161 | case $ac_val in |
5213506e RW |
1162 | */ ) |
1163 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1164 | eval $ac_var=\$ac_val;; | |
0bc0cd11 | 1165 | esac |
5213506e RW |
1166 | # Be sure to have absolute directory names. |
1167 | case $ac_val in | |
1168 | [\\/$]* | ?:[\\/]* ) continue;; | |
1169 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
1170 | esac | |
22e05272 | 1171 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
0bc0cd11 JL |
1172 | done |
1173 | ||
238235ef DJ |
1174 | # There might be people who depend on the old broken behavior: `$host' |
1175 | # used to hold the argument of --host etc. | |
1176 | # FIXME: To remove some day. | |
1177 | build=$build_alias | |
1178 | host=$host_alias | |
1179 | target=$target_alias | |
1180 | ||
1181 | # FIXME: To remove some day. | |
1182 | if test "x$host_alias" != x; then | |
1183 | if test "x$build_alias" = x; then | |
1184 | cross_compiling=maybe | |
238235ef DJ |
1185 | elif test "x$build_alias" != "x$host_alias"; then |
1186 | cross_compiling=yes | |
1187 | fi | |
1188 | fi | |
0bc0cd11 | 1189 | |
238235ef DJ |
1190 | ac_tool_prefix= |
1191 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1192 | ||
1193 | test "$silent" = yes && exec 6>/dev/null | |
0bc0cd11 | 1194 | |
0bc0cd11 | 1195 | |
5213506e RW |
1196 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1197 | ac_ls_di=`ls -di .` && | |
1198 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
22e05272 | 1199 | as_fn_error $? "working directory cannot be determined" |
5213506e | 1200 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
22e05272 | 1201 | as_fn_error $? "pwd does not report name of working directory" |
5213506e RW |
1202 | |
1203 | ||
0bc0cd11 JL |
1204 | # Find the source files, if location was not specified. |
1205 | if test -z "$srcdir"; then | |
1206 | ac_srcdir_defaulted=yes | |
5213506e RW |
1207 | # Try the directory containing this script, then the parent directory. |
1208 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1209 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1210 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1211 | X"$as_myself" : 'X\(//\)$' \| \ | |
1212 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1213 | $as_echo X"$as_myself" | | |
1214 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1215 | s//\1/ | |
1216 | q | |
1217 | } | |
1218 | /^X\(\/\/\)[^/].*/{ | |
1219 | s//\1/ | |
1220 | q | |
1221 | } | |
1222 | /^X\(\/\/\)$/{ | |
1223 | s//\1/ | |
1224 | q | |
1225 | } | |
1226 | /^X\(\/\).*/{ | |
1227 | s//\1/ | |
1228 | q | |
1229 | } | |
1230 | s/.*/./; q'` | |
0bc0cd11 | 1231 | srcdir=$ac_confdir |
5213506e | 1232 | if test ! -r "$srcdir/$ac_unique_file"; then |
0bc0cd11 JL |
1233 | srcdir=.. |
1234 | fi | |
1235 | else | |
1236 | ac_srcdir_defaulted=no | |
1237 | fi | |
5213506e RW |
1238 | if test ! -r "$srcdir/$ac_unique_file"; then |
1239 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
22e05272 | 1240 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
5213506e RW |
1241 | fi |
1242 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1243 | ac_abs_confdir=`( | |
22e05272 | 1244 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
5213506e RW |
1245 | pwd)` |
1246 | # When building in place, set srcdir=. | |
1247 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1248 | srcdir=. | |
1249 | fi | |
1250 | # Remove unnecessary trailing slashes from srcdir. | |
1251 | # Double slashes in file names in object file debugging info | |
1252 | # mess up M-x gdb in Emacs. | |
1253 | case $srcdir in | |
1254 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1255 | esac | |
1256 | for ac_var in $ac_precious_vars; do | |
1257 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1258 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1259 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1260 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1261 | done | |
238235ef DJ |
1262 | |
1263 | # | |
1264 | # Report the --help message. | |
1265 | # | |
1266 | if test "$ac_init_help" = "long"; then | |
1267 | # Omit some internal or obsolete options to make the list less imposing. | |
1268 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1269 | cat <<_ACEOF | |
1270 | \`configure' configures this package to adapt to many kinds of systems. | |
1271 | ||
1272 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1273 | ||
1274 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1275 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1276 | ||
1277 | Defaults for the options are specified in brackets. | |
1278 | ||
1279 | Configuration: | |
1280 | -h, --help display this help and exit | |
1281 | --help=short display options specific to this package | |
1282 | --help=recursive display the short help of all the included packages | |
1283 | -V, --version display version information and exit | |
22e05272 | 1284 | -q, --quiet, --silent do not print \`checking ...' messages |
238235ef DJ |
1285 | --cache-file=FILE cache test results in FILE [disabled] |
1286 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1287 | -n, --no-create do not create output files | |
1288 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1289 | ||
238235ef DJ |
1290 | Installation directories: |
1291 | --prefix=PREFIX install architecture-independent files in PREFIX | |
5213506e | 1292 | [$ac_default_prefix] |
238235ef | 1293 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
5213506e | 1294 | [PREFIX] |
238235ef DJ |
1295 | |
1296 | By default, \`make install' will install all the files in | |
1297 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1298 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1299 | for instance \`--prefix=\$HOME'. | |
1300 | ||
1301 | For better control, use the options below. | |
1302 | ||
1303 | Fine tuning of the installation directories: | |
5213506e RW |
1304 | --bindir=DIR user executables [EPREFIX/bin] |
1305 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1306 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1307 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1308 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1309 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1310 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1311 | --includedir=DIR C header files [PREFIX/include] | |
1312 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1313 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1314 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1315 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1316 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1317 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1318 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1319 | --htmldir=DIR html documentation [DOCDIR] | |
1320 | --dvidir=DIR dvi documentation [DOCDIR] | |
1321 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1322 | --psdir=DIR ps documentation [DOCDIR] | |
238235ef DJ |
1323 | _ACEOF |
1324 | ||
1325 | cat <<\_ACEOF | |
1326 | ||
1327 | System types: | |
1328 | --build=BUILD configure for building on BUILD [guessed] | |
1329 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1330 | _ACEOF | |
1331 | fi | |
1332 | ||
1333 | if test -n "$ac_init_help"; then | |
1334 | ||
1335 | cat <<\_ACEOF | |
1336 | ||
1337 | Optional Features: | |
5213506e | 1338 | --disable-option-checking ignore unrecognized --enable/--with options |
238235ef DJ |
1339 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1340 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1341 | --enable-maintainer-mode | |
1342 | enable make rules and dependencies not useful | |
1343 | (and sometimes confusing) to the casual installer | |
abea993f | 1344 | --enable-multilib build many library versions (default) |
8c9fddf4 | 1345 | --enable-install-libiberty Install headers and library for end users |
d208e2d2 | 1346 | --disable-largefile omit support for large files |
8fc8bf80 | 1347 | --enable-cet enable Intel CET in host libraries [default=auto] |
238235ef DJ |
1348 | |
1349 | Optional Packages: | |
1350 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1351 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1352 | --with-target-subdir=SUBDIR Configuring in a subdirectory for target | |
1353 | --with-build-subdir=SUBDIR Configuring in a subdirectory for build | |
1354 | --with-cross-host=HOST Configuring with a cross compiler | |
1355 | --with-newlib Configuring with newlib | |
1f5a932e | 1356 | --with-sphinx-build= Use sphinx-build from a given path |
238235ef DJ |
1357 | |
1358 | Some influential environment variables: | |
1359 | CC C compiler command | |
1360 | CFLAGS C compiler flags | |
1361 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1362 | nonstandard directory <lib dir> | |
5213506e | 1363 | LIBS libraries to pass to the linker, e.g. -l<library> |
22e05272 | 1364 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
5213506e | 1365 | you have headers in a nonstandard directory <include dir> |
238235ef DJ |
1366 | CPP C preprocessor |
1367 | ||
1368 | Use these variables to override the choices made by `configure' or to help | |
1369 | it to find libraries and programs with nonstandard names/locations. | |
1370 | ||
5213506e | 1371 | Report bugs to the package provider. |
238235ef | 1372 | _ACEOF |
5213506e | 1373 | ac_status=$? |
238235ef DJ |
1374 | fi |
1375 | ||
1376 | if test "$ac_init_help" = "recursive"; then | |
1377 | # If there are subdirs, report their specific --help. | |
238235ef | 1378 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
5213506e RW |
1379 | test -d "$ac_dir" || |
1380 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1381 | continue | |
238235ef DJ |
1382 | ac_builddir=. |
1383 | ||
5213506e RW |
1384 | case "$ac_dir" in |
1385 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1386 | *) | |
1387 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1388 | # A ".." for each directory in $ac_dir_suffix. | |
1389 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1390 | case $ac_top_builddir_sub in | |
1391 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1392 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1393 | esac ;; | |
1394 | esac | |
1395 | ac_abs_top_builddir=$ac_pwd | |
1396 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1397 | # for backward compatibility: | |
1398 | ac_top_builddir=$ac_top_build_prefix | |
238235ef DJ |
1399 | |
1400 | case $srcdir in | |
5213506e | 1401 | .) # We are building in place. |
238235ef | 1402 | ac_srcdir=. |
5213506e RW |
1403 | ac_top_srcdir=$ac_top_builddir_sub |
1404 | ac_abs_top_srcdir=$ac_pwd ;; | |
1405 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
238235ef | 1406 | ac_srcdir=$srcdir$ac_dir_suffix; |
5213506e RW |
1407 | ac_top_srcdir=$srcdir |
1408 | ac_abs_top_srcdir=$srcdir ;; | |
1409 | *) # Relative name. | |
1410 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1411 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1412 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
3beb1315 | 1413 | esac |
5213506e RW |
1414 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
1415 | ||
1416 | cd "$ac_dir" || { ac_status=$?; continue; } | |
1417 | # Check for guested configure. | |
1418 | if test -f "$ac_srcdir/configure.gnu"; then | |
1419 | echo && | |
1420 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1421 | elif test -f "$ac_srcdir/configure"; then | |
1422 | echo && | |
1423 | $SHELL "$ac_srcdir/configure" --help=recursive | |
238235ef | 1424 | else |
5213506e RW |
1425 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1426 | fi || ac_status=$? | |
1427 | cd "$ac_pwd" || { ac_status=$?; break; } | |
238235ef DJ |
1428 | done |
1429 | fi | |
1430 | ||
5213506e | 1431 | test -n "$ac_init_help" && exit $ac_status |
238235ef DJ |
1432 | if $ac_init_version; then |
1433 | cat <<\_ACEOF | |
5213506e | 1434 | configure |
22e05272 | 1435 | generated by GNU Autoconf 2.69 |
238235ef | 1436 | |
22e05272 | 1437 | Copyright (C) 2012 Free Software Foundation, Inc. |
238235ef DJ |
1438 | This configure script is free software; the Free Software Foundation |
1439 | gives unlimited permission to copy, distribute and modify it. | |
1440 | _ACEOF | |
5213506e | 1441 | exit |
238235ef | 1442 | fi |
238235ef | 1443 | |
5213506e RW |
1444 | ## ------------------------ ## |
1445 | ## Autoconf initialization. ## | |
1446 | ## ------------------------ ## | |
238235ef | 1447 | |
5213506e RW |
1448 | # ac_fn_c_try_compile LINENO |
1449 | # -------------------------- | |
1450 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1451 | ac_fn_c_try_compile () | |
238235ef | 1452 | { |
5213506e RW |
1453 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1454 | rm -f conftest.$ac_objext | |
1455 | if { { ac_try="$ac_compile" | |
1456 | case "(($ac_try" in | |
1457 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1458 | *) ac_try_echo=$ac_try;; | |
1459 | esac | |
1460 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1461 | $as_echo "$ac_try_echo"; } >&5 | |
1462 | (eval "$ac_compile") 2>conftest.err | |
1463 | ac_status=$? | |
1464 | if test -s conftest.err; then | |
1465 | grep -v '^ *+' conftest.err >conftest.er1 | |
1466 | cat conftest.er1 >&5 | |
1467 | mv -f conftest.er1 conftest.err | |
1468 | fi | |
1469 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1470 | test $ac_status = 0; } && { | |
1471 | test -z "$ac_c_werror_flag" || | |
1472 | test ! -s conftest.err | |
1473 | } && test -s conftest.$ac_objext; then : | |
1474 | ac_retval=0 | |
1475 | else | |
1476 | $as_echo "$as_me: failed program was:" >&5 | |
1477 | sed 's/^/| /' conftest.$ac_ext >&5 | |
238235ef | 1478 | |
5213506e RW |
1479 | ac_retval=1 |
1480 | fi | |
22e05272 JM |
1481 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1482 | as_fn_set_status $ac_retval | |
238235ef | 1483 | |
5213506e | 1484 | } # ac_fn_c_try_compile |
238235ef | 1485 | |
5213506e RW |
1486 | # ac_fn_c_try_cpp LINENO |
1487 | # ---------------------- | |
1488 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1489 | ac_fn_c_try_cpp () | |
1490 | { | |
1491 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1492 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1493 | case "(($ac_try" in | |
1494 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1495 | *) ac_try_echo=$ac_try;; | |
1496 | esac | |
1497 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1498 | $as_echo "$ac_try_echo"; } >&5 | |
1499 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1500 | ac_status=$? | |
1501 | if test -s conftest.err; then | |
1502 | grep -v '^ *+' conftest.err >conftest.er1 | |
1503 | cat conftest.er1 >&5 | |
1504 | mv -f conftest.er1 conftest.err | |
1505 | fi | |
1506 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
22e05272 | 1507 | test $ac_status = 0; } > conftest.i && { |
5213506e RW |
1508 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
1509 | test ! -s conftest.err | |
1510 | }; then : | |
1511 | ac_retval=0 | |
1512 | else | |
1513 | $as_echo "$as_me: failed program was:" >&5 | |
1514 | sed 's/^/| /' conftest.$ac_ext >&5 | |
238235ef | 1515 | |
5213506e RW |
1516 | ac_retval=1 |
1517 | fi | |
22e05272 JM |
1518 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1519 | as_fn_set_status $ac_retval | |
238235ef | 1520 | |
5213506e | 1521 | } # ac_fn_c_try_cpp |
238235ef | 1522 | |
f50f17e6 YJ |
1523 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1524 | # ------------------------------------------------------- | |
1525 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1526 | # the include files in INCLUDES and setting the cache variable VAR | |
1527 | # accordingly. | |
1528 | ac_fn_c_check_header_mongrel () | |
1529 | { | |
1530 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
22e05272 | 1531 | if eval \${$3+:} false; then : |
f50f17e6 YJ |
1532 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1533 | $as_echo_n "checking for $2... " >&6; } | |
22e05272 | 1534 | if eval \${$3+:} false; then : |
f50f17e6 YJ |
1535 | $as_echo_n "(cached) " >&6 |
1536 | fi | |
1537 | eval ac_res=\$$3 | |
1538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1539 | $as_echo "$ac_res" >&6; } | |
1540 | else | |
1541 | # Is the header compilable? | |
1542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1543 | $as_echo_n "checking $2 usability... " >&6; } | |
1544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1545 | /* end confdefs.h. */ | |
1546 | $4 | |
1547 | #include <$2> | |
1548 | _ACEOF | |
1549 | if ac_fn_c_try_compile "$LINENO"; then : | |
1550 | ac_header_compiler=yes | |
1551 | else | |
1552 | ac_header_compiler=no | |
1553 | fi | |
1554 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1556 | $as_echo "$ac_header_compiler" >&6; } | |
1557 | ||
1558 | # Is the header present? | |
1559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1560 | $as_echo_n "checking $2 presence... " >&6; } | |
1561 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1562 | /* end confdefs.h. */ | |
1563 | #include <$2> | |
1564 | _ACEOF | |
1565 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1566 | ac_header_preproc=yes | |
1567 | else | |
1568 | ac_header_preproc=no | |
1569 | fi | |
22e05272 | 1570 | rm -f conftest.err conftest.i conftest.$ac_ext |
f50f17e6 YJ |
1571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
1572 | $as_echo "$ac_header_preproc" >&6; } | |
1573 | ||
1574 | # So? What about this header? | |
1575 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1576 | yes:no: ) | |
1577 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1578 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1579 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1580 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1581 | ;; | |
1582 | no:yes:* ) | |
1583 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1584 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1585 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1586 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1587 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1588 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1589 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1590 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1591 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1592 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1593 | ;; | |
1594 | esac | |
1595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1596 | $as_echo_n "checking for $2... " >&6; } | |
22e05272 | 1597 | if eval \${$3+:} false; then : |
f50f17e6 YJ |
1598 | $as_echo_n "(cached) " >&6 |
1599 | else | |
1600 | eval "$3=\$ac_header_compiler" | |
1601 | fi | |
1602 | eval ac_res=\$$3 | |
1603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1604 | $as_echo "$ac_res" >&6; } | |
1605 | fi | |
22e05272 | 1606 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
f50f17e6 YJ |
1607 | |
1608 | } # ac_fn_c_check_header_mongrel | |
1609 | ||
5213506e RW |
1610 | # ac_fn_c_try_run LINENO |
1611 | # ---------------------- | |
1612 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1613 | # that executables *can* be run. | |
1614 | ac_fn_c_try_run () | |
1615 | { | |
1616 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1617 | if { { ac_try="$ac_link" | |
1618 | case "(($ac_try" in | |
1619 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1620 | *) ac_try_echo=$ac_try;; | |
1621 | esac | |
1622 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1623 | $as_echo "$ac_try_echo"; } >&5 | |
1624 | (eval "$ac_link") 2>&5 | |
1625 | ac_status=$? | |
1626 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1627 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1628 | { { case "(($ac_try" in | |
1629 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1630 | *) ac_try_echo=$ac_try;; | |
1631 | esac | |
1632 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1633 | $as_echo "$ac_try_echo"; } >&5 | |
1634 | (eval "$ac_try") 2>&5 | |
1635 | ac_status=$? | |
1636 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1637 | test $ac_status = 0; }; }; then : | |
1638 | ac_retval=0 | |
1639 | else | |
1640 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1641 | $as_echo "$as_me: failed program was:" >&5 | |
1642 | sed 's/^/| /' conftest.$ac_ext >&5 | |
238235ef | 1643 | |
5213506e RW |
1644 | ac_retval=$ac_status |
1645 | fi | |
1646 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
22e05272 JM |
1647 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1648 | as_fn_set_status $ac_retval | |
238235ef | 1649 | |
5213506e | 1650 | } # ac_fn_c_try_run |
0bc0cd11 | 1651 | |
f50f17e6 YJ |
1652 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1653 | # ------------------------------------------------------- | |
1654 | # Tests whether HEADER exists and can be compiled using the include files in | |
1655 | # INCLUDES, setting the cache variable VAR accordingly. | |
1656 | ac_fn_c_check_header_compile () | |
1657 | { | |
1658 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1660 | $as_echo_n "checking for $2... " >&6; } | |
22e05272 | 1661 | if eval \${$3+:} false; then : |
f50f17e6 YJ |
1662 | $as_echo_n "(cached) " >&6 |
1663 | else | |
1664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1665 | /* end confdefs.h. */ | |
1666 | $4 | |
1667 | #include <$2> | |
1668 | _ACEOF | |
1669 | if ac_fn_c_try_compile "$LINENO"; then : | |
1670 | eval "$3=yes" | |
1671 | else | |
1672 | eval "$3=no" | |
1673 | fi | |
1674 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1675 | fi | |
1676 | eval ac_res=\$$3 | |
1677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1678 | $as_echo "$ac_res" >&6; } | |
22e05272 | 1679 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
f50f17e6 YJ |
1680 | |
1681 | } # ac_fn_c_check_header_compile | |
1682 | ||
eedc73a2 L |
1683 | # ac_fn_c_try_link LINENO |
1684 | # ----------------------- | |
1685 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
1686 | ac_fn_c_try_link () | |
1687 | { | |
1688 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1689 | rm -f conftest.$ac_objext conftest$ac_exeext | |
1690 | if { { ac_try="$ac_link" | |
1691 | case "(($ac_try" in | |
1692 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1693 | *) ac_try_echo=$ac_try;; | |
1694 | esac | |
1695 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1696 | $as_echo "$ac_try_echo"; } >&5 | |
1697 | (eval "$ac_link") 2>conftest.err | |
1698 | ac_status=$? | |
1699 | if test -s conftest.err; then | |
1700 | grep -v '^ *+' conftest.err >conftest.er1 | |
1701 | cat conftest.er1 >&5 | |
1702 | mv -f conftest.er1 conftest.err | |
1703 | fi | |
1704 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1705 | test $ac_status = 0; } && { | |
1706 | test -z "$ac_c_werror_flag" || | |
1707 | test ! -s conftest.err | |
1708 | } && test -s conftest$ac_exeext && { | |
1709 | test "$cross_compiling" = yes || | |
1710 | test -x conftest$ac_exeext | |
1711 | }; then : | |
1712 | ac_retval=0 | |
1713 | else | |
1714 | $as_echo "$as_me: failed program was:" >&5 | |
1715 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1716 | ||
1717 | ac_retval=1 | |
1718 | fi | |
1719 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
1720 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
1721 | # interfere with the next link command; also delete a directory that is | |
1722 | # left behind by Apple's compiler. We do this before executing the actions. | |
1723 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1724 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1725 | as_fn_set_status $ac_retval | |
1726 | ||
1727 | } # ac_fn_c_try_link | |
1728 | ||
5213506e RW |
1729 | # ac_fn_c_check_header_preproc LINENO HEADER VAR |
1730 | # ---------------------------------------------- | |
1731 | # Tests whether HEADER is present, setting the cache variable VAR accordingly. | |
1732 | ac_fn_c_check_header_preproc () | |
1733 | { | |
1734 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1736 | $as_echo_n "checking for $2... " >&6; } | |
22e05272 | 1737 | if eval \${$3+:} false; then : |
5213506e RW |
1738 | $as_echo_n "(cached) " >&6 |
1739 | else | |
1740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1741 | /* end confdefs.h. */ | |
1742 | #include <$2> | |
238235ef | 1743 | _ACEOF |
5213506e RW |
1744 | if ac_fn_c_try_cpp "$LINENO"; then : |
1745 | eval "$3=yes" | |
1746 | else | |
1747 | eval "$3=no" | |
1748 | fi | |
22e05272 | 1749 | rm -f conftest.err conftest.i conftest.$ac_ext |
5213506e RW |
1750 | fi |
1751 | eval ac_res=\$$3 | |
1752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1753 | $as_echo "$ac_res" >&6; } | |
22e05272 | 1754 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
238235ef | 1755 | |
5213506e | 1756 | } # ac_fn_c_check_header_preproc |
238235ef | 1757 | |
5213506e RW |
1758 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1759 | # -------------------------------------------- | |
1760 | # Tries to find the compile-time value of EXPR in a program that includes | |
1761 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1762 | # computed | |
1763 | ac_fn_c_compute_int () | |
1764 | { | |
1765 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1766 | if test "$cross_compiling" = yes; then | |
1767 | # Depending upon the size, compute the lo and hi bounds. | |
1768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1769 | /* end confdefs.h. */ | |
1770 | $4 | |
1771 | int | |
1772 | main () | |
1773 | { | |
1774 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
22e05272 JM |
1775 | test_array [0] = 0; |
1776 | return test_array [0]; | |
238235ef | 1777 | |
5213506e RW |
1778 | ; |
1779 | return 0; | |
1780 | } | |
1781 | _ACEOF | |
1782 | if ac_fn_c_try_compile "$LINENO"; then : | |
1783 | ac_lo=0 ac_mid=0 | |
1784 | while :; do | |
1785 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1786 | /* end confdefs.h. */ | |
1787 | $4 | |
1788 | int | |
1789 | main () | |
238235ef | 1790 | { |
5213506e | 1791 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
22e05272 JM |
1792 | test_array [0] = 0; |
1793 | return test_array [0]; | |
5213506e RW |
1794 | |
1795 | ; | |
1796 | return 0; | |
238235ef | 1797 | } |
5213506e RW |
1798 | _ACEOF |
1799 | if ac_fn_c_try_compile "$LINENO"; then : | |
1800 | ac_hi=$ac_mid; break | |
1801 | else | |
1802 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1803 | if test $ac_lo -le $ac_mid; then | |
1804 | ac_lo= ac_hi= | |
1805 | break | |
1806 | fi | |
1807 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
1808 | fi | |
1809 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1810 | done | |
1811 | else | |
1812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1813 | /* end confdefs.h. */ | |
1814 | $4 | |
1815 | int | |
1816 | main () | |
1817 | { | |
1818 | static int test_array [1 - 2 * !(($2) < 0)]; | |
22e05272 JM |
1819 | test_array [0] = 0; |
1820 | return test_array [0]; | |
238235ef | 1821 | |
5213506e RW |
1822 | ; |
1823 | return 0; | |
1824 | } | |
1825 | _ACEOF | |
1826 | if ac_fn_c_try_compile "$LINENO"; then : | |
1827 | ac_hi=-1 ac_mid=-1 | |
1828 | while :; do | |
1829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1830 | /* end confdefs.h. */ | |
1831 | $4 | |
1832 | int | |
1833 | main () | |
1834 | { | |
1835 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
22e05272 JM |
1836 | test_array [0] = 0; |
1837 | return test_array [0]; | |
238235ef | 1838 | |
5213506e RW |
1839 | ; |
1840 | return 0; | |
1841 | } | |
1842 | _ACEOF | |
1843 | if ac_fn_c_try_compile "$LINENO"; then : | |
1844 | ac_lo=$ac_mid; break | |
1845 | else | |
1846 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1847 | if test $ac_mid -le $ac_hi; then | |
1848 | ac_lo= ac_hi= | |
1849 | break | |
1850 | fi | |
1851 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1852 | fi | |
1853 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1854 | done | |
1855 | else | |
1856 | ac_lo= ac_hi= | |
1857 | fi | |
1858 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1859 | fi | |
1860 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1861 | # Binary search between lo and hi bounds. | |
1862 | while test "x$ac_lo" != "x$ac_hi"; do | |
1863 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1865 | /* end confdefs.h. */ | |
1866 | $4 | |
1867 | int | |
1868 | main () | |
1869 | { | |
1870 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
22e05272 JM |
1871 | test_array [0] = 0; |
1872 | return test_array [0]; | |
238235ef | 1873 | |
5213506e RW |
1874 | ; |
1875 | return 0; | |
1876 | } | |
1877 | _ACEOF | |
1878 | if ac_fn_c_try_compile "$LINENO"; then : | |
1879 | ac_hi=$ac_mid | |
1880 | else | |
1881 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
1882 | fi | |
1883 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
238235ef | 1884 | done |
5213506e RW |
1885 | case $ac_lo in #(( |
1886 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
1887 | '') ac_retval=1 ;; | |
1888 | esac | |
1889 | else | |
1890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1891 | /* end confdefs.h. */ | |
1892 | $4 | |
1893 | static long int longval () { return $2; } | |
1894 | static unsigned long int ulongval () { return $2; } | |
1895 | #include <stdio.h> | |
1896 | #include <stdlib.h> | |
1897 | int | |
1898 | main () | |
1899 | { | |
238235ef | 1900 | |
5213506e RW |
1901 | FILE *f = fopen ("conftest.val", "w"); |
1902 | if (! f) | |
1903 | return 1; | |
1904 | if (($2) < 0) | |
1905 | { | |
1906 | long int i = longval (); | |
1907 | if (i != ($2)) | |
1908 | return 1; | |
1909 | fprintf (f, "%ld", i); | |
1910 | } | |
1911 | else | |
1912 | { | |
1913 | unsigned long int i = ulongval (); | |
1914 | if (i != ($2)) | |
1915 | return 1; | |
1916 | fprintf (f, "%lu", i); | |
1917 | } | |
1918 | /* Do not output a trailing newline, as this causes \r\n confusion | |
1919 | on some platforms. */ | |
1920 | return ferror (f) || fclose (f) != 0; | |
238235ef | 1921 | |
5213506e RW |
1922 | ; |
1923 | return 0; | |
1924 | } | |
238235ef | 1925 | _ACEOF |
5213506e RW |
1926 | if ac_fn_c_try_run "$LINENO"; then : |
1927 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
1928 | else | |
1929 | ac_retval=1 | |
1930 | fi | |
1931 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
1932 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1933 | rm -f conftest.val | |
238235ef | 1934 | |
5213506e | 1935 | fi |
22e05272 JM |
1936 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1937 | as_fn_set_status $ac_retval | |
238235ef | 1938 | |
5213506e | 1939 | } # ac_fn_c_compute_int |
238235ef | 1940 | |
5213506e RW |
1941 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
1942 | # ------------------------------------------- | |
1943 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
1944 | # variable VAR accordingly. | |
1945 | ac_fn_c_check_type () | |
1946 | { | |
1947 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1949 | $as_echo_n "checking for $2... " >&6; } | |
22e05272 | 1950 | if eval \${$3+:} false; then : |
5213506e RW |
1951 | $as_echo_n "(cached) " >&6 |
1952 | else | |
1953 | eval "$3=no" | |
1954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1955 | /* end confdefs.h. */ | |
1956 | $4 | |
1957 | int | |
1958 | main () | |
1959 | { | |
1960 | if (sizeof ($2)) | |
1961 | return 0; | |
1962 | ; | |
1963 | return 0; | |
1964 | } | |
238235ef | 1965 | _ACEOF |
5213506e RW |
1966 | if ac_fn_c_try_compile "$LINENO"; then : |
1967 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1968 | /* end confdefs.h. */ | |
1969 | $4 | |
1970 | int | |
1971 | main () | |
1972 | { | |
1973 | if (sizeof (($2))) | |
1974 | return 0; | |
1975 | ; | |
1976 | return 0; | |
1977 | } | |
238235ef | 1978 | _ACEOF |
5213506e | 1979 | if ac_fn_c_try_compile "$LINENO"; then : |
238235ef | 1980 | |
5213506e RW |
1981 | else |
1982 | eval "$3=yes" | |
1983 | fi | |
1984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1985 | fi | |
1986 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1987 | fi | |
1988 | eval ac_res=\$$3 | |
1989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1990 | $as_echo "$ac_res" >&6; } | |
22e05272 | 1991 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
238235ef | 1992 | |
5213506e | 1993 | } # ac_fn_c_check_type |
238235ef | 1994 | |
5213506e RW |
1995 | # ac_fn_c_check_func LINENO FUNC VAR |
1996 | # ---------------------------------- | |
1997 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1998 | ac_fn_c_check_func () | |
1999 | { | |
2000 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2002 | $as_echo_n "checking for $2... " >&6; } | |
22e05272 | 2003 | if eval \${$3+:} false; then : |
5213506e | 2004 | $as_echo_n "(cached) " >&6 |
0bc0cd11 | 2005 | else |
5213506e | 2006 | if test x$gcc_no_link = xyes; then |
22e05272 | 2007 | as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 |
238235ef | 2008 | fi |
5213506e RW |
2009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2010 | /* end confdefs.h. */ | |
0e0f02ff RW |
2011 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2012 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2013 | #define $2 innocuous_$2 | |
2014 | ||
5213506e RW |
2015 | /* System header to define __stub macros and hopefully few prototypes, |
2016 | which can conflict with char $2 (); below. | |
2017 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
0e0f02ff RW |
2018 | <limits.h> exists even on freestanding compilers. */ |
2019 | ||
2020 | #ifdef __STDC__ | |
5213506e RW |
2021 | # include <limits.h> |
2022 | #else | |
2023 | # include <assert.h> | |
2024 | #endif | |
0e0f02ff RW |
2025 | |
2026 | #undef $2 | |
2027 | ||
2028 | /* Override any GCC internal prototype to avoid an error. | |
2029 | Use char because int might match the return type of a GCC | |
2030 | builtin and then its argument prototype would still apply. */ | |
5213506e RW |
2031 | #ifdef __cplusplus |
2032 | extern "C" | |
5213506e | 2033 | #endif |
5213506e RW |
2034 | char $2 (); |
2035 | /* The GNU C library defines this for functions which it implements | |
2036 | to always fail with ENOSYS. Some functions are actually named | |
2037 | something starting with __ and the normal name is an alias. */ | |
0e0f02ff | 2038 | #if defined __stub_$2 || defined __stub___$2 |
5213506e | 2039 | choke me |
5213506e | 2040 | #endif |
238235ef | 2041 | |
5213506e RW |
2042 | int |
2043 | main () | |
2044 | { | |
0e0f02ff | 2045 | return $2 (); |
5213506e RW |
2046 | ; |
2047 | return 0; | |
2048 | } | |
2049 | _ACEOF | |
2050 | if ac_fn_c_try_link "$LINENO"; then : | |
2051 | eval "$3=yes" | |
2052 | else | |
2053 | eval "$3=no" | |
0bc0cd11 | 2054 | fi |
5213506e RW |
2055 | rm -f core conftest.err conftest.$ac_objext \ |
2056 | conftest$ac_exeext conftest.$ac_ext | |
2057 | fi | |
2058 | eval ac_res=\$$3 | |
2059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2060 | $as_echo "$ac_res" >&6; } | |
22e05272 | 2061 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
0bc0cd11 | 2062 | |
5213506e | 2063 | } # ac_fn_c_check_func |
0bc0cd11 | 2064 | |
22e05272 JM |
2065 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
2066 | # --------------------------------------------- | |
2067 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
2068 | # accordingly. | |
5213506e RW |
2069 | ac_fn_c_check_decl () |
2070 | { | |
2071 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
c3f247f4 RW |
2072 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
2073 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2075 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
22e05272 | 2076 | if eval \${$3+:} false; then : |
5213506e RW |
2077 | $as_echo_n "(cached) " >&6 |
2078 | else | |
2079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2080 | /* end confdefs.h. */ | |
2081 | $4 | |
2082 | int | |
2083 | main () | |
2084 | { | |
c3f247f4 RW |
2085 | #ifndef $as_decl_name |
2086 | #ifdef __cplusplus | |
2087 | (void) $as_decl_use; | |
2088 | #else | |
2089 | (void) $as_decl_name; | |
2090 | #endif | |
5213506e | 2091 | #endif |
0bc0cd11 | 2092 | |
5213506e RW |
2093 | ; |
2094 | return 0; | |
2095 | } | |
2096 | _ACEOF | |
2097 | if ac_fn_c_try_compile "$LINENO"; then : | |
2098 | eval "$3=yes" | |
2099 | else | |
2100 | eval "$3=no" | |
2101 | fi | |
2102 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2103 | fi | |
2104 | eval ac_res=\$$3 | |
2105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2106 | $as_echo "$ac_res" >&6; } | |
22e05272 | 2107 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
0bc0cd11 | 2108 | |
5213506e RW |
2109 | } # ac_fn_c_check_decl |
2110 | cat >config.log <<_ACEOF | |
2111 | This file contains any messages produced by compilers while | |
2112 | running configure, to aid debugging if configure makes a mistake. | |
6706f116 | 2113 | |
5213506e | 2114 | It was created by $as_me, which was |
22e05272 | 2115 | generated by GNU Autoconf 2.69. Invocation command line was |
0bc0cd11 | 2116 | |
5213506e | 2117 | $ $0 $@ |
238235ef | 2118 | |
5213506e RW |
2119 | _ACEOF |
2120 | exec 5>>config.log | |
2121 | { | |
2122 | cat <<_ASUNAME | |
2123 | ## --------- ## | |
2124 | ## Platform. ## | |
2125 | ## --------- ## | |
238235ef | 2126 | |
5213506e RW |
2127 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2128 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2129 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2130 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2131 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
238235ef | 2132 | |
5213506e RW |
2133 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2134 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
238235ef | 2135 | |
5213506e RW |
2136 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2137 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2138 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2139 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2140 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2141 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2142 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
238235ef | 2143 | |
5213506e | 2144 | _ASUNAME |
238235ef | 2145 | |
5213506e RW |
2146 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2147 | for as_dir in $PATH | |
2148 | do | |
2149 | IFS=$as_save_IFS | |
2150 | test -z "$as_dir" && as_dir=. | |
2151 | $as_echo "PATH: $as_dir" | |
2152 | done | |
2153 | IFS=$as_save_IFS | |
238235ef | 2154 | |
5213506e | 2155 | } >&5 |
238235ef | 2156 | |
5213506e | 2157 | cat >&5 <<_ACEOF |
238235ef DJ |
2158 | |
2159 | ||
5213506e RW |
2160 | ## ----------- ## |
2161 | ## Core tests. ## | |
2162 | ## ----------- ## | |
238235ef | 2163 | |
5213506e | 2164 | _ACEOF |
238235ef | 2165 | |
18c04407 | 2166 | |
5213506e RW |
2167 | # Keep a trace of the command line. |
2168 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2169 | # Strip out --silent because we don't want to record it for future runs. | |
2170 | # Also quote any args containing shell meta-characters. | |
2171 | # Make two passes to allow for proper duplicate-argument suppression. | |
2172 | ac_configure_args= | |
2173 | ac_configure_args0= | |
2174 | ac_configure_args1= | |
2175 | ac_must_keep_next=false | |
2176 | for ac_pass in 1 2 | |
2177 | do | |
2178 | for ac_arg | |
2179 | do | |
2180 | case $ac_arg in | |
2181 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2182 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2183 | | -silent | --silent | --silen | --sile | --sil) | |
2184 | continue ;; | |
2185 | *\'*) | |
2186 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2187 | esac | |
2188 | case $ac_pass in | |
2189 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2190 | 2) | |
2191 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2192 | if test $ac_must_keep_next = true; then | |
2193 | ac_must_keep_next=false # Got value, back to normal. | |
2194 | else | |
2195 | case $ac_arg in | |
2196 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2197 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2198 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2199 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2200 | case "$ac_configure_args0 " in | |
2201 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2202 | esac | |
2203 | ;; | |
2204 | -* ) ac_must_keep_next=true ;; | |
2205 | esac | |
2206 | fi | |
2207 | as_fn_append ac_configure_args " '$ac_arg'" | |
2208 | ;; | |
2209 | esac | |
2210 | done | |
2211 | done | |
2212 | { ac_configure_args0=; unset ac_configure_args0;} | |
2213 | { ac_configure_args1=; unset ac_configure_args1;} | |
18c04407 | 2214 | |
5213506e RW |
2215 | # When interrupted or exit'd, cleanup temporary files, and complete |
2216 | # config.log. We remove comments because anyway the quotes in there | |
2217 | # would cause problems or look ugly. | |
2218 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2219 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2220 | trap 'exit_status=$? | |
2221 | # Save into config.log some information that might help in debugging. | |
2222 | { | |
2223 | echo | |
18c04407 | 2224 | |
22e05272 | 2225 | $as_echo "## ---------------- ## |
5213506e | 2226 | ## Cache variables. ## |
22e05272 | 2227 | ## ---------------- ##" |
5213506e RW |
2228 | echo |
2229 | # The following way of writing the cache mishandles newlines in values, | |
2230 | ( | |
2231 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2232 | eval ac_val=\$$ac_var | |
2233 | case $ac_val in #( | |
2234 | *${as_nl}*) | |
2235 | case $ac_var in #( | |
2236 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2237 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2238 | esac | |
2239 | case $ac_var in #( | |
2240 | _ | IFS | as_nl) ;; #( | |
2241 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2242 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2243 | esac ;; | |
2244 | esac | |
2245 | done | |
2246 | (set) 2>&1 | | |
2247 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2248 | *${as_nl}ac_space=\ *) | |
2249 | sed -n \ | |
2250 | "s/'\''/'\''\\\\'\'''\''/g; | |
2251 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2252 | ;; #( | |
2253 | *) | |
2254 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2255 | ;; | |
2256 | esac | | |
2257 | sort | |
2258 | ) | |
2259 | echo | |
238235ef | 2260 | |
22e05272 | 2261 | $as_echo "## ----------------- ## |
5213506e | 2262 | ## Output variables. ## |
22e05272 | 2263 | ## ----------------- ##" |
5213506e RW |
2264 | echo |
2265 | for ac_var in $ac_subst_vars | |
2266 | do | |
2267 | eval ac_val=\$$ac_var | |
2268 | case $ac_val in | |
2269 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2270 | esac | |
2271 | $as_echo "$ac_var='\''$ac_val'\''" | |
2272 | done | sort | |
2273 | echo | |
238235ef | 2274 | |
5213506e | 2275 | if test -n "$ac_subst_files"; then |
22e05272 | 2276 | $as_echo "## ------------------- ## |
5213506e | 2277 | ## File substitutions. ## |
22e05272 | 2278 | ## ------------------- ##" |
5213506e RW |
2279 | echo |
2280 | for ac_var in $ac_subst_files | |
2281 | do | |
2282 | eval ac_val=\$$ac_var | |
2283 | case $ac_val in | |
2284 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2285 | esac | |
2286 | $as_echo "$ac_var='\''$ac_val'\''" | |
2287 | done | sort | |
2288 | echo | |
2289 | fi | |
9bf3c9cc | 2290 | |
5213506e | 2291 | if test -s confdefs.h; then |
22e05272 | 2292 | $as_echo "## ----------- ## |
5213506e | 2293 | ## confdefs.h. ## |
22e05272 | 2294 | ## ----------- ##" |
5213506e RW |
2295 | echo |
2296 | cat confdefs.h | |
2297 | echo | |
2298 | fi | |
2299 | test "$ac_signal" != 0 && | |
2300 | $as_echo "$as_me: caught signal $ac_signal" | |
2301 | $as_echo "$as_me: exit $exit_status" | |
2302 | } >&5 | |
2303 | rm -f core *.core core.conftest.* && | |
2304 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2305 | exit $exit_status | |
2306 | ' 0 | |
2307 | for ac_signal in 1 2 13 15; do | |
2308 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2309 | done | |
2310 | ac_signal=0 | |
238235ef | 2311 | |
5213506e RW |
2312 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
2313 | rm -f -r conftest* confdefs.h | |
238235ef | 2314 | |
5213506e | 2315 | $as_echo "/* confdefs.h */" > confdefs.h |
238235ef | 2316 | |
5213506e | 2317 | # Predefined preprocessor variables. |
238235ef | 2318 | |
5213506e RW |
2319 | cat >>confdefs.h <<_ACEOF |
2320 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2321 | _ACEOF | |
238235ef | 2322 | |
5213506e RW |
2323 | cat >>confdefs.h <<_ACEOF |
2324 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2325 | _ACEOF | |
238235ef | 2326 | |
5213506e RW |
2327 | cat >>confdefs.h <<_ACEOF |
2328 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2329 | _ACEOF | |
cd862df8 | 2330 | |
5213506e RW |
2331 | cat >>confdefs.h <<_ACEOF |
2332 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2333 | _ACEOF | |
238235ef | 2334 | |
5213506e RW |
2335 | cat >>confdefs.h <<_ACEOF |
2336 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2337 | _ACEOF | |
ca6b370d | 2338 | |
5213506e RW |
2339 | cat >>confdefs.h <<_ACEOF |
2340 | #define PACKAGE_URL "$PACKAGE_URL" | |
2341 | _ACEOF | |
0bc0cd11 JL |
2342 | |
2343 | ||
5213506e RW |
2344 | # Let the site file select an alternate cache file if it wants to. |
2345 | # Prefer an explicitly selected file to automatically selected ones. | |
2346 | ac_site_file1=NONE | |
2347 | ac_site_file2=NONE | |
2348 | if test -n "$CONFIG_SITE"; then | |
22e05272 JM |
2349 | # We do not want a PATH search for config.site. |
2350 | case $CONFIG_SITE in #(( | |
2351 | -*) ac_site_file1=./$CONFIG_SITE;; | |
2352 | */*) ac_site_file1=$CONFIG_SITE;; | |
2353 | *) ac_site_file1=./$CONFIG_SITE;; | |
2354 | esac | |
5213506e RW |
2355 | elif test "x$prefix" != xNONE; then |
2356 | ac_site_file1=$prefix/share/config.site | |
2357 | ac_site_file2=$prefix/etc/config.site | |
2358 | else | |
2359 | ac_site_file1=$ac_default_prefix/share/config.site | |
2360 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2361 | fi | |
2362 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2363 | do | |
2364 | test "x$ac_site_file" = xNONE && continue | |
22e05272 | 2365 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
5213506e RW |
2366 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
2367 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2368 | sed 's/^/| /' "$ac_site_file" >&5 | |
22e05272 JM |
2369 | . "$ac_site_file" \ |
2370 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2371 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2372 | as_fn_error $? "failed to load site script $ac_site_file | |
2373 | See \`config.log' for more details" "$LINENO" 5; } | |
5213506e RW |
2374 | fi |
2375 | done | |
2376 | ||
2377 | if test -r "$cache_file"; then | |
22e05272 JM |
2378 | # Some versions of bash will fail to source /dev/null (special files |
2379 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
2380 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
5213506e RW |
2381 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
2382 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2383 | case $cache_file in | |
2384 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2385 | *) . "./$cache_file";; | |
2386 | esac | |
2387 | fi | |
2388 | else | |
2389 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2390 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2391 | >$cache_file | |
2392 | fi | |
2393 | ||
22e05272 JM |
2394 | as_fn_append ac_header_list " stdlib.h" |
2395 | as_fn_append ac_header_list " unistd.h" | |
2396 | as_fn_append ac_header_list " sys/param.h" | |
5213506e RW |
2397 | # Check that the precious variables saved in the cache have kept the same |
2398 | # value. | |
2399 | ac_cache_corrupted=false | |
2400 | for ac_var in $ac_precious_vars; do | |
2401 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2402 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2403 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2404 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2405 | case $ac_old_set,$ac_new_set in | |
2406 | set,) | |
2407 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2408 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2409 | ac_cache_corrupted=: ;; | |
2410 | ,set) | |
2411 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2412 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2413 | ac_cache_corrupted=: ;; | |
2414 | ,);; | |
2415 | *) | |
2416 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2417 | # differences in whitespace do not lead to failure. | |
2418 | ac_old_val_w=`echo x $ac_old_val` | |
2419 | ac_new_val_w=`echo x $ac_new_val` | |
2420 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2421 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2422 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2423 | ac_cache_corrupted=: | |
2424 | else | |
2425 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2426 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2427 | eval $ac_var=\$ac_old_val | |
2428 | fi | |
2429 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2430 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2431 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2432 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2433 | fi;; | |
2434 | esac | |
2435 | # Pass precious variables to config.status. | |
2436 | if test "$ac_new_set" = set; then | |
2437 | case $ac_new_val in | |
2438 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2439 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2440 | esac | |
2441 | case " $ac_configure_args " in | |
2442 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2443 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2444 | esac | |
2445 | fi | |
2446 | done | |
2447 | if $ac_cache_corrupted; then | |
2448 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2449 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2450 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2451 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
22e05272 | 2452 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
5213506e RW |
2453 | fi |
2454 | ## -------------------- ## | |
2455 | ## Main body of script. ## | |
2456 | ## -------------------- ## | |
2457 | ||
2458 | ac_ext=c | |
2459 | ac_cpp='$CPP $CPPFLAGS' | |
2460 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2461 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2462 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2463 | ||
2464 | ||
2465 | ||
2466 | ||
1f237573 | 2467 | |
5213506e RW |
2468 | # This works around the fact that libtool configuration may change LD |
2469 | # for this particular configuration, but some shells, instead of | |
2470 | # keeping the changes in LD private, export them just because LD is | |
2471 | # exported. We don't use libtool yet, but some day we might, so... | |
2472 | ORIGINAL_LD_FOR_MULTILIBS=$LD | |
2473 | ||
2474 | ||
2475 | # Check whether --with-target-subdir was given. | |
2476 | if test "${with_target_subdir+set}" = set; then : | |
2477 | withval=$with_target_subdir; | |
2478 | fi | |
2479 | ||
2480 | ||
2481 | # Check whether --with-build-subdir was given. | |
2482 | if test "${with_build_subdir+set}" = set; then : | |
2483 | withval=$with_build_subdir; | |
2484 | fi | |
2485 | ||
2486 | ||
2487 | # Check whether --with-cross-host was given. | |
2488 | if test "${with_cross_host+set}" = set; then : | |
2489 | withval=$with_cross_host; | |
2490 | fi | |
2491 | ||
2492 | ||
2493 | # Check whether --with-newlib was given. | |
2494 | if test "${with_newlib+set}" = set; then : | |
2495 | withval=$with_newlib; | |
2496 | fi | |
2497 | ||
2498 | ||
1f5a932e ML |
2499 | |
2500 | # Check whether --with-sphinx-build was given. | |
2501 | if test "${with_sphinx_build+set}" = set; then : | |
2502 | withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval | |
2503 | else | |
2504 | CONFIGURE_SPHINX_BUILD= | |
2505 | ||
2506 | fi | |
2507 | ||
2508 | ||
2509 | ||
2510 | # See if sphinx-build has been installed and is modern enough | |
2511 | # that we can use it. | |
2512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5 | |
2513 | $as_echo_n "checking for sphinx-build... " >&6; } | |
2514 | sphinx=sphinx-build | |
2515 | if test x${CONFIGURE_SPHINX_BUILD} != x ; then | |
2516 | sphinx=${CONFIGURE_SPHINX_BUILD} | |
2517 | fi | |
2518 | ||
2519 | tempdir=build.$$ | |
2520 | source=source.$$ | |
2521 | mkdir $source | |
2522 | grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py | |
2523 | touch $source/index.rst | |
2524 | if ${sphinx} $source $tempdir >/dev/null 2>&1; then | |
2525 | SPHINX_BUILD=${sphinx} | |
2526 | HAS_SPHINX_BUILD=has-sphinx-build | |
2527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
2528 | $as_echo "yes" >&6; } | |
2529 | else | |
2530 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | |
2531 | *** sphinx-build is missing or too old. | |
2532 | *** Info and man pages documentation will not be built." >&5 | |
2533 | $as_echo "$as_me: WARNING: | |
2534 | *** sphinx-build is missing or too old. | |
2535 | *** Info and man pages documentation will not be built." >&2;} | |
2536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2537 | $as_echo "no" >&6; } | |
bd24b5db | 2538 | SPHINX_BUILD= |
1f5a932e ML |
2539 | HAS_SPHINX_BUILD= |
2540 | fi | |
2541 | rm -rf $tempdir | |
2542 | rm -rf $source | |
2543 | ||
2544 | ||
2545 | ||
5213506e RW |
2546 | if test "${srcdir}" = "."; then |
2547 | if test -n "${with_build_subdir}"; then | |
2548 | libiberty_topdir="${srcdir}/../.." | |
cd862df8 L |
2549 | with_target_subdir= |
2550 | elif test -z "${with_target_subdir}"; then | |
0bc0cd11 JL |
2551 | libiberty_topdir="${srcdir}/.." |
2552 | else | |
2553 | if test "${with_target_subdir}" != "."; then | |
2554 | libiberty_topdir="${srcdir}/${with_multisrctop}../.." | |
2555 | else | |
2556 | libiberty_topdir="${srcdir}/${with_multisrctop}.." | |
2557 | fi | |
2558 | fi | |
2559 | else | |
2560 | libiberty_topdir="${srcdir}/.." | |
2561 | fi | |
d8c22ce7 | 2562 | |
0bc0cd11 | 2563 | ac_aux_dir= |
5213506e | 2564 | for ac_dir in $libiberty_topdir "$srcdir"/$libiberty_topdir; do |
22e05272 JM |
2565 | if test -f "$ac_dir/install-sh"; then |
2566 | ac_aux_dir=$ac_dir | |
2567 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
2568 | break | |
2569 | elif test -f "$ac_dir/install.sh"; then | |
2570 | ac_aux_dir=$ac_dir | |
2571 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
2572 | break | |
2573 | elif test -f "$ac_dir/shtool"; then | |
2574 | ac_aux_dir=$ac_dir | |
2575 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
2576 | break | |
2577 | fi | |
0bc0cd11 JL |
2578 | done |
2579 | if test -z "$ac_aux_dir"; then | |
22e05272 | 2580 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in $libiberty_topdir \"$srcdir\"/$libiberty_topdir" "$LINENO" 5 |
0bc0cd11 | 2581 | fi |
0bc0cd11 | 2582 | |
5213506e RW |
2583 | # These three variables are undocumented and unsupported, |
2584 | # and are intended to be withdrawn in a future Autoconf release. | |
2585 | # They can cause serious problems if a builder's source tree is in a directory | |
2586 | # whose full name contains unusual characters. | |
2587 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
2588 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
2589 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
0bc0cd11 JL |
2590 | |
2591 | ||
5213506e RW |
2592 | |
2593 | ||
2594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2595 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2596 | # Check whether --enable-maintainer-mode was given. | |
2597 | if test "${enable_maintainer_mode+set}" = set; then : | |
2598 | enableval=$enable_maintainer_mode; maintainer_mode=$enableval | |
aaa5f039 DD |
2599 | else |
2600 | maintainer_mode=no | |
5213506e | 2601 | fi |
aaa5f039 | 2602 | |
5213506e RW |
2603 | |
2604 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $maintainer_mode" >&5 | |
2605 | $as_echo "$maintainer_mode" >&6; } | |
aaa5f039 DD |
2606 | |
2607 | if test "$maintainer_mode" = "yes"; then | |
2608 | MAINT='' | |
2609 | NOTMAINT='#' | |
2610 | else | |
2611 | MAINT='#' | |
2612 | NOTMAINT='' | |
2613 | fi | |
2614 | ||
909b30a1 EG |
2615 | if test -z "$ETAGS"; then |
2616 | ETAGS=etags | |
2617 | fi | |
2618 | ||
2619 | ||
0e30ffc5 DD |
2620 | # Do we have a single-tree copy of texinfo? Even if we do, we can't |
2621 | # rely on it - libiberty is built before texinfo. | |
2622 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
aaa5f039 | 2623 | set dummy makeinfo; ac_word=$2 |
5213506e RW |
2624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2625 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 2626 | if ${ac_cv_prog_MAKEINFO+:} false; then : |
5213506e | 2627 | $as_echo_n "(cached) " >&6 |
aaa5f039 DD |
2628 | else |
2629 | if test -n "$MAKEINFO"; then | |
2630 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2631 | else | |
238235ef DJ |
2632 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2633 | for as_dir in $PATH | |
2634 | do | |
2635 | IFS=$as_save_IFS | |
2636 | test -z "$as_dir" && as_dir=. | |
5213506e | 2637 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 2638 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 2639 | ac_cv_prog_MAKEINFO="makeinfo" |
5213506e | 2640 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
2641 | break 2 |
2642 | fi | |
2643 | done | |
5213506e RW |
2644 | done |
2645 | IFS=$as_save_IFS | |
238235ef | 2646 | |
aaa5f039 DD |
2647 | fi |
2648 | fi | |
238235ef | 2649 | MAKEINFO=$ac_cv_prog_MAKEINFO |
aaa5f039 | 2650 | if test -n "$MAKEINFO"; then |
5213506e RW |
2651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 |
2652 | $as_echo "$MAKEINFO" >&6; } | |
aaa5f039 | 2653 | else |
5213506e RW |
2654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2655 | $as_echo "no" >&6; } | |
aaa5f039 DD |
2656 | fi |
2657 | ||
5213506e | 2658 | |
f749bd83 AM |
2659 | if test "x$MAKEINFO" = "x"; then |
2660 | MAKEINFO="@echo makeinfo missing; true" | |
0e30ffc5 | 2661 | BUILD_INFO= |
f749bd83 AM |
2662 | else |
2663 | BUILD_INFO=info | |
c0590bfd L |
2664 | case "$MAKEINFO" in |
2665 | */missing\ makeinfo*) | |
f749bd83 | 2666 | BUILD_INFO= |
5213506e | 2667 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: |
c0590bfd | 2668 | *** Makeinfo is missing. Info documentation will not be built." >&5 |
5213506e | 2669 | $as_echo "$as_me: WARNING: |
c0590bfd L |
2670 | *** Makeinfo is missing. Info documentation will not be built." >&2;} |
2671 | ;; | |
2672 | *) | |
2673 | case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in | |
2674 | x*\ [1-3].* ) | |
2675 | MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" | |
2676 | BUILD_INFO= | |
5213506e | 2677 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: |
238235ef | 2678 | *** Makeinfo is too old. Info documentation will not be built." >&5 |
5213506e | 2679 | $as_echo "$as_me: WARNING: |
238235ef | 2680 | *** Makeinfo is too old. Info documentation will not be built." >&2;} |
c0590bfd L |
2681 | ;; |
2682 | esac | |
f749bd83 AM |
2683 | ;; |
2684 | esac | |
2685 | fi | |
0e30ffc5 | 2686 | |
aaa5f039 DD |
2687 | |
2688 | ||
2689 | # Extract the first word of "perl", so it can be a program name with args. | |
2690 | set dummy perl; ac_word=$2 | |
5213506e RW |
2691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2692 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 2693 | if ${ac_cv_prog_PERL+:} false; then : |
5213506e | 2694 | $as_echo_n "(cached) " >&6 |
aaa5f039 DD |
2695 | else |
2696 | if test -n "$PERL"; then | |
2697 | ac_cv_prog_PERL="$PERL" # Let the user override the test. | |
2698 | else | |
238235ef DJ |
2699 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2700 | for as_dir in $PATH | |
2701 | do | |
2702 | IFS=$as_save_IFS | |
2703 | test -z "$as_dir" && as_dir=. | |
5213506e | 2704 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 2705 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 2706 | ac_cv_prog_PERL="perl" |
5213506e | 2707 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
2708 | break 2 |
2709 | fi | |
2710 | done | |
5213506e RW |
2711 | done |
2712 | IFS=$as_save_IFS | |
238235ef | 2713 | |
aaa5f039 DD |
2714 | fi |
2715 | fi | |
238235ef | 2716 | PERL=$ac_cv_prog_PERL |
aaa5f039 | 2717 | if test -n "$PERL"; then |
5213506e RW |
2718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 |
2719 | $as_echo "$PERL" >&6; } | |
aaa5f039 | 2720 | else |
5213506e RW |
2721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2722 | $as_echo "no" >&6; } | |
aaa5f039 DD |
2723 | fi |
2724 | ||
5213506e | 2725 | |
aaa5f039 DD |
2726 | if test x"$PERL" = x""; then |
2727 | HAVE_PERL='#' | |
2728 | else | |
2729 | HAVE_PERL='' | |
2730 | fi | |
2731 | ||
2732 | ||
0bc0cd11 | 2733 | # Make sure we can run config.sub. |
5213506e | 2734 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
22e05272 | 2735 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
5213506e RW |
2736 | |
2737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
2738 | $as_echo_n "checking build system type... " >&6; } | |
22e05272 | 2739 | if ${ac_cv_build+:} false; then : |
5213506e RW |
2740 | $as_echo_n "(cached) " >&6 |
2741 | else | |
2742 | ac_build_alias=$build_alias | |
2743 | test "x$ac_build_alias" = x && | |
2744 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
2745 | test "x$ac_build_alias" = x && | |
22e05272 | 2746 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
5213506e | 2747 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
22e05272 | 2748 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
5213506e RW |
2749 | |
2750 | fi | |
2751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
2752 | $as_echo "$ac_cv_build" >&6; } | |
2753 | case $ac_cv_build in | |
2754 | *-*-*) ;; | |
22e05272 | 2755 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
5213506e | 2756 | esac |
238235ef | 2757 | build=$ac_cv_build |
5213506e RW |
2758 | ac_save_IFS=$IFS; IFS='-' |
2759 | set x $ac_cv_build | |
2760 | shift | |
2761 | build_cpu=$1 | |
2762 | build_vendor=$2 | |
2763 | shift; shift | |
2764 | # Remember, the first character of IFS is used to create $*, | |
2765 | # except with old shells: | |
2766 | build_os=$* | |
2767 | IFS=$ac_save_IFS | |
2768 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
0bc0cd11 JL |
2769 | |
2770 | ||
5213506e RW |
2771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
2772 | $as_echo_n "checking host system type... " >&6; } | |
22e05272 | 2773 | if ${ac_cv_host+:} false; then : |
5213506e | 2774 | $as_echo_n "(cached) " >&6 |
238235ef | 2775 | else |
5213506e RW |
2776 | if test "x$host_alias" = x; then |
2777 | ac_cv_host=$ac_cv_build | |
2778 | else | |
2779 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
22e05272 | 2780 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
5213506e | 2781 | fi |
0bc0cd11 | 2782 | |
238235ef | 2783 | fi |
5213506e RW |
2784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
2785 | $as_echo "$ac_cv_host" >&6; } | |
2786 | case $ac_cv_host in | |
2787 | *-*-*) ;; | |
22e05272 | 2788 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
5213506e | 2789 | esac |
238235ef | 2790 | host=$ac_cv_host |
5213506e RW |
2791 | ac_save_IFS=$IFS; IFS='-' |
2792 | set x $ac_cv_host | |
2793 | shift | |
2794 | host_cpu=$1 | |
2795 | host_vendor=$2 | |
2796 | shift; shift | |
2797 | # Remember, the first character of IFS is used to create $*, | |
2798 | # except with old shells: | |
2799 | host_os=$* | |
2800 | IFS=$ac_save_IFS | |
2801 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
0bc0cd11 | 2802 | |
0bc0cd11 | 2803 | |
0bc0cd11 | 2804 | |
0bc0cd11 | 2805 | |
238235ef DJ |
2806 | if test -n "$ac_tool_prefix"; then |
2807 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
0bc0cd11 | 2808 | set dummy ${ac_tool_prefix}ar; ac_word=$2 |
5213506e RW |
2809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2810 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 2811 | if ${ac_cv_prog_AR+:} false; then : |
5213506e | 2812 | $as_echo_n "(cached) " >&6 |
0bc0cd11 JL |
2813 | else |
2814 | if test -n "$AR"; then | |
2815 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
2816 | else | |
238235ef DJ |
2817 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2818 | for as_dir in $PATH | |
2819 | do | |
2820 | IFS=$as_save_IFS | |
2821 | test -z "$as_dir" && as_dir=. | |
5213506e | 2822 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 2823 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 2824 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
5213506e | 2825 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
2826 | break 2 |
2827 | fi | |
2828 | done | |
5213506e RW |
2829 | done |
2830 | IFS=$as_save_IFS | |
238235ef | 2831 | |
0bc0cd11 JL |
2832 | fi |
2833 | fi | |
238235ef | 2834 | AR=$ac_cv_prog_AR |
0bc0cd11 | 2835 | if test -n "$AR"; then |
5213506e RW |
2836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
2837 | $as_echo "$AR" >&6; } | |
0bc0cd11 | 2838 | else |
5213506e RW |
2839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2840 | $as_echo "no" >&6; } | |
238235ef DJ |
2841 | fi |
2842 | ||
5213506e | 2843 | |
0bc0cd11 | 2844 | fi |
238235ef DJ |
2845 | if test -z "$ac_cv_prog_AR"; then |
2846 | ac_ct_AR=$AR | |
2847 | # Extract the first word of "ar", so it can be a program name with args. | |
2848 | set dummy ar; ac_word=$2 | |
5213506e RW |
2849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2850 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 2851 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
5213506e | 2852 | $as_echo_n "(cached) " >&6 |
238235ef DJ |
2853 | else |
2854 | if test -n "$ac_ct_AR"; then | |
2855 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
2856 | else | |
2857 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2858 | for as_dir in $PATH | |
2859 | do | |
2860 | IFS=$as_save_IFS | |
2861 | test -z "$as_dir" && as_dir=. | |
5213506e | 2862 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 2863 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 2864 | ac_cv_prog_ac_ct_AR="ar" |
5213506e | 2865 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
2866 | break 2 |
2867 | fi | |
2868 | done | |
5213506e RW |
2869 | done |
2870 | IFS=$as_save_IFS | |
0bc0cd11 | 2871 | |
238235ef DJ |
2872 | fi |
2873 | fi | |
2874 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
2875 | if test -n "$ac_ct_AR"; then | |
5213506e RW |
2876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
2877 | $as_echo "$ac_ct_AR" >&6; } | |
238235ef | 2878 | else |
5213506e RW |
2879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2880 | $as_echo "no" >&6; } | |
238235ef | 2881 | fi |
0bc0cd11 | 2882 | |
5213506e RW |
2883 | if test "x$ac_ct_AR" = x; then |
2884 | AR="" | |
2885 | else | |
2886 | case $cross_compiling:$ac_tool_warned in | |
2887 | yes:) | |
2888 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2889 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2890 | ac_tool_warned=yes ;; | |
2891 | esac | |
2892 | AR=$ac_ct_AR | |
2893 | fi | |
238235ef DJ |
2894 | else |
2895 | AR="$ac_cv_prog_AR" | |
2896 | fi | |
0bc0cd11 | 2897 | |
238235ef DJ |
2898 | if test -n "$ac_tool_prefix"; then |
2899 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
0bc0cd11 | 2900 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
5213506e RW |
2901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2902 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 2903 | if ${ac_cv_prog_RANLIB+:} false; then : |
5213506e | 2904 | $as_echo_n "(cached) " >&6 |
0bc0cd11 JL |
2905 | else |
2906 | if test -n "$RANLIB"; then | |
2907 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2908 | else | |
238235ef DJ |
2909 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2910 | for as_dir in $PATH | |
2911 | do | |
2912 | IFS=$as_save_IFS | |
2913 | test -z "$as_dir" && as_dir=. | |
5213506e | 2914 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 2915 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 2916 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
5213506e | 2917 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
2918 | break 2 |
2919 | fi | |
2920 | done | |
5213506e RW |
2921 | done |
2922 | IFS=$as_save_IFS | |
238235ef | 2923 | |
0bc0cd11 JL |
2924 | fi |
2925 | fi | |
238235ef | 2926 | RANLIB=$ac_cv_prog_RANLIB |
0bc0cd11 | 2927 | if test -n "$RANLIB"; then |
5213506e RW |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
2929 | $as_echo "$RANLIB" >&6; } | |
0bc0cd11 | 2930 | else |
5213506e RW |
2931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2932 | $as_echo "no" >&6; } | |
0bc0cd11 JL |
2933 | fi |
2934 | ||
5213506e | 2935 | |
238235ef | 2936 | fi |
0bc0cd11 | 2937 | if test -z "$ac_cv_prog_RANLIB"; then |
238235ef | 2938 | ac_ct_RANLIB=$RANLIB |
0bc0cd11 JL |
2939 | # Extract the first word of "ranlib", so it can be a program name with args. |
2940 | set dummy ranlib; ac_word=$2 | |
5213506e RW |
2941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2942 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 2943 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
5213506e | 2944 | $as_echo_n "(cached) " >&6 |
0bc0cd11 | 2945 | else |
238235ef DJ |
2946 | if test -n "$ac_ct_RANLIB"; then |
2947 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
0bc0cd11 | 2948 | else |
238235ef DJ |
2949 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2950 | for as_dir in $PATH | |
2951 | do | |
2952 | IFS=$as_save_IFS | |
2953 | test -z "$as_dir" && as_dir=. | |
5213506e | 2954 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 2955 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 2956 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
5213506e | 2957 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
2958 | break 2 |
2959 | fi | |
2960 | done | |
5213506e RW |
2961 | done |
2962 | IFS=$as_save_IFS | |
238235ef | 2963 | |
0bc0cd11 JL |
2964 | fi |
2965 | fi | |
238235ef DJ |
2966 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
2967 | if test -n "$ac_ct_RANLIB"; then | |
5213506e RW |
2968 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
2969 | $as_echo "$ac_ct_RANLIB" >&6; } | |
0bc0cd11 | 2970 | else |
5213506e RW |
2971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2972 | $as_echo "no" >&6; } | |
0bc0cd11 JL |
2973 | fi |
2974 | ||
5213506e RW |
2975 | if test "x$ac_ct_RANLIB" = x; then |
2976 | RANLIB=":" | |
2977 | else | |
2978 | case $cross_compiling:$ac_tool_warned in | |
2979 | yes:) | |
2980 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2981 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2982 | ac_tool_warned=yes ;; | |
2983 | esac | |
2984 | RANLIB=$ac_ct_RANLIB | |
2985 | fi | |
0bc0cd11 | 2986 | else |
238235ef | 2987 | RANLIB="$ac_cv_prog_RANLIB" |
0bc0cd11 JL |
2988 | fi |
2989 | ||
2990 | ||
abea993f GK |
2991 | # Add --enable-multilib to configure. |
2992 | # Default to --enable-multilib | |
5213506e RW |
2993 | # Check whether --enable-multilib was given. |
2994 | if test "${enable_multilib+set}" = set; then : | |
2995 | enableval=$enable_multilib; case "$enableval" in | |
abea993f GK |
2996 | yes) multilib=yes ;; |
2997 | no) multilib=no ;; | |
22e05272 | 2998 | *) as_fn_error $? "bad value $enableval for multilib option" "$LINENO" 5 ;; |
abea993f GK |
2999 | esac |
3000 | else | |
3001 | multilib=yes | |
5213506e RW |
3002 | fi |
3003 | ||
abea993f GK |
3004 | |
3005 | # Even if the default multilib is not a cross compilation, | |
3006 | # it may be that some of the other multilibs are. | |
3007 | if test $cross_compiling = no && test $multilib = yes \ | |
3008 | && test "x${with_multisubdir}" != x ; then | |
3009 | cross_compiling=maybe | |
3010 | fi | |
3011 | ||
8c9fddf4 MB |
3012 | # We may wish to install the target headers somewhere. |
3013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 | |
3014 | $as_echo_n "checking whether to install libiberty headers and static library... " >&6; } | |
3015 | ||
3016 | # Check whether --enable-install-libiberty was given. | |
3017 | if test "${enable_install_libiberty+set}" = set; then : | |
3018 | enableval=$enable_install_libiberty; enable_install_libiberty=$enableval | |
3019 | else | |
3020 | enable_install_libiberty=no | |
3021 | fi | |
3022 | ||
3023 | # Option parsed, now set things appropriately. | |
3024 | case x"$enable_install_libiberty" in | |
3025 | xyes|x) | |
3026 | target_header_dir=libiberty | |
3027 | ;; | |
3028 | xno) | |
3029 | target_header_dir= | |
3030 | ;; | |
3031 | *) | |
3032 | # This could be sanity-checked in various ways... | |
3033 | target_header_dir="${enable_install_libiberty}" | |
3034 | ;; | |
3035 | esac | |
3036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 | |
3037 | $as_echo "$enable_install_libiberty" >&6; } | |
3038 | { $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 | |
3039 | $as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} | |
3040 | ||
1eaf7d9c | 3041 | |
238235ef DJ |
3042 | ac_ext=c |
3043 | ac_cpp='$CPP $CPPFLAGS' | |
3044 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3045 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3046 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3047 | if test -n "$ac_tool_prefix"; then | |
3048 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3049 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
5213506e RW |
3050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3051 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 3052 | if ${ac_cv_prog_CC+:} false; then : |
5213506e | 3053 | $as_echo_n "(cached) " >&6 |
238235ef DJ |
3054 | else |
3055 | if test -n "$CC"; then | |
3056 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3057 | else | |
3058 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3059 | for as_dir in $PATH | |
3060 | do | |
3061 | IFS=$as_save_IFS | |
3062 | test -z "$as_dir" && as_dir=. | |
5213506e | 3063 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 3064 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 3065 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
5213506e | 3066 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
3067 | break 2 |
3068 | fi | |
3069 | done | |
5213506e RW |
3070 | done |
3071 | IFS=$as_save_IFS | |
238235ef DJ |
3072 | |
3073 | fi | |
3074 | fi | |
3075 | CC=$ac_cv_prog_CC | |
3076 | if test -n "$CC"; then | |
5213506e RW |
3077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3078 | $as_echo "$CC" >&6; } | |
238235ef | 3079 | else |
5213506e RW |
3080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3081 | $as_echo "no" >&6; } | |
238235ef DJ |
3082 | fi |
3083 | ||
5213506e | 3084 | |
238235ef DJ |
3085 | fi |
3086 | if test -z "$ac_cv_prog_CC"; then | |
3087 | ac_ct_CC=$CC | |
3088 | # Extract the first word of "gcc", so it can be a program name with args. | |
0bc0cd11 | 3089 | set dummy gcc; ac_word=$2 |
5213506e RW |
3090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3091 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 3092 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
5213506e | 3093 | $as_echo_n "(cached) " >&6 |
238235ef DJ |
3094 | else |
3095 | if test -n "$ac_ct_CC"; then | |
3096 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3097 | else | |
3098 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3099 | for as_dir in $PATH | |
3100 | do | |
3101 | IFS=$as_save_IFS | |
3102 | test -z "$as_dir" && as_dir=. | |
5213506e | 3103 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 3104 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 3105 | ac_cv_prog_ac_ct_CC="gcc" |
5213506e | 3106 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
3107 | break 2 |
3108 | fi | |
3109 | done | |
5213506e RW |
3110 | done |
3111 | IFS=$as_save_IFS | |
238235ef DJ |
3112 | |
3113 | fi | |
3114 | fi | |
3115 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3116 | if test -n "$ac_ct_CC"; then | |
5213506e RW |
3117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3118 | $as_echo "$ac_ct_CC" >&6; } | |
238235ef | 3119 | else |
5213506e RW |
3120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3121 | $as_echo "no" >&6; } | |
238235ef DJ |
3122 | fi |
3123 | ||
5213506e RW |
3124 | if test "x$ac_ct_CC" = x; then |
3125 | CC="" | |
3126 | else | |
3127 | case $cross_compiling:$ac_tool_warned in | |
3128 | yes:) | |
3129 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3130 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3131 | ac_tool_warned=yes ;; | |
3132 | esac | |
3133 | CC=$ac_ct_CC | |
3134 | fi | |
238235ef DJ |
3135 | else |
3136 | CC="$ac_cv_prog_CC" | |
3137 | fi | |
3138 | ||
3139 | if test -z "$CC"; then | |
5213506e RW |
3140 | if test -n "$ac_tool_prefix"; then |
3141 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
238235ef | 3142 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
5213506e RW |
3143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3144 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 3145 | if ${ac_cv_prog_CC+:} false; then : |
5213506e | 3146 | $as_echo_n "(cached) " >&6 |
0bc0cd11 JL |
3147 | else |
3148 | if test -n "$CC"; then | |
3149 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3150 | else | |
238235ef DJ |
3151 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3152 | for as_dir in $PATH | |
3153 | do | |
3154 | IFS=$as_save_IFS | |
3155 | test -z "$as_dir" && as_dir=. | |
5213506e | 3156 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 3157 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 3158 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
5213506e | 3159 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
3160 | break 2 |
3161 | fi | |
3162 | done | |
5213506e RW |
3163 | done |
3164 | IFS=$as_save_IFS | |
238235ef | 3165 | |
0bc0cd11 JL |
3166 | fi |
3167 | fi | |
238235ef | 3168 | CC=$ac_cv_prog_CC |
0bc0cd11 | 3169 | if test -n "$CC"; then |
5213506e RW |
3170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3171 | $as_echo "$CC" >&6; } | |
0bc0cd11 | 3172 | else |
5213506e RW |
3173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3174 | $as_echo "no" >&6; } | |
0bc0cd11 JL |
3175 | fi |
3176 | ||
238235ef | 3177 | |
5213506e | 3178 | fi |
238235ef | 3179 | fi |
0bc0cd11 JL |
3180 | if test -z "$CC"; then |
3181 | # Extract the first word of "cc", so it can be a program name with args. | |
3182 | set dummy cc; ac_word=$2 | |
5213506e RW |
3183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3184 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 3185 | if ${ac_cv_prog_CC+:} false; then : |
5213506e | 3186 | $as_echo_n "(cached) " >&6 |
0bc0cd11 JL |
3187 | else |
3188 | if test -n "$CC"; then | |
3189 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3190 | else | |
0bc0cd11 | 3191 | ac_prog_rejected=no |
238235ef DJ |
3192 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3193 | for as_dir in $PATH | |
3194 | do | |
3195 | IFS=$as_save_IFS | |
3196 | test -z "$as_dir" && as_dir=. | |
5213506e | 3197 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 3198 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef DJ |
3199 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
3200 | ac_prog_rejected=yes | |
3201 | continue | |
3202 | fi | |
3203 | ac_cv_prog_CC="cc" | |
5213506e | 3204 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
3205 | break 2 |
3206 | fi | |
3207 | done | |
5213506e RW |
3208 | done |
3209 | IFS=$as_save_IFS | |
238235ef | 3210 | |
0bc0cd11 JL |
3211 | if test $ac_prog_rejected = yes; then |
3212 | # We found a bogon in the path, so make sure we never use it. | |
3213 | set dummy $ac_cv_prog_CC | |
3214 | shift | |
238235ef | 3215 | if test $# != 0; then |
0bc0cd11 JL |
3216 | # We chose a different compiler from the bogus one. |
3217 | # However, it has the same basename, so the bogon will be chosen | |
3218 | # first if we set CC to just the basename; use the full file name. | |
3219 | shift | |
238235ef | 3220 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
0bc0cd11 JL |
3221 | fi |
3222 | fi | |
3223 | fi | |
3224 | fi | |
238235ef | 3225 | CC=$ac_cv_prog_CC |
0bc0cd11 | 3226 | if test -n "$CC"; then |
5213506e RW |
3227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3228 | $as_echo "$CC" >&6; } | |
0bc0cd11 | 3229 | else |
5213506e RW |
3230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3231 | $as_echo "no" >&6; } | |
0bc0cd11 JL |
3232 | fi |
3233 | ||
5213506e | 3234 | |
0bc0cd11 | 3235 | fi |
238235ef DJ |
3236 | if test -z "$CC"; then |
3237 | if test -n "$ac_tool_prefix"; then | |
5213506e | 3238 | for ac_prog in cl.exe |
238235ef DJ |
3239 | do |
3240 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3241 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
5213506e RW |
3242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3243 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 3244 | if ${ac_cv_prog_CC+:} false; then : |
5213506e | 3245 | $as_echo_n "(cached) " >&6 |
0bc0cd11 | 3246 | else |
238235ef DJ |
3247 | if test -n "$CC"; then |
3248 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
0bc0cd11 | 3249 | else |
238235ef DJ |
3250 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3251 | for as_dir in $PATH | |
3252 | do | |
3253 | IFS=$as_save_IFS | |
3254 | test -z "$as_dir" && as_dir=. | |
5213506e | 3255 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 3256 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 3257 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
5213506e | 3258 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef DJ |
3259 | break 2 |
3260 | fi | |
3261 | done | |
5213506e RW |
3262 | done |
3263 | IFS=$as_save_IFS | |
238235ef | 3264 | |
0bc0cd11 JL |
3265 | fi |
3266 | fi | |
238235ef DJ |
3267 | CC=$ac_cv_prog_CC |
3268 | if test -n "$CC"; then | |
5213506e RW |
3269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3270 | $as_echo "$CC" >&6; } | |
0bc0cd11 | 3271 | else |
5213506e RW |
3272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3273 | $as_echo "no" >&6; } | |
0bc0cd11 | 3274 | fi |
0bc0cd11 | 3275 | |
5213506e | 3276 | |
238235ef DJ |
3277 | test -n "$CC" && break |
3278 | done | |
0bc0cd11 | 3279 | fi |
238235ef DJ |
3280 | if test -z "$CC"; then |
3281 | ac_ct_CC=$CC | |
5213506e | 3282 | for ac_prog in cl.exe |
238235ef DJ |
3283 | do |
3284 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3285 | set dummy $ac_prog; ac_word=$2 | |
5213506e RW |
3286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3287 | $as_echo_n "checking for $ac_word... " >&6; } | |
22e05272 | 3288 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
5213506e | 3289 | $as_echo_n "(cached) " >&6 |
238235ef DJ |
3290 | else |
3291 | if test -n "$ac_ct_CC"; then | |
3292 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3293 | else | |
3294 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3295 | for as_dir in $PATH | |
3296 | do | |
3297 | IFS=$as_save_IFS | |
3298 | test -z "$as_dir" && as_dir=. | |
5213506e | 3299 | for ac_exec_ext in '' $ac_executable_extensions; do |
22e05272 | 3300 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
238235ef | 3301 | ac_cv_prog_ac_ct_CC="$ac_prog" |
5213506e | 3302 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
238235ef | 3303 | break 2 |
0bc0cd11 | 3304 | fi |
238235ef | 3305 | done |
5213506e RW |
3306 | done |
3307 | IFS=$as_save_IFS | |
238235ef DJ |
3308 | |
3309 | fi | |
3310 | fi | |
3311 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3312 | if test -n "$ac_ct_CC"; then | |
5213506e RW |
3313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3314 | $as_echo "$ac_ct_CC" >&6; } | |
0bc0cd11 | 3315 | else |
5213506e RW |
3316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3317 | $as_echo "no" >&6; } | |
0bc0cd11 JL |
3318 | fi |
3319 | ||
5213506e | 3320 | |
238235ef DJ |
3321 | test -n "$ac_ct_CC" && break |
3322 | done | |
0bc0cd11 | 3323 | |
5213506e RW |
3324 | if test "x$ac_ct_CC" = x; then |
3325 | CC="" | |
3326 | else | |
3327 | case $cross_compiling:$ac_tool_warned in | |
3328 | yes:) | |
3329 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3330 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3331 | ac_tool_warned=yes ;; | |
3332 | esac | |
3333 | CC=$ac_ct_CC | |
3334 | fi | |
238235ef DJ |
3335 | fi |
3336 | ||
3337 | fi | |
3338 | ||
3339 | ||
5213506e RW |
3340 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3341 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
3342 | as_fn_error $? "no acceptable C compiler found in \$PATH |
3343 | See \`config.log' for more details" "$LINENO" 5; } | |
238235ef DJ |
3344 | |
3345 | # Provide some information about the compiler. | |
5213506e RW |
3346 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3347 | set X $ac_compile | |
3348 | ac_compiler=$2 | |
3349 | for ac_option in --version -v -V -qversion; do | |
3350 | { { ac_try="$ac_compiler $ac_option >&5" | |
3351 | case "(($ac_try" in | |
3352 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3353 | *) ac_try_echo=$ac_try;; | |
3354 | esac | |
3355 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3356 | $as_echo "$ac_try_echo"; } >&5 | |
3357 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
238235ef | 3358 | ac_status=$? |
5213506e RW |
3359 | if test -s conftest.err; then |
3360 | sed '10a\ | |
3361 | ... rest of stderr output deleted ... | |
3362 | 10q' conftest.err >conftest.er1 | |
3363 | cat conftest.er1 >&5 | |
5213506e | 3364 | fi |
22e05272 | 3365 | rm -f conftest.er1 conftest.err |
5213506e RW |
3366 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3367 | test $ac_status = 0; } | |
3368 | done | |
238235ef | 3369 | |
5213506e | 3370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
238235ef | 3371 | /* end confdefs.h. */ |
02ce382c | 3372 | #include <stdio.h> |
238235ef DJ |
3373 | int |
3374 | main () | |
3375 | { | |
02ce382c | 3376 | printf ("hello world\n"); |
238235ef DJ |
3377 | ; |
3378 | return 0; | |
3379 | } | |
3380 | _ACEOF | |
3381 | # FIXME: Cleanup? | |
5213506e | 3382 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 |
238235ef DJ |
3383 | (eval $ac_link) 2>&5 |
3384 | ac_status=$? | |
5213506e RW |
3385 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3386 | test $ac_status = 0; }; then : | |
238235ef DJ |
3387 | gcc_no_link=no |
3388 | else | |
3389 | gcc_no_link=yes | |
3390 | fi | |
238235ef DJ |
3391 | if test x$gcc_no_link = xyes; then |
3392 | # Setting cross_compile will disable run tests; it will | |
3393 | # also disable AC_CHECK_FILE but that's generally | |
3394 | # correct if we can't link. | |
3395 | cross_compiling=yes | |
3396 | EXEEXT= | |
3397 | else | |
5213506e | 3398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
238235ef DJ |
3399 | /* end confdefs.h. */ |
3400 | ||
3401 | int | |
3402 | main () | |
3403 | { | |
3404 | ||
3405 | ; | |
3406 | return 0; | |
3407 | } | |
3408 | _ACEOF | |
3409 | ac_clean_files_save=$ac_clean_files | |
22e05272 | 3410 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
238235ef DJ |
3411 | # Try to create an executable without -o first, disregard a.out. |
3412 | # It will help us diagnose broken compilers, and finding out an intuition | |
3413 | # of exeext. | |
22e05272 JM |
3414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3415 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
5213506e RW |
3416 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3417 | ||
3418 | # The possible output files: | |
3419 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3420 | ||
3421 | ac_rmfiles= | |
3422 | for ac_file in $ac_files | |
3423 | do | |
3424 | case $ac_file in | |
3425 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3426 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3427 | esac | |
3428 | done | |
3429 | rm -f $ac_rmfiles | |
3430 | ||
3431 | if { { ac_try="$ac_link_default" | |
3432 | case "(($ac_try" in | |
3433 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3434 | *) ac_try_echo=$ac_try;; | |
3435 | esac | |
3436 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3437 | $as_echo "$ac_try_echo"; } >&5 | |
3438 | (eval "$ac_link_default") 2>&5 | |
3439 | ac_status=$? | |
3440 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3441 | test $ac_status = 0; }; then : | |
3442 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3443 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3444 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3445 | # so that the user can short-circuit this test for compilers unknown to | |
3446 | # Autoconf. | |
3447 | for ac_file in $ac_files '' | |
238235ef DJ |
3448 | do |
3449 | test -f "$ac_file" || continue | |
3450 | case $ac_file in | |
5213506e | 3451 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
3beb1315 | 3452 | ;; |
238235ef | 3453 | [ab].out ) |
3beb1315 HPN |
3454 | # We found the default executable, but exeext='' is most |
3455 | # certainly right. | |
3456 | break;; | |
238235ef | 3457 | *.* ) |
5213506e RW |
3458 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3459 | then :; else | |
3460 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3461 | fi | |
3462 | # We set ac_cv_exeext here because the later test for it is not | |
3463 | # safe: cross compilers may not add the suffix if given an `-o' | |
3464 | # argument, so we may need to know it at that point already. | |
3465 | # Even if this section looks crufty: it has the advantage of | |
3466 | # actually working. | |
3beb1315 | 3467 | break;; |
238235ef | 3468 | * ) |
3beb1315 | 3469 | break;; |
238235ef DJ |
3470 | esac |
3471 | done | |
5213506e RW |
3472 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3473 | ||
7fda878c | 3474 | else |
5213506e RW |
3475 | ac_file='' |
3476 | fi | |
5213506e | 3477 | if test -z "$ac_file"; then : |
22e05272 JM |
3478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3479 | $as_echo "no" >&6; } | |
3480 | $as_echo "$as_me: failed program was:" >&5 | |
238235ef DJ |
3481 | sed 's/^/| /' conftest.$ac_ext >&5 |
3482 | ||
5213506e RW |
3483 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3484 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
3485 | as_fn_error 77 "C compiler cannot create executables |
3486 | See \`config.log' for more details" "$LINENO" 5; } | |
3487 | else | |
3488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
3489 | $as_echo "yes" >&6; } | |
238235ef | 3490 | fi |
22e05272 JM |
3491 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3492 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3494 | $as_echo "$ac_file" >&6; } | |
238235ef | 3495 | ac_exeext=$ac_cv_exeext |
238235ef | 3496 | |
22e05272 | 3497 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
238235ef | 3498 | ac_clean_files=$ac_clean_files_save |
5213506e RW |
3499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
3500 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3501 | if { { ac_try="$ac_link" | |
3502 | case "(($ac_try" in | |
3503 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3504 | *) ac_try_echo=$ac_try;; | |
3505 | esac | |
3506 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3507 | $as_echo "$ac_try_echo"; } >&5 | |
3508 | (eval "$ac_link") 2>&5 | |
238235ef | 3509 | ac_status=$? |
5213506e RW |
3510 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3511 | test $ac_status = 0; }; then : | |
238235ef DJ |
3512 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3513 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3514 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3515 | # `rm'. | |
3516 | for ac_file in conftest.exe conftest conftest.*; do | |
3517 | test -f "$ac_file" || continue | |
3518 | case $ac_file in | |
5213506e | 3519 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
238235ef | 3520 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
3beb1315 | 3521 | break;; |
238235ef DJ |
3522 | * ) break;; |
3523 | esac | |
3524 | done | |
7fda878c | 3525 | else |
5213506e RW |
3526 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3527 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
3528 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
3529 | See \`config.log' for more details" "$LINENO" 5; } | |
7fda878c | 3530 | fi |
22e05272 | 3531 | rm -f conftest conftest$ac_cv_exeext |
5213506e RW |
3532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3533 | $as_echo "$ac_cv_exeext" >&6; } | |
238235ef DJ |
3534 | |
3535 | rm -f conftest.$ac_ext | |
3536 | EXEEXT=$ac_cv_exeext | |
3537 | ac_exeext=$EXEEXT | |
22e05272 JM |
3538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3539 | /* end confdefs.h. */ | |
3540 | #include <stdio.h> | |
3541 | int | |
3542 | main () | |
3543 | { | |
3544 | FILE *f = fopen ("conftest.out", "w"); | |
3545 | return ferror (f) || fclose (f) != 0; | |
3546 | ||
3547 | ; | |
3548 | return 0; | |
3549 | } | |
3550 | _ACEOF | |
3551 | ac_clean_files="$ac_clean_files conftest.out" | |
3552 | # Check that the compiler produces executables we can run. If not, either | |
3553 | # the compiler is broken, or we cross compile. | |
3554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
3555 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3556 | if test "$cross_compiling" != yes; then | |
3557 | { { ac_try="$ac_link" | |
3558 | case "(($ac_try" in | |
3559 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3560 | *) ac_try_echo=$ac_try;; | |
3561 | esac | |
3562 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3563 | $as_echo "$ac_try_echo"; } >&5 | |
3564 | (eval "$ac_link") 2>&5 | |
3565 | ac_status=$? | |
3566 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3567 | test $ac_status = 0; } | |
3568 | if { ac_try='./conftest$ac_cv_exeext' | |
3569 | { { case "(($ac_try" in | |
3570 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3571 | *) ac_try_echo=$ac_try;; | |
3572 | esac | |
3573 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3574 | $as_echo "$ac_try_echo"; } >&5 | |
3575 | (eval "$ac_try") 2>&5 | |
3576 | ac_status=$? | |
3577 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3578 | test $ac_status = 0; }; }; then | |
3579 | cross_compiling=no | |
3580 | else | |
3581 | if test "$cross_compiling" = maybe; then | |
3582 | cross_compiling=yes | |
3583 | else | |
3584 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3585 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3586 | as_fn_error $? "cannot run C compiled programs. | |
3587 | If you meant to cross compile, use \`--host'. | |
3588 | See \`config.log' for more details" "$LINENO" 5; } | |
3589 | fi | |
3590 | fi | |
3591 | fi | |
3592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3593 | $as_echo "$cross_compiling" >&6; } | |
3594 | ||
3595 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out | |
3596 | ac_clean_files=$ac_clean_files_save | |
7fda878c | 3597 | fi |
5213506e RW |
3598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3599 | $as_echo_n "checking for suffix of object files... " >&6; } | |
22e05272 | 3600 | if ${ac_cv_objext+:} false; then : |
5213506e | 3601 | $as_echo_n "(cached) " >&6 |
7fda878c | 3602 | else |
5213506e | 3603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
238235ef | 3604 | /* end confdefs.h. */ |
7fda878c | 3605 | |
238235ef DJ |
3606 | int |
3607 | main () | |
3608 | { | |
7fda878c | 3609 | |
238235ef DJ |
3610 | ; |
3611 | return 0; | |
3612 | } | |
3613 | _ACEOF | |
3614 | rm -f conftest.o conftest.obj | |
5213506e RW |
3615 | if { { ac_try="$ac_compile" |
3616 | case "(($ac_try" in | |
3617 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3618 | *) ac_try_echo=$ac_try;; | |
3619 | esac | |
3620 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3621 | $as_echo "$ac_try_echo"; } >&5 | |
3622 | (eval "$ac_compile") 2>&5 | |
3623 | ac_status=$? | |
3624 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3625 | test $ac_status = 0; }; then : | |
3626 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3627 | test -f "$ac_file" || continue; | |
238235ef | 3628 | case $ac_file in |
5213506e | 3629 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
238235ef DJ |
3630 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3631 | break;; | |
3632 | esac | |
3633 | done | |
7fda878c | 3634 | else |
5213506e | 3635 | $as_echo "$as_me: failed program was:" >&5 |
238235ef DJ |
3636 | sed 's/^/| /' conftest.$ac_ext >&5 |
3637 | ||
5213506e RW |
3638 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3639 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
3640 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
3641 | See \`config.log' for more details" "$LINENO" 5; } | |
238235ef | 3642 | fi |
238235ef | 3643 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
7fda878c | 3644 | fi |
5213506e RW |
3645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3646 | $as_echo "$ac_cv_objext" >&6; } | |
238235ef DJ |
3647 | OBJEXT=$ac_cv_objext |
3648 | ac_objext=$OBJEXT | |
5213506e RW |
3649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3650 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
22e05272 | 3651 | if ${ac_cv_c_compiler_gnu+:} false; then : |
5213506e | 3652 | $as_echo_n "(cached) " >&6 |
238235ef | 3653 | else |
5213506e | 3654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
238235ef DJ |
3655 | /* end confdefs.h. */ |
3656 | ||
3657 | int | |
3658 | main () | |
3659 | { | |
3660 | #ifndef __GNUC__ | |
3661 | choke me | |
3662 | #endif | |
7fda878c | 3663 | |
238235ef DJ |
3664 | ; |
3665 | return 0; | |
3666 | } | |
3667 | _ACEOF | |
5213506e | 3668 | if ac_fn_c_try_compile "$LINENO"; then : |
238235ef DJ |
3669 | ac_compiler_gnu=yes |
3670 | else | |
5213506e | 3671 | ac_compiler_gnu=no |
238235ef | 3672 | fi |
5213506e | 3673 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
238235ef DJ |
3674 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3675 | ||
3676 | fi | |
5213506e RW |
3677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3678 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3679 | if test $ac_compiler_gnu = yes; then | |
3680 | GCC=yes | |
3681 | else | |
3682 | GCC= | |
3683 | fi | |
238235ef DJ |
3684 | ac_test_CFLAGS=${CFLAGS+set} |
3685 | ac_save_CFLAGS=$CFLAGS | |
5213506e RW |
3686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3687 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
22e05272 | 3688 | if ${ac_cv_prog_cc_g+:} false; then : |
5213506e RW |
3689 | $as_echo_n "(cached) " >&6 |
3690 | else | |
3691 | ac_save_c_werror_flag=$ac_c_werror_flag | |
3692 | ac_c_werror_flag=yes | |
3693 | ac_cv_prog_cc_g=no | |
3694 | CFLAGS="-g" | |
3695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
238235ef | 3696 | /* end confdefs.h. */ |
7fda878c | 3697 | |
238235ef DJ |
3698 | int |
3699 | main () | |
3700 | { | |
7fda878c | 3701 | |
238235ef DJ |
3702 | ; |
3703 | return 0; | |
3704 | } | |
3705 | _ACEOF | |
5213506e | 3706 | if ac_fn_c_try_compile "$LINENO"; then : |
238235ef DJ |
3707 | ac_cv_prog_cc_g=yes |
3708 | else | |
5213506e RW |
3709 | CFLAGS="" |
3710 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3711 | /* end confdefs.h. */ | |
3712 | ||
3713 | int | |
3714 | main () | |
3715 | { | |
3716 | ||
3717 | ; | |
3718 | return 0; | |
3719 | } | |
3720 | _ACEOF | |
3721 | if ac_fn_c_try_compile "$LINENO"; then : | |
3722 | ||
3723 | else | |
3724 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3725 | CFLAGS="-g" | |
3726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3727 | /* end confdefs.h. */ | |
3728 | ||
3729 | int | |
3730 | main () | |
3731 | { | |
0bc0cd11 | 3732 | |
5213506e RW |
3733 | ; |
3734 | return 0; | |
3735 | } | |
3736 | _ACEOF | |
3737 | if ac_fn_c_try_compile "$LINENO"; then : | |
3738 | ac_cv_prog_cc_g=yes | |
3739 | fi | |
3740 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
238235ef | 3741 | fi |
5213506e | 3742 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
238235ef | 3743 | fi |
5213506e RW |
3744 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3745 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3746 | fi | |
3747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3748 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
238235ef DJ |
3749 | if test "$ac_test_CFLAGS" = set; then |
3750 | CFLAGS=$ac_save_CFLAGS | |
3751 | elif test $ac_cv_prog_cc_g = yes; then | |
0bc0cd11 | 3752 | if test "$GCC" = yes; then |
238235ef | 3753 | CFLAGS="-g -O2" |
0bc0cd11 | 3754 | else |
238235ef | 3755 | CFLAGS="-g" |
0bc0cd11 JL |
3756 | fi |
3757 | else | |
238235ef DJ |
3758 | if test "$GCC" = yes; then |
3759 | CFLAGS="-O2" | |
3760 | else | |
3761 | CFLAGS= | |
3762 | fi | |
0bc0cd11 | 3763 | fi |
5213506e RW |
3764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3765 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
22e05272 | 3766 | if ${ac_cv_prog_cc_c89+:} false; then : |
5213506e | 3767 | $as_echo_n "(cached) " >&6 |
238235ef | 3768 | else |
5213506e | 3769 | ac_cv_prog_cc_c89=no |
238235ef | 3770 | ac_save_CC=$CC |
5213506e | 3771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
238235ef DJ |
3772 | /* end confdefs.h. */ |
3773 | #include <stdarg.h> | |
3774 | #include <stdio.h> | |
22e05272 | 3775 | struct stat; |
238235ef DJ |
3776 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
3777 | struct buf { int x; }; | |
3778 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3779 | static char *e (p, i) | |
3780 | char **p; | |
3781 | int i; | |
3782 | { | |
3783 | return p[i]; | |
d1209685 | 3784 | } |
238235ef DJ |
3785 | static char *f (char * (*g) (char **, int), char **p, ...) |
3786 | { | |
3787 | char *s; | |
3788 | va_list v; | |
3789 | va_start (v,p); | |
3790 | s = g (p, va_arg (v,int)); | |
3791 | va_end (v); | |
3792 | return s; | |
d1209685 | 3793 | } |
3beb1315 HPN |
3794 | |
3795 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3796 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3797 | These don't provoke an error unfortunately, instead are silently treated | |
5213506e | 3798 | as 'x'. The following induces an error, until -std is added to get |
3beb1315 HPN |
3799 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3800 | array size at least. It's necessary to write '\x00'==0 to get something | |
5213506e | 3801 | that's true only with -std. */ |
3beb1315 HPN |
3802 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3803 | ||
5213506e RW |
3804 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3805 | inside strings and character constants. */ | |
3806 | #define FOO(x) 'x' | |
3807 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3808 | ||
238235ef DJ |
3809 | int test (int i, double x); |
3810 | struct s1 {int (*f) (int a);}; | |
3811 | struct s2 {int (*f) (double a);}; | |
3812 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3813 | int argc; | |
3814 | char **argv; | |
3815 | int | |
3816 | main () | |
3817 | { | |
3818 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3819 | ; | |
3820 | return 0; | |
d1209685 | 3821 | } |
238235ef | 3822 | _ACEOF |
5213506e RW |
3823 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3824 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
238235ef DJ |
3825 | do |
3826 | CC="$ac_save_CC $ac_arg" | |
5213506e RW |
3827 | if ac_fn_c_try_compile "$LINENO"; then : |
3828 | ac_cv_prog_cc_c89=$ac_arg | |
238235ef | 3829 | fi |
5213506e RW |
3830 | rm -f core conftest.err conftest.$ac_objext |
3831 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
238235ef | 3832 | done |
5213506e | 3833 | rm -f conftest.$ac_ext |
238235ef DJ |
3834 | CC=$ac_save_CC |
3835 | ||
3836 | fi | |
5213506e RW |
3837 | # AC_CACHE_VAL |
3838 | case "x$ac_cv_prog_cc_c89" in | |
3839 | x) | |
3840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3841 | $as_echo "none needed" >&6; } ;; | |
3842 | xno) | |
3843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3844 | $as_echo "unsupported" >&6; } ;; | |
238235ef | 3845 | *) |
5213506e RW |
3846 | CC="$CC $ac_cv_prog_cc_c89" |
3847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3848 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
238235ef | 3849 | esac |
5213506e | 3850 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
238235ef | 3851 | |
238235ef DJ |
3852 | fi |
3853 | ||
238235ef DJ |
3854 | ac_ext=c |
3855 | ac_cpp='$CPP $CPPFLAGS' | |
3856 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3857 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3858 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3859 | ||
d208e2d2 | 3860 | |
f50f17e6 YJ |
3861 | ac_ext=c |
3862 | ac_cpp='$CPP $CPPFLAGS' | |
3863 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3864 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3865 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
3867 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
3868 | # On Suns, sometimes $CPP names a directory. | |
3869 | if test -n "$CPP" && test -d "$CPP"; then | |
3870 | CPP= | |
5213506e | 3871 | fi |
f50f17e6 | 3872 | if test -z "$CPP"; then |
22e05272 | 3873 | if ${ac_cv_prog_CPP+:} false; then : |
5213506e | 3874 | $as_echo_n "(cached) " >&6 |
d208e2d2 | 3875 | else |
f50f17e6 YJ |
3876 | # Double quotes because CPP needs to be expanded |
3877 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3878 | do | |
3879 | ac_preproc_ok=false | |
3880 | for ac_c_preproc_warn_flag in '' yes | |
3881 | do | |
3882 | # Use a header file that comes with gcc, so configuring glibc | |
3883 | # with a fresh cross-compiler works. | |
3884 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3885 | # <limits.h> exists even on freestanding compilers. | |
3886 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3887 | # not just through cpp. "Syntax error" is here to catch this case. | |
3888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d208e2d2 | 3889 | /* end confdefs.h. */ |
f50f17e6 YJ |
3890 | #ifdef __STDC__ |
3891 | # include <limits.h> | |
3892 | #else | |
3893 | # include <assert.h> | |
3894 | #endif | |
3895 | Syntax error | |
d208e2d2 | 3896 | _ACEOF |
f50f17e6 YJ |
3897 | if ac_fn_c_try_cpp "$LINENO"; then : |
3898 | ||
3899 | else | |
3900 | # Broken: fails on valid input. | |
3901 | continue | |
d208e2d2 | 3902 | fi |
22e05272 | 3903 | rm -f conftest.err conftest.i conftest.$ac_ext |
f50f17e6 YJ |
3904 | |
3905 | # OK, works on sane cases. Now check whether nonexistent headers | |
3906 | # can be detected and how. | |
3907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3908 | /* end confdefs.h. */ | |
3909 | #include <ac_nonexistent.h> | |
3910 | _ACEOF | |
3911 | if ac_fn_c_try_cpp "$LINENO"; then : | |
3912 | # Broken: success on invalid input. | |
3913 | continue | |
3914 | else | |
3915 | # Passes both tests. | |
3916 | ac_preproc_ok=: | |
3917 | break | |
d208e2d2 | 3918 | fi |
22e05272 | 3919 | rm -f conftest.err conftest.i conftest.$ac_ext |
f50f17e6 YJ |
3920 | |
3921 | done | |
3922 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
22e05272 | 3923 | rm -f conftest.i conftest.err conftest.$ac_ext |
f50f17e6 YJ |
3924 | if $ac_preproc_ok; then : |
3925 | break | |
d208e2d2 | 3926 | fi |
d208e2d2 | 3927 | |
f50f17e6 YJ |
3928 | done |
3929 | ac_cv_prog_CPP=$CPP | |
3930 | ||
3931 | fi | |
3932 | CPP=$ac_cv_prog_CPP | |
d208e2d2 | 3933 | else |
f50f17e6 YJ |
3934 | ac_cv_prog_CPP=$CPP |
3935 | fi | |
3936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
3937 | $as_echo "$CPP" >&6; } | |
3938 | ac_preproc_ok=false | |
3939 | for ac_c_preproc_warn_flag in '' yes | |
3940 | do | |
3941 | # Use a header file that comes with gcc, so configuring glibc | |
3942 | # with a fresh cross-compiler works. | |
3943 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3944 | # <limits.h> exists even on freestanding compilers. | |
3945 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3946 | # not just through cpp. "Syntax error" is here to catch this case. | |
5213506e | 3947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d208e2d2 | 3948 | /* end confdefs.h. */ |
f50f17e6 YJ |
3949 | #ifdef __STDC__ |
3950 | # include <limits.h> | |
3951 | #else | |
3952 | # include <assert.h> | |
3953 | #endif | |
3954 | Syntax error | |
d208e2d2 | 3955 | _ACEOF |
f50f17e6 YJ |
3956 | if ac_fn_c_try_cpp "$LINENO"; then : |
3957 | ||
3958 | else | |
3959 | # Broken: fails on valid input. | |
3960 | continue | |
d208e2d2 | 3961 | fi |
22e05272 | 3962 | rm -f conftest.err conftest.i conftest.$ac_ext |
f50f17e6 YJ |
3963 | |
3964 | # OK, works on sane cases. Now check whether nonexistent headers | |
3965 | # can be detected and how. | |
5213506e | 3966 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d208e2d2 | 3967 | /* end confdefs.h. */ |
f50f17e6 | 3968 | #include <ac_nonexistent.h> |
b033df90 | 3969 | _ACEOF |
5213506e | 3970 | if ac_fn_c_try_cpp "$LINENO"; then : |
b033df90 DJ |
3971 | # Broken: success on invalid input. |
3972 | continue | |
3973 | else | |
b033df90 DJ |
3974 | # Passes both tests. |
3975 | ac_preproc_ok=: | |
3976 | break | |
3977 | fi | |
22e05272 | 3978 | rm -f conftest.err conftest.i conftest.$ac_ext |
b033df90 DJ |
3979 | |
3980 | done | |
3981 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
22e05272 | 3982 | rm -f conftest.i conftest.err conftest.$ac_ext |
5213506e RW |
3983 | if $ac_preproc_ok; then : |
3984 | ||
b033df90 | 3985 | else |
5213506e RW |
3986 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3987 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
3988 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
3989 | See \`config.log' for more details" "$LINENO" 5; } | |
b033df90 DJ |
3990 | fi |
3991 | ||
3992 | ac_ext=c | |
3993 | ac_cpp='$CPP $CPPFLAGS' | |
3994 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3995 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3996 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3997 | ||
3998 | ||
f50f17e6 YJ |
3999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
4000 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
22e05272 | 4001 | if ${ac_cv_path_GREP+:} false; then : |
5213506e | 4002 | $as_echo_n "(cached) " >&6 |
e8f9ec35 | 4003 | else |
f50f17e6 YJ |
4004 | if test -z "$GREP"; then |
4005 | ac_path_GREP_found=false | |
4006 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4007 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4008 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4009 | do | |
4010 | IFS=$as_save_IFS | |
4011 | test -z "$as_dir" && as_dir=. | |
4012 | for ac_prog in grep ggrep; do | |
4013 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4014 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
22e05272 | 4015 | as_fn_executable_p "$ac_path_GREP" || continue |
f50f17e6 YJ |
4016 | # Check for GNU ac_path_GREP and select it if it is found. |
4017 | # Check for GNU $ac_path_GREP | |
4018 | case `"$ac_path_GREP" --version 2>&1` in | |
4019 | *GNU*) | |
4020 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4021 | *) | |
4022 | ac_count=0 | |
4023 | $as_echo_n 0123456789 >"conftest.in" | |
4024 | while : | |
4025 | do | |
4026 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4027 | mv "conftest.tmp" "conftest.in" | |
4028 | cp "conftest.in" "conftest.nl" | |
4029 | $as_echo 'GREP' >> "conftest.nl" | |
4030 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4031 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4032 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4033 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4034 | # Best one so far, save it but keep looking for a better one | |
4035 | ac_cv_path_GREP="$ac_path_GREP" | |
4036 | ac_path_GREP_max=$ac_count | |
4037 | fi | |
4038 | # 10*(2^10) chars as input seems more than enough | |
4039 | test $ac_count -gt 10 && break | |
4040 | done | |
4041 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4042 | esac | |
4043 | ||
4044 | $ac_path_GREP_found && break 3 | |
4045 | done | |
4046 | done | |
4047 | done | |
4048 | IFS=$as_save_IFS | |
4049 | if test -z "$ac_cv_path_GREP"; then | |
22e05272 | 4050 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
f50f17e6 | 4051 | fi |
aa2480c5 | 4052 | else |
f50f17e6 YJ |
4053 | ac_cv_path_GREP=$GREP |
4054 | fi | |
4055 | ||
4056 | fi | |
4057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4058 | $as_echo "$ac_cv_path_GREP" >&6; } | |
4059 | GREP="$ac_cv_path_GREP" | |
4060 | ||
4061 | ||
4062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
4063 | $as_echo_n "checking for egrep... " >&6; } | |
22e05272 | 4064 | if ${ac_cv_path_EGREP+:} false; then : |
f50f17e6 YJ |
4065 | $as_echo_n "(cached) " >&6 |
4066 | else | |
4067 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4068 | then ac_cv_path_EGREP="$GREP -E" | |
4069 | else | |
4070 | if test -z "$EGREP"; then | |
4071 | ac_path_EGREP_found=false | |
4072 | # Loop through the user's path and test for each of PROGNAME-LIST | |
4073 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4074 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4075 | do | |
4076 | IFS=$as_save_IFS | |
4077 | test -z "$as_dir" && as_dir=. | |
4078 | for ac_prog in egrep; do | |
4079 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4080 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
22e05272 | 4081 | as_fn_executable_p "$ac_path_EGREP" || continue |
f50f17e6 YJ |
4082 | # Check for GNU ac_path_EGREP and select it if it is found. |
4083 | # Check for GNU $ac_path_EGREP | |
4084 | case `"$ac_path_EGREP" --version 2>&1` in | |
4085 | *GNU*) | |
4086 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4087 | *) | |
4088 | ac_count=0 | |
4089 | $as_echo_n 0123456789 >"conftest.in" | |
4090 | while : | |
4091 | do | |
4092 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4093 | mv "conftest.tmp" "conftest.in" | |
4094 | cp "conftest.in" "conftest.nl" | |
4095 | $as_echo 'EGREP' >> "conftest.nl" | |
4096 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4097 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4098 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4099 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4100 | # Best one so far, save it but keep looking for a better one | |
4101 | ac_cv_path_EGREP="$ac_path_EGREP" | |
4102 | ac_path_EGREP_max=$ac_count | |
4103 | fi | |
4104 | # 10*(2^10) chars as input seems more than enough | |
4105 | test $ac_count -gt 10 && break | |
4106 | done | |
4107 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4108 | esac | |
4109 | ||
4110 | $ac_path_EGREP_found && break 3 | |
4111 | done | |
4112 | done | |
4113 | done | |
4114 | IFS=$as_save_IFS | |
4115 | if test -z "$ac_cv_path_EGREP"; then | |
22e05272 | 4116 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
f50f17e6 YJ |
4117 | fi |
4118 | else | |
4119 | ac_cv_path_EGREP=$EGREP | |
4120 | fi | |
4121 | ||
4122 | fi | |
4123 | fi | |
4124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
4125 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4126 | EGREP="$ac_cv_path_EGREP" | |
4127 | ||
4128 | ||
4129 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
4130 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
22e05272 | 4131 | if ${ac_cv_header_stdc+:} false; then : |
f50f17e6 YJ |
4132 | $as_echo_n "(cached) " >&6 |
4133 | else | |
4134 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
aa2480c5 | 4135 | /* end confdefs.h. */ |
f50f17e6 YJ |
4136 | #include <stdlib.h> |
4137 | #include <stdarg.h> | |
4138 | #include <string.h> | |
4139 | #include <float.h> | |
aa2480c5 PB |
4140 | |
4141 | int | |
4142 | main () | |
4143 | { | |
4144 | ||
4145 | ; | |
4146 | return 0; | |
4147 | } | |
4148 | _ACEOF | |
5213506e | 4149 | if ac_fn_c_try_compile "$LINENO"; then : |
f50f17e6 | 4150 | ac_cv_header_stdc=yes |
aa2480c5 | 4151 | else |
f50f17e6 | 4152 | ac_cv_header_stdc=no |
aa2480c5 | 4153 | fi |
5213506e | 4154 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f50f17e6 YJ |
4155 | |
4156 | if test $ac_cv_header_stdc = yes; then | |
4157 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4158 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4159 | /* end confdefs.h. */ | |
4160 | #include <string.h> | |
4161 | ||
4162 | _ACEOF | |
4163 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4164 | $EGREP "memchr" >/dev/null 2>&1; then : | |
4165 | ||
4166 | else | |
4167 | ac_cv_header_stdc=no | |
aa2480c5 | 4168 | fi |
f50f17e6 | 4169 | rm -f conftest* |
aa2480c5 | 4170 | |
aa2480c5 PB |
4171 | fi |
4172 | ||
f50f17e6 YJ |
4173 | if test $ac_cv_header_stdc = yes; then |
4174 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4176 | /* end confdefs.h. */ | |
4177 | #include <stdlib.h> | |
4178 | ||
4179 | _ACEOF | |
4180 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4181 | $EGREP "free" >/dev/null 2>&1; then : | |
aa2480c5 | 4182 | |
24f2cabb | 4183 | else |
f50f17e6 | 4184 | ac_cv_header_stdc=no |
24f2cabb | 4185 | fi |
f50f17e6 YJ |
4186 | rm -f conftest* |
4187 | ||
4188 | fi | |
4189 | ||
4190 | if test $ac_cv_header_stdc = yes; then | |
4191 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4192 | if test "$cross_compiling" = yes; then : | |
4193 | : | |
24f2cabb | 4194 | else |
5213506e | 4195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
24f2cabb | 4196 | /* end confdefs.h. */ |
f50f17e6 YJ |
4197 | #include <ctype.h> |
4198 | #include <stdlib.h> | |
4199 | #if ((' ' & 0x0FF) == 0x020) | |
4200 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4201 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4202 | #else | |
4203 | # define ISLOWER(c) \ | |
4204 | (('a' <= (c) && (c) <= 'i') \ | |
4205 | || ('j' <= (c) && (c) <= 'r') \ | |
4206 | || ('s' <= (c) && (c) <= 'z')) | |
4207 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4208 | #endif | |
24f2cabb | 4209 | |
f50f17e6 | 4210 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
24f2cabb L |
4211 | int |
4212 | main () | |
4213 | { | |
f50f17e6 YJ |
4214 | int i; |
4215 | for (i = 0; i < 256; i++) | |
4216 | if (XOR (islower (i), ISLOWER (i)) | |
4217 | || toupper (i) != TOUPPER (i)) | |
4218 | return 2; | |
24f2cabb L |
4219 | return 0; |
4220 | } | |
4221 | _ACEOF | |
f50f17e6 YJ |
4222 | if ac_fn_c_try_run "$LINENO"; then : |
4223 | ||
24f2cabb | 4224 | else |
f50f17e6 YJ |
4225 | ac_cv_header_stdc=no |
4226 | fi | |
4227 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4228 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24f2cabb | 4229 | fi |
24f2cabb L |
4230 | |
4231 | fi | |
f50f17e6 YJ |
4232 | fi |
4233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
4234 | $as_echo "$ac_cv_header_stdc" >&6; } | |
4235 | if test $ac_cv_header_stdc = yes; then | |
24f2cabb | 4236 | |
f50f17e6 | 4237 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
24f2cabb L |
4238 | |
4239 | fi | |
4240 | ||
f50f17e6 YJ |
4241 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4242 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4243 | inttypes.h stdint.h unistd.h | |
4244 | do : | |
4245 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4246 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4247 | " | |
22e05272 | 4248 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
f50f17e6 YJ |
4249 | cat >>confdefs.h <<_ACEOF |
4250 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4251 | _ACEOF | |
4252 | ||
4253 | fi | |
4254 | ||
4255 | done | |
4256 | ||
4257 | ||
4258 | ||
4259 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" | |
22e05272 | 4260 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
f50f17e6 | 4261 | MINIX=yes |
24f2cabb | 4262 | else |
f50f17e6 | 4263 | MINIX= |
24f2cabb L |
4264 | fi |
4265 | ||
4266 | ||
f50f17e6 | 4267 | if test "$MINIX" = yes; then |
24f2cabb | 4268 | |
f50f17e6 YJ |
4269 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
4270 | ||
4271 | ||
4272 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
4273 | ||
4274 | ||
4275 | $as_echo "#define _MINIX 1" >>confdefs.h | |
4276 | ||
4277 | fi | |
4278 | ||
4279 | ||
4280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
4281 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
22e05272 | 4282 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
5213506e | 4283 | $as_echo_n "(cached) " >&6 |
207db768 | 4284 | else |
5213506e | 4285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ad49d865 L |
4286 | /* end confdefs.h. */ |
4287 | ||
22e05272 JM |
4288 | # define __EXTENSIONS__ 1 |
4289 | $ac_includes_default | |
ad49d865 L |
4290 | int |
4291 | main () | |
4292 | { | |
ad49d865 L |
4293 | |
4294 | ; | |
4295 | return 0; | |
4296 | } | |
4297 | _ACEOF | |
5213506e | 4298 | if ac_fn_c_try_compile "$LINENO"; then : |
f50f17e6 | 4299 | ac_cv_safe_to_define___extensions__=yes |
207db768 | 4300 | else |
f50f17e6 | 4301 | ac_cv_safe_to_define___extensions__=no |
207db768 | 4302 | fi |
5213506e | 4303 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
207db768 | 4304 | fi |
f50f17e6 YJ |
4305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4306 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
4307 | test $ac_cv_safe_to_define___extensions__ = yes && | |
4308 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h | |
4309 | ||
4310 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h | |
4311 | ||
4312 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h | |
4313 | ||
4314 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
4315 | ||
4316 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h | |
4317 | ||
ad49d865 | 4318 | |
207db768 | 4319 | |
f50f17e6 YJ |
4320 | # Check whether --enable-largefile was given. |
4321 | if test "${enable_largefile+set}" = set; then : | |
4322 | enableval=$enable_largefile; | |
207db768 | 4323 | fi |
ad49d865 | 4324 | |
f50f17e6 YJ |
4325 | if test "$enable_largefile" != no; then |
4326 | ||
4327 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4328 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
22e05272 | 4329 | if ${ac_cv_sys_largefile_CC+:} false; then : |
5213506e | 4330 | $as_echo_n "(cached) " >&6 |
207db768 | 4331 | else |
f50f17e6 YJ |
4332 | ac_cv_sys_largefile_CC=no |
4333 | if test "$GCC" != yes; then | |
4334 | ac_save_CC=$CC | |
4335 | while :; do | |
4336 | # IRIX 6.2 and later do not support large files by default, | |
4337 | # so use the C compiler's -n32 option if that helps. | |
4338 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4339 | /* end confdefs.h. */ | |
4340 | #include <sys/types.h> | |
4341 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4342 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4343 | since some C++ compilers masquerading as C compilers | |
4344 | incorrectly reject 9223372036854775807. */ | |
fbb334a6 | 4345 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
f50f17e6 YJ |
4346 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
4347 | && LARGE_OFF_T % 2147483647 == 1) | |
4348 | ? 1 : -1]; | |
4349 | int | |
4350 | main () | |
4351 | { | |
4352 | ||
4353 | ; | |
4354 | return 0; | |
4355 | } | |
4356 | _ACEOF | |
4357 | if ac_fn_c_try_compile "$LINENO"; then : | |
4358 | break | |
4359 | fi | |
4360 | rm -f core conftest.err conftest.$ac_objext | |
4361 | CC="$CC -n32" | |
4362 | if ac_fn_c_try_compile "$LINENO"; then : | |
4363 | ac_cv_sys_largefile_CC=' -n32'; break | |
4364 | fi | |
4365 | rm -f core conftest.err conftest.$ac_objext | |
4366 | break | |
4367 | done | |
4368 | CC=$ac_save_CC | |
4369 | rm -f conftest.$ac_ext | |
4370 | fi | |
4371 | fi | |
4372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4373 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4374 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4375 | CC=$CC$ac_cv_sys_largefile_CC | |
4376 | fi | |
4377 | ||
4378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4379 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
22e05272 | 4380 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
f50f17e6 YJ |
4381 | $as_echo_n "(cached) " >&6 |
4382 | else | |
4383 | while :; do | |
5213506e | 4384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
ad49d865 | 4385 | /* end confdefs.h. */ |
f50f17e6 YJ |
4386 | #include <sys/types.h> |
4387 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4388 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4389 | since some C++ compilers masquerading as C compilers | |
4390 | incorrectly reject 9223372036854775807. */ | |
fbb334a6 | 4391 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
f50f17e6 YJ |
4392 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
4393 | && LARGE_OFF_T % 2147483647 == 1) | |
4394 | ? 1 : -1]; | |
4395 | int | |
4396 | main () | |
4397 | { | |
238235ef | 4398 | |
f50f17e6 YJ |
4399 | ; |
4400 | return 0; | |
4401 | } | |
ad49d865 | 4402 | _ACEOF |
5213506e | 4403 | if ac_fn_c_try_compile "$LINENO"; then : |
f50f17e6 | 4404 | ac_cv_sys_file_offset_bits=no; break |
207db768 | 4405 | fi |
5213506e | 4406 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f50f17e6 YJ |
4407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4408 | /* end confdefs.h. */ | |
4409 | #define _FILE_OFFSET_BITS 64 | |
4410 | #include <sys/types.h> | |
4411 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4412 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4413 | since some C++ compilers masquerading as C compilers | |
4414 | incorrectly reject 9223372036854775807. */ | |
fbb334a6 | 4415 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
f50f17e6 YJ |
4416 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
4417 | && LARGE_OFF_T % 2147483647 == 1) | |
4418 | ? 1 : -1]; | |
4419 | int | |
4420 | main () | |
4421 | { | |
ad49d865 | 4422 | |
f50f17e6 YJ |
4423 | ; |
4424 | return 0; | |
4425 | } | |
4426 | _ACEOF | |
4427 | if ac_fn_c_try_compile "$LINENO"; then : | |
4428 | ac_cv_sys_file_offset_bits=64; break | |
207db768 | 4429 | fi |
f50f17e6 YJ |
4430 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4431 | ac_cv_sys_file_offset_bits=unknown | |
4432 | break | |
4433 | done | |
4434 | fi | |
4435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4436 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4437 | case $ac_cv_sys_file_offset_bits in #( | |
4438 | no | unknown) ;; | |
4439 | *) | |
4440 | cat >>confdefs.h <<_ACEOF | |
4441 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
ad49d865 | 4442 | _ACEOF |
f50f17e6 | 4443 | ;; |
ad49d865 | 4444 | esac |
f50f17e6 YJ |
4445 | rm -rf conftest* |
4446 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4447 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4448 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
22e05272 | 4449 | if ${ac_cv_sys_large_files+:} false; then : |
f50f17e6 YJ |
4450 | $as_echo_n "(cached) " >&6 |
4451 | else | |
4452 | while :; do | |
4453 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4454 | /* end confdefs.h. */ | |
4455 | #include <sys/types.h> | |
4456 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4457 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4458 | since some C++ compilers masquerading as C compilers | |
4459 | incorrectly reject 9223372036854775807. */ | |
fbb334a6 | 4460 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
f50f17e6 YJ |
4461 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
4462 | && LARGE_OFF_T % 2147483647 == 1) | |
4463 | ? 1 : -1]; | |
4464 | int | |
4465 | main () | |
4466 | { | |
207db768 | 4467 | |
f50f17e6 YJ |
4468 | ; |
4469 | return 0; | |
4470 | } | |
4471 | _ACEOF | |
4472 | if ac_fn_c_try_compile "$LINENO"; then : | |
4473 | ac_cv_sys_large_files=no; break | |
4474 | fi | |
4475 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4477 | /* end confdefs.h. */ | |
4478 | #define _LARGE_FILES 1 | |
4479 | #include <sys/types.h> | |
4480 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4481 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4482 | since some C++ compilers masquerading as C compilers | |
4483 | incorrectly reject 9223372036854775807. */ | |
fbb334a6 | 4484 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
f50f17e6 YJ |
4485 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
4486 | && LARGE_OFF_T % 2147483647 == 1) | |
4487 | ? 1 : -1]; | |
4488 | int | |
4489 | main () | |
4490 | { | |
5213506e | 4491 | |
f50f17e6 YJ |
4492 | ; |
4493 | return 0; | |
4494 | } | |
4495 | _ACEOF | |
4496 | if ac_fn_c_try_compile "$LINENO"; then : | |
4497 | ac_cv_sys_large_files=1; break | |
4498 | fi | |
4499 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4500 | ac_cv_sys_large_files=unknown | |
4501 | break | |
4502 | done | |
4503 | fi | |
4504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4505 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4506 | case $ac_cv_sys_large_files in #( | |
4507 | no | unknown) ;; | |
4508 | *) | |
4509 | cat >>confdefs.h <<_ACEOF | |
4510 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4511 | _ACEOF | |
4512 | ;; | |
4513 | esac | |
4514 | rm -rf conftest* | |
4515 | fi | |
22e05272 JM |
4516 | |
4517 | ||
f50f17e6 YJ |
4518 | fi |
4519 | ||
4520 | ||
4521 | ac_c_preproc_warn_flag=yes | |
4522 | ||
126e0b6b AM |
4523 | ac_ext=c |
4524 | ac_cpp='$CPP $CPPFLAGS' | |
4525 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4526 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4527 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4528 | ||
f50f17e6 YJ |
4529 | ac_libiberty_warn_cflags= |
4530 | save_CFLAGS="$CFLAGS" | |
4531 | for real_option in -W -Wall -Wwrite-strings -Wc++-compat \ | |
3eb89071 MW |
4532 | -Wstrict-prototypes \ |
4533 | -Wshadow=local; do | |
f50f17e6 YJ |
4534 | # Do the check with the no- prefix removed since gcc silently |
4535 | # accepts any -Wno-* option on purpose | |
4536 | case $real_option in | |
4537 | -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;; | |
4538 | *) option=$real_option ;; | |
4539 | esac | |
4540 | as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
4541 | ||
4542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 | |
4543 | $as_echo_n "checking whether $CC supports $option... " >&6; } | |
22e05272 | 4544 | if eval \${$as_acx_Woption+:} false; then : |
5213506e | 4545 | $as_echo_n "(cached) " >&6 |
207db768 | 4546 | else |
f50f17e6 YJ |
4547 | CFLAGS="$option" |
4548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4549 | /* end confdefs.h. */ | |
5213506e | 4550 | |
f50f17e6 YJ |
4551 | int |
4552 | main () | |
4553 | { | |
4554 | ||
4555 | ; | |
4556 | return 0; | |
4557 | } | |
4558 | _ACEOF | |
4559 | if ac_fn_c_try_compile "$LINENO"; then : | |
4560 | eval "$as_acx_Woption=yes" | |
4561 | else | |
4562 | eval "$as_acx_Woption=no" | |
4563 | fi | |
4564 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4565 | ||
4566 | fi | |
4567 | eval ac_res=\$$as_acx_Woption | |
4568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
4569 | $as_echo "$ac_res" >&6; } | |
4570 | if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : | |
4571 | ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$real_option" | |
4572 | fi | |
5213506e | 4573 | done |
f50f17e6 | 4574 | CFLAGS="$save_CFLAGS" |
126e0b6b AM |
4575 | ac_ext=c |
4576 | ac_cpp='$CPP $CPPFLAGS' | |
4577 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4578 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4579 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4580 | ||
4581 | ||
4582 | ac_ext=c | |
4583 | ac_cpp='$CPP $CPPFLAGS' | |
4584 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4585 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4586 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
f50f17e6 YJ |
4587 | |
4588 | # Do the check with the no- prefix removed from the warning options | |
4589 | # since gcc silently accepts any -Wno-* option on purpose | |
4590 | if test "$GCC" = yes; then : | |
4591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic " >&5 | |
4592 | $as_echo_n "checking whether $CC supports -pedantic ... " >&6; } | |
22e05272 | 4593 | if ${acx_cv_prog_cc_pedantic_+:} false; then : |
f50f17e6 | 4594 | $as_echo_n "(cached) " >&6 |
5213506e | 4595 | else |
f50f17e6 YJ |
4596 | save_CFLAGS="$CFLAGS" |
4597 | CFLAGS="-pedantic " | |
4598 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4599 | /* end confdefs.h. */ | |
4600 | ||
4601 | int | |
4602 | main () | |
4603 | { | |
4604 | ||
4605 | ; | |
4606 | return 0; | |
4607 | } | |
4608 | _ACEOF | |
4609 | if ac_fn_c_try_compile "$LINENO"; then : | |
4610 | acx_cv_prog_cc_pedantic_=yes | |
4611 | else | |
4612 | acx_cv_prog_cc_pedantic_=no | |
4613 | fi | |
4614 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4615 | CFLAGS="$save_CFLAGS" | |
4616 | fi | |
4617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic_" >&5 | |
4618 | $as_echo "$acx_cv_prog_cc_pedantic_" >&6; } | |
4619 | if test $acx_cv_prog_cc_pedantic_ = yes; then : | |
4620 | ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic " | |
5213506e RW |
4621 | fi |
4622 | ||
4623 | fi | |
126e0b6b AM |
4624 | ac_ext=c |
4625 | ac_cpp='$CPP $CPPFLAGS' | |
4626 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4627 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4628 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4629 | ||
5213506e RW |
4630 | |
4631 | ||
f50f17e6 YJ |
4632 | if test "x$CC" != xcc; then |
4633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 | |
4634 | $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } | |
4635 | else | |
4636 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 | |
4637 | $as_echo_n "checking whether cc understands -c and -o together... " >&6; } | |
4638 | fi | |
4639 | set dummy $CC; ac_cc=`$as_echo "$2" | | |
4640 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
22e05272 | 4641 | if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : |
5213506e RW |
4642 | $as_echo_n "(cached) " >&6 |
4643 | else | |
f50f17e6 YJ |
4644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4645 | /* end confdefs.h. */ | |
4646 | ||
4647 | int | |
4648 | main () | |
4649 | { | |
4650 | ||
4651 | ; | |
4652 | return 0; | |
4653 | } | |
4654 | _ACEOF | |
4655 | # Make sure it works both with $CC and with simple cc. | |
4656 | # We do the test twice because some compilers refuse to overwrite an | |
4657 | # existing .o file with -o, though they will create one. | |
4658 | ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
4659 | rm -f conftest2.* | |
4660 | if { { case "(($ac_try" in | |
4661 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4662 | *) ac_try_echo=$ac_try;; | |
4663 | esac | |
4664 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4665 | $as_echo "$ac_try_echo"; } >&5 | |
4666 | (eval "$ac_try") 2>&5 | |
4667 | ac_status=$? | |
4668 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4669 | test $ac_status = 0; } && | |
4670 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
4671 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4672 | *) ac_try_echo=$ac_try;; | |
4673 | esac | |
4674 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4675 | $as_echo "$ac_try_echo"; } >&5 | |
4676 | (eval "$ac_try") 2>&5 | |
4677 | ac_status=$? | |
4678 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4679 | test $ac_status = 0; }; | |
4680 | then | |
4681 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
4682 | if test "x$CC" != xcc; then | |
4683 | # Test first that cc exists at all. | |
4684 | if { ac_try='cc -c conftest.$ac_ext >&5' | |
4685 | { { case "(($ac_try" in | |
4686 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4687 | *) ac_try_echo=$ac_try;; | |
5213506e | 4688 | esac |
f50f17e6 YJ |
4689 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
4690 | $as_echo "$ac_try_echo"; } >&5 | |
4691 | (eval "$ac_try") 2>&5 | |
4692 | ac_status=$? | |
4693 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4694 | test $ac_status = 0; }; }; then | |
4695 | ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' | |
4696 | rm -f conftest2.* | |
4697 | if { { case "(($ac_try" in | |
4698 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4699 | *) ac_try_echo=$ac_try;; | |
4700 | esac | |
4701 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4702 | $as_echo "$ac_try_echo"; } >&5 | |
4703 | (eval "$ac_try") 2>&5 | |
4704 | ac_status=$? | |
4705 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4706 | test $ac_status = 0; } && | |
4707 | test -f conftest2.$ac_objext && { { case "(($ac_try" in | |
4708 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4709 | *) ac_try_echo=$ac_try;; | |
4710 | esac | |
4711 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
4712 | $as_echo "$ac_try_echo"; } >&5 | |
4713 | (eval "$ac_try") 2>&5 | |
4714 | ac_status=$? | |
4715 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4716 | test $ac_status = 0; }; | |
4717 | then | |
4718 | # cc works too. | |
4719 | : | |
4720 | else | |
4721 | # cc exists but doesn't like -o. | |
4722 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
4723 | fi | |
4724 | fi | |
5213506e RW |
4725 | fi |
4726 | else | |
f50f17e6 | 4727 | eval ac_cv_prog_cc_${ac_cc}_c_o=no |
5213506e | 4728 | fi |
f50f17e6 | 4729 | rm -f core conftest* |
5213506e | 4730 | |
5213506e | 4731 | fi |
f50f17e6 YJ |
4732 | if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then |
4733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4734 | $as_echo "yes" >&6; } | |
4735 | else | |
4736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4737 | $as_echo "no" >&6; } | |
4738 | ||
4739 | $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h | |
5213506e | 4740 | |
f50f17e6 | 4741 | fi |
5213506e | 4742 | |
f50f17e6 YJ |
4743 | # autoconf is lame and doesn't give us any substitution variable for this. |
4744 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
4745 | NO_MINUS_C_MINUS_O=yes | |
4746 | else | |
4747 | OUTPUT_OPTION='-o $@' | |
4748 | fi | |
4749 | ||
4750 | ||
4751 | ||
4752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
4753 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
22e05272 | 4754 | if ${ac_cv_c_const+:} false; then : |
5213506e RW |
4755 | $as_echo_n "(cached) " >&6 |
4756 | else | |
4757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
ad49d865 | 4758 | /* end confdefs.h. */ |
fbc1bc09 | 4759 | |
ad49d865 L |
4760 | int |
4761 | main () | |
4762 | { | |
22e05272 | 4763 | |
f50f17e6 | 4764 | #ifndef __cplusplus |
22e05272 | 4765 | /* Ultrix mips cc rejects this sort of thing. */ |
f50f17e6 | 4766 | typedef int charset[2]; |
22e05272 | 4767 | const charset cs = { 0, 0 }; |
f50f17e6 YJ |
4768 | /* SunOS 4.1.1 cc rejects this. */ |
4769 | char const *const *pcpcc; | |
4770 | char **ppc; | |
4771 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
4772 | struct point {int x, y;}; | |
4773 | static struct point const zero = {0,0}; | |
4774 | /* AIX XL C 1.02.0.0 rejects this. | |
4775 | It does not let you subtract one const X* pointer from another in | |
4776 | an arm of an if-expression whose if-part is not a constant | |
4777 | expression */ | |
4778 | const char *g = "string"; | |
4779 | pcpcc = &g + (g ? g-g : 0); | |
4780 | /* HPUX 7.0 cc rejects these. */ | |
4781 | ++pcpcc; | |
4782 | ppc = (char**) pcpcc; | |
4783 | pcpcc = (char const *const *) ppc; | |
22e05272 JM |
4784 | { /* SCO 3.2v4 cc rejects this sort of thing. */ |
4785 | char tx; | |
4786 | char *t = &tx; | |
f50f17e6 YJ |
4787 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
4788 | ||
4789 | *t++ = 0; | |
4790 | if (s) return 0; | |
4791 | } | |
4792 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
4793 | int x[] = {25, 17}; | |
4794 | const int *foo = &x[0]; | |
4795 | ++foo; | |
4796 | } | |
4797 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
4798 | typedef const int *iptr; | |
4799 | iptr p = 0; | |
4800 | ++p; | |
4801 | } | |
22e05272 | 4802 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying |
f50f17e6 | 4803 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
22e05272 JM |
4804 | struct s { int j; const int *ap[3]; } bx; |
4805 | struct s *b = &bx; b->j = 5; | |
f50f17e6 YJ |
4806 | } |
4807 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
4808 | const int foo = 10; | |
4809 | if (!foo) return 0; | |
4810 | } | |
4811 | return !cs[0] && !zero.x; | |
4812 | #endif | |
fbc1bc09 | 4813 | |
ad49d865 L |
4814 | ; |
4815 | return 0; | |
4816 | } | |
4817 | _ACEOF | |
5213506e | 4818 | if ac_fn_c_try_compile "$LINENO"; then : |
f50f17e6 | 4819 | ac_cv_c_const=yes |
5213506e | 4820 | else |
f50f17e6 | 4821 | ac_cv_c_const=no |
5213506e RW |
4822 | fi |
4823 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5213506e | 4824 | fi |
f50f17e6 YJ |
4825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
4826 | $as_echo "$ac_cv_c_const" >&6; } | |
4827 | if test $ac_cv_c_const = no; then | |
5213506e | 4828 | |
f50f17e6 | 4829 | $as_echo "#define const /**/" >>confdefs.h |
5213506e RW |
4830 | |
4831 | fi | |
4832 | ||
f50f17e6 YJ |
4833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
4834 | $as_echo_n "checking for inline... " >&6; } | |
22e05272 | 4835 | if ${ac_cv_c_inline+:} false; then : |
f50f17e6 | 4836 | $as_echo_n "(cached) " >&6 |
5213506e | 4837 | else |
f50f17e6 YJ |
4838 | ac_cv_c_inline=no |
4839 | for ac_kw in inline __inline__ __inline; do | |
5213506e RW |
4840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4841 | /* end confdefs.h. */ | |
f50f17e6 YJ |
4842 | #ifndef __cplusplus |
4843 | typedef int foo_t; | |
4844 | static $ac_kw foo_t static_foo () {return 0; } | |
4845 | $ac_kw foo_t foo () {return 0; } | |
24f2cabb | 4846 | #endif |
fbc1bc09 | 4847 | |
238235ef | 4848 | _ACEOF |
f50f17e6 YJ |
4849 | if ac_fn_c_try_compile "$LINENO"; then : |
4850 | ac_cv_c_inline=$ac_kw | |
5213506e | 4851 | fi |
f50f17e6 YJ |
4852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4853 | test "$ac_cv_c_inline" != no && break | |
4854 | done | |
5213506e RW |
4855 | |
4856 | fi | |
f50f17e6 YJ |
4857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
4858 | $as_echo "$ac_cv_c_inline" >&6; } | |
5213506e | 4859 | |
f50f17e6 YJ |
4860 | case $ac_cv_c_inline in |
4861 | inline | yes) ;; | |
4862 | *) | |
4863 | case $ac_cv_c_inline in | |
4864 | no) ac_val=;; | |
4865 | *) ac_val=$ac_cv_c_inline;; | |
4866 | esac | |
4867 | cat >>confdefs.h <<_ACEOF | |
4868 | #ifndef __cplusplus | |
4869 | #define inline $ac_val | |
4870 | #endif | |
5213506e | 4871 | _ACEOF |
f50f17e6 YJ |
4872 | ;; |
4873 | esac | |
5213506e RW |
4874 | |
4875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
4876 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
22e05272 | 4877 | if ${ac_cv_c_bigendian+:} false; then : |
5213506e RW |
4878 | $as_echo_n "(cached) " >&6 |
4879 | else | |
fbc1bc09 | 4880 | ac_cv_c_bigendian=unknown |
5213506e RW |
4881 | # See if we're dealing with a universal compiler. |
4882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4883 | /* end confdefs.h. */ | |
4884 | #ifndef __APPLE_CC__ | |
4885 | not a universal capable compiler | |
4886 | #endif | |
4887 | typedef int dummy; | |
4888 | ||
4889 | _ACEOF | |
4890 | if ac_fn_c_try_compile "$LINENO"; then : | |
4891 | ||
4892 | # Check for potential -arch flags. It is not universal unless | |
4893 | # there are at least two -arch flags with different values. | |
4894 | ac_arch= | |
4895 | ac_prev= | |
4896 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
4897 | if test -n "$ac_prev"; then | |
4898 | case $ac_word in | |
4899 | i?86 | x86_64 | ppc | ppc64) | |
4900 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
4901 | ac_arch=$ac_word | |
4902 | else | |
4903 | ac_cv_c_bigendian=universal | |
4904 | break | |
4905 | fi | |
4906 | ;; | |
4907 | esac | |
4908 | ac_prev= | |
4909 | elif test "x$ac_word" = "x-arch"; then | |
4910 | ac_prev=arch | |
4911 | fi | |
4912 | done | |
4913 | fi | |
4914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4915 | if test $ac_cv_c_bigendian = unknown; then | |
4916 | # See if sys/param.h defines the BYTE_ORDER macro. | |
4917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4918 | /* end confdefs.h. */ | |
4919 | #include <sys/types.h> | |
4920 | #include <sys/param.h> | |
4921 | ||
4922 | int | |
4923 | main () | |
4924 | { | |
4925 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ | |
4926 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
4927 | && LITTLE_ENDIAN) | |
4928 | bogus endian macros | |
4929 | #endif | |
4930 | ||
4931 | ; | |
4932 | return 0; | |
4933 | } | |
fbc1bc09 | 4934 | _ACEOF |
5213506e RW |
4935 | if ac_fn_c_try_compile "$LINENO"; then : |
4936 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
4937 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
fbc1bc09 | 4938 | /* end confdefs.h. */ |
5213506e RW |
4939 | #include <sys/types.h> |
4940 | #include <sys/param.h> | |
4941 | ||
fbc1bc09 KC |
4942 | int |
4943 | main () | |
4944 | { | |
5213506e RW |
4945 | #if BYTE_ORDER != BIG_ENDIAN |
4946 | not big endian | |
4947 | #endif | |
4948 | ||
fbc1bc09 KC |
4949 | ; |
4950 | return 0; | |
4951 | } | |
4952 | _ACEOF | |
5213506e | 4953 | if ac_fn_c_try_compile "$LINENO"; then : |
fbc1bc09 | 4954 | ac_cv_c_bigendian=yes |
5213506e RW |
4955 | else |
4956 | ac_cv_c_bigendian=no | |
fbc1bc09 | 4957 | fi |
5213506e | 4958 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
fbc1bc09 | 4959 | fi |
5213506e RW |
4960 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4961 | fi | |
4962 | if test $ac_cv_c_bigendian = unknown; then | |
4963 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
4964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4965 | /* end confdefs.h. */ | |
4966 | #include <limits.h> | |
fbc1bc09 | 4967 | |
5213506e RW |
4968 | int |
4969 | main () | |
4970 | { | |
4971 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
4972 | bogus endian macros | |
4973 | #endif | |
4974 | ||
4975 | ; | |
4976 | return 0; | |
4977 | } | |
24f2cabb | 4978 | _ACEOF |
5213506e RW |
4979 | if ac_fn_c_try_compile "$LINENO"; then : |
4980 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
4981 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
24f2cabb | 4982 | /* end confdefs.h. */ |
5213506e RW |
4983 | #include <limits.h> |
4984 | ||
fbc1bc09 KC |
4985 | int |
4986 | main () | |
4987 | { | |
5213506e RW |
4988 | #ifndef _BIG_ENDIAN |
4989 | not big endian | |
4990 | #endif | |
4991 | ||
4992 | ; | |
4993 | return 0; | |
24f2cabb | 4994 | } |
238235ef | 4995 | _ACEOF |
5213506e RW |
4996 | if ac_fn_c_try_compile "$LINENO"; then : |
4997 | ac_cv_c_bigendian=yes | |
24f2cabb | 4998 | else |
5213506e | 4999 | ac_cv_c_bigendian=no |
5cc5a0d0 | 5000 | fi |
5213506e | 5001 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
24f2cabb | 5002 | fi |
5213506e RW |
5003 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5004 | fi | |
5005 | if test $ac_cv_c_bigendian = unknown; then | |
5006 | # Compile a test program. | |
5007 | if test "$cross_compiling" = yes; then : | |
5008 | # Try to guess by grepping values from an object file. | |
5009 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5010 | /* end confdefs.h. */ | |
5011 | short int ascii_mm[] = | |
5012 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
5013 | short int ascii_ii[] = | |
5014 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
5015 | int use_ascii (int i) { | |
5016 | return ascii_mm[i] + ascii_ii[i]; | |
5017 | } | |
5018 | short int ebcdic_ii[] = | |
5019 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
5020 | short int ebcdic_mm[] = | |
5021 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
5022 | int use_ebcdic (int i) { | |
5023 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
5024 | } | |
5025 | extern int foo; | |
5026 | ||
5027 | int | |
5028 | main () | |
5029 | { | |
5030 | return use_ascii (foo) == use_ebcdic (foo); | |
5031 | ; | |
5032 | return 0; | |
5033 | } | |
5034 | _ACEOF | |
5035 | if ac_fn_c_try_compile "$LINENO"; then : | |
5036 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
5037 | ac_cv_c_bigendian=yes | |
5038 | fi | |
5039 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
5040 | if test "$ac_cv_c_bigendian" = unknown; then | |
5041 | ac_cv_c_bigendian=no | |
5042 | else | |
5043 | # finding both strings is unlikely to happen, but who knows? | |
5044 | ac_cv_c_bigendian=unknown | |
5045 | fi | |
5046 | fi | |
5047 | fi | |
5048 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5049 | else | |
5050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5051 | /* end confdefs.h. */ | |
5052 | $ac_includes_default | |
5053 | int | |
5054 | main () | |
5055 | { | |
5056 | ||
5057 | /* Are we little or big endian? From Harbison&Steele. */ | |
5058 | union | |
5059 | { | |
5060 | long int l; | |
5061 | char c[sizeof (long int)]; | |
5062 | } u; | |
5063 | u.l = 1; | |
5064 | return u.c[sizeof (long int) - 1] == 1; | |
5065 | ||
5066 | ; | |
5067 | return 0; | |
5068 | } | |
5069 | _ACEOF | |
5070 | if ac_fn_c_try_run "$LINENO"; then : | |
5071 | ac_cv_c_bigendian=no | |
5072 | else | |
5073 | ac_cv_c_bigendian=yes | |
24f2cabb | 5074 | fi |
5213506e RW |
5075 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
5076 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
24f2cabb | 5077 | fi |
238235ef | 5078 | |
5213506e RW |
5079 | fi |
5080 | fi | |
5081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
5082 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
5083 | case $ac_cv_c_bigendian in #( | |
5084 | yes) | |
5085 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
5086 | ;; #( | |
5087 | no) | |
5088 | ;; #( | |
5089 | universal) | |
5090 | ||
5091 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
5092 | ||
5093 | ;; #( | |
5094 | *) | |
22e05272 | 5095 | as_fn_error $? "unknown endianness |
5213506e RW |
5096 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
5097 | esac | |
5cc5a0d0 | 5098 | |
0bc0cd11 JL |
5099 | |
5100 | ||
5101 | ||
5213506e | 5102 | ac_config_headers="$ac_config_headers config.h:config.in" |
0bc0cd11 JL |
5103 | |
5104 | ||
5105 | ||
5106 | # Find a good install program. We prefer a C program (faster), | |
5107 | # so one script is as good as another. But avoid the broken or | |
5108 | # incompatible versions: | |
5109 | # SysV /etc/install, /usr/sbin/install | |
5110 | # SunOS /usr/etc/install | |
5111 | # IRIX /sbin/install | |
5112 | # AIX /bin/install | |
238235ef | 5113 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
0bc0cd11 JL |
5114 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
5115 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5116 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3beb1315 | 5117 | # OS/2's system install, which has a completely different semantic |
0bc0cd11 | 5118 | # ./install, which can be erroneously created by make from ./install.sh. |
5213506e RW |
5119 | # Reject install programs that cannot install multiple files. |
5120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5121 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
0bc0cd11 | 5122 | if test -z "$INSTALL"; then |
22e05272 | 5123 | if ${ac_cv_path_install+:} false; then : |
5213506e | 5124 | $as_echo_n "(cached) " >&6 |
238235ef DJ |
5125 | else |
5126 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5127 | for as_dir in $PATH | |
5128 | do | |
5129 | IFS=$as_save_IFS | |
5130 | test -z "$as_dir" && as_dir=. | |
5213506e RW |
5131 | # Account for people who put trailing slashes in PATH elements. |
5132 | case $as_dir/ in #(( | |
5133 | ./ | .// | /[cC]/* | \ | |
238235ef | 5134 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
5213506e | 5135 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
238235ef DJ |
5136 | /usr/ucb/* ) ;; |
5137 | *) | |
5138 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5139 | # Don't use installbsd from OSF since it installs stuff as root | |
5140 | # by default. | |
5141 | for ac_prog in ginstall scoinst install; do | |
5142 | for ac_exec_ext in '' $ac_executable_extensions; do | |
22e05272 | 5143 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
3beb1315 HPN |
5144 | if test $ac_prog = install && |
5145 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5146 | # AIX install. It has an incompatible calling convention. | |
5147 | : | |
5148 | elif test $ac_prog = install && | |
5149 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5150 | # program-specific install script used by HP pwplus--don't use. | |
5151 | : | |
5152 | else | |
5213506e RW |
5153 | rm -rf conftest.one conftest.two conftest.dir |
5154 | echo one > conftest.one | |
5155 | echo two > conftest.two | |
5156 | mkdir conftest.dir | |
5157 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5158 | test -s conftest.one && test -s conftest.two && | |
5159 | test -s conftest.dir/conftest.one && | |
5160 | test -s conftest.dir/conftest.two | |
5161 | then | |
5162 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5163 | break 3 | |
5164 | fi | |
3beb1315 HPN |
5165 | fi |
5166 | fi | |
0bc0cd11 | 5167 | done |
238235ef DJ |
5168 | done |
5169 | ;; | |
5170 | esac | |
238235ef | 5171 | |
5213506e RW |
5172 | done |
5173 | IFS=$as_save_IFS | |
5174 | ||
5175 | rm -rf conftest.one conftest.two conftest.dir | |
0bc0cd11 JL |
5176 | |
5177 | fi | |
5178 | if test "${ac_cv_path_install+set}" = set; then | |
238235ef | 5179 | INSTALL=$ac_cv_path_install |
0bc0cd11 | 5180 | else |
5213506e RW |
5181 | # As a last resort, use the slow shell script. Don't cache a |
5182 | # value for INSTALL within a source directory, because that will | |
0bc0cd11 | 5183 | # break other packages using the cache if that directory is |
5213506e | 5184 | # removed, or if the value is a relative name. |
238235ef | 5185 | INSTALL=$ac_install_sh |
0bc0cd11 JL |
5186 | fi |
5187 | fi | |
5213506e RW |
5188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
5189 | $as_echo "$INSTALL" >&6; } | |
0bc0cd11 JL |
5190 | |
5191 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5192 | # It thinks the first close brace ends the variable substitution. | |
5193 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5194 | ||
238235ef | 5195 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
687361c8 | 5196 | |
0bc0cd11 JL |
5197 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
5198 | ||
5199 | ||
769b009e KC |
5200 | # Don't build the shared library for build. |
5201 | if [ -n "${with_build_subdir}" ]; then | |
5202 | enable_shared=no | |
5203 | fi | |
5204 | ||
5205 | frag= | |
5206 | case "${host}" in | |
5207 | rs6000-ibm-aix3.1 | rs6000-ibm-aix) | |
5208 | frag=mh-aix ;; | |
5209 | *-*-cxux7*) frag=mh-cxux7 ;; | |
5210 | *-*-freebsd2.1.*) frag=mh-fbsd21 ;; | |
5211 | *-*-freebsd2.2.[012]) frag=mh-fbsd21 ;; | |
5212 | i370-*-opened*) frag=mh-openedition ;; | |
5213 | i[34567]86-*-windows*) frag=mh-windows ;; | |
5214 | esac | |
5215 | ||
5216 | if [ -n "${frag}" ]; then | |
c91c9c2e | 5217 | frag=${libiberty_topdir}/libiberty/config/$frag |
769b009e KC |
5218 | fi |
5219 | ||
e3aa9eba RO |
5220 | |
5221 | ||
5222 | ||
5223 | ||
5224 | case "${host}" in | |
5225 | # PIC is the default on some targets or must not be used. | |
5226 | *-*-darwin*) | |
cacf1f59 JJ |
5227 | # For darwin, common symbols are not allowed in MH_DYLIB files |
5228 | case "${CFLAGS}" in | |
5229 | # If we are using a compiler supporting mdynamic-no-pic | |
5230 | # and the option has been tested as safe to add, then cancel | |
5231 | # it here, since the code generated is incompatible with shared | |
8f56cb51 | 5232 | # libs. |
cacf1f59 JJ |
5233 | *-mdynamic-no-pic*) PICFLAG='-fno-common -mno-dynamic-no-pic' ;; |
5234 | *) PICFLAG=-fno-common ;; | |
5235 | esac | |
e3aa9eba RO |
5236 | ;; |
5237 | alpha*-dec-osf5*) | |
5238 | # PIC is the default. | |
5239 | ;; | |
5240 | hppa*64*-*-hpux*) | |
5241 | # PIC is the default for 64-bit PA HP-UX. | |
5242 | ;; | |
071928d9 KT |
5243 | i[34567]86-*-cygwin* | x86_64-*-cygwin*) |
5244 | ;; | |
5245 | i[34567]86-*-mingw* | x86_64-*-mingw*) | |
e3aa9eba | 5246 | ;; |
2b601678 MK |
5247 | i[34567]86-*-interix[3-9]*) |
5248 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
5249 | # Instead, we relocate shared libraries at runtime. | |
5250 | ;; | |
e3aa9eba RO |
5251 | i[34567]86-*-nto-qnx*) |
5252 | # QNX uses GNU C++, but need to define -shared option too, otherwise | |
5253 | # it will coredump. | |
5254 | PICFLAG='-fPIC -shared' | |
5255 | ;; | |
5256 | i[34567]86-pc-msdosdjgpp*) | |
5257 | # DJGPP does not support shared libraries at all. | |
5258 | ;; | |
5259 | ia64*-*-hpux*) | |
5260 | # On IA64 HP-UX, PIC is the default but the pic flag | |
5261 | # sets the default TLS model and affects inlining. | |
5262 | PICFLAG=-fPIC | |
5263 | ;; | |
b1a3d2b7 ML |
5264 | loongarch*-*-*) |
5265 | PICFLAG=-fpic | |
5266 | ;; | |
e3aa9eba RO |
5267 | mips-sgi-irix6*) |
5268 | # PIC is the default. | |
5269 | ;; | |
5270 | rs6000-ibm-aix* | powerpc-ibm-aix*) | |
5271 | # All AIX code is PIC. | |
5272 | ;; | |
5273 | ||
5274 | # Some targets support both -fPIC and -fpic, but prefer the latter. | |
5275 | # FIXME: Why? | |
5276 | i[34567]86-*-* | x86_64-*-*) | |
5277 | PICFLAG=-fpic | |
5278 | ;; | |
e3aa9eba RO |
5279 | # FIXME: Override -fPIC default in libgcc only? |
5280 | sh-*-linux* | sh[2346lbe]*-*-linux*) | |
5281 | PICFLAG=-fpic | |
5282 | ;; | |
5283 | # FIXME: Simplify to sh*-*-netbsd*? | |
8f56cb51 AM |
5284 | sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ |
5285 | sh64-*-netbsd* | sh64l*-*-netbsd*) | |
e3aa9eba RO |
5286 | PICFLAG=-fpic |
5287 | ;; | |
5288 | # Default to -fPIC unless specified otherwise. | |
5289 | *) | |
5290 | PICFLAG=-fPIC | |
5291 | ;; | |
5292 | esac | |
5293 | ||
5294 | # If the user explicitly uses -fpic/-fPIC, keep that. | |
5295 | case "${CFLAGS}" in | |
5296 | *-fpic*) | |
5297 | PICFLAG=-fpic | |
5298 | ;; | |
5299 | *-fPIC*) | |
5300 | PICFLAG=-fPIC | |
5301 | ;; | |
5302 | esac | |
5303 | ||
5304 | ||
769b009e KC |
5305 | # If they didn't specify --enable-shared, don't generate shared libs. |
5306 | case "${enable_shared}" in | |
5307 | yes) shared=yes ;; | |
5308 | no) shared=no ;; | |
5309 | "") shared=no ;; | |
5310 | *) shared=yes ;; | |
5311 | esac | |
459260ec DM |
5312 | |
5313 | # ...unless --enable-host-shared was passed from top-level config: | |
5314 | if [ "${enable_host_shared}" = "yes" ]; then | |
5315 | shared=yes | |
5316 | fi | |
5317 | ||
e3aa9eba RO |
5318 | if [ "${shared}" != "yes" ]; then |
5319 | PICFLAG= | |
769b009e KC |
5320 | fi |
5321 | ||
c91c9c2e | 5322 | |
4f148bbc JJ |
5323 | NOASANFLAG= |
5324 | case " ${CFLAGS} " in | |
5325 | *\ -fsanitize=address\ *) NOASANFLAG=-fno-sanitize=address ;; | |
170e618e | 5326 | *\ -fsanitize=hwaddress\ *) NOASANFLAG=-fno-sanitize=hwaddress ;; |
4f148bbc JJ |
5327 | esac |
5328 | ||
5329 | ||
8fc8bf80 L |
5330 | # Check whether --enable-cet was given. |
5331 | if test "${enable_cet+set}" = set; then : | |
5332 | enableval=$enable_cet; | |
5333 | case "$enableval" in | |
5334 | yes|no|auto) ;; | |
5335 | *) as_fn_error $? "Unknown argument to enable/disable cet" "$LINENO" 5 ;; | |
5336 | esac | |
5337 | ||
5338 | else | |
5339 | enable_cet=auto | |
5340 | fi | |
5341 | ||
5342 | ||
5343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5 | |
5344 | $as_echo_n "checking for CET support... " >&6; } | |
5345 | ||
5346 | case "$host" in | |
5347 | i[34567]86-*-linux* | x86_64-*-linux*) | |
5348 | may_have_cet=yes | |
9051b548 | 5349 | cet_save_CFLAGS="$CFLAGS" |
8fc8bf80 L |
5350 | CFLAGS="$CFLAGS -fcf-protection" |
5351 | case "$enable_cet" in | |
5352 | auto) | |
5353 | # Check if target supports multi-byte NOPs | |
4712bde3 | 5354 | # and if compiler and assembler support CET. |
8fc8bf80 L |
5355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5356 | /* end confdefs.h. */ | |
5357 | ||
5358 | int | |
5359 | main () | |
5360 | { | |
5361 | ||
5362 | #if !defined(__SSE2__) | |
5363 | #error target does not support multi-byte NOPs | |
5364 | #else | |
5365 | asm ("setssbsy"); | |
5366 | #endif | |
5367 | ||
5368 | ; | |
5369 | return 0; | |
5370 | } | |
5371 | _ACEOF | |
5372 | if ac_fn_c_try_compile "$LINENO"; then : | |
5373 | enable_cet=yes | |
5374 | else | |
5375 | enable_cet=no | |
5376 | fi | |
5377 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5378 | ;; | |
5379 | yes) | |
4712bde3 | 5380 | # Check if compiler and assembler support CET. |
8fc8bf80 L |
5381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5382 | /* end confdefs.h. */ | |
5383 | ||
5384 | int | |
5385 | main () | |
5386 | { | |
5387 | asm ("setssbsy"); | |
5388 | ; | |
5389 | return 0; | |
5390 | } | |
5391 | _ACEOF | |
5392 | if ac_fn_c_try_compile "$LINENO"; then : | |
4712bde3 | 5393 | support_cet=yes |
8fc8bf80 | 5394 | else |
4712bde3 | 5395 | support_cet=no |
8fc8bf80 L |
5396 | fi |
5397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4712bde3 L |
5398 | if test $support_cet = "no"; then |
5399 | if test x$enable_bootstrap != xno \ | |
5400 | && test -z "${with_build_subdir}" \ | |
5401 | && (test ! -f ../stage_current \ | |
5402 | || test `cat ../stage_current` != "stage1"); then | |
5403 | # Require CET support only for the final GCC build. | |
5404 | as_fn_error $? "compiler and assembler with CET support are required for --enable-cet" "$LINENO" 5 | |
5405 | else | |
5406 | # Don't enable CET without CET support for non-bootstrap | |
5407 | # build, in stage1 nor for build support. | |
5408 | enable_cet=no | |
5409 | fi | |
5410 | fi | |
8fc8bf80 L |
5411 | ;; |
5412 | esac | |
9051b548 | 5413 | CFLAGS="$cet_save_CFLAGS" |
8fc8bf80 L |
5414 | ;; |
5415 | *) | |
5416 | may_have_cet=no | |
5417 | enable_cet=no | |
5418 | ;; | |
5419 | esac | |
5420 | ||
9051b548 | 5421 | cet_save_CFLAGS="$CFLAGS" |
eedc73a2 | 5422 | CFLAGS="$CFLAGS -fcf-protection=none" |
9051b548 | 5423 | cet_save_LDFLAGS="$LDFLAGS" |
eedc73a2 L |
5424 | LDFLAGS="$LDFLAGS -Wl,-z,ibt,-z,shstk" |
5425 | if test x$may_have_cet = xyes; then | |
5426 | # Check whether -fcf-protection=none -Wl,-z,ibt,-z,shstk work. | |
5427 | if test x$gcc_no_link = xyes; then | |
5428 | as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 | |
5429 | fi | |
5430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5431 | /* end confdefs.h. */ | |
5432 | ||
5433 | int | |
5434 | main () | |
5435 | { | |
5436 | return 0; | |
5437 | ; | |
5438 | return 0; | |
5439 | } | |
5440 | _ACEOF | |
5441 | if ac_fn_c_try_link "$LINENO"; then : | |
5442 | may_have_cet=yes | |
5443 | else | |
5444 | may_have_cet=no | |
5445 | fi | |
5446 | rm -f core conftest.err conftest.$ac_objext \ | |
5447 | conftest$ac_exeext conftest.$ac_ext | |
5448 | fi | |
5449 | ||
8fc8bf80 | 5450 | if test x$may_have_cet = xyes; then |
d17cdc17 L |
5451 | if test x$cross_compiling = xno; then |
5452 | if test "$cross_compiling" = yes; then : | |
8fc8bf80 L |
5453 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
5454 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5455 | as_fn_error $? "cannot run test program while cross compiling | |
5456 | See \`config.log' for more details" "$LINENO" 5; } | |
5457 | else | |
5458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5459 | /* end confdefs.h. */ | |
5460 | ||
fd7eb4bc L |
5461 | int |
5462 | main () | |
5463 | { | |
5464 | asm ("endbr32"); | |
5465 | return 0; | |
5466 | } | |
5467 | ||
5468 | _ACEOF | |
5469 | if ac_fn_c_try_run "$LINENO"; then : | |
5470 | have_multi_byte_nop=yes | |
5471 | else | |
5472 | have_multi_byte_nop=no | |
5473 | fi | |
5474 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5475 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5476 | fi | |
5477 | ||
5478 | have_cet=no | |
5479 | if test x$have_multi_byte_nop = xyes; then | |
5480 | if test "$cross_compiling" = yes; then : | |
5481 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5482 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5483 | as_fn_error $? "cannot run test program while cross compiling | |
5484 | See \`config.log' for more details" "$LINENO" 5; } | |
5485 | else | |
5486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5487 | /* end confdefs.h. */ | |
5488 | ||
8fc8bf80 L |
5489 | static void |
5490 | foo (void) | |
5491 | { | |
5492 | } | |
5493 | ||
5494 | static void | |
5495 | __attribute__ ((noinline, noclone)) | |
5496 | xxx (void (*f) (void)) | |
5497 | { | |
5498 | f (); | |
5499 | } | |
5500 | ||
5501 | static void | |
5502 | __attribute__ ((noinline, noclone)) | |
5503 | bar (void) | |
5504 | { | |
5505 | xxx (foo); | |
5506 | } | |
5507 | ||
5508 | int | |
5509 | main () | |
5510 | { | |
5511 | bar (); | |
5512 | return 0; | |
5513 | } | |
5514 | ||
5515 | _ACEOF | |
5516 | if ac_fn_c_try_run "$LINENO"; then : | |
5517 | have_cet=no | |
5518 | else | |
5519 | have_cet=yes | |
5520 | fi | |
5521 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5522 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5523 | fi | |
5524 | ||
fd7eb4bc | 5525 | fi |
d17cdc17 L |
5526 | if test x$enable_cet = xno -a x$have_cet = xyes; then |
5527 | as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5 | |
5528 | fi | |
8fc8bf80 | 5529 | fi |
d17cdc17 L |
5530 | else |
5531 | # Enable CET in cross compiler if possible so that it will run on both | |
5532 | # CET and non-CET hosts. | |
5533 | have_cet=yes | |
8fc8bf80 L |
5534 | fi |
5535 | if test x$enable_cet = xyes; then | |
5536 | CET_HOST_FLAGS="-fcf-protection" | |
5537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5538 | $as_echo "yes" >&6; } | |
5539 | else | |
5540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5541 | $as_echo "no" >&6; } | |
5542 | fi | |
9051b548 L |
5543 | CFLAGS="$cet_save_CFLAGS" |
5544 | LDFLAGS="$cet_save_LDFLAGS" | |
8fc8bf80 L |
5545 | |
5546 | ||
5547 | ||
769b009e KC |
5548 | echo "# Warning: this fragment is automatically generated" > temp-frag |
5549 | ||
c91c9c2e PB |
5550 | if [ -n "${frag}" ] && [ -f "${frag}" ]; then |
5551 | echo "Appending ${frag} to xhost-mkfrag" | |
5552 | echo "# Following fragment copied from ${frag}" >> temp-frag | |
5553 | cat ${frag} >> temp-frag | |
5554 | fi | |
769b009e KC |
5555 | |
5556 | # record if we want to build shared libs. | |
5557 | if [ "${shared}" = "yes" ]; then | |
5558 | echo enable_shared = yes >> temp-frag | |
5559 | else | |
5560 | echo enable_shared = no >> temp-frag | |
5561 | fi | |
5562 | ||
5563 | frag=xhost-mkfrag | |
5564 | ${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag | |
5565 | ||
0bc0cd11 JL |
5566 | host_makefile_frag=${frag} |
5567 | ||
5568 | ||
5569 | # It's OK to check for header files. Although the compiler may not be | |
5570 | # able to link anything, it had better be able to at least compile | |
5571 | # something. | |
52ae149d | 5572 | for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h |
5213506e RW |
5573 | do : |
5574 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5575 | ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" | |
22e05272 | 5576 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
238235ef | 5577 | cat >>confdefs.h <<_ACEOF |
5213506e | 5578 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
238235ef DJ |
5579 | _ACEOF |
5580 | ||
5581 | fi | |
238235ef DJ |
5582 | done |
5583 | ||
5213506e RW |
5584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
5585 | $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } | |
22e05272 | 5586 | if ${ac_cv_header_sys_wait_h+:} false; then : |
5213506e | 5587 | $as_echo_n "(cached) " >&6 |
238235ef | 5588 | else |
5213506e | 5589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
238235ef | 5590 | /* end confdefs.h. */ |
d3982b71 | 5591 | #include <sys/types.h> |
238235ef DJ |
5592 | #include <sys/wait.h> |
5593 | #ifndef WEXITSTATUS | |
5213506e | 5594 | # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) |
fdfc290b | 5595 | #endif |
238235ef DJ |
5596 | #ifndef WIFEXITED |
5597 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
5598 | #endif | |
5599 | ||
5600 | int | |
5601 | main () | |
5602 | { | |
5603 | int s; | |
5604 | wait (&s); | |
5605 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
5606 | ; | |
5607 | return 0; | |
5608 | } | |
5609 | _ACEOF | |
5213506e | 5610 | if ac_fn_c_try_compile "$LINENO"; then : |
238235ef | 5611 | ac_cv_header_sys_wait_h=yes |
d3982b71 | 5612 | else |
5213506e | 5613 | ac_cv_header_sys_wait_h=no |
d3982b71 | 5614 | fi |
5213506e | 5615 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
238235ef | 5616 | fi |
5213506e RW |
5617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 |
5618 | $as_echo "$ac_cv_header_sys_wait_h" >&6; } | |
238235ef DJ |
5619 | if test $ac_cv_header_sys_wait_h = yes; then |
5620 | ||
5213506e | 5621 | $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h |
b033df90 DJ |
5622 | |
5623 | fi | |
5624 | ||
5213506e RW |
5625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
5626 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } | |
22e05272 | 5627 | if ${ac_cv_header_time+:} false; then : |
5213506e | 5628 | $as_echo_n "(cached) " >&6 |
b033df90 | 5629 | else |
5213506e | 5630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b033df90 DJ |
5631 | /* end confdefs.h. */ |
5632 | #include <sys/types.h> | |
5633 | #include <sys/time.h> | |
5634 | #include <time.h> | |
5635 | ||
5636 | int | |
5637 | main () | |
5638 | { | |
5639 | if ((struct tm *) 0) | |
5640 | return 0; | |
5641 | ; | |
5642 | return 0; | |
5643 | } | |
5644 | _ACEOF | |
5213506e | 5645 | if ac_fn_c_try_compile "$LINENO"; then : |
b033df90 DJ |
5646 | ac_cv_header_time=yes |
5647 | else | |
5213506e | 5648 | ac_cv_header_time=no |
b033df90 | 5649 | fi |
5213506e | 5650 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b033df90 | 5651 | fi |
5213506e RW |
5652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
5653 | $as_echo "$ac_cv_header_time" >&6; } | |
b033df90 DJ |
5654 | if test $ac_cv_header_time = yes; then |
5655 | ||
5213506e | 5656 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
b033df90 DJ |
5657 | |
5658 | fi | |
5659 | ||
5660 | ||
2b601678 MK |
5661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether errno must be declared" >&5 |
5662 | $as_echo_n "checking whether errno must be declared... " >&6; } | |
22e05272 | 5663 | if ${libiberty_cv_declare_errno+:} false; then : |
2b601678 MK |
5664 | $as_echo_n "(cached) " >&6 |
5665 | else | |
5666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5667 | /* end confdefs.h. */ | |
5668 | #include <errno.h> | |
5669 | int | |
5670 | main () | |
5671 | { | |
5672 | int x = errno; | |
5673 | ; | |
5674 | return 0; | |
5675 | } | |
5676 | _ACEOF | |
5677 | if ac_fn_c_try_compile "$LINENO"; then : | |
5678 | libiberty_cv_declare_errno=no | |
5679 | else | |
5680 | libiberty_cv_declare_errno=yes | |
5681 | fi | |
5682 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5683 | fi | |
5684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libiberty_cv_declare_errno" >&5 | |
5685 | $as_echo "$libiberty_cv_declare_errno" >&6; } | |
5686 | if test $libiberty_cv_declare_errno = yes | |
5687 | then | |
5688 | $as_echo "#define NEED_DECLARATION_ERRNO 1" >>confdefs.h | |
5689 | ||
5690 | fi | |
5691 | ||
b033df90 | 5692 | |
ea41822a | 5693 | # Determine sizes of some types. |
5213506e RW |
5694 | # The cast to long int works around a bug in the HP C Compiler |
5695 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5696 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5697 | # This bug is HP SR number 8606223364. | |
5698 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 | |
5699 | $as_echo_n "checking size of int... " >&6; } | |
22e05272 | 5700 | if ${ac_cv_sizeof_int+:} false; then : |
5213506e RW |
5701 | $as_echo_n "(cached) " >&6 |
5702 | else | |
5703 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : | |
5704 | ||
5705 | else | |
5706 | if test "$ac_cv_type_int" = yes; then | |
5707 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5708 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
5709 | as_fn_error 77 "cannot compute sizeof (int) |
5710 | See \`config.log' for more details" "$LINENO" 5; } | |
5213506e RW |
5711 | else |
5712 | ac_cv_sizeof_int=0 | |
5713 | fi | |
b033df90 | 5714 | fi |
b033df90 | 5715 | |
5213506e RW |
5716 | fi |
5717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 | |
5718 | $as_echo "$ac_cv_sizeof_int" >&6; } | |
b033df90 | 5719 | |
b033df90 | 5720 | |
b033df90 | 5721 | |
5213506e RW |
5722 | cat >>confdefs.h <<_ACEOF |
5723 | #define SIZEOF_INT $ac_cv_sizeof_int | |
b033df90 | 5724 | _ACEOF |
b033df90 | 5725 | |
b033df90 | 5726 | |
ea41822a YG |
5727 | # The cast to long int works around a bug in the HP C Compiler |
5728 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5729 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5730 | # This bug is HP SR number 8606223364. | |
5731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5732 | $as_echo_n "checking size of long... " >&6; } | |
22e05272 | 5733 | if ${ac_cv_sizeof_long+:} false; then : |
ea41822a YG |
5734 | $as_echo_n "(cached) " >&6 |
5735 | else | |
5736 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : | |
5737 | ||
5738 | else | |
5739 | if test "$ac_cv_type_long" = yes; then | |
5740 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5741 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
5742 | as_fn_error 77 "cannot compute sizeof (long) |
5743 | See \`config.log' for more details" "$LINENO" 5; } | |
ea41822a YG |
5744 | else |
5745 | ac_cv_sizeof_long=0 | |
5746 | fi | |
5747 | fi | |
5748 | ||
5749 | fi | |
5750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 | |
5751 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
5752 | ||
5753 | ||
5754 | ||
5755 | cat >>confdefs.h <<_ACEOF | |
5756 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5757 | _ACEOF | |
5758 | ||
5759 | ||
126e0b6b AM |
5760 | # The cast to long int works around a bug in the HP C Compiler |
5761 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5762 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5763 | # This bug is HP SR number 8606223364. | |
5764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 | |
5765 | $as_echo_n "checking size of size_t... " >&6; } | |
22e05272 | 5766 | if ${ac_cv_sizeof_size_t+:} false; then : |
126e0b6b AM |
5767 | $as_echo_n "(cached) " >&6 |
5768 | else | |
5769 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : | |
5770 | ||
5771 | else | |
5772 | if test "$ac_cv_type_size_t" = yes; then | |
5773 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5774 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
5775 | as_fn_error 77 "cannot compute sizeof (size_t) |
5776 | See \`config.log' for more details" "$LINENO" 5; } | |
126e0b6b AM |
5777 | else |
5778 | ac_cv_sizeof_size_t=0 | |
5779 | fi | |
5780 | fi | |
5781 | ||
5782 | fi | |
5783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 | |
5784 | $as_echo "$ac_cv_sizeof_size_t" >&6; } | |
5785 | ||
5786 | ||
5787 | ||
5788 | cat >>confdefs.h <<_ACEOF | |
5789 | #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t | |
5790 | _ACEOF | |
5791 | ||
5792 | ||
ea41822a YG |
5793 | |
5794 | # Check for presense of long long | |
5795 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" | |
22e05272 | 5796 | if test "x$ac_cv_type_long_long" = xyes; then : |
ea41822a YG |
5797 | |
5798 | $as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h | |
5799 | # The cast to long int works around a bug in the HP C Compiler | |
5800 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5801 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5802 | # This bug is HP SR number 8606223364. | |
5803 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
5804 | $as_echo_n "checking size of long long... " >&6; } | |
22e05272 | 5805 | if ${ac_cv_sizeof_long_long+:} false; then : |
ea41822a YG |
5806 | $as_echo_n "(cached) " >&6 |
5807 | else | |
5808 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : | |
5809 | ||
5810 | else | |
5811 | if test "$ac_cv_type_long_long" = yes; then | |
5812 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5813 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
22e05272 JM |
5814 | as_fn_error 77 "cannot compute sizeof (long long) |
5815 | See \`config.log' for more details" "$LINENO" 5; } | |
ea41822a YG |
5816 | else |
5817 | ac_cv_sizeof_long_long=0 | |
5818 | fi | |
5819 | fi | |
5820 | ||
5821 | fi | |
5822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
5823 | $as_echo "$ac_cv_sizeof_long_long" >&6; } | |
5824 | ||
5825 | ||
5826 | ||
5827 | cat >>confdefs.h <<_ACEOF | |
5828 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5829 | _ACEOF | |
5830 | ||
5831 | ||
5832 | fi | |
5833 | ||
b033df90 | 5834 | |
5213506e RW |
5835 | # Look for a 64-bit type. |
5836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a 64-bit type" >&5 | |
5837 | $as_echo_n "checking for a 64-bit type... " >&6; } | |
22e05272 | 5838 | if ${liberty_cv_uint64+:} false; then : |
5213506e | 5839 | $as_echo_n "(cached) " >&6 |
238235ef | 5840 | else |
5213506e RW |
5841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5842 | /* end confdefs.h. */ | |
5843 | #ifdef HAVE_STDINT_H | |
5844 | #include <stdint.h> | |
5845 | #endif | |
5846 | int | |
5847 | main () | |
5848 | { | |
5849 | extern uint64_t foo; | |
5850 | ; | |
5851 | return 0; | |
5852 | } | |
238235ef | 5853 | _ACEOF |
5213506e RW |
5854 | if ac_fn_c_try_compile "$LINENO"; then : |
5855 | liberty_cv_uint64=uint64_t | |
5856 | else | |
5857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
238235ef | 5858 | /* end confdefs.h. */ |
5213506e RW |
5859 | #ifdef HAVE_LIMITS_H |
5860 | #include <limits.h> | |
5861 | #endif | |
5862 | #ifndef CHAR_BIT | |
5863 | #define CHAR_BIT 8 | |
b033df90 | 5864 | #endif |
238235ef DJ |
5865 | int |
5866 | main () | |
5867 | { | |
5213506e RW |
5868 | extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1]; |
5869 | ; | |
5870 | return 0; | |
238235ef DJ |
5871 | } |
5872 | _ACEOF | |
5213506e RW |
5873 | if ac_fn_c_try_compile "$LINENO"; then : |
5874 | liberty_cv_uint64="unsigned long" | |
238235ef | 5875 | else |
5213506e RW |
5876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
5877 | /* end confdefs.h. */ | |
5878 | #ifdef HAVE_LIMITS_H | |
5879 | #include <limits.h> | |
5880 | #endif | |
5881 | #ifndef CHAR_BIT | |
5882 | #define CHAR_BIT 8 | |
5883 | #endif | |
5884 | int | |
5885 | main () | |
5886 | { | |
5887 | extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1]; | |
5888 | ; | |
5889 | return 0; | |
5890 | } | |
5891 | _ACEOF | |
5892 | if ac_fn_c_try_compile "$LINENO"; then : | |
5893 | liberty_cv_uint64="unsigned long long" | |
5894 | else | |
5895 | liberty_cv_uint64=none | |
238235ef | 5896 | fi |
5213506e | 5897 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
238235ef | 5898 | fi |
5213506e | 5899 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b033df90 | 5900 | fi |
5213506e | 5901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b033df90 | 5902 | fi |
238235ef | 5903 | |
5213506e RW |
5904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liberty_cv_uint64" >&5 |
5905 | $as_echo "$liberty_cv_uint64" >&6; } | |
5906 | if test "$liberty_cv_uint64" != none; then | |
5907 | ||
5908 | cat >>confdefs.h <<_ACEOF | |
5909 | #define UNSIGNED_64BIT_TYPE $liberty_cv_uint64 | |
238235ef DJ |
5910 | _ACEOF |
5911 | ||
5912 | fi | |
5913 | ||
0e497905 OS |
5914 | |
5915 | ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" | |
22e05272 | 5916 | if test "x$ac_cv_type_intptr_t" = xyes; then : |
0e497905 OS |
5917 | |
5918 | $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h | |
5919 | ||
5920 | else | |
5921 | for ac_type in 'int' 'long int' 'long long int'; do | |
5922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5923 | /* end confdefs.h. */ | |
5924 | $ac_includes_default | |
5925 | int | |
5926 | main () | |
5927 | { | |
5928 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
22e05272 JM |
5929 | test_array [0] = 0; |
5930 | return test_array [0]; | |
0e497905 OS |
5931 | |
5932 | ; | |
5933 | return 0; | |
5934 | } | |
5935 | _ACEOF | |
5936 | if ac_fn_c_try_compile "$LINENO"; then : | |
5937 | ||
5938 | cat >>confdefs.h <<_ACEOF | |
5939 | #define intptr_t $ac_type | |
5940 | _ACEOF | |
5941 | ||
5942 | ac_type= | |
5943 | fi | |
5944 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5945 | test -z "$ac_type" && break | |
5946 | done | |
5947 | fi | |
5948 | ||
5949 | ||
5950 | ||
5951 | ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" | |
22e05272 | 5952 | if test "x$ac_cv_type_uintptr_t" = xyes; then : |
0e497905 OS |
5953 | |
5954 | $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h | |
5955 | ||
5956 | else | |
5957 | for ac_type in 'unsigned int' 'unsigned long int' \ | |
5958 | 'unsigned long long int'; do | |
5959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5960 | /* end confdefs.h. */ | |
5961 | $ac_includes_default | |
5962 | int | |
5963 | main () | |
5964 | { | |
5965 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
22e05272 JM |
5966 | test_array [0] = 0; |
5967 | return test_array [0]; | |
0e497905 OS |
5968 | |
5969 | ; | |
5970 | return 0; | |
5971 | } | |
5972 | _ACEOF | |
5973 | if ac_fn_c_try_compile "$LINENO"; then : | |
5974 | ||
5975 | cat >>confdefs.h <<_ACEOF | |
5976 | #define uintptr_t $ac_type | |
5977 | _ACEOF | |
5978 | ||
5979 | ac_type= | |
5980 | fi | |
5981 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5982 | test -z "$ac_type" && break | |
5983 | done | |
5984 | fi | |
5985 | ||
5986 | ||
1cfabf34 | 5987 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" |
22e05272 | 5988 | if test "x$ac_cv_type_ssize_t" = xyes; then : |
1cfabf34 ILT |
5989 | |
5990 | else | |
5991 | ||
5992 | cat >>confdefs.h <<_ACEOF | |
5993 | #define ssize_t int | |
5994 | _ACEOF | |
5995 | ||
5996 | fi | |
5997 | ||
0e497905 | 5998 | |
5213506e RW |
5999 | # Given the above check, we always have uintptr_t or a fallback |
6000 | # definition. So define HAVE_UINTPTR_T in case any imported code | |
6001 | # relies on it. | |
238235ef | 6002 | |
5213506e | 6003 | $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h |
b033df90 DJ |
6004 | |
6005 | ||
5213506e | 6006 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
22e05272 | 6007 | if test "x$ac_cv_type_pid_t" = xyes; then : |
b033df90 | 6008 | |
5213506e | 6009 | else |
b033df90 | 6010 | |
5213506e RW |
6011 | cat >>confdefs.h <<_ACEOF |
6012 | #define pid_t int | |
6013 | _ACEOF | |
b033df90 | 6014 | |
5213506e | 6015 | fi |
b033df90 DJ |
6016 | |
6017 | ||
5213506e RW |
6018 | # This is the list of functions which libiberty will provide if they |
6019 | # are not available on the host. | |
b033df90 | 6020 | |
5213506e RW |
6021 | funcs="asprintf" |
6022 | funcs="$funcs atexit" | |
6023 | funcs="$funcs basename" | |
6024 | funcs="$funcs bcmp" | |
6025 | funcs="$funcs bcopy" | |
6026 | funcs="$funcs bsearch" | |
6027 | funcs="$funcs bzero" | |
6028 | funcs="$funcs calloc" | |
6029 | funcs="$funcs clock" | |
6030 | funcs="$funcs ffs" | |
6031 | funcs="$funcs getcwd" | |
6032 | funcs="$funcs getpagesize" | |
6033 | funcs="$funcs gettimeofday" | |
6034 | funcs="$funcs index" | |
6035 | funcs="$funcs insque" | |
6036 | funcs="$funcs memchr" | |
6037 | funcs="$funcs memcmp" | |
6038 | funcs="$funcs memcpy" | |
6039 | funcs="$funcs memmem" | |
6040 | funcs="$funcs memmove" | |
6041 | funcs="$funcs mempcpy" | |
6042 | funcs="$funcs memset" | |
6043 | funcs="$funcs mkstemps" | |
6044 | funcs="$funcs putenv" | |
6045 | funcs="$funcs random" | |
6046 | funcs="$funcs rename" | |
6047 | funcs="$funcs rindex" | |
6048 | funcs="$funcs setenv" | |
6049 | funcs="$funcs snprintf" | |
6050 | funcs="$funcs sigsetmask" | |
6051 | funcs="$funcs stpcpy" | |
6052 | funcs="$funcs stpncpy" | |
6053 | funcs="$funcs strcasecmp" | |
6054 | funcs="$funcs strchr" | |
6055 | funcs="$funcs strdup" | |
6056 | funcs="$funcs strncasecmp" | |
6057 | funcs="$funcs strndup" | |
9a9baa52 | 6058 | funcs="$funcs strnlen" |
5213506e RW |
6059 | funcs="$funcs strrchr" |
6060 | funcs="$funcs strstr" | |
6061 | funcs="$funcs strtod" | |
6062 | funcs="$funcs strtol" | |
6063 | funcs="$funcs strtoul" | |
ea41822a YG |
6064 | funcs="$funcs strtoll" |
6065 | funcs="$funcs strtoull" | |
5213506e RW |
6066 | funcs="$funcs strverscmp" |
6067 | funcs="$funcs tmpnam" | |
6068 | funcs="$funcs vasprintf" | |
6069 | funcs="$funcs vfprintf" | |
6070 | funcs="$funcs vprintf" | |
6071 | funcs="$funcs vsnprintf" | |
6072 | funcs="$funcs vsprintf" | |
6073 | funcs="$funcs waitpid" | |
6e9bd0f8 | 6074 | funcs="$funcs setproctitle" |
238235ef | 6075 | |
5213506e RW |
6076 | # Also in the old function.def file: alloca, vfork, getopt. |
6077 | ||
6078 | vars="sys_errlist sys_nerr sys_siglist" | |
6079 | ||
d423df48 | 6080 | checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \ |
df1346b4 | 6081 | getsysinfo gettimeofday on_exit pipe2 psignal pstat_getdynamic pstat_getstatic \ |
fbb334a6 | 6082 | realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \ |
d423df48 | 6083 | sysmp table times wait3 wait4" |
5213506e | 6084 | |
fbb334a6 IS |
6085 | #Â Darwin has sbrk, but it is deprecated and that produces build-time warnings |
6086 | #Â so do not check for it. | |
6087 | case "${host}" in | |
6088 | *-*-darwin*) ;; | |
6089 | *) checkfuncs="$checkfuncs sbrk" | |
6090 | esac | |
6091 | ||
5213506e RW |
6092 | # These are neither executed nor required, but they help keep |
6093 | # autoheader happy without adding a bunch of text to acconfig.h. | |
6094 | if test "x" = "y"; then | |
59a8dc25 BE |
6095 | for ac_func in asprintf atexit \ |
6096 | basename bcmp bcopy bsearch bzero \ | |
6097 | calloc canonicalize_file_name clock \ | |
3b63ca7e | 6098 | dup3 \ |
59a8dc25 | 6099 | ffs __fsetlocking \ |
d423df48 | 6100 | getcwd getpagesize getrlimit getrusage getsysinfo gettimeofday \ |
59a8dc25 BE |
6101 | index insque \ |
6102 | memchr memcmp memcpy memmem memmove memset mkstemps \ | |
6103 | on_exit \ | |
df1346b4 | 6104 | pipe2 psignal pstat_getdynamic pstat_getstatic putenv \ |
59a8dc25 | 6105 | random realpath rename rindex \ |
d423df48 | 6106 | sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \ |
3b63ca7e | 6107 | stpcpy stpncpy strcasecmp strchr strdup \ |
9a9baa52 | 6108 | strerror strncasecmp strndup strnlen strrchr strsignal strstr strtod \ |
ea41822a | 6109 | strtol strtoul strtoll strtoull strverscmp sysconf sysctl sysmp \ |
59a8dc25 BE |
6110 | table times tmpnam \ |
6111 | vasprintf vfprintf vprintf vsprintf \ | |
6112 | wait3 wait4 waitpid | |
5213506e RW |
6113 | do : |
6114 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6115 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
22e05272 | 6116 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
b033df90 | 6117 | cat >>confdefs.h <<_ACEOF |
5213506e | 6118 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
238235ef DJ |
6119 | _ACEOF |
6120 | ||
6121 | fi | |
b033df90 | 6122 | done |
238235ef | 6123 | |
22e05272 JM |
6124 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
6125 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
6126 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
5213506e | 6127 | ac_have_decl=1 |
d49d0907 | 6128 | else |
5213506e RW |
6129 | ac_have_decl=0 |
6130 | fi | |
6131 | ||
6132 | cat >>confdefs.h <<_ACEOF | |
6133 | #define HAVE_DECL_BASENAME $ac_have_decl | |
d49d0907 | 6134 | _ACEOF |
5213506e | 6135 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
22e05272 | 6136 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
5213506e | 6137 | ac_have_decl=1 |
d49d0907 | 6138 | else |
5213506e | 6139 | ac_have_decl=0 |
d49d0907 | 6140 | fi |
5213506e RW |
6141 | |
6142 | cat >>confdefs.h <<_ACEOF | |
6143 | #define HAVE_DECL_FFS $ac_have_decl | |
6144 | _ACEOF | |
6145 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" | |
22e05272 | 6146 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
5213506e RW |
6147 | ac_have_decl=1 |
6148 | else | |
6149 | ac_have_decl=0 | |
d49d0907 | 6150 | fi |
d49d0907 | 6151 | |
5213506e RW |
6152 | cat >>confdefs.h <<_ACEOF |
6153 | #define HAVE_DECL_ASPRINTF $ac_have_decl | |
6154 | _ACEOF | |
6155 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" | |
22e05272 | 6156 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
5213506e | 6157 | ac_have_decl=1 |
d49d0907 | 6158 | else |
5213506e RW |
6159 | ac_have_decl=0 |
6160 | fi | |
6161 | ||
6162 | cat >>confdefs.h <<_ACEOF | |
6163 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
d49d0907 | 6164 | _ACEOF |
5213506e | 6165 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
22e05272 | 6166 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
5213506e RW |
6167 | ac_have_decl=1 |
6168 | else | |
6169 | ac_have_decl=0 | |
6170 | fi | |
d49d0907 | 6171 | |
5213506e RW |
6172 | cat >>confdefs.h <<_ACEOF |
6173 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
d49d0907 | 6174 | _ACEOF |
5213506e | 6175 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" |
22e05272 | 6176 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
5213506e RW |
6177 | ac_have_decl=1 |
6178 | else | |
6179 | ac_have_decl=0 | |
6180 | fi | |
6181 | ||
6182 | cat >>confdefs.h <<_ACEOF | |
6183 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
d49d0907 | 6184 | _ACEOF |
ea41822a | 6185 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
22e05272 | 6186 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
ea41822a YG |
6187 | ac_have_decl=1 |
6188 | else | |
6189 | ac_have_decl=0 | |
6190 | fi | |
6191 | ||
6192 | cat >>confdefs.h <<_ACEOF | |
6193 | #define HAVE_DECL_STRTOL $ac_have_decl | |
6194 | _ACEOF | |
6195 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
22e05272 | 6196 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
ea41822a YG |
6197 | ac_have_decl=1 |
6198 | else | |
6199 | ac_have_decl=0 | |
6200 | fi | |
6201 | ||
6202 | cat >>confdefs.h <<_ACEOF | |
6203 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
6204 | _ACEOF | |
6205 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
22e05272 | 6206 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
ea41822a YG |
6207 | ac_have_decl=1 |
6208 | else | |
6209 | ac_have_decl=0 | |
6210 | fi | |
6211 | ||
6212 | cat >>confdefs.h <<_ACEOF | |
6213 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
6214 | _ACEOF | |
6215 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
22e05272 | 6216 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
ea41822a YG |
6217 | ac_have_decl=1 |
6218 | else | |
6219 | ac_have_decl=0 | |
6220 | fi | |
6221 | ||
6222 | cat >>confdefs.h <<_ACEOF | |
6223 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
6224 | _ACEOF | |
63d9caf9 | 6225 | ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" |
22e05272 | 6226 | if test "x$ac_cv_have_decl_strnlen" = xyes; then : |
63d9caf9 DD |
6227 | ac_have_decl=1 |
6228 | else | |
6229 | ac_have_decl=0 | |
6230 | fi | |
6231 | ||
6232 | cat >>confdefs.h <<_ACEOF | |
6233 | #define HAVE_DECL_STRNLEN $ac_have_decl | |
6234 | _ACEOF | |
d49d0907 | 6235 | |
d49d0907 | 6236 | |
5213506e | 6237 | $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h |
d49d0907 | 6238 | |
d49d0907 | 6239 | |
5213506e | 6240 | $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h |
d49d0907 | 6241 | |
d49d0907 | 6242 | |
5213506e | 6243 | $as_echo "#define HAVE_SYS_SIGLIST 1" >>confdefs.h |
d49d0907 | 6244 | |
d49d0907 | 6245 | fi |
d49d0907 | 6246 | |
5213506e RW |
6247 | # For each of these functions, if the host does not provide the |
6248 | # function we want to put FN.o in LIBOBJS, and if the host does | |
6249 | # provide the function, we want to define HAVE_FN in config.h. | |
d49d0907 | 6250 | |
5213506e RW |
6251 | setobjs= |
6252 | CHECK= | |
5213506e | 6253 | if test -n "${with_target_subdir}"; then |
d49d0907 | 6254 | |
5213506e RW |
6255 | # We are being configured as a target library. AC_REPLACE_FUNCS |
6256 | # may not work correctly, because the compiler may not be able to | |
6257 | # link executables. Note that we may still be being configured | |
6258 | # native. | |
d49d0907 | 6259 | |
5213506e RW |
6260 | # If we are being configured for newlib, we know which functions |
6261 | # newlib provide and which ones we will be expected to provide. | |
d49d0907 | 6262 | |
5213506e RW |
6263 | if test "x${with_newlib}" = "xyes"; then |
6264 | case " $LIBOBJS " in | |
6265 | *" asprintf.$ac_objext "* ) ;; | |
6266 | *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" | |
6267 | ;; | |
6268 | esac | |
d49d0907 | 6269 | |
5213506e RW |
6270 | case " $LIBOBJS " in |
6271 | *" basename.$ac_objext "* ) ;; | |
6272 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" | |
6273 | ;; | |
6274 | esac | |
d49d0907 | 6275 | |
5213506e RW |
6276 | case " $LIBOBJS " in |
6277 | *" insque.$ac_objext "* ) ;; | |
6278 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" | |
6279 | ;; | |
6280 | esac | |
d49d0907 | 6281 | |
5213506e RW |
6282 | case " $LIBOBJS " in |
6283 | *" random.$ac_objext "* ) ;; | |
6284 | *) LIBOBJS="$LIBOBJS random.$ac_objext" | |
6285 | ;; | |
6286 | esac | |
d3982b71 | 6287 | |
5213506e RW |
6288 | case " $LIBOBJS " in |
6289 | *" strdup.$ac_objext "* ) ;; | |
6290 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" | |
6291 | ;; | |
6292 | esac | |
238235ef | 6293 | |
5213506e RW |
6294 | case " $LIBOBJS " in |
6295 | *" vasprintf.$ac_objext "* ) ;; | |
6296 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" | |
6297 | ;; | |
6298 | esac | |
6299 | ||
6300 | ||
6301 | for f in $funcs; do | |
6302 | case "$f" in | |
6303 | asprintf | basename | insque | random | strdup | vasprintf) | |
6304 | ;; | |
6305 | *) | |
6306 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6307 | cat >>confdefs.h <<_ACEOF | |
6308 | #define $n 1 | |
238235ef | 6309 | _ACEOF |
fdfc290b | 6310 | |
5213506e RW |
6311 | ;; |
6312 | esac | |
6313 | done | |
238235ef | 6314 | |
5213506e RW |
6315 | # newlib doesnt provide any of the variables in $vars, so we |
6316 | # dont have to check them here. | |
238235ef | 6317 | |
5213506e RW |
6318 | # Of the functions in $checkfuncs, newlib only has strerror. |
6319 | $as_echo "#define HAVE_STRERROR 1" >>confdefs.h | |
238235ef DJ |
6320 | |
6321 | ||
5213506e | 6322 | setobjs=yes |
238235ef | 6323 | |
5213506e | 6324 | fi |
238235ef | 6325 | |
5213506e RW |
6326 | # If we are being configured for Mingw, we know which functions |
6327 | # Mingw provides and which ones we will be expected to provide. | |
238235ef | 6328 | |
5213506e RW |
6329 | case "${host}" in |
6330 | *-*-mingw*) | |
6331 | case " $LIBOBJS " in | |
6332 | *" asprintf.$ac_objext "* ) ;; | |
6333 | *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" | |
6334 | ;; | |
6335 | esac | |
238235ef | 6336 | |
5213506e RW |
6337 | case " $LIBOBJS " in |
6338 | *" basename.$ac_objext "* ) ;; | |
6339 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" | |
6340 | ;; | |
6341 | esac | |
238235ef | 6342 | |
5213506e RW |
6343 | case " $LIBOBJS " in |
6344 | *" bcmp.$ac_objext "* ) ;; | |
6345 | *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" | |
6346 | ;; | |
6347 | esac | |
238235ef | 6348 | |
5213506e RW |
6349 | case " $LIBOBJS " in |
6350 | *" bcopy.$ac_objext "* ) ;; | |
6351 | *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" | |
6352 | ;; | |
6353 | esac | |
238235ef | 6354 | |
5213506e RW |
6355 | case " $LIBOBJS " in |
6356 | *" bzero.$ac_objext "* ) ;; | |
6357 | *) LIBOBJS="$LIBOBJS bzero.$ac_objext" | |
6358 | ;; | |
6359 | esac | |
238235ef | 6360 | |
5213506e RW |
6361 | case " $LIBOBJS " in |
6362 | *" clock.$ac_objext "* ) ;; | |
6363 | *) LIBOBJS="$LIBOBJS clock.$ac_objext" | |
6364 | ;; | |
6365 | esac | |
238235ef | 6366 | |
5213506e RW |
6367 | case " $LIBOBJS " in |
6368 | *" ffs.$ac_objext "* ) ;; | |
6369 | *) LIBOBJS="$LIBOBJS ffs.$ac_objext" | |
6370 | ;; | |
6371 | esac | |
238235ef | 6372 | |
5213506e RW |
6373 | case " $LIBOBJS " in |
6374 | *" getpagesize.$ac_objext "* ) ;; | |
6375 | *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" | |
6376 | ;; | |
6377 | esac | |
238235ef | 6378 | |
5213506e RW |
6379 | case " $LIBOBJS " in |
6380 | *" index.$ac_objext "* ) ;; | |
6381 | *) LIBOBJS="$LIBOBJS index.$ac_objext" | |
6382 | ;; | |
6383 | esac | |
238235ef | 6384 | |
5213506e RW |
6385 | case " $LIBOBJS " in |
6386 | *" insque.$ac_objext "* ) ;; | |
6387 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" | |
6388 | ;; | |
6389 | esac | |
238235ef | 6390 | |
5213506e RW |
6391 | case " $LIBOBJS " in |
6392 | *" mempcpy.$ac_objext "* ) ;; | |
6393 | *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" | |
6394 | ;; | |
6395 | esac | |
238235ef | 6396 | |
5213506e RW |
6397 | case " $LIBOBJS " in |
6398 | *" mkstemps.$ac_objext "* ) ;; | |
6399 | *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" | |
6400 | ;; | |
6401 | esac | |
238235ef | 6402 | |
5213506e RW |
6403 | case " $LIBOBJS " in |
6404 | *" random.$ac_objext "* ) ;; | |
6405 | *) LIBOBJS="$LIBOBJS random.$ac_objext" | |
6406 | ;; | |
6407 | esac | |
238235ef | 6408 | |
5213506e RW |
6409 | case " $LIBOBJS " in |
6410 | *" rindex.$ac_objext "* ) ;; | |
6411 | *) LIBOBJS="$LIBOBJS rindex.$ac_objext" | |
6412 | ;; | |
6413 | esac | |
238235ef | 6414 | |
5213506e RW |
6415 | case " $LIBOBJS " in |
6416 | *" sigsetmask.$ac_objext "* ) ;; | |
6417 | *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" | |
6418 | ;; | |
6419 | esac | |
238235ef | 6420 | |
5213506e RW |
6421 | case " $LIBOBJS " in |
6422 | *" stpcpy.$ac_objext "* ) ;; | |
6423 | *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" | |
6424 | ;; | |
6425 | esac | |
238235ef | 6426 | |
5213506e RW |
6427 | case " $LIBOBJS " in |
6428 | *" stpncpy.$ac_objext "* ) ;; | |
6429 | *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" | |
6430 | ;; | |
6431 | esac | |
238235ef | 6432 | |
5213506e RW |
6433 | case " $LIBOBJS " in |
6434 | *" strndup.$ac_objext "* ) ;; | |
6435 | *) LIBOBJS="$LIBOBJS strndup.$ac_objext" | |
6436 | ;; | |
6437 | esac | |
238235ef | 6438 | |
9a9baa52 ILT |
6439 | case " $LIBOBJS " in |
6440 | *" strnlen.$ac_objext "* ) ;; | |
6441 | *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" | |
6442 | ;; | |
6443 | esac | |
6444 | ||
5213506e RW |
6445 | case " $LIBOBJS " in |
6446 | *" strverscmp.$ac_objext "* ) ;; | |
6447 | *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" | |
6448 | ;; | |
6449 | esac | |
238235ef | 6450 | |
5213506e RW |
6451 | case " $LIBOBJS " in |
6452 | *" vasprintf.$ac_objext "* ) ;; | |
6453 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" | |
6454 | ;; | |
6455 | esac | |
238235ef | 6456 | |
5213506e RW |
6457 | case " $LIBOBJS " in |
6458 | *" waitpid.$ac_objext "* ) ;; | |
6459 | *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" | |
6460 | ;; | |
6461 | esac | |
238235ef DJ |
6462 | |
6463 | ||
5213506e RW |
6464 | for f in $funcs; do |
6465 | case "$f" in | |
9a9baa52 | 6466 | asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strnlen | strverscmp | vasprintf | waitpid) |
5213506e RW |
6467 | ;; |
6468 | *) | |
6469 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6470 | cat >>confdefs.h <<_ACEOF | |
6471 | #define $n 1 | |
6472 | _ACEOF | |
238235ef | 6473 | |
5213506e RW |
6474 | ;; |
6475 | esac | |
6476 | done | |
238235ef | 6477 | |
5213506e RW |
6478 | # Mingw doesnt provide any of the variables in $vars, so we |
6479 | # dont have to check them here. | |
238235ef | 6480 | |
5213506e RW |
6481 | # Of the functions in $checkfuncs, Mingw only has strerror. |
6482 | $as_echo "#define HAVE_STRERROR 1" >>confdefs.h | |
238235ef DJ |
6483 | |
6484 | ||
5213506e RW |
6485 | setobjs=yes |
6486 | ;; | |
238235ef | 6487 | |
5213506e RW |
6488 | *-*-msdosdjgpp) |
6489 | case " $LIBOBJS " in | |
6490 | *" vasprintf.$ac_objext "* ) ;; | |
6491 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" | |
6492 | ;; | |
6493 | esac | |
238235ef | 6494 | |
5213506e RW |
6495 | case " $LIBOBJS " in |
6496 | *" vsnprintf.$ac_objext "* ) ;; | |
6497 | *) LIBOBJS="$LIBOBJS vsnprintf.$ac_objext" | |
6498 | ;; | |
6499 | esac | |
238235ef | 6500 | |
5213506e RW |
6501 | case " $LIBOBJS " in |
6502 | *" snprintf.$ac_objext "* ) ;; | |
6503 | *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" | |
6504 | ;; | |
6505 | esac | |
238235ef | 6506 | |
5213506e RW |
6507 | case " $LIBOBJS " in |
6508 | *" asprintf.$ac_objext "* ) ;; | |
6509 | *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" | |
6510 | ;; | |
6511 | esac | |
238235ef DJ |
6512 | |
6513 | ||
5213506e RW |
6514 | for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \ |
6515 | getcwd getpagesize getrusage gettimeofday \ | |
6516 | index insque memchr memcmp memcpy memmove memset psignal \ | |
6517 | putenv random rename rindex sbrk setenv stpcpy strcasecmp \ | |
6518 | strchr strdup strerror strncasecmp strrchr strstr strtod \ | |
6519 | strtol strtoul sysconf times tmpnam vfprintf vprintf \ | |
6520 | vsprintf waitpid | |
6521 | do | |
6522 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6523 | cat >>confdefs.h <<_ACEOF | |
6524 | #define $n 1 | |
6525 | _ACEOF | |
238235ef | 6526 | |
5213506e | 6527 | done |
238235ef | 6528 | |
17998b22 | 6529 | |
5213506e RW |
6530 | setobjs=yes |
6531 | ;; | |
17998b22 | 6532 | |
5213506e | 6533 | esac |
f9a9ac80 | 6534 | |
0bc0cd11 | 6535 | else |
238235ef | 6536 | |
5213506e RW |
6537 | # Not a target library, so we set things up to run the test suite. |
6538 | CHECK=really-check | |
0bc0cd11 JL |
6539 | |
6540 | fi | |
6541 | ||
238235ef | 6542 | |
238235ef | 6543 | |
238235ef | 6544 | |
5213506e RW |
6545 | case "${host}" in |
6546 | *-*-cygwin* | *-*-mingw*) | |
6547 | $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h | |
238235ef | 6548 | |
5213506e | 6549 | $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h |
238235ef | 6550 | |
5213506e RW |
6551 | ;; |
6552 | esac | |
0bc0cd11 | 6553 | |
5213506e RW |
6554 | if test -z "${setobjs}"; then |
6555 | case "${host}" in | |
0bc0cd11 | 6556 | |
5213506e RW |
6557 | *-*-vxworks*) |
6558 | # Handle VxWorks configuration specially, since on VxWorks the | |
6559 | # libraries are actually on the target board, not in the file | |
6560 | # system. | |
6561 | case " $LIBOBJS " in | |
6562 | *" basename.$ac_objext "* ) ;; | |
6563 | *) LIBOBJS="$LIBOBJS basename.$ac_objext" | |
6564 | ;; | |
3beb1315 HPN |
6565 | esac |
6566 | ||
5213506e RW |
6567 | case " $LIBOBJS " in |
6568 | *" getpagesize.$ac_objext "* ) ;; | |
6569 | *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" | |
6570 | ;; | |
6571 | esac | |
238235ef | 6572 | |
5213506e RW |
6573 | case " $LIBOBJS " in |
6574 | *" insque.$ac_objext "* ) ;; | |
6575 | *) LIBOBJS="$LIBOBJS insque.$ac_objext" | |
6576 | ;; | |
6577 | esac | |
e490616e | 6578 | |
5213506e RW |
6579 | case " $LIBOBJS " in |
6580 | *" random.$ac_objext "* ) ;; | |
6581 | *) LIBOBJS="$LIBOBJS random.$ac_objext" | |
6582 | ;; | |
6583 | esac | |
238235ef | 6584 | |
5213506e RW |
6585 | case " $LIBOBJS " in |
6586 | *" strcasecmp.$ac_objext "* ) ;; | |
6587 | *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" | |
6588 | ;; | |
6589 | esac | |
238235ef | 6590 | |
5213506e RW |
6591 | case " $LIBOBJS " in |
6592 | *" strncasecmp.$ac_objext "* ) ;; | |
6593 | *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" | |
6594 | ;; | |
3beb1315 HPN |
6595 | esac |
6596 | ||
5213506e RW |
6597 | case " $LIBOBJS " in |
6598 | *" strdup.$ac_objext "* ) ;; | |
6599 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" | |
6600 | ;; | |
6601 | esac | |
e490616e | 6602 | |
5213506e RW |
6603 | case " $LIBOBJS " in |
6604 | *" vfork.$ac_objext "* ) ;; | |
6605 | *) LIBOBJS="$LIBOBJS vfork.$ac_objext" | |
6606 | ;; | |
6607 | esac | |
e490616e | 6608 | |
5213506e RW |
6609 | case " $LIBOBJS " in |
6610 | *" waitpid.$ac_objext "* ) ;; | |
6611 | *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" | |
6612 | ;; | |
6613 | esac | |
238235ef | 6614 | |
5213506e RW |
6615 | case " $LIBOBJS " in |
6616 | *" vasprintf.$ac_objext "* ) ;; | |
6617 | *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" | |
6618 | ;; | |
6619 | esac | |
9ce3f7e5 | 6620 | |
5213506e RW |
6621 | for f in $funcs; do |
6622 | case "$f" in | |
6623 | basename | getpagesize | insque | random | strcasecmp) | |
6624 | ;; | |
6625 | strncasecmp | strdup | vfork | waitpid | vasprintf) | |
6626 | ;; | |
6627 | *) | |
6628 | n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6629 | cat >>confdefs.h <<_ACEOF | |
6630 | #define $n 1 | |
238235ef | 6631 | _ACEOF |
238235ef | 6632 | |
5213506e RW |
6633 | ;; |
6634 | esac | |
6635 | done | |
9ce3f7e5 | 6636 | |
5213506e RW |
6637 | # VxWorks doesn't provide any of the variables in $vars, so we |
6638 | # don't have to check them here. | |
9ce3f7e5 | 6639 | |
5213506e RW |
6640 | # Of the functions in $checkfuncs, VxWorks only has strerror. |
6641 | $as_echo "#define HAVE_STRERROR 1" >>confdefs.h | |
e490616e | 6642 | |
238235ef | 6643 | |
5213506e RW |
6644 | setobjs=yes |
6645 | ;; | |
6646 | ||
6647 | esac | |
0bc0cd11 JL |
6648 | fi |
6649 | ||
5213506e | 6650 | if test -z "${setobjs}"; then |
0bc0cd11 | 6651 | |
5213506e | 6652 | case "${host}" in |
aa9dc53d | 6653 | |
41fdbd54 JB |
6654 | *-*-android*) |
6655 | # On android, getpagesize is defined in unistd.h as a static inline | |
6656 | # function, which AC_CHECK_FUNCS does not handle properly. | |
6657 | ac_cv_func_getpagesize=yes | |
6658 | ;; | |
6659 | ||
a0864ce8 JDA |
6660 | hppa*-*-hpux*) |
6661 | # Replace system snprintf and vsnprintf with libiberty implementations. | |
6662 | case " $LIBOBJS " in | |
6663 | *" snprintf.$ac_objext "* ) ;; | |
6664 | *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" | |
6665 | ;; | |
6666 | esac | |
6667 | ||
6668 | case " $LIBOBJS " in | |
6669 | *" vsnprintf.$ac_objext "* ) ;; | |
6670 | *) LIBOBJS="$LIBOBJS vsnprintf.$ac_objext" | |
6671 | ;; | |
6672 | esac | |
6673 | ||
6674 | ;; | |
6675 | ||
5213506e RW |
6676 | *-*-mingw32*) |
6677 | # Under mingw32, sys_nerr and sys_errlist exist, but they are | |
6678 | # macros, so the test below won't find them. | |
6679 | libiberty_cv_var_sys_nerr=yes | |
6680 | libiberty_cv_var_sys_errlist=yes | |
6681 | ;; | |
238235ef | 6682 | |
5213506e RW |
6683 | *-*-msdosdjgpp*) |
6684 | # vfork and fork are stubs. | |
6685 | ac_cv_func_vfork_works=no | |
6686 | ;; | |
aa9dc53d | 6687 | |
5213506e RW |
6688 | *-*-uwin*) |
6689 | # Under some versions of uwin, vfork is notoriously buggy and the test | |
6690 | # can hang configure; on other versions, vfork exists just as a stub. | |
6691 | # FIXME: This should be removed once vfork in uwin's runtime is fixed. | |
6692 | ac_cv_func_vfork_works=no | |
6693 | # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are | |
6694 | # macros (actually, these are imported from a DLL, but the end effect | |
6695 | # is the same), so the test below won't find them. | |
6696 | libiberty_cv_var_sys_nerr=yes | |
6697 | libiberty_cv_var_sys_errlist=yes | |
6698 | ;; | |
238235ef | 6699 | |
5213506e RW |
6700 | *-*-*vms*) |
6701 | # Under VMS, vfork works very different than on Unix. The standard test | |
6702 | # won't work, and it isn't easily adaptable. It makes more sense to | |
6703 | # just force it. | |
6704 | ac_cv_func_vfork_works=yes | |
6705 | ;; | |
238235ef | 6706 | |
5213506e | 6707 | esac |
aa9dc53d | 6708 | |
5213506e RW |
6709 | # We haven't set the list of objects yet. Use the standard autoconf |
6710 | # tests. This will only work if the compiler works. | |
6711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 | |
6712 | $as_echo_n "checking for library containing strerror... " >&6; } | |
22e05272 | 6713 | if ${ac_cv_search_strerror+:} false; then : |
5213506e | 6714 | $as_echo_n "(cached) " >&6 |
238235ef | 6715 | else |
5213506e RW |
6716 | ac_func_search_save_LIBS=$LIBS |
6717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
238235ef | 6718 | /* end confdefs.h. */ |
5213506e RW |
6719 | |
6720 | /* Override any GCC internal prototype to avoid an error. | |
6721 | Use char because int might match the return type of a GCC | |
238235ef | 6722 | builtin and then its argument prototype would still apply. */ |
238235ef | 6723 | #ifdef __cplusplus |
5213506e | 6724 | extern "C" |
0bc0cd11 | 6725 | #endif |
5213506e | 6726 | char strerror (); |
238235ef DJ |
6727 | int |
6728 | main () | |
6729 | { | |
5213506e | 6730 | return strerror (); |
238235ef DJ |
6731 | ; |
6732 | return 0; | |
6733 | } | |
6734 | _ACEOF | |
5213506e RW |
6735 | for ac_lib in '' cposix; do |
6736 | if test -z "$ac_lib"; then | |
6737 | ac_res="none required" | |
6738 | else | |
6739 | ac_res=-l$ac_lib | |
6740 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6741 | fi | |
6742 | if test x$gcc_no_link = xyes; then | |
22e05272 | 6743 | as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 |
5213506e RW |
6744 | fi |
6745 | if ac_fn_c_try_link "$LINENO"; then : | |
6746 | ac_cv_search_strerror=$ac_res | |
6747 | fi | |
6748 | rm -f core conftest.err conftest.$ac_objext \ | |
6749 | conftest$ac_exeext | |
22e05272 | 6750 | if ${ac_cv_search_strerror+:} false; then : |
5213506e RW |
6751 | break |
6752 | fi | |
6753 | done | |
22e05272 | 6754 | if ${ac_cv_search_strerror+:} false; then : |
238235ef | 6755 | |
5213506e RW |
6756 | else |
6757 | ac_cv_search_strerror=no | |
238235ef | 6758 | fi |
5213506e RW |
6759 | rm conftest.$ac_ext |
6760 | LIBS=$ac_func_search_save_LIBS | |
6761 | fi | |
6762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 | |
6763 | $as_echo "$ac_cv_search_strerror" >&6; } | |
6764 | ac_res=$ac_cv_search_strerror | |
6765 | if test "$ac_res" != no; then : | |
6766 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6767 | ||
238235ef | 6768 | fi |
5213506e RW |
6769 | |
6770 | for ac_func in $funcs | |
6771 | do : | |
6772 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6773 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
22e05272 | 6774 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
238235ef | 6775 | cat >>confdefs.h <<_ACEOF |
5213506e | 6776 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
238235ef | 6777 | _ACEOF |
0bc0cd11 | 6778 | |
5213506e RW |
6779 | else |
6780 | case " $LIBOBJS " in | |
6781 | *" $ac_func.$ac_objext "* ) ;; | |
6782 | *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" | |
6783 | ;; | |
6784 | esac | |
6785 | ||
0bc0cd11 JL |
6786 | fi |
6787 | done | |
6788 | ||
2b601678 MK |
6789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether alloca needs Cray hooks" >&5 |
6790 | $as_echo_n "checking whether alloca needs Cray hooks... " >&6; } | |
22e05272 | 6791 | if ${ac_cv_os_cray+:} false; then : |
2b601678 MK |
6792 | $as_echo_n "(cached) " >&6 |
6793 | else | |
6794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6795 | /* end confdefs.h. */ | |
6796 | #if defined(CRAY) && ! defined(CRAY2) | |
6797 | webecray | |
6798 | #else | |
6799 | wenotbecray | |
6800 | #endif | |
6801 | ||
6802 | _ACEOF | |
6803 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6804 | $EGREP "webecray" >/dev/null 2>&1; then : | |
6805 | ac_cv_os_cray=yes | |
6806 | else | |
6807 | ac_cv_os_cray=no | |
6808 | fi | |
6809 | rm -f conftest* | |
6810 | ||
6811 | fi | |
6812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 | |
6813 | $as_echo "$ac_cv_os_cray" >&6; } | |
6814 | if test $ac_cv_os_cray = yes; then | |
6815 | for ac_func in _getb67 GETB67 getb67; do | |
6816 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6817 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
22e05272 | 6818 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
2b601678 MK |
6819 | |
6820 | cat >>confdefs.h <<_ACEOF | |
6821 | #define CRAY_STACKSEG_END $ac_func | |
6822 | _ACEOF | |
6823 | break | |
6824 | fi | |
6825 | ||
6826 | done | |
6827 | fi | |
6828 | ||
6829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
6830 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
22e05272 | 6831 | if ${ac_cv_c_stack_direction+:} false; then : |
2b601678 MK |
6832 | $as_echo_n "(cached) " >&6 |
6833 | else | |
6834 | if test "$cross_compiling" = yes; then : | |
6835 | ac_cv_c_stack_direction=0 | |
6836 | else | |
6837 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6838 | /* end confdefs.h. */ | |
885b6660 FW |
6839 | #include <stdlib.h> |
6840 | ||
6841 | int | |
6842 | find_stack_direction (void) | |
2b601678 MK |
6843 | { |
6844 | static char *addr = 0; | |
6845 | auto char dummy; | |
6846 | if (addr == 0) | |
6847 | { | |
6848 | addr = &dummy; | |
6849 | return find_stack_direction (); | |
6850 | } | |
6851 | else | |
6852 | return (&dummy > addr) ? 1 : -1; | |
6853 | } | |
885b6660 FW |
6854 | |
6855 | int | |
6856 | main (void) | |
2b601678 MK |
6857 | { |
6858 | exit (find_stack_direction() < 0); | |
6859 | } | |
6860 | _ACEOF | |
6861 | if ac_fn_c_try_run "$LINENO"; then : | |
6862 | ac_cv_c_stack_direction=1 | |
6863 | else | |
6864 | ac_cv_c_stack_direction=-1 | |
6865 | fi | |
6866 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6867 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6868 | fi | |
6869 | ||
6870 | fi | |
6871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
6872 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
6873 | ||
6874 | cat >>confdefs.h <<_ACEOF | |
6875 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
6876 | _ACEOF | |
6877 | ||
6878 | ||
5213506e RW |
6879 | for ac_header in vfork.h |
6880 | do : | |
6881 | ac_fn_c_check_header_preproc "$LINENO" "vfork.h" "ac_cv_header_vfork_h" | |
22e05272 | 6882 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
3c60ae5a | 6883 | cat >>confdefs.h <<_ACEOF |
5213506e | 6884 | #define HAVE_VFORK_H 1 |
3c60ae5a GDR |
6885 | _ACEOF |
6886 | ||
5213506e RW |
6887 | fi |
6888 | done | |
6889 | ||
6890 | for ac_func in fork vfork | |
6891 | do : | |
6892 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6893 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
22e05272 | 6894 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
5213506e RW |
6895 | cat >>confdefs.h <<_ACEOF |
6896 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6897 | _ACEOF | |
3c60ae5a GDR |
6898 | |
6899 | fi | |
5213506e RW |
6900 | done |
6901 | ||
6902 | if test "x$ac_cv_func_fork" = xyes; then | |
6903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 | |
6904 | $as_echo_n "checking for working fork... " >&6; } | |
22e05272 | 6905 | if ${ac_cv_func_fork_works+:} false; then : |
5213506e | 6906 | $as_echo_n "(cached) " >&6 |
3c60ae5a | 6907 | else |
5213506e RW |
6908 | if test "$cross_compiling" = yes; then : |
6909 | ac_cv_func_fork_works=cross | |
6910 | else | |
6911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3c60ae5a GDR |
6912 | /* end confdefs.h. */ |
6913 | $ac_includes_default | |
6914 | int | |
6915 | main () | |
6916 | { | |
5213506e RW |
6917 | |
6918 | /* By Ruediger Kuhlmann. */ | |
6919 | return fork () < 0; | |
3c60ae5a GDR |
6920 | |
6921 | ; | |
6922 | return 0; | |
6923 | } | |
6924 | _ACEOF | |
5213506e RW |
6925 | if ac_fn_c_try_run "$LINENO"; then : |
6926 | ac_cv_func_fork_works=yes | |
3c60ae5a | 6927 | else |
5213506e | 6928 | ac_cv_func_fork_works=no |
3c60ae5a | 6929 | fi |
5213506e RW |
6930 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
6931 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
3c60ae5a | 6932 | fi |
3c60ae5a | 6933 | |
5213506e RW |
6934 | fi |
6935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 | |
6936 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
3c60ae5a GDR |
6937 | |
6938 | else | |
5213506e RW |
6939 | ac_cv_func_fork_works=$ac_cv_func_fork |
6940 | fi | |
6941 | if test "x$ac_cv_func_fork_works" = xcross; then | |
6942 | case $host in | |
6943 | *-*-amigaos* | *-*-msdosdjgpp*) | |
6944 | # Override, as these systems have only a dummy fork() stub | |
6945 | ac_cv_func_fork_works=no | |
6946 | ;; | |
6947 | *) | |
6948 | ac_cv_func_fork_works=yes | |
6949 | ;; | |
6950 | esac | |
6951 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
6952 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
3c60ae5a | 6953 | fi |
5213506e RW |
6954 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
6955 | if test "x$ac_cv_func_vfork" = xyes; then | |
6956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 | |
6957 | $as_echo_n "checking for working vfork... " >&6; } | |
22e05272 | 6958 | if ${ac_cv_func_vfork_works+:} false; then : |
5213506e | 6959 | $as_echo_n "(cached) " >&6 |
3c60ae5a | 6960 | else |
5213506e RW |
6961 | if test "$cross_compiling" = yes; then : |
6962 | ac_cv_func_vfork_works=cross | |
6963 | else | |
6964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3c60ae5a | 6965 | /* end confdefs.h. */ |
5213506e | 6966 | /* Thanks to Paul Eggert for this test. */ |
3c60ae5a | 6967 | $ac_includes_default |
5213506e RW |
6968 | #include <sys/wait.h> |
6969 | #ifdef HAVE_VFORK_H | |
6970 | # include <vfork.h> | |
6971 | #endif | |
6972 | /* On some sparc systems, changes by the child to local and incoming | |
6973 | argument registers are propagated back to the parent. The compiler | |
6974 | is told about this with #include <vfork.h>, but some compilers | |
6975 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
6976 | static variable whose address is put into a register that is | |
6977 | clobbered by the vfork. */ | |
6978 | static void | |
6979 | #ifdef __cplusplus | |
6980 | sparc_address_test (int arg) | |
6981 | # else | |
6982 | sparc_address_test (arg) int arg; | |
6983 | #endif | |
6984 | { | |
6985 | static pid_t child; | |
6986 | if (!child) { | |
6987 | child = vfork (); | |
6988 | if (child < 0) { | |
6989 | perror ("vfork"); | |
6990 | _exit(2); | |
6991 | } | |
6992 | if (!child) { | |
6993 | arg = getpid(); | |
6994 | write(-1, "", 0); | |
6995 | _exit (arg); | |
6996 | } | |
6997 | } | |
6998 | } | |
6999 | ||
3c60ae5a GDR |
7000 | int |
7001 | main () | |
7002 | { | |
5213506e RW |
7003 | pid_t parent = getpid (); |
7004 | pid_t child; | |
3c60ae5a | 7005 | |
5213506e | 7006 | sparc_address_test (0); |
3c60ae5a | 7007 | |
5213506e | 7008 | child = vfork (); |
3c60ae5a | 7009 | |
5213506e RW |
7010 | if (child == 0) { |
7011 | /* Here is another test for sparc vfork register problems. This | |
7012 | test uses lots of local variables, at least as many local | |
7013 | variables as main has allocated so far including compiler | |
7014 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7015 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7016 | reuse the register of parent for one of the local variables, | |
7017 | since it will think that parent can't possibly be used any more | |
7018 | in this routine. Assigning to the local variable will thus | |
7019 | munge parent in the parent process. */ | |
7020 | pid_t | |
7021 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7022 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7023 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7024 | use the same hardware register for all 8 local variables. */ | |
7025 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7026 | || p != p5 || p != p6 || p != p7) | |
7027 | _exit(1); | |
3c60ae5a | 7028 | |
5213506e RW |
7029 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
7030 | from child file descriptors. If the child closes a descriptor | |
7031 | before it execs or exits, this munges the parent's descriptor | |
7032 | as well. Test for this by closing stdout in the child. */ | |
7033 | _exit(close(fileno(stdout)) != 0); | |
7034 | } else { | |
7035 | int status; | |
7036 | struct stat st; | |
3c60ae5a | 7037 | |
5213506e RW |
7038 | while (wait(&status) != child) |
7039 | ; | |
7040 | return ( | |
7041 | /* Was there some problem with vforking? */ | |
7042 | child < 0 | |
3c60ae5a | 7043 | |
5213506e RW |
7044 | /* Did the child fail? (This shouldn't happen.) */ |
7045 | || status | |
3c60ae5a | 7046 | |
5213506e RW |
7047 | /* Did the vfork/compiler bug occur? */ |
7048 | || parent != getpid() | |
ddcf783b | 7049 | |
5213506e RW |
7050 | /* Did the file descriptor bug occur? */ |
7051 | || fstat(fileno(stdout), &st) != 0 | |
7052 | ); | |
7053 | } | |
ddcf783b EZ |
7054 | } |
7055 | _ACEOF | |
5213506e RW |
7056 | if ac_fn_c_try_run "$LINENO"; then : |
7057 | ac_cv_func_vfork_works=yes | |
ddcf783b | 7058 | else |
5213506e RW |
7059 | ac_cv_func_vfork_works=no |
7060 | fi | |
7061 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7062 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7063 | fi | |
ddcf783b | 7064 | |
ddcf783b | 7065 | fi |
5213506e RW |
7066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
7067 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
7068 | ||
7069 | fi; | |
7070 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7071 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
7072 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
7073 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
ddcf783b | 7074 | fi |
ddcf783b | 7075 | |
5213506e | 7076 | if test "x$ac_cv_func_vfork_works" = xyes; then |
ddcf783b | 7077 | |
5213506e | 7078 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
ddcf783b EZ |
7079 | |
7080 | else | |
ddcf783b | 7081 | |
5213506e | 7082 | $as_echo "#define vfork fork" >>confdefs.h |
ddcf783b EZ |
7083 | |
7084 | fi | |
5213506e | 7085 | if test "x$ac_cv_func_fork_works" = xyes; then |
ddcf783b | 7086 | |
5213506e | 7087 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
ddcf783b | 7088 | |
ddcf783b | 7089 | fi |
ddcf783b | 7090 | |
5213506e RW |
7091 | if test $ac_cv_func_vfork_works = no; then |
7092 | case " $LIBOBJS " in | |
7093 | *" vfork.$ac_objext "* ) ;; | |
7094 | *) LIBOBJS="$LIBOBJS vfork.$ac_objext" | |
7095 | ;; | |
7096 | esac | |
ddcf783b | 7097 | |
5213506e RW |
7098 | fi |
7099 | # We only need _doprnt if we might use it to implement v*printf. | |
7100 | if test $ac_cv_func_vprintf != yes \ | |
7101 | || test $ac_cv_func_vfprintf != yes \ | |
7102 | || test $ac_cv_func_vsprintf != yes; then | |
22e05272 JM |
7103 | ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" |
7104 | if test "x$ac_cv_func__doprnt" = xyes; then : | |
7105 | $as_echo "#define HAVE__DOPRNT 1" >>confdefs.h | |
ddcf783b | 7106 | |
5213506e RW |
7107 | else |
7108 | case " $LIBOBJS " in | |
22e05272 JM |
7109 | *" _doprnt.$ac_objext "* ) ;; |
7110 | *) LIBOBJS="$LIBOBJS _doprnt.$ac_objext" | |
5213506e RW |
7111 | ;; |
7112 | esac | |
ddcf783b | 7113 | |
d7cf8390 GDR |
7114 | fi |
7115 | ||
7116 | ||
5213506e RW |
7117 | else |
7118 | for ac_func in _doprnt | |
7119 | do : | |
7120 | ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" | |
22e05272 | 7121 | if test "x$ac_cv_func__doprnt" = xyes; then : |
5213506e RW |
7122 | cat >>confdefs.h <<_ACEOF |
7123 | #define HAVE__DOPRNT 1 | |
d7cf8390 | 7124 | _ACEOF |
d7cf8390 | 7125 | |
d7cf8390 | 7126 | fi |
5213506e | 7127 | done |
d7cf8390 | 7128 | |
5213506e | 7129 | fi |
d7cf8390 | 7130 | |
5213506e RW |
7131 | for v in $vars; do |
7132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $v" >&5 | |
7133 | $as_echo_n "checking for $v... " >&6; } | |
22e05272 | 7134 | if eval \${libiberty_cv_var_$v+:} false; then : |
5213506e | 7135 | $as_echo_n "(cached) " >&6 |
d7cf8390 | 7136 | else |
5213506e | 7137 | if test x$gcc_no_link = xyes; then |
22e05272 | 7138 | as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 |
d7cf8390 | 7139 | fi |
5213506e | 7140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d7cf8390 | 7141 | /* end confdefs.h. */ |
f418bc3c | 7142 | extern int $v []; |
d7cf8390 GDR |
7143 | int |
7144 | main () | |
7145 | { | |
f418bc3c | 7146 | if ($v [0]) return 1; |
d7cf8390 GDR |
7147 | ; |
7148 | return 0; | |
7149 | } | |
7150 | _ACEOF | |
5213506e RW |
7151 | if ac_fn_c_try_link "$LINENO"; then : |
7152 | eval "libiberty_cv_var_$v=yes" | |
d7cf8390 | 7153 | else |
5213506e | 7154 | eval "libiberty_cv_var_$v=no" |
d7cf8390 | 7155 | fi |
5213506e RW |
7156 | rm -f core conftest.err conftest.$ac_objext \ |
7157 | conftest$ac_exeext conftest.$ac_ext | |
d7cf8390 | 7158 | fi |
d7cf8390 | 7159 | |
5213506e RW |
7160 | if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then |
7161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7162 | $as_echo "yes" >&6; } | |
7163 | n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
7164 | cat >>confdefs.h <<_ACEOF | |
7165 | #define $n 1 | |
d7cf8390 GDR |
7166 | _ACEOF |
7167 | ||
5213506e RW |
7168 | else |
7169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7170 | $as_echo "no" >&6; } | |
7171 | fi | |
7172 | done | |
d7cf8390 | 7173 | |
5213506e RW |
7174 | # special check for _system_configuration because AIX <4.3.2 do not |
7175 | # contain the `physmem' member. | |
7176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external symbol _system_configuration" >&5 | |
7177 | $as_echo_n "checking for external symbol _system_configuration... " >&6; } | |
7178 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8b82b724 | 7179 | /* end confdefs.h. */ |
5213506e | 7180 | #include <sys/systemcfg.h> |
8b82b724 BE |
7181 | int |
7182 | main () | |
7183 | { | |
5213506e | 7184 | double x = _system_configuration.physmem; |
8b82b724 BE |
7185 | ; |
7186 | return 0; | |
7187 | } | |
7188 | _ACEOF | |
5213506e RW |
7189 | if ac_fn_c_try_compile "$LINENO"; then : |
7190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7191 | $as_echo "yes" >&6; } | |
8b82b724 | 7192 | |
5213506e | 7193 | $as_echo "#define HAVE__SYSTEM_CONFIGURATION 1" >>confdefs.h |
8b82b724 BE |
7194 | |
7195 | else | |
5213506e RW |
7196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7197 | $as_echo "no" >&6; } | |
7198 | fi | |
7199 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7200 | ||
7201 | for ac_func in $checkfuncs | |
7202 | do : | |
7203 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7204 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
22e05272 | 7205 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
8b82b724 | 7206 | cat >>confdefs.h <<_ACEOF |
5213506e | 7207 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
8b82b724 BE |
7208 | _ACEOF |
7209 | ||
d7cf8390 | 7210 | fi |
5213506e | 7211 | done |
d7cf8390 | 7212 | |
22e05272 JM |
7213 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
7214 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" | |
7215 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : | |
5213506e | 7216 | ac_have_decl=1 |
d7cf8390 | 7217 | else |
5213506e | 7218 | ac_have_decl=0 |
d7cf8390 | 7219 | fi |
d7cf8390 GDR |
7220 | |
7221 | cat >>confdefs.h <<_ACEOF | |
5213506e | 7222 | #define HAVE_DECL_BASENAME $ac_have_decl |
d7cf8390 | 7223 | _ACEOF |
5213506e | 7224 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
22e05272 | 7225 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
5213506e | 7226 | ac_have_decl=1 |
d7cf8390 | 7227 | else |
5213506e | 7228 | ac_have_decl=0 |
d7cf8390 | 7229 | fi |
d7cf8390 | 7230 | |
5213506e RW |
7231 | cat >>confdefs.h <<_ACEOF |
7232 | #define HAVE_DECL_FFS $ac_have_decl | |
d7cf8390 | 7233 | _ACEOF |
5213506e | 7234 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
22e05272 | 7235 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
5213506e | 7236 | ac_have_decl=1 |
d7cf8390 | 7237 | else |
5213506e | 7238 | ac_have_decl=0 |
d7cf8390 | 7239 | fi |
d7cf8390 GDR |
7240 | |
7241 | cat >>confdefs.h <<_ACEOF | |
5213506e | 7242 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
d7cf8390 | 7243 | _ACEOF |
5213506e | 7244 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
22e05272 | 7245 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
5213506e | 7246 | ac_have_decl=1 |
d7cf8390 | 7247 | else |
5213506e | 7248 | ac_have_decl=0 |
d7cf8390 | 7249 | fi |
d7cf8390 | 7250 | |
5213506e RW |
7251 | cat >>confdefs.h <<_ACEOF |
7252 | #define HAVE_DECL_VASPRINTF $ac_have_decl | |
d7cf8390 | 7253 | _ACEOF |
5213506e | 7254 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
22e05272 | 7255 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
5213506e | 7256 | ac_have_decl=1 |
d7cf8390 | 7257 | else |
5213506e | 7258 | ac_have_decl=0 |
d7cf8390 | 7259 | fi |
d7cf8390 GDR |
7260 | |
7261 | cat >>confdefs.h <<_ACEOF | |
5213506e | 7262 | #define HAVE_DECL_SNPRINTF $ac_have_decl |
d7cf8390 | 7263 | _ACEOF |
5213506e | 7264 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" |
22e05272 | 7265 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
5213506e | 7266 | ac_have_decl=1 |
d7cf8390 | 7267 | else |
5213506e | 7268 | ac_have_decl=0 |
83fbfe42 GK |
7269 | fi |
7270 | ||
5213506e RW |
7271 | cat >>confdefs.h <<_ACEOF |
7272 | #define HAVE_DECL_VSNPRINTF $ac_have_decl | |
7273 | _ACEOF | |
83fbfe42 | 7274 | |
5213506e | 7275 | ac_fn_c_check_decl "$LINENO" "calloc" "ac_cv_have_decl_calloc" "$ac_includes_default" |
22e05272 | 7276 | if test "x$ac_cv_have_decl_calloc" = xyes; then : |
5213506e RW |
7277 | ac_have_decl=1 |
7278 | else | |
7279 | ac_have_decl=0 | |
83fbfe42 | 7280 | fi |
5213506e RW |
7281 | |
7282 | cat >>confdefs.h <<_ACEOF | |
7283 | #define HAVE_DECL_CALLOC $ac_have_decl | |
7284 | _ACEOF | |
7285 | ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" | |
22e05272 | 7286 | if test "x$ac_cv_have_decl_getenv" = xyes; then : |
5213506e RW |
7287 | ac_have_decl=1 |
7288 | else | |
7289 | ac_have_decl=0 | |
83fbfe42 | 7290 | fi |
83fbfe42 GK |
7291 | |
7292 | cat >>confdefs.h <<_ACEOF | |
5213506e | 7293 | #define HAVE_DECL_GETENV $ac_have_decl |
83fbfe42 | 7294 | _ACEOF |
5213506e | 7295 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" |
22e05272 | 7296 | if test "x$ac_cv_have_decl_getopt" = xyes; then : |
5213506e RW |
7297 | ac_have_decl=1 |
7298 | else | |
7299 | ac_have_decl=0 | |
7300 | fi | |
83fbfe42 | 7301 | |
5213506e RW |
7302 | cat >>confdefs.h <<_ACEOF |
7303 | #define HAVE_DECL_GETOPT $ac_have_decl | |
7304 | _ACEOF | |
7305 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" | |
22e05272 | 7306 | if test "x$ac_cv_have_decl_malloc" = xyes; then : |
5213506e RW |
7307 | ac_have_decl=1 |
7308 | else | |
7309 | ac_have_decl=0 | |
7310 | fi | |
83fbfe42 | 7311 | |
5213506e RW |
7312 | cat >>confdefs.h <<_ACEOF |
7313 | #define HAVE_DECL_MALLOC $ac_have_decl | |
7314 | _ACEOF | |
7315 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" | |
22e05272 | 7316 | if test "x$ac_cv_have_decl_realloc" = xyes; then : |
5213506e | 7317 | ac_have_decl=1 |
83fbfe42 | 7318 | else |
5213506e RW |
7319 | ac_have_decl=0 |
7320 | fi | |
7321 | ||
7322 | cat >>confdefs.h <<_ACEOF | |
7323 | #define HAVE_DECL_REALLOC $ac_have_decl | |
83fbfe42 | 7324 | _ACEOF |
fbb334a6 IS |
7325 | |
7326 | case "${host}" in | |
7327 | *-*-darwin*) ;; # Darwin's sbrk implementation is deprecated. | |
7328 | *) ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" | |
22e05272 | 7329 | if test "x$ac_cv_have_decl_sbrk" = xyes; then : |
5213506e RW |
7330 | ac_have_decl=1 |
7331 | else | |
7332 | ac_have_decl=0 | |
7333 | fi | |
83fbfe42 | 7334 | |
5213506e RW |
7335 | cat >>confdefs.h <<_ACEOF |
7336 | #define HAVE_DECL_SBRK $ac_have_decl | |
2d3a2063 | 7337 | _ACEOF |
fbb334a6 IS |
7338 | ;; |
7339 | esac | |
2d3a2063 | 7340 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
22e05272 | 7341 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
2d3a2063 JDA |
7342 | ac_have_decl=1 |
7343 | else | |
7344 | ac_have_decl=0 | |
7345 | fi | |
7346 | ||
7347 | cat >>confdefs.h <<_ACEOF | |
7348 | #define HAVE_DECL_STRTOL $ac_have_decl | |
7349 | _ACEOF | |
7350 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" | |
22e05272 | 7351 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
2d3a2063 JDA |
7352 | ac_have_decl=1 |
7353 | else | |
7354 | ac_have_decl=0 | |
7355 | fi | |
7356 | ||
7357 | cat >>confdefs.h <<_ACEOF | |
7358 | #define HAVE_DECL_STRTOUL $ac_have_decl | |
7359 | _ACEOF | |
7360 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" | |
22e05272 | 7361 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
2d3a2063 JDA |
7362 | ac_have_decl=1 |
7363 | else | |
7364 | ac_have_decl=0 | |
7365 | fi | |
7366 | ||
7367 | cat >>confdefs.h <<_ACEOF | |
7368 | #define HAVE_DECL_STRTOLL $ac_have_decl | |
7369 | _ACEOF | |
7370 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" | |
22e05272 | 7371 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
2d3a2063 JDA |
7372 | ac_have_decl=1 |
7373 | else | |
7374 | ac_have_decl=0 | |
7375 | fi | |
7376 | ||
7377 | cat >>confdefs.h <<_ACEOF | |
7378 | #define HAVE_DECL_STRTOULL $ac_have_decl | |
5213506e | 7379 | _ACEOF |
83fbfe42 | 7380 | |
5213506e | 7381 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
22e05272 | 7382 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
5213506e RW |
7383 | ac_have_decl=1 |
7384 | else | |
7385 | ac_have_decl=0 | |
3c60ae5a GDR |
7386 | fi |
7387 | ||
5213506e RW |
7388 | cat >>confdefs.h <<_ACEOF |
7389 | #define HAVE_DECL_STRVERSCMP $ac_have_decl | |
63d9caf9 DD |
7390 | _ACEOF |
7391 | ||
7392 | ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" | |
22e05272 | 7393 | if test "x$ac_cv_have_decl_strnlen" = xyes; then : |
63d9caf9 DD |
7394 | ac_have_decl=1 |
7395 | else | |
7396 | ac_have_decl=0 | |
7397 | fi | |
7398 | ||
7399 | cat >>confdefs.h <<_ACEOF | |
7400 | #define HAVE_DECL_STRNLEN $ac_have_decl | |
5213506e | 7401 | _ACEOF |
3c60ae5a | 7402 | |
2b601678 MK |
7403 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether canonicalize_file_name must be declared" >&5 |
7404 | $as_echo_n "checking whether canonicalize_file_name must be declared... " >&6; } | |
22e05272 | 7405 | if ${libiberty_cv_decl_needed_canonicalize_file_name+:} false; then : |
2b601678 MK |
7406 | $as_echo_n "(cached) " >&6 |
7407 | else | |
7408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7409 | /* end confdefs.h. */ | |
7410 | ||
7411 | #include "confdefs.h" | |
7412 | #include <stdio.h> | |
7413 | #ifdef HAVE_STRING_H | |
7414 | #include <string.h> | |
7415 | #else | |
7416 | #ifdef HAVE_STRINGS_H | |
7417 | #include <strings.h> | |
7418 | #endif | |
7419 | #endif | |
7420 | #ifdef HAVE_STDLIB_H | |
7421 | #include <stdlib.h> | |
7422 | #endif | |
7423 | #ifdef HAVE_UNISTD_H | |
7424 | #include <unistd.h> | |
7425 | #endif | |
7426 | int | |
7427 | main () | |
7428 | { | |
7429 | char *(*pfn) = (char *(*)) canonicalize_file_name | |
7430 | ; | |
7431 | return 0; | |
7432 | } | |
7433 | _ACEOF | |
7434 | if ac_fn_c_try_compile "$LINENO"; then : | |
7435 | libiberty_cv_decl_needed_canonicalize_file_name=no | |
7436 | else | |
7437 | libiberty_cv_decl_needed_canonicalize_file_name=yes | |
7438 | fi | |
7439 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7440 | fi | |
7441 | ||
7442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libiberty_cv_decl_needed_canonicalize_file_name" >&5 | |
7443 | $as_echo "$libiberty_cv_decl_needed_canonicalize_file_name" >&6; } | |
7444 | if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then | |
7445 | ||
7446 | $as_echo "#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1" >>confdefs.h | |
7447 | ||
7448 | fi | |
7449 | ||
0bc0cd11 JL |
7450 | fi |
7451 | ||
55d0e5e0 ZW |
7452 | # Figure out which version of pexecute to use. |
7453 | case "${host}" in | |
16f60fcb TG |
7454 | *-*-mingw* | *-*-winnt*) pexecute=pex-win32 ;; |
7455 | *-*-msdosdjgpp*) pexecute=pex-djgpp ;; | |
7456 | *-*-msdos*) pexecute=pex-msdos ;; | |
7457 | *) pexecute=pex-unix ;; | |
55d0e5e0 ZW |
7458 | esac |
7459 | ||
7460 | ||
22e05272 JM |
7461 | |
7462 | ||
7463 | ||
7464 | for ac_header in $ac_header_list | |
2b601678 MK |
7465 | do : |
7466 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7467 | ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" | |
22e05272 | 7468 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
2b601678 MK |
7469 | cat >>confdefs.h <<_ACEOF |
7470 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7471 | _ACEOF | |
7472 | ||
7473 | fi | |
7474 | done | |
7475 | ||
22e05272 JM |
7476 | |
7477 | ||
7478 | ||
7479 | ||
7480 | ||
7481 | ||
7482 | if test x$gcc_no_link = xyes; then | |
7483 | if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then | |
7484 | ac_cv_func_mmap_fixed_mapped=no | |
7485 | fi | |
7486 | fi | |
7487 | if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then | |
7488 | ||
2b601678 MK |
7489 | for ac_func in getpagesize |
7490 | do : | |
7491 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
22e05272 | 7492 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
2b601678 MK |
7493 | cat >>confdefs.h <<_ACEOF |
7494 | #define HAVE_GETPAGESIZE 1 | |
7495 | _ACEOF | |
7496 | ||
7497 | fi | |
7498 | done | |
7499 | ||
7500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
7501 | $as_echo_n "checking for working mmap... " >&6; } | |
22e05272 | 7502 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
2b601678 MK |
7503 | $as_echo_n "(cached) " >&6 |
7504 | else | |
7505 | if test "$cross_compiling" = yes; then : | |
7506 | ac_cv_func_mmap_fixed_mapped=no | |
7507 | else | |
7508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7509 | /* end confdefs.h. */ | |
7510 | $ac_includes_default | |
7511 | /* malloc might have been renamed as rpl_malloc. */ | |
7512 | #undef malloc | |
7513 | ||
7514 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
7515 | Here is a matrix of mmap possibilities: | |
7516 | mmap private not fixed | |
7517 | mmap private fixed at somewhere currently unmapped | |
7518 | mmap private fixed at somewhere already mapped | |
7519 | mmap shared not fixed | |
7520 | mmap shared fixed at somewhere currently unmapped | |
7521 | mmap shared fixed at somewhere already mapped | |
7522 | For private mappings, we should verify that changes cannot be read() | |
7523 | back from the file, nor mmap's back from the file at a different | |
7524 | address. (There have been systems where private was not correctly | |
7525 | implemented like the infamous i386 svr4.0, and systems where the | |
7526 | VM page cache was not coherent with the file system buffer cache | |
7527 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
7528 | For shared mappings, we should conversely verify that changes get | |
7529 | propagated back to all the places they're supposed to be. | |
7530 | ||
7531 | Grep wants private fixed already mapped. | |
7532 | The main things grep needs to know about mmap are: | |
7533 | * does it exist and is it safe to write into the mmap'd area | |
7534 | * how to use it (BSD variants) */ | |
7535 | ||
7536 | #include <fcntl.h> | |
7537 | #include <sys/mman.h> | |
7538 | ||
7539 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H | |
7540 | char *malloc (); | |
7541 | #endif | |
7542 | ||
7543 | /* This mess was copied from the GNU getpagesize.h. */ | |
7544 | #ifndef HAVE_GETPAGESIZE | |
2b601678 MK |
7545 | # ifdef _SC_PAGESIZE |
7546 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
7547 | # else /* no _SC_PAGESIZE */ | |
7548 | # ifdef HAVE_SYS_PARAM_H | |
7549 | # include <sys/param.h> | |
7550 | # ifdef EXEC_PAGESIZE | |
7551 | # define getpagesize() EXEC_PAGESIZE | |
7552 | # else /* no EXEC_PAGESIZE */ | |
7553 | # ifdef NBPG | |
7554 | # define getpagesize() NBPG * CLSIZE | |
7555 | # ifndef CLSIZE | |
7556 | # define CLSIZE 1 | |
7557 | # endif /* no CLSIZE */ | |
7558 | # else /* no NBPG */ | |
7559 | # ifdef NBPC | |
7560 | # define getpagesize() NBPC | |
7561 | # else /* no NBPC */ | |
7562 | # ifdef PAGESIZE | |
7563 | # define getpagesize() PAGESIZE | |
7564 | # endif /* PAGESIZE */ | |
7565 | # endif /* no NBPC */ | |
7566 | # endif /* no NBPG */ | |
7567 | # endif /* no EXEC_PAGESIZE */ | |
7568 | # else /* no HAVE_SYS_PARAM_H */ | |
7569 | # define getpagesize() 8192 /* punt totally */ | |
7570 | # endif /* no HAVE_SYS_PARAM_H */ | |
7571 | # endif /* no _SC_PAGESIZE */ | |
7572 | ||
7573 | #endif /* no HAVE_GETPAGESIZE */ | |
7574 | ||
7575 | int | |
7576 | main () | |
7577 | { | |
7578 | char *data, *data2, *data3; | |
22e05272 | 7579 | const char *cdata2; |
2b601678 | 7580 | int i, pagesize; |
22e05272 | 7581 | int fd, fd2; |
2b601678 MK |
7582 | |
7583 | pagesize = getpagesize (); | |
7584 | ||
7585 | /* First, make a file with some known garbage in it. */ | |
7586 | data = (char *) malloc (pagesize); | |
7587 | if (!data) | |
7588 | return 1; | |
7589 | for (i = 0; i < pagesize; ++i) | |
7590 | *(data + i) = rand (); | |
7591 | umask (0); | |
7592 | fd = creat ("conftest.mmap", 0600); | |
7593 | if (fd < 0) | |
22e05272 | 7594 | return 2; |
2b601678 | 7595 | if (write (fd, data, pagesize) != pagesize) |
22e05272 | 7596 | return 3; |
2b601678 MK |
7597 | close (fd); |
7598 | ||
22e05272 JM |
7599 | /* Next, check that the tail of a page is zero-filled. File must have |
7600 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
7601 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
7602 | if (fd2 < 0) | |
7603 | return 4; | |
7604 | cdata2 = ""; | |
7605 | if (write (fd2, cdata2, 1) != 1) | |
7606 | return 5; | |
7607 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
7608 | if (data2 == MAP_FAILED) | |
7609 | return 6; | |
7610 | for (i = 0; i < pagesize; ++i) | |
7611 | if (*(data2 + i)) | |
7612 | return 7; | |
7613 | close (fd2); | |
7614 | if (munmap (data2, pagesize)) | |
7615 | return 8; | |
7616 | ||
2b601678 MK |
7617 | /* Next, try to mmap the file at a fixed address which already has |
7618 | something else allocated at it. If we can, also make sure that | |
7619 | we see the same garbage. */ | |
7620 | fd = open ("conftest.mmap", O_RDWR); | |
7621 | if (fd < 0) | |
22e05272 | 7622 | return 9; |
2b601678 MK |
7623 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
7624 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
22e05272 | 7625 | return 10; |
2b601678 MK |
7626 | for (i = 0; i < pagesize; ++i) |
7627 | if (*(data + i) != *(data2 + i)) | |
22e05272 | 7628 | return 11; |
2b601678 MK |
7629 | |
7630 | /* Finally, make sure that changes to the mapped area do not | |
7631 | percolate back to the file as seen by read(). (This is a bug on | |
7632 | some variants of i386 svr4.0.) */ | |
7633 | for (i = 0; i < pagesize; ++i) | |
7634 | *(data2 + i) = *(data2 + i) + 1; | |
7635 | data3 = (char *) malloc (pagesize); | |
7636 | if (!data3) | |
22e05272 | 7637 | return 12; |
2b601678 | 7638 | if (read (fd, data3, pagesize) != pagesize) |
22e05272 | 7639 | return 13; |
2b601678 MK |
7640 | for (i = 0; i < pagesize; ++i) |
7641 | if (*(data + i) != *(data3 + i)) | |
22e05272 | 7642 | return 14; |
2b601678 MK |
7643 | close (fd); |
7644 | return 0; | |
7645 | } | |
7646 | _ACEOF | |
7647 | if ac_fn_c_try_run "$LINENO"; then : | |
7648 | ac_cv_func_mmap_fixed_mapped=yes | |
7649 | else | |
7650 | ac_cv_func_mmap_fixed_mapped=no | |
7651 | fi | |
7652 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7653 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7654 | fi | |
7655 | ||
7656 | fi | |
7657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
7658 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
7659 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
7660 | ||
7661 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h | |
7662 | ||
7663 | fi | |
22e05272 | 7664 | rm -f conftest.mmap conftest.txt |
2b601678 MK |
7665 | |
7666 | fi | |
7667 | ||
7668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strncmp" >&5 | |
7669 | $as_echo_n "checking for working strncmp... " >&6; } | |
22e05272 | 7670 | if ${ac_cv_func_strncmp_works+:} false; then : |
2b601678 MK |
7671 | $as_echo_n "(cached) " >&6 |
7672 | else | |
7673 | if test "$cross_compiling" = yes; then : | |
7674 | ac_cv_func_strncmp_works=yes | |
7675 | else | |
7676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7677 | /* end confdefs.h. */ | |
7678 | ||
7679 | /* Test by Jim Wilson and Kaveh Ghazi. | |
7680 | Check whether strncmp reads past the end of its string parameters. */ | |
885b6660 FW |
7681 | #include <stdlib.h> |
7682 | #include <string.h> | |
2b601678 MK |
7683 | #include <sys/types.h> |
7684 | ||
7685 | #ifdef HAVE_FCNTL_H | |
7686 | #include <fcntl.h> | |
7687 | #endif | |
7688 | ||
7689 | #ifdef HAVE_SYS_MMAN_H | |
7690 | #include <sys/mman.h> | |
7691 | #endif | |
7692 | ||
7693 | #ifndef MAP_ANON | |
7694 | #ifdef MAP_ANONYMOUS | |
7695 | #define MAP_ANON MAP_ANONYMOUS | |
7696 | #else | |
7697 | #define MAP_ANON MAP_FILE | |
7698 | #endif | |
7699 | #endif | |
7700 | ||
7701 | #ifndef MAP_FILE | |
7702 | #define MAP_FILE 0 | |
7703 | #endif | |
7704 | #ifndef O_RDONLY | |
7705 | #define O_RDONLY 0 | |
7706 | #endif | |
7707 | ||
7708 | #define MAP_LEN 0x10000 | |
7709 | ||
885b6660 FW |
7710 | int |
7711 | main (void) | |
2b601678 MK |
7712 | { |
7713 | #if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) | |
7714 | char *p; | |
7715 | int dev_zero; | |
7716 | ||
7717 | dev_zero = open ("/dev/zero", O_RDONLY); | |
7718 | if (dev_zero < 0) | |
7719 | exit (1); | |
7720 | ||
7721 | p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, | |
7722 | MAP_ANON|MAP_PRIVATE, dev_zero, 0); | |
7723 | if (p == (char *)-1) | |
7724 | p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, | |
7725 | MAP_ANON|MAP_PRIVATE, -1, 0); | |
7726 | if (p == (char *)-1) | |
7727 | exit (2); | |
7728 | else | |
7729 | { | |
7730 | char *string = "__si_type_info"; | |
7731 | char *q = (char *) p + MAP_LEN - strlen (string) - 2; | |
7732 | char *r = (char *) p + 0xe; | |
7733 | ||
7734 | strcpy (q, string); | |
7735 | strcpy (r, string); | |
7736 | strncmp (r, q, 14); | |
7737 | } | |
7738 | #endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ | |
7739 | exit (0); | |
7740 | } | |
7741 | ||
7742 | _ACEOF | |
7743 | if ac_fn_c_try_run "$LINENO"; then : | |
7744 | ac_cv_func_strncmp_works=yes | |
7745 | else | |
7746 | ac_cv_func_strncmp_works=no | |
7747 | fi | |
7748 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
7749 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
7750 | fi | |
7751 | ||
7752 | rm -f core core.* *.core | |
7753 | fi | |
7754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strncmp_works" >&5 | |
7755 | $as_echo "$ac_cv_func_strncmp_works" >&6; } | |
7756 | if test $ac_cv_func_strncmp_works = no ; then | |
7757 | case " $LIBOBJS " in | |
7758 | *" strncmp.$ac_objext "* ) ;; | |
7759 | *) LIBOBJS="$LIBOBJS strncmp.$ac_objext" | |
7760 | ;; | |
7761 | esac | |
7762 | ||
7763 | fi | |
7764 | ||
a9266bfa | 7765 | |
0bc0cd11 JL |
7766 | # Install a library built with a cross compiler in $(tooldir) rather |
7767 | # than $(libdir). | |
ca6b370d | 7768 | if test -z "${with_cross_host}"; then |
0bc0cd11 JL |
7769 | INSTALL_DEST=libdir |
7770 | else | |
7771 | INSTALL_DEST=tooldir | |
7772 | fi | |
7773 | ||
7774 | ||
ad49d865 L |
7775 | |
7776 | L="" | |
7777 | for l in x $LIBOBJS; do | |
7778 | case $l in | |
7779 | x) ;; | |
7780 | *) L="$L ./$l" ;; | |
7781 | esac | |
7782 | done | |
7783 | LIBOBJS="$L" | |
7784 | ||
cf61af07 CD |
7785 | |
7786 | ||
7787 | ||
7788 | ||
0bc0cd11 | 7789 | # We need multilib support, but only if configuring for the target. |
5213506e | 7790 | ac_config_files="$ac_config_files Makefile testsuite/Makefile" |
9bf3c9cc | 7791 | |
5213506e | 7792 | ac_config_commands="$ac_config_commands default" |
9bf3c9cc | 7793 | |
238235ef | 7794 | cat >confcache <<\_ACEOF |
0bc0cd11 JL |
7795 | # This file is a shell script that caches the results of configure |
7796 | # tests run on this system so they can be shared between configure | |
238235ef DJ |
7797 | # scripts and configure runs, see configure's option --config-cache. |
7798 | # It is not useful on other systems. If it contains results you don't | |
7799 | # want to keep, you may remove or edit it. | |
0bc0cd11 | 7800 | # |
238235ef DJ |
7801 | # config.status only pays attention to the cache file if you give it |
7802 | # the --recheck option to rerun configure. | |
0bc0cd11 | 7803 | # |
238235ef DJ |
7804 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
7805 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
7806 | # following values. | |
7807 | ||
7808 | _ACEOF | |
7809 | ||
0bc0cd11 JL |
7810 | # The following way of writing the cache mishandles newlines in values, |
7811 | # but we know of no workaround that is simple, portable, and efficient. | |
5213506e | 7812 | # So, we kill variables containing newlines. |
0bc0cd11 JL |
7813 | # Ultrix sh set writes to stderr and can't be redirected directly, |
7814 | # and sets the high bit in the cache file unless we assign to the vars. | |
5213506e RW |
7815 | ( |
7816 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
7817 | eval ac_val=\$$ac_var | |
7818 | case $ac_val in #( | |
7819 | *${as_nl}*) | |
7820 | case $ac_var in #( | |
7821 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
7822 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
7823 | esac | |
7824 | case $ac_var in #( | |
7825 | _ | IFS | as_nl) ;; #( | |
7826 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
7827 | *) { eval $ac_var=; unset $ac_var;} ;; | |
7828 | esac ;; | |
7829 | esac | |
7830 | done | |
7831 | ||
238235ef | 7832 | (set) 2>&1 | |
5213506e RW |
7833 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
7834 | *${as_nl}ac_space=\ *) | |
7835 | # `set' does not quote correctly, so add quotes: double-quote | |
7836 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
238235ef | 7837 | sed -n \ |
3beb1315 HPN |
7838 | "s/'/'\\\\''/g; |
7839 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
5213506e | 7840 | ;; #( |
238235ef DJ |
7841 | *) |
7842 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5213506e | 7843 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
238235ef | 7844 | ;; |
5213506e RW |
7845 | esac | |
7846 | sort | |
7847 | ) | | |
238235ef | 7848 | sed ' |
5213506e | 7849 | /^ac_cv_env_/b end |
238235ef | 7850 | t clear |
5213506e | 7851 | :clear |
238235ef DJ |
7852 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
7853 | t end | |
5213506e RW |
7854 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
7855 | :end' >>confcache | |
7856 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
7857 | if test -w "$cache_file"; then | |
22e05272 | 7858 | if test "x$cache_file" != "x/dev/null"; then |
5213506e RW |
7859 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
7860 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
22e05272 JM |
7861 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
7862 | cat confcache >"$cache_file" | |
7863 | else | |
7864 | case $cache_file in #( | |
7865 | */* | ?:*) | |
7866 | mv -f confcache "$cache_file"$$ && | |
7867 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
7868 | *) | |
7869 | mv -f confcache "$cache_file" ;; | |
7870 | esac | |
7871 | fi | |
7872 | fi | |
0bc0cd11 | 7873 | else |
5213506e RW |
7874 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
7875 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
0bc0cd11 JL |
7876 | fi |
7877 | fi | |
7878 | rm -f confcache | |
7879 | ||
0bc0cd11 JL |
7880 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
7881 | # Let make expand exec_prefix. | |
7882 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7883 | ||
0bc0cd11 JL |
7884 | DEFS=-DHAVE_CONFIG_H |
7885 | ||
238235ef DJ |
7886 | ac_libobjs= |
7887 | ac_ltlibobjs= | |
22e05272 | 7888 | U= |
238235ef DJ |
7889 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
7890 | # 1. Remove the extension, and $U if already installed. | |
5213506e RW |
7891 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
7892 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
7893 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
7894 | # will be set to the directory where LIBOBJS objects are built. | |
7895 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
7896 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
238235ef DJ |
7897 | done |
7898 | LIBOBJS=$ac_libobjs | |
0bc0cd11 | 7899 | |
238235ef DJ |
7900 | LTLIBOBJS=$ac_ltlibobjs |
7901 | ||
7902 | ||
7903 | ||
5213506e | 7904 | |
22e05272 | 7905 | : "${CONFIG_STATUS=./config.status}" |
5213506e | 7906 | ac_write_fail=0 |
238235ef DJ |
7907 | ac_clean_files_save=$ac_clean_files |
7908 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
5213506e RW |
7909 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
7910 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
7911 | as_write_fail=0 | |
7912 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
238235ef DJ |
7913 | #! $SHELL |
7914 | # Generated by $as_me. | |
0bc0cd11 | 7915 | # Run this file to recreate the current configuration. |
0bc0cd11 | 7916 | # Compiler output produced by configure, useful for debugging |
238235ef | 7917 | # configure, is in config.log if it exists. |
0bc0cd11 | 7918 | |
238235ef DJ |
7919 | debug=false |
7920 | ac_cs_recheck=false | |
7921 | ac_cs_silent=false | |
238235ef | 7922 | |
5213506e RW |
7923 | SHELL=\${CONFIG_SHELL-$SHELL} |
7924 | export SHELL | |
7925 | _ASEOF | |
7926 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
7927 | ## -------------------- ## | |
7928 | ## M4sh Initialization. ## | |
7929 | ## -------------------- ## | |
7930 | ||
7931 | # Be more Bourne compatible | |
7932 | DUALCASE=1; export DUALCASE # for MKS sh | |
7933 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
238235ef DJ |
7934 | emulate sh |
7935 | NULLCMD=: | |
5213506e | 7936 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
238235ef DJ |
7937 | # is contrary to our usage. Disable this feature. |
7938 | alias -g '${1+"$@"}'='"$@"' | |
5213506e RW |
7939 | setopt NO_GLOB_SUBST |
7940 | else | |
7941 | case `(set -o) 2>/dev/null` in #( | |
7942 | *posix*) : | |
7943 | set -o posix ;; #( | |
7944 | *) : | |
7945 | ;; | |
7946 | esac | |
238235ef DJ |
7947 | fi |
7948 | ||
5213506e RW |
7949 | |
7950 | as_nl=' | |
7951 | ' | |
7952 | export as_nl | |
7953 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
7954 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
7955 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
7956 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
7957 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
7958 | # but without wasting forks for bash or zsh. | |
7959 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
7960 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
7961 | as_echo='print -r --' | |
7962 | as_echo_n='print -rn --' | |
7963 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
7964 | as_echo='printf %s\n' | |
7965 | as_echo_n='printf %s' | |
7966 | else | |
7967 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
7968 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
7969 | as_echo_n='/usr/ucb/echo -n' | |
7970 | else | |
7971 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
7972 | as_echo_n_body='eval | |
7973 | arg=$1; | |
7974 | case $arg in #( | |
7975 | *"$as_nl"*) | |
7976 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
7977 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
7978 | esac; | |
7979 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
7980 | ' | |
7981 | export as_echo_n_body | |
7982 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
7983 | fi | |
7984 | export as_echo_body | |
7985 | as_echo='sh -c $as_echo_body as_echo' | |
7986 | fi | |
7987 | ||
7988 | # The user is always right. | |
7989 | if test "${PATH_SEPARATOR+set}" != set; then | |
7990 | PATH_SEPARATOR=: | |
7991 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
7992 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
7993 | PATH_SEPARATOR=';' | |
7994 | } | |
238235ef DJ |
7995 | fi |
7996 | ||
7997 | ||
5213506e RW |
7998 | # IFS |
7999 | # We need space, tab and new line, in precisely that order. Quoting is | |
8000 | # there to prevent editors from complaining about space-tab. | |
8001 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
8002 | # splitting by setting IFS to empty value.) | |
8003 | IFS=" "" $as_nl" | |
8004 | ||
8005 | # Find who we are. Look in the path if we contain no directory separator. | |
22e05272 | 8006 | as_myself= |
5213506e RW |
8007 | case $0 in #(( |
8008 | *[\\/]* ) as_myself=$0 ;; | |
8009 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8010 | for as_dir in $PATH | |
8011 | do | |
8012 | IFS=$as_save_IFS | |
8013 | test -z "$as_dir" && as_dir=. | |
8014 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
8015 | done | |
8016 | IFS=$as_save_IFS | |
8017 | ||
8018 | ;; | |
8019 | esac | |
8020 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
8021 | # in which case we are not to be found in the path. | |
8022 | if test "x$as_myself" = x; then | |
8023 | as_myself=$0 | |
8024 | fi | |
8025 | if test ! -f "$as_myself"; then | |
8026 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
8027 | exit 1 | |
8028 | fi | |
8029 | ||
8030 | # Unset variables that we do not need and which cause bugs (e.g. in | |
8031 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
8032 | # suppresses any "Segmentation fault" message there. '((' could | |
8033 | # trigger a bug in pdksh 5.2.14. | |
8034 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
8035 | do eval test x\${$as_var+set} = xset \ | |
8036 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
8037 | done | |
238235ef DJ |
8038 | PS1='$ ' |
8039 | PS2='> ' | |
8040 | PS4='+ ' | |
8041 | ||
8042 | # NLS nuisances. | |
5213506e RW |
8043 | LC_ALL=C |
8044 | export LC_ALL | |
8045 | LANGUAGE=C | |
8046 | export LANGUAGE | |
8047 | ||
8048 | # CDPATH. | |
8049 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
8050 | ||
8051 | ||
22e05272 JM |
8052 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
8053 | # ---------------------------------------- | |
5213506e RW |
8054 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
8055 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
22e05272 | 8056 | # script with STATUS, using 1 if that was 0. |
5213506e RW |
8057 | as_fn_error () |
8058 | { | |
22e05272 JM |
8059 | as_status=$1; test $as_status -eq 0 && as_status=1 |
8060 | if test "$4"; then | |
8061 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
8062 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
238235ef | 8063 | fi |
22e05272 | 8064 | $as_echo "$as_me: error: $2" >&2 |
5213506e RW |
8065 | as_fn_exit $as_status |
8066 | } # as_fn_error | |
8067 | ||
8068 | ||
8069 | # as_fn_set_status STATUS | |
8070 | # ----------------------- | |
8071 | # Set $? to STATUS, without forking. | |
8072 | as_fn_set_status () | |
8073 | { | |
8074 | return $1 | |
8075 | } # as_fn_set_status | |
8076 | ||
8077 | # as_fn_exit STATUS | |
8078 | # ----------------- | |
8079 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
8080 | as_fn_exit () | |
8081 | { | |
8082 | set +e | |
8083 | as_fn_set_status $1 | |
8084 | exit $1 | |
8085 | } # as_fn_exit | |
8086 | ||
8087 | # as_fn_unset VAR | |
8088 | # --------------- | |
8089 | # Portably unset VAR. | |
8090 | as_fn_unset () | |
8091 | { | |
8092 | { eval $1=; unset $1;} | |
8093 | } | |
8094 | as_unset=as_fn_unset | |
8095 | # as_fn_append VAR VALUE | |
8096 | # ---------------------- | |
8097 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
8098 | # advantage of any shell optimizations that allow amortized linear growth over | |
8099 | # repeated appends, instead of the typical quadratic growth present in naive | |
8100 | # implementations. | |
8101 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
8102 | eval 'as_fn_append () | |
8103 | { | |
8104 | eval $1+=\$2 | |
8105 | }' | |
8106 | else | |
8107 | as_fn_append () | |
8108 | { | |
8109 | eval $1=\$$1\$2 | |
8110 | } | |
8111 | fi # as_fn_append | |
8112 | ||
8113 | # as_fn_arith ARG... | |
8114 | # ------------------ | |
8115 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
8116 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
8117 | # must be portable across $(()) and expr. | |
8118 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
8119 | eval 'as_fn_arith () | |
8120 | { | |
8121 | as_val=$(( $* )) | |
8122 | }' | |
8123 | else | |
8124 | as_fn_arith () | |
8125 | { | |
8126 | as_val=`expr "$@" || test $? -eq 1` | |
8127 | } | |
8128 | fi # as_fn_arith | |
8129 | ||
0bc0cd11 | 8130 | |
5213506e RW |
8131 | if expr a : '\(a\)' >/dev/null 2>&1 && |
8132 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
238235ef DJ |
8133 | as_expr=expr |
8134 | else | |
8135 | as_expr=false | |
8136 | fi | |
0bc0cd11 | 8137 | |
5213506e | 8138 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
238235ef DJ |
8139 | as_basename=basename |
8140 | else | |
8141 | as_basename=false | |
8142 | fi | |
0bc0cd11 | 8143 | |
5213506e RW |
8144 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
8145 | as_dirname=dirname | |
8146 | else | |
8147 | as_dirname=false | |
8148 | fi | |
0bc0cd11 | 8149 | |
5213506e | 8150 | as_me=`$as_basename -- "$0" || |
238235ef DJ |
8151 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
8152 | X"$0" : 'X\(//\)$' \| \ | |
5213506e RW |
8153 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
8154 | $as_echo X/"$0" | | |
8155 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
8156 | s//\1/ | |
8157 | q | |
8158 | } | |
8159 | /^X\/\(\/\/\)$/{ | |
8160 | s//\1/ | |
8161 | q | |
8162 | } | |
8163 | /^X\/\(\/\).*/{ | |
8164 | s//\1/ | |
8165 | q | |
8166 | } | |
8167 | s/.*/./; q'` | |
238235ef | 8168 | |
238235ef DJ |
8169 | # Avoid depending upon Character Ranges. |
8170 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
8171 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
8172 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
8173 | as_cr_digits='0123456789' | |
8174 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
0bc0cd11 | 8175 | |
5213506e RW |
8176 | ECHO_C= ECHO_N= ECHO_T= |
8177 | case `echo -n x` in #((((( | |
8178 | -n*) | |
8179 | case `echo 'xy\c'` in | |
8180 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
8181 | xy) ECHO_C='\c';; | |
8182 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
8183 | ECHO_T=' ';; | |
8184 | esac;; | |
8185 | *) | |
8186 | ECHO_N='-n';; | |
238235ef DJ |
8187 | esac |
8188 | ||
5213506e RW |
8189 | rm -f conf$$ conf$$.exe conf$$.file |
8190 | if test -d conf$$.dir; then | |
8191 | rm -f conf$$.dir/conf$$.file | |
238235ef | 8192 | else |
5213506e RW |
8193 | rm -f conf$$.dir |
8194 | mkdir conf$$.dir 2>/dev/null | |
238235ef | 8195 | fi |
5213506e RW |
8196 | if (echo >conf$$.file) 2>/dev/null; then |
8197 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
238235ef | 8198 | as_ln_s='ln -s' |
5213506e RW |
8199 | # ... but there are two gotchas: |
8200 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
8201 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
22e05272 | 8202 | # In both cases, we have to default to `cp -pR'. |
5213506e | 8203 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
22e05272 | 8204 | as_ln_s='cp -pR' |
5213506e RW |
8205 | elif ln conf$$.file conf$$ 2>/dev/null; then |
8206 | as_ln_s=ln | |
8207 | else | |
22e05272 | 8208 | as_ln_s='cp -pR' |
0bc0cd11 | 8209 | fi |
238235ef | 8210 | else |
22e05272 | 8211 | as_ln_s='cp -pR' |
238235ef | 8212 | fi |
5213506e RW |
8213 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
8214 | rmdir conf$$.dir 2>/dev/null | |
8215 | ||
8216 | ||
8217 | # as_fn_mkdir_p | |
8218 | # ------------- | |
8219 | # Create "$as_dir" as a directory, including parents if necessary. | |
8220 | as_fn_mkdir_p () | |
8221 | { | |
8222 | ||
8223 | case $as_dir in #( | |
8224 | -*) as_dir=./$as_dir;; | |
8225 | esac | |
8226 | test -d "$as_dir" || eval $as_mkdir_p || { | |
8227 | as_dirs= | |
8228 | while :; do | |
8229 | case $as_dir in #( | |
8230 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
8231 | *) as_qdir=$as_dir;; | |
8232 | esac | |
8233 | as_dirs="'$as_qdir' $as_dirs" | |
8234 | as_dir=`$as_dirname -- "$as_dir" || | |
8235 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
8236 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
8237 | X"$as_dir" : 'X\(//\)$' \| \ | |
8238 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
8239 | $as_echo X"$as_dir" | | |
8240 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
8241 | s//\1/ | |
8242 | q | |
8243 | } | |
8244 | /^X\(\/\/\)[^/].*/{ | |
8245 | s//\1/ | |
8246 | q | |
8247 | } | |
8248 | /^X\(\/\/\)$/{ | |
8249 | s//\1/ | |
8250 | q | |
8251 | } | |
8252 | /^X\(\/\).*/{ | |
8253 | s//\1/ | |
8254 | q | |
8255 | } | |
8256 | s/.*/./; q'` | |
8257 | test -d "$as_dir" && break | |
8258 | done | |
8259 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
22e05272 | 8260 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
238235ef | 8261 | |
5213506e RW |
8262 | |
8263 | } # as_fn_mkdir_p | |
238235ef | 8264 | if mkdir -p . 2>/dev/null; then |
5213506e | 8265 | as_mkdir_p='mkdir -p "$as_dir"' |
238235ef | 8266 | else |
3beb1315 | 8267 | test -d ./-p && rmdir ./-p |
238235ef DJ |
8268 | as_mkdir_p=false |
8269 | fi | |
8270 | ||
22e05272 JM |
8271 | |
8272 | # as_fn_executable_p FILE | |
8273 | # ----------------------- | |
8274 | # Test if FILE is an executable regular file. | |
8275 | as_fn_executable_p () | |
8276 | { | |
8277 | test -f "$1" && test -x "$1" | |
8278 | } # as_fn_executable_p | |
8279 | as_test_x='test -x' | |
8280 | as_executable_p=as_fn_executable_p | |
238235ef DJ |
8281 | |
8282 | # Sed expression to map a string onto a valid CPP name. | |
3beb1315 | 8283 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
238235ef DJ |
8284 | |
8285 | # Sed expression to map a string onto a valid variable name. | |
3beb1315 | 8286 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
238235ef DJ |
8287 | |
8288 | ||
238235ef | 8289 | exec 6>&1 |
5213506e RW |
8290 | ## ----------------------------------- ## |
8291 | ## Main body of $CONFIG_STATUS script. ## | |
8292 | ## ----------------------------------- ## | |
8293 | _ASEOF | |
8294 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
8295 | ||
8296 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
8297 | # Save the log message, to keep $0 and so on meaningful, and to | |
238235ef | 8298 | # report actual input values of CONFIG_FILES etc. instead of their |
5213506e RW |
8299 | # values after options handling. |
8300 | ac_log=" | |
238235ef | 8301 | This file was extended by $as_me, which was |
22e05272 | 8302 | generated by GNU Autoconf 2.69. Invocation command line was |
238235ef DJ |
8303 | |
8304 | CONFIG_FILES = $CONFIG_FILES | |
8305 | CONFIG_HEADERS = $CONFIG_HEADERS | |
8306 | CONFIG_LINKS = $CONFIG_LINKS | |
8307 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
8308 | $ $0 $@ | |
8309 | ||
5213506e RW |
8310 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
8311 | " | |
8312 | ||
238235ef DJ |
8313 | _ACEOF |
8314 | ||
5213506e RW |
8315 | case $ac_config_files in *" |
8316 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
8317 | esac | |
238235ef | 8318 | |
5213506e RW |
8319 | case $ac_config_headers in *" |
8320 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
8321 | esac | |
238235ef | 8322 | |
238235ef | 8323 | |
5213506e RW |
8324 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
8325 | # Files that config.status was made for. | |
8326 | config_files="$ac_config_files" | |
8327 | config_headers="$ac_config_headers" | |
8328 | config_commands="$ac_config_commands" | |
238235ef | 8329 | |
5213506e | 8330 | _ACEOF |
238235ef | 8331 | |
5213506e | 8332 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
238235ef | 8333 | ac_cs_usage="\ |
5213506e RW |
8334 | \`$as_me' instantiates files and other configuration actions |
8335 | from templates according to the current configuration. Unless the files | |
8336 | and actions are specified as TAGs, all are instantiated by default. | |
238235ef | 8337 | |
5213506e | 8338 | Usage: $0 [OPTION]... [TAG]... |
238235ef DJ |
8339 | |
8340 | -h, --help print this help, then exit | |
5213506e | 8341 | -V, --version print version number and configuration settings, then exit |
22e05272 | 8342 | --config print configuration, then exit |
5213506e RW |
8343 | -q, --quiet, --silent |
8344 | do not print progress messages | |
238235ef DJ |
8345 | -d, --debug don't remove temporary files |
8346 | --recheck update $as_me by reconfiguring in the same conditions | |
5213506e RW |
8347 | --file=FILE[:TEMPLATE] |
8348 | instantiate the configuration file FILE | |
8349 | --header=FILE[:TEMPLATE] | |
8350 | instantiate the configuration header FILE | |
238235ef DJ |
8351 | |
8352 | Configuration files: | |
8353 | $config_files | |
8354 | ||
8355 | Configuration headers: | |
8356 | $config_headers | |
8357 | ||
8358 | Configuration commands: | |
8359 | $config_commands | |
8360 | ||
5213506e | 8361 | Report bugs to the package provider." |
238235ef | 8362 | |
5213506e RW |
8363 | _ACEOF |
8364 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22e05272 | 8365 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
238235ef DJ |
8366 | ac_cs_version="\\ |
8367 | config.status | |
22e05272 JM |
8368 | configured by $0, generated by GNU Autoconf 2.69, |
8369 | with options \\"\$ac_cs_config\\" | |
238235ef | 8370 | |
22e05272 | 8371 | Copyright (C) 2012 Free Software Foundation, Inc. |
238235ef DJ |
8372 | This config.status script is free software; the Free Software Foundation |
8373 | gives unlimited permission to copy, distribute and modify it." | |
5213506e RW |
8374 | |
8375 | ac_pwd='$ac_pwd' | |
8376 | srcdir='$srcdir' | |
8377 | INSTALL='$INSTALL' | |
8378 | test -n "\$AWK" || AWK=awk | |
238235ef DJ |
8379 | _ACEOF |
8380 | ||
5213506e RW |
8381 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
8382 | # The default lists apply if the user does not specify any file. | |
238235ef DJ |
8383 | ac_need_defaults=: |
8384 | while test $# != 0 | |
8385 | do | |
8386 | case $1 in | |
22e05272 | 8387 | --*=?*) |
5213506e RW |
8388 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
8389 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
238235ef DJ |
8390 | ac_shift=: |
8391 | ;; | |
22e05272 JM |
8392 | --*=) |
8393 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
8394 | ac_optarg= | |
8395 | ac_shift=: | |
8396 | ;; | |
5213506e | 8397 | *) |
238235ef DJ |
8398 | ac_option=$1 |
8399 | ac_optarg=$2 | |
8400 | ac_shift=shift | |
8401 | ;; | |
238235ef DJ |
8402 | esac |
8403 | ||
8404 | case $ac_option in | |
8405 | # Handling of the options. | |
238235ef DJ |
8406 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
8407 | ac_cs_recheck=: ;; | |
5213506e RW |
8408 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
8409 | $as_echo "$ac_cs_version"; exit ;; | |
22e05272 JM |
8410 | --config | --confi | --conf | --con | --co | --c ) |
8411 | $as_echo "$ac_cs_config"; exit ;; | |
5213506e | 8412 | --debug | --debu | --deb | --de | --d | -d ) |
238235ef DJ |
8413 | debug=: ;; |
8414 | --file | --fil | --fi | --f ) | |
8415 | $ac_shift | |
5213506e RW |
8416 | case $ac_optarg in |
8417 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
22e05272 | 8418 | '') as_fn_error $? "missing file argument" ;; |
5213506e RW |
8419 | esac |
8420 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
238235ef DJ |
8421 | ac_need_defaults=false;; |
8422 | --header | --heade | --head | --hea ) | |
8423 | $ac_shift | |
5213506e RW |
8424 | case $ac_optarg in |
8425 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
8426 | esac | |
8427 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
238235ef | 8428 | ac_need_defaults=false;; |
5213506e RW |
8429 | --he | --h) |
8430 | # Conflict between --help and --header | |
22e05272 | 8431 | as_fn_error $? "ambiguous option: \`$1' |
5213506e RW |
8432 | Try \`$0 --help' for more information.";; |
8433 | --help | --hel | -h ) | |
8434 | $as_echo "$ac_cs_usage"; exit ;; | |
238235ef DJ |
8435 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
8436 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
8437 | ac_cs_silent=: ;; | |
8438 | ||
8439 | # This is an error. | |
22e05272 | 8440 | -*) as_fn_error $? "unrecognized option: \`$1' |
5213506e | 8441 | Try \`$0 --help' for more information." ;; |
238235ef | 8442 | |
5213506e RW |
8443 | *) as_fn_append ac_config_targets " $1" |
8444 | ac_need_defaults=false ;; | |
238235ef DJ |
8445 | |
8446 | esac | |
8447 | shift | |
0bc0cd11 | 8448 | done |
238235ef DJ |
8449 | |
8450 | ac_configure_extra_args= | |
8451 | ||
8452 | if $ac_cs_silent; then | |
8453 | exec 6>/dev/null | |
8454 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
0bc0cd11 | 8455 | fi |
0bc0cd11 | 8456 | |
238235ef | 8457 | _ACEOF |
5213506e | 8458 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
238235ef | 8459 | if \$ac_cs_recheck; then |
22e05272 | 8460 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
5213506e RW |
8461 | shift |
8462 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
8463 | CONFIG_SHELL='$SHELL' | |
8464 | export CONFIG_SHELL | |
8465 | exec "\$@" | |
238235ef | 8466 | fi |
0bc0cd11 | 8467 | |
238235ef | 8468 | _ACEOF |
5213506e RW |
8469 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
8470 | exec 5>>config.log | |
8471 | { | |
8472 | echo | |
8473 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
8474 | ## Running $as_me. ## | |
8475 | _ASBOX | |
8476 | $as_echo "$ac_log" | |
8477 | } >&5 | |
238235ef | 8478 | |
5213506e RW |
8479 | _ACEOF |
8480 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
238235ef | 8481 | # |
5213506e | 8482 | # INIT-COMMANDS |
238235ef | 8483 | # |
238235ef DJ |
8484 | srcdir=${srcdir} |
8485 | host=${host} | |
8486 | target=${target} | |
8487 | with_target_subdir=${with_target_subdir} | |
238235ef DJ |
8488 | with_multisubdir=${with_multisubdir} |
8489 | ac_configure_args="--enable-multilib ${ac_configure_args}" | |
8490 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
8491 | ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" | |
8492 | libiberty_topdir=${libiberty_topdir} | |
8493 | ||
8494 | ||
8495 | _ACEOF | |
8496 | ||
5213506e | 8497 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
238235ef | 8498 | |
5213506e | 8499 | # Handling of arguments. |
238235ef DJ |
8500 | for ac_config_target in $ac_config_targets |
8501 | do | |
5213506e RW |
8502 | case $ac_config_target in |
8503 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
8504 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
8505 | "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; | |
8506 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
8507 | ||
22e05272 | 8508 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
0bc0cd11 | 8509 | esac |
238235ef | 8510 | done |
0bc0cd11 | 8511 | |
5213506e | 8512 | |
238235ef DJ |
8513 | # If the user did not use the arguments to specify the items to instantiate, |
8514 | # then the envvar interface is used. Set only those that are not. | |
8515 | # We use the long form for the default assignment because of an extremely | |
8516 | # bizarre bug on SunOS 4.1.3. | |
8517 | if $ac_need_defaults; then | |
8518 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
8519 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
8520 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
8521 | fi | |
8522 | ||
8523 | # Have a temporary directory for convenience. Make it in the build tree | |
5213506e | 8524 | # simply because there is no reason against having it here, and in addition, |
238235ef | 8525 | # creating and moving files from /tmp can sometimes cause problems. |
5213506e RW |
8526 | # Hook for its removal unless debugging. |
8527 | # Note that there is a small window in which the directory will not be cleaned: | |
8528 | # after its creation but before its name has been assigned to `$tmp'. | |
238235ef DJ |
8529 | $debug || |
8530 | { | |
22e05272 | 8531 | tmp= ac_tmp= |
5213506e | 8532 | trap 'exit_status=$? |
22e05272 JM |
8533 | : "${ac_tmp:=$tmp}" |
8534 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
5213506e RW |
8535 | ' 0 |
8536 | trap 'as_fn_exit 1' 1 2 13 15 | |
238235ef | 8537 | } |
238235ef DJ |
8538 | # Create a (secure) tmp directory for tmp files. |
8539 | ||
8540 | { | |
5213506e | 8541 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
22e05272 | 8542 | test -d "$tmp" |
238235ef DJ |
8543 | } || |
8544 | { | |
5213506e RW |
8545 | tmp=./conf$$-$RANDOM |
8546 | (umask 077 && mkdir "$tmp") | |
22e05272 JM |
8547 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
8548 | ac_tmp=$tmp | |
5213506e RW |
8549 | |
8550 | # Set up the scripts for CONFIG_FILES section. | |
8551 | # No need to generate them if there are no CONFIG_FILES. | |
8552 | # This happens for instance with `./config.status config.h'. | |
8553 | if test -n "$CONFIG_FILES"; then | |
8554 | ||
8555 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
8556 | ac_cs_awk_getline=: | |
8557 | ac_cs_awk_pipe_init= | |
8558 | ac_cs_awk_read_file=' | |
8559 | while ((getline aline < (F[key])) > 0) | |
8560 | print(aline) | |
8561 | close(F[key])' | |
8562 | ac_cs_awk_pipe_fini= | |
8563 | else | |
8564 | ac_cs_awk_getline=false | |
8565 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
8566 | ac_cs_awk_read_file=' | |
8567 | print "|#_!!_#|" | |
8568 | print "cat " F[key] " &&" | |
8569 | '$ac_cs_awk_pipe_init | |
8570 | # The final `:' finishes the AND list. | |
8571 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
8572 | fi | |
8573 | ac_cr=`echo X | tr X '\015'` | |
8574 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
8575 | # But we know of no other shell where ac_cr would be empty at this | |
8576 | # point, so we can use a bashism as a fallback. | |
8577 | if test "x$ac_cr" = x; then | |
8578 | eval ac_cr=\$\'\\r\' | |
8579 | fi | |
8580 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
8581 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
22e05272 | 8582 | ac_cs_awk_cr='\\r' |
5213506e RW |
8583 | else |
8584 | ac_cs_awk_cr=$ac_cr | |
8585 | fi | |
8586 | ||
22e05272 | 8587 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
5213506e RW |
8588 | _ACEOF |
8589 | ||
8590 | # Create commands to substitute file output variables. | |
8591 | { | |
8592 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
22e05272 | 8593 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
5213506e RW |
8594 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
8595 | echo "_ACAWK" && | |
8596 | echo "_ACEOF" | |
8597 | } >conf$$files.sh && | |
8598 | . ./conf$$files.sh || | |
22e05272 | 8599 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
5213506e RW |
8600 | rm -f conf$$files.sh |
8601 | ||
238235ef | 8602 | { |
5213506e RW |
8603 | echo "cat >conf$$subs.awk <<_ACEOF" && |
8604 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
8605 | echo "_ACEOF" | |
8606 | } >conf$$subs.sh || | |
22e05272 JM |
8607 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
8608 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
5213506e RW |
8609 | ac_delim='%!_!# ' |
8610 | for ac_last_try in false false false false false :; do | |
8611 | . ./conf$$subs.sh || | |
22e05272 | 8612 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
5213506e RW |
8613 | |
8614 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
8615 | if test $ac_delim_n = $ac_delim_num; then | |
8616 | break | |
8617 | elif $ac_last_try; then | |
22e05272 | 8618 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
5213506e RW |
8619 | else |
8620 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
8621 | fi | |
8622 | done | |
8623 | rm -f conf$$subs.sh | |
8624 | ||
8625 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
22e05272 | 8626 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
5213506e RW |
8627 | _ACEOF |
8628 | sed -n ' | |
8629 | h | |
8630 | s/^/S["/; s/!.*/"]=/ | |
8631 | p | |
8632 | g | |
8633 | s/^[^!]*!// | |
8634 | :repl | |
8635 | t repl | |
8636 | s/'"$ac_delim"'$// | |
8637 | t delim | |
8638 | :nl | |
8639 | h | |
22e05272 | 8640 | s/\(.\{148\}\)..*/\1/ |
5213506e RW |
8641 | t more1 |
8642 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
8643 | p | |
8644 | n | |
8645 | b repl | |
8646 | :more1 | |
8647 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
8648 | p | |
8649 | g | |
8650 | s/.\{148\}// | |
8651 | t nl | |
8652 | :delim | |
8653 | h | |
22e05272 | 8654 | s/\(.\{148\}\)..*/\1/ |
5213506e RW |
8655 | t more2 |
8656 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
8657 | p | |
8658 | b | |
8659 | :more2 | |
8660 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
8661 | p | |
8662 | g | |
8663 | s/.\{148\}// | |
8664 | t delim | |
8665 | ' <conf$$subs.awk | sed ' | |
8666 | /^[^""]/{ | |
8667 | N | |
8668 | s/\n// | |
238235ef | 8669 | } |
5213506e RW |
8670 | ' >>$CONFIG_STATUS || ac_write_fail=1 |
8671 | rm -f conf$$subs.awk | |
8672 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
8673 | _ACAWK | |
22e05272 | 8674 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
5213506e RW |
8675 | for (key in S) S_is_set[key] = 1 |
8676 | FS = "\a" | |
8677 | \$ac_cs_awk_pipe_init | |
8678 | } | |
8679 | { | |
8680 | line = $ 0 | |
8681 | nfields = split(line, field, "@") | |
8682 | substed = 0 | |
8683 | len = length(field[1]) | |
8684 | for (i = 2; i < nfields; i++) { | |
8685 | key = field[i] | |
8686 | keylen = length(key) | |
8687 | if (S_is_set[key]) { | |
8688 | value = S[key] | |
8689 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
8690 | len += length(value) + length(field[++i]) | |
8691 | substed = 1 | |
8692 | } else | |
8693 | len += 1 + keylen | |
8694 | } | |
8695 | if (nfields == 3 && !substed) { | |
8696 | key = field[2] | |
8697 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
8698 | \$ac_cs_awk_read_file | |
8699 | next | |
8700 | } | |
8701 | } | |
8702 | print line | |
8703 | } | |
8704 | \$ac_cs_awk_pipe_fini | |
8705 | _ACAWK | |
8706 | _ACEOF | |
8707 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
8708 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
8709 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
8710 | else | |
8711 | cat | |
22e05272 JM |
8712 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
8713 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
238235ef DJ |
8714 | _ACEOF |
8715 | ||
22e05272 JM |
8716 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
8717 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
5213506e RW |
8718 | # trailing colons and then remove the whole line if VPATH becomes empty |
8719 | # (actually we leave an empty line to preserve line numbers). | |
8720 | if test "x$srcdir" = x.; then | |
22e05272 JM |
8721 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
8722 | h | |
8723 | s/// | |
8724 | s/^/:/ | |
8725 | s/[ ]*$/:/ | |
8726 | s/:\$(srcdir):/:/g | |
8727 | s/:\${srcdir}:/:/g | |
8728 | s/:@srcdir@:/:/g | |
8729 | s/^:*// | |
5213506e | 8730 | s/:*$// |
22e05272 JM |
8731 | x |
8732 | s/\(=[ ]*\).*/\1/ | |
8733 | G | |
8734 | s/\n// | |
5213506e RW |
8735 | s/^[^=]*=[ ]*$// |
8736 | }' | |
8737 | fi | |
238235ef | 8738 | |
5213506e RW |
8739 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
8740 | fi # test -n "$CONFIG_FILES" | |
238235ef | 8741 | |
5213506e RW |
8742 | # Set up the scripts for CONFIG_HEADERS section. |
8743 | # No need to generate them if there are no CONFIG_HEADERS. | |
8744 | # This happens for instance with `./config.status Makefile'. | |
8745 | if test -n "$CONFIG_HEADERS"; then | |
22e05272 | 8746 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
5213506e RW |
8747 | BEGIN { |
8748 | _ACEOF | |
8749 | ||
8750 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
8751 | # here-document in config.status, that substitutes the proper values into | |
8752 | # config.h.in to produce config.h. | |
8753 | ||
8754 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
8755 | # handling of long lines. | |
8756 | ac_delim='%!_!# ' | |
8757 | for ac_last_try in false false :; do | |
22e05272 JM |
8758 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
8759 | if test -z "$ac_tt"; then | |
5213506e RW |
8760 | break |
8761 | elif $ac_last_try; then | |
22e05272 | 8762 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
5213506e RW |
8763 | else |
8764 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
0bc0cd11 | 8765 | fi |
5213506e | 8766 | done |
0bc0cd11 | 8767 | |
5213506e RW |
8768 | # For the awk script, D is an array of macro values keyed by name, |
8769 | # likewise P contains macro parameters if any. Preserve backslash | |
8770 | # newline sequences. | |
8771 | ||
8772 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
8773 | sed -n ' | |
8774 | s/.\{148\}/&'"$ac_delim"'/g | |
8775 | t rset | |
8776 | :rset | |
8777 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
8778 | t def | |
8779 | d | |
8780 | :def | |
8781 | s/\\$// | |
8782 | t bsnl | |
8783 | s/["\\]/\\&/g | |
8784 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
8785 | D["\1"]=" \3"/p | |
8786 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
8787 | d | |
8788 | :bsnl | |
8789 | s/["\\]/\\&/g | |
8790 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
8791 | D["\1"]=" \3\\\\\\n"\\/p | |
8792 | t cont | |
8793 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
8794 | t cont | |
8795 | d | |
8796 | :cont | |
8797 | n | |
8798 | s/.\{148\}/&'"$ac_delim"'/g | |
8799 | t clear | |
8800 | :clear | |
8801 | s/\\$// | |
8802 | t bsnlc | |
8803 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
8804 | d | |
8805 | :bsnlc | |
8806 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
8807 | b cont | |
8808 | ' <confdefs.h | sed ' | |
8809 | s/'"$ac_delim"'/"\\\ | |
8810 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
8811 | ||
8812 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
8813 | for (key in D) D_is_set[key] = 1 | |
8814 | FS = "\a" | |
8815 | } | |
8816 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
8817 | line = \$ 0 | |
8818 | split(line, arg, " ") | |
8819 | if (arg[1] == "#") { | |
8820 | defundef = arg[2] | |
8821 | mac1 = arg[3] | |
8822 | } else { | |
8823 | defundef = substr(arg[1], 2) | |
8824 | mac1 = arg[2] | |
8825 | } | |
8826 | split(mac1, mac2, "(") #) | |
8827 | macro = mac2[1] | |
8828 | prefix = substr(line, 1, index(line, defundef) - 1) | |
8829 | if (D_is_set[macro]) { | |
8830 | # Preserve the white space surrounding the "#". | |
8831 | print prefix "define", macro P[macro] D[macro] | |
8832 | next | |
8833 | } else { | |
8834 | # Replace #undef with comments. This is necessary, for example, | |
8835 | # in the case of _POSIX_SOURCE, which is predefined and required | |
8836 | # on some systems where configure will not decide to define it. | |
8837 | if (defundef == "undef") { | |
8838 | print "/*", prefix defundef, macro, "*/" | |
8839 | next | |
8840 | } | |
8841 | } | |
8842 | } | |
8843 | { print } | |
8844 | _ACAWK | |
238235ef | 8845 | _ACEOF |
5213506e | 8846 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
22e05272 | 8847 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
5213506e RW |
8848 | fi # test -n "$CONFIG_HEADERS" |
8849 | ||
8850 | ||
8851 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
8852 | shift | |
8853 | for ac_tag | |
8854 | do | |
8855 | case $ac_tag in | |
8856 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
8857 | esac | |
8858 | case $ac_mode$ac_tag in | |
8859 | :[FHL]*:*);; | |
22e05272 | 8860 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
5213506e RW |
8861 | :[FH]-) ac_tag=-:-;; |
8862 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
8863 | esac | |
8864 | ac_save_IFS=$IFS | |
8865 | IFS=: | |
8866 | set x $ac_tag | |
8867 | IFS=$ac_save_IFS | |
8868 | shift | |
8869 | ac_file=$1 | |
8870 | shift | |
8871 | ||
8872 | case $ac_mode in | |
8873 | :L) ac_source=$1;; | |
8874 | :[FH]) | |
8875 | ac_file_inputs= | |
8876 | for ac_f | |
8877 | do | |
8878 | case $ac_f in | |
22e05272 | 8879 | -) ac_f="$ac_tmp/stdin";; |
5213506e RW |
8880 | *) # Look for the file first in the build tree, then in the source tree |
8881 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
8882 | # because $ac_f cannot contain `:'. | |
8883 | test -f "$ac_f" || | |
8884 | case $ac_f in | |
8885 | [\\/$]*) false;; | |
8886 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
8887 | esac || | |
22e05272 | 8888 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
5213506e RW |
8889 | esac |
8890 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
8891 | as_fn_append ac_file_inputs " '$ac_f'" | |
8892 | done | |
8893 | ||
8894 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
8895 | # use $as_me), people would be surprised to read: | |
8896 | # /* config.h. Generated by config.status. */ | |
8897 | configure_input='Generated from '` | |
8898 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
8899 | `' by configure.' | |
8900 | if test x"$ac_file" != x-; then | |
8901 | configure_input="$ac_file. $configure_input" | |
8902 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
8903 | $as_echo "$as_me: creating $ac_file" >&6;} | |
8904 | fi | |
8905 | # Neutralize special characters interpreted by sed in replacement strings. | |
8906 | case $configure_input in #( | |
8907 | *\&* | *\|* | *\\* ) | |
8908 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
8909 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
8910 | *) ac_sed_conf_input=$configure_input;; | |
8911 | esac | |
8912 | ||
8913 | case $ac_tag in | |
22e05272 JM |
8914 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
8915 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
5213506e RW |
8916 | esac |
8917 | ;; | |
0bc0cd11 JL |
8918 | esac |
8919 | ||
5213506e | 8920 | ac_dir=`$as_dirname -- "$ac_file" || |
238235ef | 8921 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
3beb1315 HPN |
8922 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
8923 | X"$ac_file" : 'X\(//\)$' \| \ | |
5213506e RW |
8924 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
8925 | $as_echo X"$ac_file" | | |
8926 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
8927 | s//\1/ | |
8928 | q | |
8929 | } | |
8930 | /^X\(\/\/\)[^/].*/{ | |
8931 | s//\1/ | |
8932 | q | |
8933 | } | |
8934 | /^X\(\/\/\)$/{ | |
8935 | s//\1/ | |
8936 | q | |
8937 | } | |
8938 | /^X\(\/\).*/{ | |
8939 | s//\1/ | |
8940 | q | |
8941 | } | |
8942 | s/.*/./; q'` | |
8943 | as_dir="$ac_dir"; as_fn_mkdir_p | |
238235ef | 8944 | ac_builddir=. |
0bc0cd11 | 8945 | |
5213506e RW |
8946 | case "$ac_dir" in |
8947 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
8948 | *) | |
8949 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
8950 | # A ".." for each directory in $ac_dir_suffix. | |
8951 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
8952 | case $ac_top_builddir_sub in | |
8953 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
8954 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
8955 | esac ;; | |
8956 | esac | |
8957 | ac_abs_top_builddir=$ac_pwd | |
8958 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
8959 | # for backward compatibility: | |
8960 | ac_top_builddir=$ac_top_build_prefix | |
238235ef DJ |
8961 | |
8962 | case $srcdir in | |
5213506e | 8963 | .) # We are building in place. |
238235ef | 8964 | ac_srcdir=. |
5213506e RW |
8965 | ac_top_srcdir=$ac_top_builddir_sub |
8966 | ac_abs_top_srcdir=$ac_pwd ;; | |
8967 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
238235ef | 8968 | ac_srcdir=$srcdir$ac_dir_suffix; |
5213506e RW |
8969 | ac_top_srcdir=$srcdir |
8970 | ac_abs_top_srcdir=$srcdir ;; | |
8971 | *) # Relative name. | |
8972 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
8973 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
8974 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
238235ef | 8975 | esac |
5213506e | 8976 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
a4f74b58 | 8977 | |
238235ef | 8978 | |
5213506e RW |
8979 | case $ac_mode in |
8980 | :F) | |
8981 | # | |
8982 | # CONFIG_FILE | |
8983 | # | |
238235ef DJ |
8984 | |
8985 | case $INSTALL in | |
8986 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
5213506e | 8987 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
0bc0cd11 | 8988 | esac |
5213506e | 8989 | _ACEOF |
0bc0cd11 | 8990 | |
5213506e RW |
8991 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
8992 | # If the template does not know about datarootdir, expand it. | |
8993 | # FIXME: This hack should be removed a few years after 2.60. | |
8994 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
8995 | ac_sed_dataroot=' | |
8996 | /datarootdir/ { | |
8997 | p | |
8998 | q | |
8999 | } | |
9000 | /@datadir@/p | |
9001 | /@docdir@/p | |
9002 | /@infodir@/p | |
9003 | /@localedir@/p | |
9004 | /@mandir@/p' | |
9005 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
9006 | *datarootdir*) ac_datarootdir_seen=yes;; | |
9007 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
9008 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
9009 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
9010 | _ACEOF | |
9011 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9012 | ac_datarootdir_hack=' | |
9013 | s&@datadir@&$datadir&g | |
9014 | s&@docdir@&$docdir&g | |
9015 | s&@infodir@&$infodir&g | |
9016 | s&@localedir@&$localedir&g | |
9017 | s&@mandir@&$mandir&g | |
9018 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
9019 | esac | |
238235ef | 9020 | _ACEOF |
5213506e RW |
9021 | |
9022 | # Neutralize VPATH when `$srcdir' = `.'. | |
9023 | # Shell code in configure.ac might set extrasub. | |
9024 | # FIXME: do we really want to maintain this feature? | |
9025 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
9026 | ac_sed_extra="$ac_vpsub | |
238235ef DJ |
9027 | $extrasub |
9028 | _ACEOF | |
5213506e | 9029 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
238235ef DJ |
9030 | :t |
9031 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
5213506e RW |
9032 | s|@configure_input@|$ac_sed_conf_input|;t t |
9033 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
9034 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
9035 | s&@srcdir@&$ac_srcdir&;t t | |
9036 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
9037 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
9038 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
9039 | s&@builddir@&$ac_builddir&;t t | |
9040 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
9041 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
9042 | s&@INSTALL@&$ac_INSTALL&;t t | |
9043 | $ac_datarootdir_hack | |
9044 | " | |
9045 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
9046 | if $ac_cs_awk_getline; then | |
22e05272 | 9047 | $AWK -f "$ac_tmp/subs.awk" |
5213506e | 9048 | else |
22e05272 JM |
9049 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
9050 | fi \ | |
9051 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
5213506e RW |
9052 | |
9053 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
22e05272 JM |
9054 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
9055 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
9056 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
5213506e | 9057 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
22e05272 | 9058 | which seems to be undefined. Please make sure it is defined" >&5 |
5213506e | 9059 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
22e05272 | 9060 | which seems to be undefined. Please make sure it is defined" >&2;} |
5213506e | 9061 | |
22e05272 | 9062 | rm -f "$ac_tmp/stdin" |
238235ef | 9063 | case $ac_file in |
22e05272 JM |
9064 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
9065 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
5213506e | 9066 | esac \ |
22e05272 | 9067 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
5213506e RW |
9068 | ;; |
9069 | :H) | |
9070 | # | |
9071 | # CONFIG_HEADER | |
9072 | # | |
238235ef | 9073 | if test x"$ac_file" != x-; then |
5213506e RW |
9074 | { |
9075 | $as_echo "/* $configure_input */" \ | |
22e05272 JM |
9076 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
9077 | } >"$ac_tmp/config.h" \ | |
9078 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
9079 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
5213506e RW |
9080 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
9081 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
238235ef | 9082 | else |
5213506e | 9083 | rm -f "$ac_file" |
22e05272 JM |
9084 | mv "$ac_tmp/config.h" "$ac_file" \ |
9085 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
238235ef DJ |
9086 | fi |
9087 | else | |
5213506e | 9088 | $as_echo "/* $configure_input */" \ |
22e05272 JM |
9089 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
9090 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
238235ef | 9091 | fi |
5213506e | 9092 | ;; |
a4f74b58 | 9093 | |
5213506e RW |
9094 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
9095 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
9096 | ;; | |
9097 | esac | |
238235ef DJ |
9098 | |
9099 | ||
5213506e RW |
9100 | case $ac_file$ac_mode in |
9101 | "default":C) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h | |
0bc0cd11 | 9102 | if test -n "$CONFIG_FILES"; then |
7b3ed47d | 9103 | if test -n "${with_target_subdir}"; then |
0bc0cd11 JL |
9104 | # FIXME: We shouldn't need to set ac_file |
9105 | ac_file=Makefile | |
6706f116 | 9106 | LD="${ORIGINAL_LD_FOR_MULTILIBS}" |
0bc0cd11 JL |
9107 | . ${libiberty_topdir}/config-ml.in |
9108 | fi | |
238235ef | 9109 | fi ;; |
5213506e | 9110 | |
238235ef | 9111 | esac |
5213506e | 9112 | done # for ac_tag |
238235ef | 9113 | |
238235ef | 9114 | |
5213506e | 9115 | as_fn_exit 0 |
238235ef | 9116 | _ACEOF |
238235ef DJ |
9117 | ac_clean_files=$ac_clean_files_save |
9118 | ||
5213506e | 9119 | test $ac_write_fail = 0 || |
22e05272 | 9120 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
5213506e | 9121 | |
238235ef DJ |
9122 | |
9123 | # configure is writing to config.log, and then calls config.status. | |
9124 | # config.status does its own redirection, appending to config.log. | |
9125 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
9126 | # by configure, so config.status won't be able to write to it; its | |
9127 | # output is simply discarded. So we exec the FD to /dev/null, | |
9128 | # effectively closing config.log, so it can be properly (re)opened and | |
9129 | # appended to by config.status. When coming back to configure, we | |
9130 | # need to make the FD available again. | |
9131 | if test "$no_create" != yes; then | |
9132 | ac_cs_success=: | |
9133 | ac_config_status_args= | |
9134 | test "$silent" = yes && | |
9135 | ac_config_status_args="$ac_config_status_args --quiet" | |
9136 | exec 5>/dev/null | |
9137 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
9138 | exec 5>>config.log | |
9139 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
9140 | # would make configure fail if this is the last instruction. | |
22e05272 | 9141 | $ac_cs_success || as_fn_exit 1 |
5213506e RW |
9142 | fi |
9143 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
9144 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
9145 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
238235ef | 9146 | fi |
0bc0cd11 | 9147 |