Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb 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 : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb 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 | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb 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 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb 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. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
783e057b | 591 | gl_header_list= |
f434ba03 | 592 | gl_func_list= |
81ecdfbb RW |
593 | enable_option_checking=no |
594 | ac_subst_vars='am__EXEEXT_FALSE | |
595 | am__EXEEXT_TRUE | |
596 | gltests_LTLIBOBJS | |
597 | gltests_LIBOBJS | |
598 | gl_LTLIBOBJS | |
599 | gl_LIBOBJS | |
600 | LTLIBOBJS | |
601 | LIBOBJS | |
602 | GDB_NM_FILE | |
603 | frags | |
604 | target_subdir | |
605 | CONFIG_UNINSTALL | |
606 | CONFIG_INSTALL | |
607 | CONFIG_CLEAN | |
608 | CONFIG_ALL | |
609 | CONFIG_SRCS | |
610 | CONFIG_DEPS | |
611 | CONFIG_OBS | |
612 | PROFILE_CFLAGS | |
613 | ENABLE_CFLAGS | |
614 | SIM_OBS | |
615 | SIM | |
616 | XMKMF | |
617 | GDBTK_SRC_DIR | |
618 | GDBTK_CFLAGS | |
619 | GDBTKLIBS | |
620 | X_LIBS | |
621 | X_LDFLAGS | |
622 | X_CFLAGS | |
623 | TK_XINCLUDES | |
624 | TK_DEPS | |
625 | TK_LIBRARY | |
626 | TK_INCLUDE | |
627 | TK_STUB_LIB_SPEC | |
628 | TK_STUB_LIB_FLAG | |
629 | TK_STUB_LIB_FILE | |
630 | TK_LIB_SPEC | |
631 | TK_LIB_FLAG | |
632 | TK_LIB_FILE | |
633 | TK_SRC_DIR | |
634 | TK_BIN_DIR | |
635 | TK_VERSION | |
636 | TCL_DEPS | |
637 | TCL_LIBRARY | |
638 | TCL_INCLUDE | |
639 | TCL_STUB_LIB_SPEC | |
640 | TCL_STUB_LIB_FLAG | |
641 | TCL_STUB_LIB_FILE | |
642 | TCL_LIB_SPEC | |
643 | TCL_LIB_FLAG | |
644 | TCL_LIB_FILE | |
645 | TCL_SRC_DIR | |
646 | TCL_BIN_DIR | |
647 | TCL_PATCH_LEVEL | |
648 | TCL_VERSION | |
649 | WIN32LDAPP | |
650 | GUI_CFLAGS_X | |
651 | LIBGUI | |
652 | WIN32LIBS | |
653 | SER_HARDWIRE | |
654 | WERROR_CFLAGS | |
655 | WARN_CFLAGS | |
656 | SYSTEM_GDBINIT | |
81ecdfbb RW |
657 | TARGET_SYSTEM_ROOT |
658 | CONFIG_LDFLAGS | |
f6528abd | 659 | RDYNAMIC |
81ecdfbb | 660 | ALLOCA |
ac534cba JB |
661 | PYTHON_LIBS |
662 | PYTHON_CPPFLAGS | |
81ecdfbb | 663 | PYTHON_CFLAGS |
ec685c5e | 664 | python_prog_path |
81ecdfbb RW |
665 | LTLIBEXPAT |
666 | LIBEXPAT | |
667 | HAVE_LIBEXPAT | |
b8e0a31c | 668 | JIT_READER_DIR |
f997c383 | 669 | TARGET_PTR |
39037522 | 670 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
671 | READLINE_CFLAGS |
672 | READLINE_DEPS | |
673 | READLINE | |
674 | MIG | |
675 | WINDRES | |
676 | DLLTOOL | |
677 | AR | |
678 | YFLAGS | |
679 | YACC | |
680 | LN_S | |
681 | REPORT_BUGS_TEXI | |
682 | REPORT_BUGS_TO | |
683 | PKGVERSION | |
684 | TARGET_OBS | |
685 | subdirs | |
686 | GDB_DATADIR | |
687 | DEBUGDIR | |
688 | am__fastdepCC_FALSE | |
689 | am__fastdepCC_TRUE | |
690 | AMDEPBACKSLASH | |
691 | AMDEP_FALSE | |
692 | AMDEP_TRUE | |
693 | am__quote | |
694 | am__include | |
695 | am__untar | |
696 | am__tar | |
697 | AMTAR | |
698 | AWK | |
699 | mkdir_p | |
700 | MKDIR_P | |
701 | INSTALL_STRIP_PROGRAM | |
702 | STRIP | |
703 | install_sh | |
81ecdfbb RW |
704 | AUTOHEADER |
705 | AUTOMAKE | |
706 | AUTOCONF | |
707 | ACLOCAL | |
708 | VERSION | |
709 | CYGPATH_W | |
710 | am__isrc | |
711 | INSTALL_DATA | |
712 | INSTALL_SCRIPT | |
713 | INSTALL_PROGRAM | |
5048e516 JK |
714 | MAKEINFO_EXTRA_FLAGS |
715 | MAKEINFOFLAGS | |
716 | MAKEINFO | |
81ecdfbb RW |
717 | PACKAGE |
718 | GNULIB_STDINT_H | |
719 | LIBGNU_LTLIBDEPS | |
720 | LIBGNU_LIBDEPS | |
f434ba03 PA |
721 | gltests_WITNESS |
722 | HAVE_WINT_T | |
81ecdfbb | 723 | HAVE_WCHAR_H |
f434ba03 PA |
724 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H |
725 | NEXT_WCHAR_H | |
81ecdfbb | 726 | REPLACE_WCWIDTH |
f434ba03 PA |
727 | REPLACE_WCSNRTOMBS |
728 | REPLACE_WCSRTOMBS | |
729 | REPLACE_WCRTOMB | |
730 | REPLACE_MBSNRTOWCS | |
731 | REPLACE_MBSRTOWCS | |
732 | REPLACE_MBRLEN | |
733 | REPLACE_MBRTOWC | |
734 | REPLACE_MBSINIT | |
735 | REPLACE_WCTOB | |
736 | REPLACE_BTOWC | |
737 | REPLACE_MBSTATE_T | |
81ecdfbb | 738 | HAVE_DECL_WCWIDTH |
f434ba03 PA |
739 | HAVE_DECL_WCTOB |
740 | HAVE_WCSNRTOMBS | |
741 | HAVE_WCSRTOMBS | |
742 | HAVE_WCRTOMB | |
743 | HAVE_MBSNRTOWCS | |
744 | HAVE_MBSRTOWCS | |
745 | HAVE_MBRLEN | |
746 | HAVE_MBRTOWC | |
747 | HAVE_MBSINIT | |
748 | HAVE_BTOWC | |
81ecdfbb | 749 | GNULIB_WCWIDTH |
f434ba03 PA |
750 | GNULIB_WCSNRTOMBS |
751 | GNULIB_WCSRTOMBS | |
752 | GNULIB_WCRTOMB | |
753 | GNULIB_MBSNRTOWCS | |
754 | GNULIB_MBSRTOWCS | |
755 | GNULIB_MBRLEN | |
756 | GNULIB_MBRTOWC | |
757 | GNULIB_MBSINIT | |
758 | GNULIB_WCTOB | |
759 | GNULIB_BTOWC | |
760 | NEXT_AS_FIRST_DIRECTIVE_STRING_H | |
81ecdfbb | 761 | NEXT_STRING_H |
f434ba03 PA |
762 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H |
763 | NEXT_STDDEF_H | |
f434ba03 PA |
764 | STDDEF_H |
765 | HAVE_WCHAR_T | |
766 | REPLACE_NULL | |
f434ba03 PA |
767 | UNDEFINE_STRTOK_R |
768 | REPLACE_STRTOK_R | |
81ecdfbb | 769 | REPLACE_STRSIGNAL |
f434ba03 PA |
770 | REPLACE_STRNLEN |
771 | REPLACE_STRNDUP | |
772 | REPLACE_STRNCAT | |
81ecdfbb | 773 | REPLACE_STRERROR |
f434ba03 PA |
774 | REPLACE_STRCASESTR |
775 | REPLACE_STRSTR | |
776 | REPLACE_STRDUP | |
777 | REPLACE_STPNCPY | |
778 | REPLACE_MEMMEM | |
779 | REPLACE_MEMCHR | |
780 | HAVE_STRVERSCMP | |
81ecdfbb | 781 | HAVE_DECL_STRSIGNAL |
81ecdfbb RW |
782 | HAVE_DECL_STRTOK_R |
783 | HAVE_STRCASESTR | |
784 | HAVE_STRSEP | |
785 | HAVE_STRPBRK | |
786 | HAVE_DECL_STRNLEN | |
787 | HAVE_DECL_STRNDUP | |
81ecdfbb RW |
788 | HAVE_DECL_STRDUP |
789 | HAVE_STRCHRNUL | |
790 | HAVE_STPNCPY | |
791 | HAVE_STPCPY | |
f434ba03 | 792 | HAVE_RAWMEMCHR |
81ecdfbb RW |
793 | HAVE_DECL_MEMRCHR |
794 | HAVE_MEMPCPY | |
795 | HAVE_DECL_MEMMEM | |
f434ba03 PA |
796 | HAVE_MEMCHR |
797 | HAVE_MBSLEN | |
798 | GNULIB_STRVERSCMP | |
81ecdfbb RW |
799 | GNULIB_STRSIGNAL |
800 | GNULIB_STRERROR | |
801 | GNULIB_MBSTOK_R | |
802 | GNULIB_MBSSEP | |
803 | GNULIB_MBSSPN | |
804 | GNULIB_MBSPBRK | |
805 | GNULIB_MBSCSPN | |
806 | GNULIB_MBSCASESTR | |
807 | GNULIB_MBSPCASECMP | |
808 | GNULIB_MBSNCASECMP | |
809 | GNULIB_MBSCASECMP | |
810 | GNULIB_MBSSTR | |
811 | GNULIB_MBSRCHR | |
812 | GNULIB_MBSCHR | |
813 | GNULIB_MBSNLEN | |
814 | GNULIB_MBSLEN | |
815 | GNULIB_STRTOK_R | |
816 | GNULIB_STRCASESTR | |
817 | GNULIB_STRSTR | |
818 | GNULIB_STRSEP | |
819 | GNULIB_STRPBRK | |
820 | GNULIB_STRNLEN | |
821 | GNULIB_STRNDUP | |
f434ba03 | 822 | GNULIB_STRNCAT |
81ecdfbb RW |
823 | GNULIB_STRDUP |
824 | GNULIB_STRCHRNUL | |
825 | GNULIB_STPNCPY | |
826 | GNULIB_STPCPY | |
f434ba03 | 827 | GNULIB_RAWMEMCHR |
81ecdfbb RW |
828 | GNULIB_MEMRCHR |
829 | GNULIB_MEMPCPY | |
830 | GNULIB_MEMMEM | |
f434ba03 | 831 | GNULIB_MEMCHR |
55a8c076 YQ |
832 | UINT64_MAX_EQ_ULONG_MAX |
833 | UINT32_MAX_LT_UINTMAX_MAX | |
834 | INT64_MAX_EQ_LONG_MAX | |
835 | INT32_MAX_LT_INTMAX_MAX | |
836 | PRIPTR_PREFIX | |
837 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H | |
838 | NEXT_INTTYPES_H | |
839 | HAVE_DECL_STRTOUMAX | |
840 | HAVE_DECL_STRTOIMAX | |
841 | HAVE_DECL_IMAXDIV | |
842 | HAVE_DECL_IMAXABS | |
843 | GNULIB_STRTOUMAX | |
844 | GNULIB_STRTOIMAX | |
845 | GNULIB_IMAXDIV | |
846 | GNULIB_IMAXABS | |
847 | PRI_MACROS_BROKEN | |
848 | STDINT_H | |
849 | WINT_T_SUFFIX | |
850 | WCHAR_T_SUFFIX | |
851 | SIG_ATOMIC_T_SUFFIX | |
852 | SIZE_T_SUFFIX | |
853 | PTRDIFF_T_SUFFIX | |
854 | HAVE_SIGNED_WINT_T | |
855 | HAVE_SIGNED_WCHAR_T | |
856 | HAVE_SIGNED_SIG_ATOMIC_T | |
857 | BITSIZEOF_WINT_T | |
858 | BITSIZEOF_WCHAR_T | |
859 | BITSIZEOF_SIG_ATOMIC_T | |
860 | BITSIZEOF_SIZE_T | |
861 | BITSIZEOF_PTRDIFF_T | |
862 | APPLE_UNIVERSAL_BUILD | |
863 | HAVE_SYS_BITYPES_H | |
864 | HAVE_SYS_INTTYPES_H | |
865 | HAVE_STDINT_H | |
866 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H | |
867 | NEXT_STDINT_H | |
868 | PRAGMA_SYSTEM_HEADER | |
869 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE | |
870 | INCLUDE_NEXT | |
871 | HAVE_SYS_TYPES_H | |
872 | HAVE_INTTYPES_H | |
873 | HAVE_UNSIGNED_LONG_LONG_INT | |
874 | HAVE_LONG_LONG_INT | |
81ecdfbb RW |
875 | GL_COND_LIBTOOL_FALSE |
876 | GL_COND_LIBTOOL_TRUE | |
877 | CATOBJEXT | |
878 | GENCAT | |
879 | INSTOBJEXT | |
880 | DATADIRNAME | |
881 | CATALOGS | |
882 | POSUB | |
883 | GMSGFMT | |
884 | XGETTEXT | |
885 | INCINTL | |
886 | LIBINTL_DEP | |
887 | LIBINTL | |
888 | USE_NLS | |
889 | SET_MAKE | |
890 | GMAKE_FALSE | |
891 | GMAKE_TRUE | |
892 | MAKE | |
893 | CCDEPMODE | |
894 | DEPDIR | |
895 | am__leading_dot | |
896 | target_os | |
897 | target_vendor | |
898 | target_cpu | |
899 | target | |
f434ba03 PA |
900 | RANLIB |
901 | EGREP | |
902 | GREP | |
903 | CPP | |
81ecdfbb RW |
904 | host_os |
905 | host_vendor | |
906 | host_cpu | |
907 | host | |
908 | build_os | |
909 | build_vendor | |
910 | build_cpu | |
911 | build | |
81ecdfbb RW |
912 | OBJEXT |
913 | EXEEXT | |
914 | ac_ct_CC | |
915 | CPPFLAGS | |
916 | LDFLAGS | |
917 | CFLAGS | |
918 | CC | |
919 | MAINT | |
920 | MAINTAINER_MODE_FALSE | |
921 | MAINTAINER_MODE_TRUE | |
922 | target_alias | |
923 | host_alias | |
924 | build_alias | |
925 | LIBS | |
926 | ECHO_T | |
927 | ECHO_N | |
928 | ECHO_C | |
929 | DEFS | |
930 | mandir | |
931 | localedir | |
932 | libdir | |
933 | psdir | |
934 | pdfdir | |
935 | dvidir | |
936 | htmldir | |
937 | infodir | |
938 | docdir | |
939 | oldincludedir | |
940 | includedir | |
941 | localstatedir | |
942 | sharedstatedir | |
943 | sysconfdir | |
944 | datadir | |
945 | datarootdir | |
946 | libexecdir | |
947 | sbindir | |
948 | bindir | |
949 | program_transform_name | |
950 | prefix | |
951 | exec_prefix | |
952 | PACKAGE_URL | |
953 | PACKAGE_BUGREPORT | |
954 | PACKAGE_STRING | |
955 | PACKAGE_VERSION | |
956 | PACKAGE_TARNAME | |
957 | PACKAGE_NAME | |
958 | PATH_SEPARATOR | |
959 | SHELL' | |
a4ce5b0d | 960 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
961 | ac_user_opts=' |
962 | enable_option_checking | |
963 | enable_maintainer_mode | |
da2f07f1 JK |
964 | enable_plugins |
965 | enable_largefile | |
81ecdfbb RW |
966 | enable_dependency_tracking |
967 | with_separate_debug_dir | |
968 | with_gdb_datadir | |
969 | with_relocated_sources | |
bccbefd2 | 970 | with_auto_load_safe_path |
81ecdfbb RW |
971 | enable_targets |
972 | enable_64_bit_bfd | |
973 | enable_gdbcli | |
974 | enable_gdbmi | |
975 | enable_tui | |
976 | enable_gdbtk | |
05e7c244 | 977 | with_libunwind_ia64 |
81ecdfbb RW |
978 | with_curses |
979 | enable_profiling | |
980 | with_pkgversion | |
981 | with_bugurl | |
b040ad30 | 982 | with_zlib |
81ecdfbb | 983 | with_libiconv_prefix |
478aac75 | 984 | with_iconv_bin |
81ecdfbb | 985 | with_system_readline |
b8e0a31c | 986 | with_jit_reader_dir |
81ecdfbb RW |
987 | with_expat |
988 | with_gnu_ld | |
989 | enable_rpath | |
990 | with_libexpat_prefix | |
991 | with_python | |
992 | with_included_regex | |
993 | with_sysroot | |
994 | with_system_gdbinit | |
995 | enable_werror | |
996 | enable_build_warnings | |
997 | enable_gdb_build_warnings | |
998 | with_tcl | |
999 | with_tk | |
1000 | with_x | |
1001 | enable_sim | |
1002 | enable_multi_ice | |
496c0e1b | 1003 | enable_gdbserver |
81ecdfbb RW |
1004 | ' |
1005 | ac_precious_vars='build_alias | |
1006 | host_alias | |
1007 | target_alias | |
1008 | CC | |
1009 | CFLAGS | |
1010 | LDFLAGS | |
1011 | LIBS | |
1012 | CPPFLAGS | |
1013 | CPP | |
f06e05e0 JK |
1014 | MAKEINFO |
1015 | MAKEINFOFLAGS | |
81ecdfbb RW |
1016 | YACC |
1017 | YFLAGS | |
1018 | XMKMF' | |
5ae98d25 | 1019 | ac_subdirs_all='testsuite |
81ecdfbb RW |
1020 | gdbtk |
1021 | multi-ice | |
1022 | gdbserver' | |
c906108c SS |
1023 | |
1024 | # Initialize some variables set by options. | |
bec39cab AC |
1025 | ac_init_help= |
1026 | ac_init_version=false | |
81ecdfbb RW |
1027 | ac_unrecognized_opts= |
1028 | ac_unrecognized_sep= | |
c906108c SS |
1029 | # The variables have the same names as the options, with |
1030 | # dashes changed to underlines. | |
bec39cab | 1031 | cache_file=/dev/null |
c906108c | 1032 | exec_prefix=NONE |
c906108c | 1033 | no_create= |
c906108c SS |
1034 | no_recursion= |
1035 | prefix=NONE | |
1036 | program_prefix=NONE | |
1037 | program_suffix=NONE | |
1038 | program_transform_name=s,x,x, | |
1039 | silent= | |
1040 | site= | |
1041 | srcdir= | |
c906108c SS |
1042 | verbose= |
1043 | x_includes=NONE | |
1044 | x_libraries=NONE | |
bec39cab AC |
1045 | |
1046 | # Installation directory options. | |
1047 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
1048 | # and all the variables that are supposed to be based on exec_prefix | |
1049 | # by default will actually change. | |
1050 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 1051 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
1052 | bindir='${exec_prefix}/bin' |
1053 | sbindir='${exec_prefix}/sbin' | |
1054 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
1055 | datarootdir='${prefix}/share' |
1056 | datadir='${datarootdir}' | |
c906108c SS |
1057 | sysconfdir='${prefix}/etc' |
1058 | sharedstatedir='${prefix}/com' | |
1059 | localstatedir='${prefix}/var' | |
c906108c SS |
1060 | includedir='${prefix}/include' |
1061 | oldincludedir='/usr/include' | |
81ecdfbb RW |
1062 | docdir='${datarootdir}/doc/${PACKAGE}' |
1063 | infodir='${datarootdir}/info' | |
1064 | htmldir='${docdir}' | |
1065 | dvidir='${docdir}' | |
1066 | pdfdir='${docdir}' | |
1067 | psdir='${docdir}' | |
1068 | libdir='${exec_prefix}/lib' | |
1069 | localedir='${datarootdir}/locale' | |
1070 | mandir='${datarootdir}/man' | |
c906108c | 1071 | |
c906108c | 1072 | ac_prev= |
81ecdfbb | 1073 | ac_dashdash= |
c906108c SS |
1074 | for ac_option |
1075 | do | |
c906108c SS |
1076 | # If the previous option needs an argument, assign it. |
1077 | if test -n "$ac_prev"; then | |
81ecdfbb | 1078 | eval $ac_prev=\$ac_option |
c906108c SS |
1079 | ac_prev= |
1080 | continue | |
1081 | fi | |
1082 | ||
81ecdfbb RW |
1083 | case $ac_option in |
1084 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
1085 | *) ac_optarg=yes ;; | |
1086 | esac | |
c906108c SS |
1087 | |
1088 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
1089 | ||
81ecdfbb RW |
1090 | case $ac_dashdash$ac_option in |
1091 | --) | |
1092 | ac_dashdash=yes ;; | |
c906108c SS |
1093 | |
1094 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
1095 | ac_prev=bindir ;; | |
1096 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 1097 | bindir=$ac_optarg ;; |
c906108c SS |
1098 | |
1099 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 1100 | ac_prev=build_alias ;; |
c906108c | 1101 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 1102 | build_alias=$ac_optarg ;; |
c906108c SS |
1103 | |
1104 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
1105 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
1106 | ac_prev=cache_file ;; | |
1107 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
1108 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
1109 | cache_file=$ac_optarg ;; |
1110 | ||
1111 | --config-cache | -C) | |
1112 | cache_file=config.cache ;; | |
c906108c | 1113 | |
81ecdfbb | 1114 | -datadir | --datadir | --datadi | --datad) |
c906108c | 1115 | ac_prev=datadir ;; |
81ecdfbb | 1116 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 1117 | datadir=$ac_optarg ;; |
c906108c | 1118 | |
81ecdfbb RW |
1119 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
1120 | | --dataroo | --dataro | --datar) | |
1121 | ac_prev=datarootdir ;; | |
1122 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
1123 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
1124 | datarootdir=$ac_optarg ;; | |
1125 | ||
c906108c | 1126 | -disable-* | --disable-*) |
81ecdfbb | 1127 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 1128 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1129 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1130 | as_fn_error "invalid feature name: $ac_useropt" | |
1131 | ac_useropt_orig=$ac_useropt | |
1132 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1133 | case $ac_user_opts in | |
1134 | *" | |
1135 | "enable_$ac_useropt" | |
1136 | "*) ;; | |
1137 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
1138 | ac_unrecognized_sep=', ';; | |
1139 | esac | |
1140 | eval enable_$ac_useropt=no ;; | |
1141 | ||
1142 | -docdir | --docdir | --docdi | --doc | --do) | |
1143 | ac_prev=docdir ;; | |
1144 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
1145 | docdir=$ac_optarg ;; | |
1146 | ||
1147 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
1148 | ac_prev=dvidir ;; | |
1149 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
1150 | dvidir=$ac_optarg ;; | |
c906108c SS |
1151 | |
1152 | -enable-* | --enable-*) | |
81ecdfbb | 1153 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 1154 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1155 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1156 | as_fn_error "invalid feature name: $ac_useropt" | |
1157 | ac_useropt_orig=$ac_useropt | |
1158 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1159 | case $ac_user_opts in | |
1160 | *" | |
1161 | "enable_$ac_useropt" | |
1162 | "*) ;; | |
1163 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
1164 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1165 | esac |
81ecdfbb | 1166 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1167 | |
1168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
1169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
1170 | | --exec | --exe | --ex) | |
1171 | ac_prev=exec_prefix ;; | |
1172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
1173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1174 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1175 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1176 | |
1177 | -gas | --gas | --ga | --g) | |
1178 | # Obsolete; use --with-gas. | |
1179 | with_gas=yes ;; | |
1180 | ||
bec39cab AC |
1181 | -help | --help | --hel | --he | -h) |
1182 | ac_init_help=long ;; | |
1183 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1184 | ac_init_help=recursive ;; | |
1185 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1186 | ac_init_help=short ;; | |
c906108c SS |
1187 | |
1188 | -host | --host | --hos | --ho) | |
bec39cab | 1189 | ac_prev=host_alias ;; |
c906108c | 1190 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1191 | host_alias=$ac_optarg ;; |
c906108c | 1192 | |
81ecdfbb RW |
1193 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1194 | ac_prev=htmldir ;; | |
1195 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1196 | | --ht=*) | |
1197 | htmldir=$ac_optarg ;; | |
1198 | ||
c906108c SS |
1199 | -includedir | --includedir | --includedi | --included | --include \ |
1200 | | --includ | --inclu | --incl | --inc) | |
1201 | ac_prev=includedir ;; | |
1202 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1203 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1204 | includedir=$ac_optarg ;; |
c906108c SS |
1205 | |
1206 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1207 | ac_prev=infodir ;; | |
1208 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1209 | infodir=$ac_optarg ;; |
c906108c SS |
1210 | |
1211 | -libdir | --libdir | --libdi | --libd) | |
1212 | ac_prev=libdir ;; | |
1213 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1214 | libdir=$ac_optarg ;; |
c906108c SS |
1215 | |
1216 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1217 | | --libexe | --libex | --libe) | |
1218 | ac_prev=libexecdir ;; | |
1219 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1220 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1221 | libexecdir=$ac_optarg ;; |
c906108c | 1222 | |
81ecdfbb RW |
1223 | -localedir | --localedir | --localedi | --localed | --locale) |
1224 | ac_prev=localedir ;; | |
1225 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1226 | localedir=$ac_optarg ;; | |
1227 | ||
c906108c | 1228 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1229 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1230 | ac_prev=localstatedir ;; |
1231 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1232 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1233 | localstatedir=$ac_optarg ;; |
c906108c SS |
1234 | |
1235 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1236 | ac_prev=mandir ;; | |
1237 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1238 | mandir=$ac_optarg ;; |
c906108c SS |
1239 | |
1240 | -nfp | --nfp | --nf) | |
1241 | # Obsolete; use --without-fp. | |
1242 | with_fp=no ;; | |
1243 | ||
1244 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1245 | | --no-cr | --no-c | -n) |
c906108c SS |
1246 | no_create=yes ;; |
1247 | ||
1248 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1249 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1250 | no_recursion=yes ;; | |
1251 | ||
1252 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1253 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1254 | | --oldin | --oldi | --old | --ol | --o) | |
1255 | ac_prev=oldincludedir ;; | |
1256 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1257 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1258 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1259 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1260 | |
1261 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1262 | ac_prev=prefix ;; | |
1263 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1264 | prefix=$ac_optarg ;; |
c906108c SS |
1265 | |
1266 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1267 | | --program-pre | --program-pr | --program-p) | |
1268 | ac_prev=program_prefix ;; | |
1269 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1270 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1271 | program_prefix=$ac_optarg ;; |
c906108c SS |
1272 | |
1273 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1274 | | --program-suf | --program-su | --program-s) | |
1275 | ac_prev=program_suffix ;; | |
1276 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1277 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1278 | program_suffix=$ac_optarg ;; |
c906108c SS |
1279 | |
1280 | -program-transform-name | --program-transform-name \ | |
1281 | | --program-transform-nam | --program-transform-na \ | |
1282 | | --program-transform-n | --program-transform- \ | |
1283 | | --program-transform | --program-transfor \ | |
1284 | | --program-transfo | --program-transf \ | |
1285 | | --program-trans | --program-tran \ | |
1286 | | --progr-tra | --program-tr | --program-t) | |
1287 | ac_prev=program_transform_name ;; | |
1288 | -program-transform-name=* | --program-transform-name=* \ | |
1289 | | --program-transform-nam=* | --program-transform-na=* \ | |
1290 | | --program-transform-n=* | --program-transform-=* \ | |
1291 | | --program-transform=* | --program-transfor=* \ | |
1292 | | --program-transfo=* | --program-transf=* \ | |
1293 | | --program-trans=* | --program-tran=* \ | |
1294 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1295 | program_transform_name=$ac_optarg ;; |
c906108c | 1296 | |
81ecdfbb RW |
1297 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1298 | ac_prev=pdfdir ;; | |
1299 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1300 | pdfdir=$ac_optarg ;; | |
1301 | ||
1302 | -psdir | --psdir | --psdi | --psd | --ps) | |
1303 | ac_prev=psdir ;; | |
1304 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1305 | psdir=$ac_optarg ;; | |
1306 | ||
c906108c SS |
1307 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1308 | | -silent | --silent | --silen | --sile | --sil) | |
1309 | silent=yes ;; | |
1310 | ||
1311 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1312 | ac_prev=sbindir ;; | |
1313 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1314 | | --sbi=* | --sb=*) | |
bec39cab | 1315 | sbindir=$ac_optarg ;; |
c906108c SS |
1316 | |
1317 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1318 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1319 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1320 | | --sha | --sh) | |
1321 | ac_prev=sharedstatedir ;; | |
1322 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1323 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1324 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1325 | | --sha=* | --sh=*) | |
bec39cab | 1326 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1327 | |
1328 | -site | --site | --sit) | |
1329 | ac_prev=site ;; | |
1330 | -site=* | --site=* | --sit=*) | |
bec39cab | 1331 | site=$ac_optarg ;; |
3ace7edb | 1332 | |
c906108c SS |
1333 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1334 | ac_prev=srcdir ;; | |
1335 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1336 | srcdir=$ac_optarg ;; |
c906108c SS |
1337 | |
1338 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1339 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1340 | ac_prev=sysconfdir ;; | |
1341 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1342 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1343 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1344 | |
1345 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1346 | ac_prev=target_alias ;; |
c906108c | 1347 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1348 | target_alias=$ac_optarg ;; |
c906108c SS |
1349 | |
1350 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1351 | verbose=yes ;; | |
1352 | ||
bec39cab AC |
1353 | -version | --version | --versio | --versi | --vers | -V) |
1354 | ac_init_version=: ;; | |
c906108c SS |
1355 | |
1356 | -with-* | --with-*) | |
81ecdfbb | 1357 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1358 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1359 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1360 | as_fn_error "invalid package name: $ac_useropt" | |
1361 | ac_useropt_orig=$ac_useropt | |
1362 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1363 | case $ac_user_opts in | |
1364 | *" | |
1365 | "with_$ac_useropt" | |
1366 | "*) ;; | |
1367 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1368 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1369 | esac |
81ecdfbb | 1370 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1371 | |
1372 | -without-* | --without-*) | |
81ecdfbb | 1373 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1374 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1375 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1376 | as_fn_error "invalid package name: $ac_useropt" | |
1377 | ac_useropt_orig=$ac_useropt | |
1378 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1379 | case $ac_user_opts in | |
1380 | *" | |
1381 | "with_$ac_useropt" | |
1382 | "*) ;; | |
1383 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1384 | ac_unrecognized_sep=', ';; | |
1385 | esac | |
1386 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1387 | |
1388 | --x) | |
1389 | # Obsolete; use --with-x. | |
1390 | with_x=yes ;; | |
1391 | ||
1392 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1393 | | --x-incl | --x-inc | --x-in | --x-i) | |
1394 | ac_prev=x_includes ;; | |
1395 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1396 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1397 | x_includes=$ac_optarg ;; |
c906108c SS |
1398 | |
1399 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1400 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1401 | ac_prev=x_libraries ;; | |
1402 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1403 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1404 | x_libraries=$ac_optarg ;; |
c906108c | 1405 | |
81ecdfbb RW |
1406 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1407 | Try \`$0 --help' for more information." | |
c906108c SS |
1408 | ;; |
1409 | ||
bec39cab AC |
1410 | *=*) |
1411 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1412 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1413 | case $ac_envvar in #( |
1414 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1415 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1416 | esac | |
1417 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1418 | export $ac_envvar ;; |
1419 | ||
c906108c | 1420 | *) |
bec39cab | 1421 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1422 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1423 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1424 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1425 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1426 | ;; |
1427 | ||
1428 | esac | |
1429 | done | |
1430 | ||
1431 | if test -n "$ac_prev"; then | |
bec39cab | 1432 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1433 | as_fn_error "missing argument to $ac_option" |
c906108c | 1434 | fi |
c906108c | 1435 | |
81ecdfbb RW |
1436 | if test -n "$ac_unrecognized_opts"; then |
1437 | case $enable_option_checking in | |
1438 | no) ;; | |
1439 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1440 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1441 | esac |
81ecdfbb | 1442 | fi |
b4e70030 | 1443 | |
81ecdfbb RW |
1444 | # Check all directory arguments for consistency. |
1445 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1446 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1447 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1448 | libdir localedir mandir | |
b4e70030 | 1449 | do |
81ecdfbb RW |
1450 | eval ac_val=\$$ac_var |
1451 | # Remove trailing slashes. | |
1452 | case $ac_val in | |
1453 | */ ) | |
1454 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1455 | eval $ac_var=\$ac_val;; | |
1456 | esac | |
1457 | # Be sure to have absolute directory names. | |
b4e70030 | 1458 | case $ac_val in |
81ecdfbb RW |
1459 | [\\/$]* | ?:[\\/]* ) continue;; |
1460 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1461 | esac |
81ecdfbb | 1462 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1463 | done |
1464 | ||
bec39cab AC |
1465 | # There might be people who depend on the old broken behavior: `$host' |
1466 | # used to hold the argument of --host etc. | |
1467 | # FIXME: To remove some day. | |
1468 | build=$build_alias | |
1469 | host=$host_alias | |
1470 | target=$target_alias | |
1471 | ||
1472 | # FIXME: To remove some day. | |
1473 | if test "x$host_alias" != x; then | |
1474 | if test "x$build_alias" = x; then | |
1475 | cross_compiling=maybe | |
81ecdfbb | 1476 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1477 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1478 | elif test "x$build_alias" != "x$host_alias"; then | |
1479 | cross_compiling=yes | |
1480 | fi | |
1481 | fi | |
c906108c | 1482 | |
bec39cab AC |
1483 | ac_tool_prefix= |
1484 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1485 | ||
1486 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1487 | |
c906108c | 1488 | |
81ecdfbb RW |
1489 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1490 | ac_ls_di=`ls -di .` && | |
1491 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1492 | as_fn_error "working directory cannot be determined" | |
1493 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1494 | as_fn_error "pwd does not report name of working directory" | |
1495 | ||
1496 | ||
c906108c SS |
1497 | # Find the source files, if location was not specified. |
1498 | if test -z "$srcdir"; then | |
1499 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1500 | # Try the directory containing this script, then the parent directory. |
1501 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1502 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1503 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1504 | X"$as_myself" : 'X\(//\)$' \| \ | |
1505 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1506 | $as_echo X"$as_myself" | | |
1507 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1508 | s//\1/ | |
1509 | q | |
1510 | } | |
1511 | /^X\(\/\/\)[^/].*/{ | |
1512 | s//\1/ | |
1513 | q | |
1514 | } | |
1515 | /^X\(\/\/\)$/{ | |
1516 | s//\1/ | |
1517 | q | |
1518 | } | |
1519 | /^X\(\/\).*/{ | |
1520 | s//\1/ | |
1521 | q | |
1522 | } | |
1523 | s/.*/./; q'` | |
c906108c | 1524 | srcdir=$ac_confdir |
81ecdfbb | 1525 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1526 | srcdir=.. |
1527 | fi | |
1528 | else | |
1529 | ac_srcdir_defaulted=no | |
1530 | fi | |
81ecdfbb RW |
1531 | if test ! -r "$srcdir/$ac_unique_file"; then |
1532 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1533 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1534 | fi | |
1535 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1536 | ac_abs_confdir=`( | |
1537 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1538 | pwd)` | |
1539 | # When building in place, set srcdir=. | |
1540 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1541 | srcdir=. | |
1542 | fi | |
1543 | # Remove unnecessary trailing slashes from srcdir. | |
1544 | # Double slashes in file names in object file debugging info | |
1545 | # mess up M-x gdb in Emacs. | |
1546 | case $srcdir in | |
1547 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1548 | esac | |
1549 | for ac_var in $ac_precious_vars; do | |
1550 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1551 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1552 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1553 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1554 | done | |
c906108c | 1555 | |
bec39cab AC |
1556 | # |
1557 | # Report the --help message. | |
1558 | # | |
1559 | if test "$ac_init_help" = "long"; then | |
1560 | # Omit some internal or obsolete options to make the list less imposing. | |
1561 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1562 | cat <<_ACEOF | |
1563 | \`configure' configures this package to adapt to many kinds of systems. | |
1564 | ||
1565 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1566 | ||
1567 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1568 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1569 | ||
1570 | Defaults for the options are specified in brackets. | |
1571 | ||
1572 | Configuration: | |
1573 | -h, --help display this help and exit | |
1574 | --help=short display options specific to this package | |
1575 | --help=recursive display the short help of all the included packages | |
1576 | -V, --version display version information and exit | |
1577 | -q, --quiet, --silent do not print \`checking...' messages | |
1578 | --cache-file=FILE cache test results in FILE [disabled] | |
1579 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1580 | -n, --no-create do not create output files | |
1581 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1582 | ||
bec39cab AC |
1583 | Installation directories: |
1584 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1585 | [$ac_default_prefix] |
bec39cab | 1586 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1587 | [PREFIX] |
bec39cab AC |
1588 | |
1589 | By default, \`make install' will install all the files in | |
1590 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1591 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1592 | for instance \`--prefix=\$HOME'. | |
1593 | ||
1594 | For better control, use the options below. | |
1595 | ||
1596 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1597 | --bindir=DIR user executables [EPREFIX/bin] |
1598 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1599 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1600 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1601 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1602 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1603 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1604 | --includedir=DIR C header files [PREFIX/include] | |
1605 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1606 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1607 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1608 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1609 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1610 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1611 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1612 | --htmldir=DIR html documentation [DOCDIR] | |
1613 | --dvidir=DIR dvi documentation [DOCDIR] | |
1614 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1615 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1616 | _ACEOF |
1617 | ||
1618 | cat <<\_ACEOF | |
1619 | ||
1620 | Program names: | |
1621 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1622 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1623 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1624 | ||
1625 | X features: | |
1626 | --x-includes=DIR X include files are in DIR | |
1627 | --x-libraries=DIR X library files are in DIR | |
1628 | ||
1629 | System types: | |
1630 | --build=BUILD configure for building on BUILD [guessed] | |
1631 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1632 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1633 | _ACEOF | |
1634 | fi | |
1635 | ||
1636 | if test -n "$ac_init_help"; then | |
1637 | ||
1638 | cat <<\_ACEOF | |
1639 | ||
1640 | Optional Features: | |
81ecdfbb | 1641 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1642 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1643 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1644 | --enable-maintainer-mode enable make rules and dependencies not useful |
1645 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1646 | --enable-plugins Enable support for plugins (defaults no) |
1647 | --disable-largefile omit support for large files | |
e28b3332 DJ |
1648 | --disable-dependency-tracking speeds up one-time build |
1649 | --enable-dependency-tracking do not reject slow dependency extractors | |
a1220294 TT |
1650 | --enable-targets=TARGETS |
1651 | alternative target configurations | |
c0993dbe | 1652 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1653 | --disable-gdbcli disable command-line interface (CLI) |
1654 | --disable-gdbmi disable machine-interface (MI) | |
1655 | --enable-tui enable full-screen terminal user interface (TUI) | |
1656 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1657 | --enable-profiling enable profiling of GDB | |
3841debe | 1658 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1659 | --enable-werror treat compile warnings as errors |
32c1c914 | 1660 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1661 | --enable-gdb-build-warnings |
32c1c914 | 1662 | enable GDB specific build-time compiler warnings if |
a1220294 | 1663 | gcc is used |
32c1c914 | 1664 | --enable-sim link gdb with simulator |
bec39cab | 1665 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1666 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1667 | is auto) | |
bec39cab AC |
1668 | |
1669 | Optional Packages: | |
1670 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1671 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1672 | --with-separate-debug-dir=PATH |
32c1c914 | 1673 | look for global separate debug info in this path |
62e4f60c | 1674 | [LIBDIR/debug] |
b14b1491 TT |
1675 | --with-gdb-datadir=PATH look for global separate data files in this path |
1676 | [DATADIR/gdb] | |
29b0e8a2 | 1677 | --with-relocated-sources=PATH |
32c1c914 | 1678 | automatically relocate this path for source files |
bccbefd2 JK |
1679 | --with-auto-load-safe-path=PATH |
1680 | directories safe to hold auto-loaded files | |
1681 | --without-auto-load-safe-path | |
1682 | do not restrict auto-loaded files locations | |
05e7c244 | 1683 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1684 | --with-curses use the curses library instead of the termcap |
1685 | library | |
c16158bc JM |
1686 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1687 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1688 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1689 | --with-libiconv-prefix=DIR |
1690 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1691 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1692 | --with-system-readline use installed readline library |
b8e0a31c SD |
1693 | --with-jit-reader-dir=PATH |
1694 | directory to load the JIT readers from | |
5c39566f | 1695 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1696 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1697 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1698 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1699 | --with-python[=PYTHON] include python support |
1700 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1701 | --without-included-regex |
1702 | don't use included regex; this is the default on | |
1703 | systems with version 2 of the GNU C library (use | |
1704 | with caution on other system) | |
81ecdfbb | 1705 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1706 | --with-system-gdbinit=PATH |
32c1c914 | 1707 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1708 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1709 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1710 | --with-x use the X Window System |
bec39cab AC |
1711 | |
1712 | Some influential environment variables: | |
1713 | CC C compiler command | |
1714 | CFLAGS C compiler flags | |
1715 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1716 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1717 | LIBS libraries to pass to the linker, e.g. -l<library> |
1718 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1719 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1720 | CPP C preprocessor |
f06e05e0 JK |
1721 | MAKEINFO Parent configure detects if it is of sufficient version. |
1722 | MAKEINFOFLAGS | |
1723 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1724 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1725 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1726 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1727 | This script will default YFLAGS to the empty string to avoid a | |
1728 | default value of `-d' given by some make applications. | |
1729 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1730 | |
1731 | Use these variables to override the choices made by `configure' or to help | |
1732 | it to find libraries and programs with nonstandard names/locations. | |
1733 | ||
81ecdfbb | 1734 | Report bugs to the package provider. |
bec39cab | 1735 | _ACEOF |
81ecdfbb | 1736 | ac_status=$? |
bec39cab AC |
1737 | fi |
1738 | ||
1739 | if test "$ac_init_help" = "recursive"; then | |
1740 | # If there are subdirs, report their specific --help. | |
bec39cab | 1741 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1742 | test -d "$ac_dir" || |
1743 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1744 | continue | |
bec39cab AC |
1745 | ac_builddir=. |
1746 | ||
81ecdfbb RW |
1747 | case "$ac_dir" in |
1748 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1749 | *) | |
1750 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1751 | # A ".." for each directory in $ac_dir_suffix. | |
1752 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1753 | case $ac_top_builddir_sub in | |
1754 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1755 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1756 | esac ;; | |
1757 | esac | |
1758 | ac_abs_top_builddir=$ac_pwd | |
1759 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1760 | # for backward compatibility: | |
1761 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1762 | |
1763 | case $srcdir in | |
81ecdfbb | 1764 | .) # We are building in place. |
bec39cab | 1765 | ac_srcdir=. |
81ecdfbb RW |
1766 | ac_top_srcdir=$ac_top_builddir_sub |
1767 | ac_abs_top_srcdir=$ac_pwd ;; | |
1768 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1769 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1770 | ac_top_srcdir=$srcdir |
1771 | ac_abs_top_srcdir=$srcdir ;; | |
1772 | *) # Relative name. | |
1773 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1774 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1775 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1776 | esac |
81ecdfbb | 1777 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1778 | |
81ecdfbb RW |
1779 | cd "$ac_dir" || { ac_status=$?; continue; } |
1780 | # Check for guested configure. | |
1781 | if test -f "$ac_srcdir/configure.gnu"; then | |
1782 | echo && | |
1783 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1784 | elif test -f "$ac_srcdir/configure"; then | |
1785 | echo && | |
1786 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1787 | else |
81ecdfbb RW |
1788 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1789 | fi || ac_status=$? | |
1790 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1791 | done |
1792 | fi | |
1793 | ||
81ecdfbb | 1794 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1795 | if $ac_init_version; then |
1796 | cat <<\_ACEOF | |
81ecdfbb RW |
1797 | configure |
1798 | generated by GNU Autoconf 2.64 | |
bec39cab | 1799 | |
81ecdfbb | 1800 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1801 | This configure script is free software; the Free Software Foundation |
1802 | gives unlimited permission to copy, distribute and modify it. | |
1803 | _ACEOF | |
81ecdfbb | 1804 | exit |
bec39cab | 1805 | fi |
bec39cab | 1806 | |
81ecdfbb RW |
1807 | ## ------------------------ ## |
1808 | ## Autoconf initialization. ## | |
1809 | ## ------------------------ ## | |
bec39cab | 1810 | |
81ecdfbb RW |
1811 | # ac_fn_c_try_compile LINENO |
1812 | # -------------------------- | |
1813 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1814 | ac_fn_c_try_compile () | |
1815 | { | |
1816 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1817 | rm -f conftest.$ac_objext | |
1818 | if { { ac_try="$ac_compile" | |
1819 | case "(($ac_try" in | |
1820 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1821 | *) ac_try_echo=$ac_try;; | |
1822 | esac | |
1823 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1824 | $as_echo "$ac_try_echo"; } >&5 | |
1825 | (eval "$ac_compile") 2>conftest.err | |
1826 | ac_status=$? | |
1827 | if test -s conftest.err; then | |
1828 | grep -v '^ *+' conftest.err >conftest.er1 | |
1829 | cat conftest.er1 >&5 | |
1830 | mv -f conftest.er1 conftest.err | |
1831 | fi | |
1832 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1833 | test $ac_status = 0; } && { | |
1834 | test -z "$ac_c_werror_flag" || | |
1835 | test ! -s conftest.err | |
1836 | } && test -s conftest.$ac_objext; then : | |
1837 | ac_retval=0 | |
1838 | else | |
1839 | $as_echo "$as_me: failed program was:" >&5 | |
1840 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1841 | |
81ecdfbb RW |
1842 | ac_retval=1 |
1843 | fi | |
1844 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1845 | return $ac_retval | |
1846 | ||
1847 | } # ac_fn_c_try_compile | |
1848 | ||
1849 | # ac_fn_c_try_cpp LINENO | |
1850 | # ---------------------- | |
1851 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1852 | ac_fn_c_try_cpp () | |
bec39cab | 1853 | { |
81ecdfbb RW |
1854 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1855 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1856 | case "(($ac_try" in | |
1857 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1858 | *) ac_try_echo=$ac_try;; | |
1859 | esac | |
1860 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1861 | $as_echo "$ac_try_echo"; } >&5 | |
1862 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1863 | ac_status=$? | |
1864 | if test -s conftest.err; then | |
1865 | grep -v '^ *+' conftest.err >conftest.er1 | |
1866 | cat conftest.er1 >&5 | |
1867 | mv -f conftest.er1 conftest.err | |
1868 | fi | |
1869 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1870 | test $ac_status = 0; } >/dev/null && { | |
1871 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1872 | test ! -s conftest.err | |
1873 | }; then : | |
1874 | ac_retval=0 | |
1875 | else | |
1876 | $as_echo "$as_me: failed program was:" >&5 | |
1877 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1878 | |
81ecdfbb RW |
1879 | ac_retval=1 |
1880 | fi | |
1881 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1882 | return $ac_retval | |
bec39cab | 1883 | |
81ecdfbb | 1884 | } # ac_fn_c_try_cpp |
bec39cab | 1885 | |
81ecdfbb RW |
1886 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1887 | # ------------------------------------------------------- | |
1888 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1889 | # the include files in INCLUDES and setting the cache variable VAR | |
1890 | # accordingly. | |
1891 | ac_fn_c_check_header_mongrel () | |
1892 | { | |
1893 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1894 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1896 | $as_echo_n "checking for $2... " >&6; } | |
1897 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1898 | $as_echo_n "(cached) " >&6 | |
1899 | fi | |
1900 | eval ac_res=\$$3 | |
1901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1902 | $as_echo "$ac_res" >&6; } | |
1903 | else | |
1904 | # Is the header compilable? | |
1905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1906 | $as_echo_n "checking $2 usability... " >&6; } | |
1907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1908 | /* end confdefs.h. */ | |
1909 | $4 | |
1910 | #include <$2> | |
1911 | _ACEOF | |
1912 | if ac_fn_c_try_compile "$LINENO"; then : | |
1913 | ac_header_compiler=yes | |
1914 | else | |
1915 | ac_header_compiler=no | |
1916 | fi | |
1917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1919 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1920 | |
81ecdfbb RW |
1921 | # Is the header present? |
1922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1923 | $as_echo_n "checking $2 presence... " >&6; } | |
1924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1925 | /* end confdefs.h. */ | |
1926 | #include <$2> | |
1927 | _ACEOF | |
1928 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1929 | ac_header_preproc=yes | |
1930 | else | |
1931 | ac_header_preproc=no | |
1932 | fi | |
1933 | rm -f conftest.err conftest.$ac_ext | |
1934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1935 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1936 | |
81ecdfbb RW |
1937 | # So? What about this header? |
1938 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1939 | yes:no: ) | |
1940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1941 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1943 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1944 | ;; | |
1945 | no:yes:* ) | |
1946 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1947 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1948 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1949 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1950 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1951 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1952 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1953 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1954 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1955 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1956 | ;; | |
1957 | esac | |
1958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1959 | $as_echo_n "checking for $2... " >&6; } | |
1960 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1961 | $as_echo_n "(cached) " >&6 | |
1962 | else | |
1963 | eval "$3=\$ac_header_compiler" | |
1964 | fi | |
1965 | eval ac_res=\$$3 | |
1966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1967 | $as_echo "$ac_res" >&6; } | |
1968 | fi | |
1969 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1970 | |
81ecdfbb | 1971 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1972 | |
81ecdfbb RW |
1973 | # ac_fn_c_try_run LINENO |
1974 | # ---------------------- | |
1975 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1976 | # that executables *can* be run. | |
1977 | ac_fn_c_try_run () | |
1978 | { | |
1979 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1980 | if { { ac_try="$ac_link" | |
1981 | case "(($ac_try" in | |
1982 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1983 | *) ac_try_echo=$ac_try;; | |
1984 | esac | |
1985 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1986 | $as_echo "$ac_try_echo"; } >&5 | |
1987 | (eval "$ac_link") 2>&5 | |
1988 | ac_status=$? | |
1989 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1990 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1991 | { { case "(($ac_try" in | |
1992 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1993 | *) ac_try_echo=$ac_try;; | |
1994 | esac | |
1995 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1996 | $as_echo "$ac_try_echo"; } >&5 | |
1997 | (eval "$ac_try") 2>&5 | |
1998 | ac_status=$? | |
1999 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2000 | test $ac_status = 0; }; }; then : | |
2001 | ac_retval=0 | |
2002 | else | |
2003 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
2004 | $as_echo "$as_me: failed program was:" >&5 | |
2005 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2006 | |
81ecdfbb RW |
2007 | ac_retval=$ac_status |
2008 | fi | |
2009 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2010 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2011 | return $ac_retval | |
bec39cab | 2012 | |
81ecdfbb | 2013 | } # ac_fn_c_try_run |
bec39cab | 2014 | |
81ecdfbb RW |
2015 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
2016 | # ------------------------------------------------------- | |
2017 | # Tests whether HEADER exists and can be compiled using the include files in | |
2018 | # INCLUDES, setting the cache variable VAR accordingly. | |
2019 | ac_fn_c_check_header_compile () | |
2020 | { | |
2021 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2023 | $as_echo_n "checking for $2... " >&6; } | |
2024 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2025 | $as_echo_n "(cached) " >&6 | |
2026 | else | |
2027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2028 | /* end confdefs.h. */ | |
2029 | $4 | |
2030 | #include <$2> | |
bec39cab | 2031 | _ACEOF |
81ecdfbb RW |
2032 | if ac_fn_c_try_compile "$LINENO"; then : |
2033 | eval "$3=yes" | |
2034 | else | |
2035 | eval "$3=no" | |
2036 | fi | |
2037 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2038 | fi | |
2039 | eval ac_res=\$$3 | |
2040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2041 | $as_echo "$ac_res" >&6; } | |
2042 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2043 | |
81ecdfbb | 2044 | } # ac_fn_c_check_header_compile |
bec39cab | 2045 | |
81ecdfbb RW |
2046 | # ac_fn_c_try_link LINENO |
2047 | # ----------------------- | |
2048 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2049 | ac_fn_c_try_link () | |
b4e70030 | 2050 | { |
81ecdfbb RW |
2051 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
2052 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2053 | if { { ac_try="$ac_link" | |
2054 | case "(($ac_try" in | |
2055 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2056 | *) ac_try_echo=$ac_try;; | |
2057 | esac | |
2058 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2059 | $as_echo "$ac_try_echo"; } >&5 | |
2060 | (eval "$ac_link") 2>conftest.err | |
2061 | ac_status=$? | |
2062 | if test -s conftest.err; then | |
2063 | grep -v '^ *+' conftest.err >conftest.er1 | |
2064 | cat conftest.er1 >&5 | |
2065 | mv -f conftest.er1 conftest.err | |
2066 | fi | |
2067 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2068 | test $ac_status = 0; } && { | |
2069 | test -z "$ac_c_werror_flag" || | |
2070 | test ! -s conftest.err | |
2071 | } && test -s conftest$ac_exeext && { | |
2072 | test "$cross_compiling" = yes || | |
2073 | $as_test_x conftest$ac_exeext | |
2074 | }; then : | |
2075 | ac_retval=0 | |
2076 | else | |
2077 | $as_echo "$as_me: failed program was:" >&5 | |
2078 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 2079 | |
81ecdfbb RW |
2080 | ac_retval=1 |
2081 | fi | |
2082 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2083 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2084 | # interfere with the next link command; also delete a directory that is | |
2085 | # left behind by Apple's compiler. We do this before executing the actions. | |
2086 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2087 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2088 | return $ac_retval | |
bec39cab | 2089 | |
81ecdfbb | 2090 | } # ac_fn_c_try_link |
bec39cab | 2091 | |
81ecdfbb RW |
2092 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
2093 | # -------------------------------------------- | |
2094 | # Tries to find the compile-time value of EXPR in a program that includes | |
2095 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
2096 | # computed | |
2097 | ac_fn_c_compute_int () | |
2098 | { | |
2099 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2100 | if test "$cross_compiling" = yes; then | |
2101 | # Depending upon the size, compute the lo and hi bounds. | |
2102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2103 | /* end confdefs.h. */ | |
2104 | $4 | |
2105 | int | |
2106 | main () | |
2107 | { | |
2108 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
2109 | test_array [0] = 0 | |
bec39cab | 2110 | |
81ecdfbb RW |
2111 | ; |
2112 | return 0; | |
2113 | } | |
2114 | _ACEOF | |
2115 | if ac_fn_c_try_compile "$LINENO"; then : | |
2116 | ac_lo=0 ac_mid=0 | |
2117 | while :; do | |
2118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2119 | /* end confdefs.h. */ | |
2120 | $4 | |
2121 | int | |
2122 | main () | |
2123 | { | |
2124 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2125 | test_array [0] = 0 | |
bec39cab | 2126 | |
81ecdfbb RW |
2127 | ; |
2128 | return 0; | |
2129 | } | |
2130 | _ACEOF | |
2131 | if ac_fn_c_try_compile "$LINENO"; then : | |
2132 | ac_hi=$ac_mid; break | |
2133 | else | |
2134 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
2135 | if test $ac_lo -le $ac_mid; then | |
2136 | ac_lo= ac_hi= | |
2137 | break | |
2138 | fi | |
2139 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 2140 | fi |
81ecdfbb RW |
2141 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
2142 | done | |
c906108c | 2143 | else |
81ecdfbb RW |
2144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2145 | /* end confdefs.h. */ | |
2146 | $4 | |
2147 | int | |
2148 | main () | |
2149 | { | |
2150 | static int test_array [1 - 2 * !(($2) < 0)]; | |
2151 | test_array [0] = 0 | |
bec39cab | 2152 | |
81ecdfbb RW |
2153 | ; |
2154 | return 0; | |
2155 | } | |
2156 | _ACEOF | |
2157 | if ac_fn_c_try_compile "$LINENO"; then : | |
2158 | ac_hi=-1 ac_mid=-1 | |
2159 | while :; do | |
2160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2161 | /* end confdefs.h. */ | |
2162 | $4 | |
2163 | int | |
2164 | main () | |
2165 | { | |
2166 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
2167 | test_array [0] = 0 | |
bec39cab | 2168 | |
81ecdfbb RW |
2169 | ; |
2170 | return 0; | |
2171 | } | |
2172 | _ACEOF | |
2173 | if ac_fn_c_try_compile "$LINENO"; then : | |
2174 | ac_lo=$ac_mid; break | |
2175 | else | |
2176 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
2177 | if test $ac_mid -le $ac_hi; then | |
2178 | ac_lo= ac_hi= | |
2179 | break | |
2180 | fi | |
2181 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
2182 | fi | |
2183 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2184 | done | |
2185 | else | |
2186 | ac_lo= ac_hi= | |
2187 | fi | |
2188 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2189 | fi | |
2190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2191 | # Binary search between lo and hi bounds. | |
2192 | while test "x$ac_lo" != "x$ac_hi"; do | |
2193 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
2194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2195 | /* end confdefs.h. */ | |
2196 | $4 | |
2197 | int | |
2198 | main () | |
2199 | { | |
2200 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
2201 | test_array [0] = 0 | |
bec39cab | 2202 | |
81ecdfbb RW |
2203 | ; |
2204 | return 0; | |
2205 | } | |
2206 | _ACEOF | |
2207 | if ac_fn_c_try_compile "$LINENO"; then : | |
2208 | ac_hi=$ac_mid | |
2209 | else | |
2210 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2211 | fi | |
2212 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2213 | done | |
2214 | case $ac_lo in #(( | |
2215 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2216 | '') ac_retval=1 ;; | |
2217 | esac | |
2218 | else | |
2219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2220 | /* end confdefs.h. */ | |
2221 | $4 | |
2222 | static long int longval () { return $2; } | |
2223 | static unsigned long int ulongval () { return $2; } | |
2224 | #include <stdio.h> | |
2225 | #include <stdlib.h> | |
2226 | int | |
2227 | main () | |
2228 | { | |
bec39cab | 2229 | |
81ecdfbb RW |
2230 | FILE *f = fopen ("conftest.val", "w"); |
2231 | if (! f) | |
2232 | return 1; | |
2233 | if (($2) < 0) | |
2234 | { | |
2235 | long int i = longval (); | |
2236 | if (i != ($2)) | |
2237 | return 1; | |
2238 | fprintf (f, "%ld", i); | |
2239 | } | |
2240 | else | |
2241 | { | |
2242 | unsigned long int i = ulongval (); | |
2243 | if (i != ($2)) | |
2244 | return 1; | |
2245 | fprintf (f, "%lu", i); | |
2246 | } | |
2247 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2248 | on some platforms. */ | |
2249 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2250 | |
81ecdfbb RW |
2251 | ; |
2252 | return 0; | |
2253 | } | |
2254 | _ACEOF | |
2255 | if ac_fn_c_try_run "$LINENO"; then : | |
2256 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2257 | else | |
2258 | ac_retval=1 | |
2259 | fi | |
2260 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2261 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2262 | rm -f conftest.val | |
bec39cab | 2263 | |
81ecdfbb RW |
2264 | fi |
2265 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2266 | return $ac_retval | |
bec39cab | 2267 | |
81ecdfbb | 2268 | } # ac_fn_c_compute_int |
bec39cab | 2269 | |
55a8c076 YQ |
2270 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2271 | # ------------------------------------ | |
2272 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2273 | ac_fn_c_check_decl () | |
81ecdfbb RW |
2274 | { |
2275 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
55a8c076 YQ |
2276 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
2277 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2279 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2280 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
81ecdfbb RW |
2281 | $as_echo_n "(cached) " >&6 |
2282 | else | |
2283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2284 | /* end confdefs.h. */ | |
55a8c076 | 2285 | $4 |
81ecdfbb RW |
2286 | int |
2287 | main () | |
2288 | { | |
55a8c076 YQ |
2289 | #ifndef $as_decl_name |
2290 | #ifdef __cplusplus | |
2291 | (void) $as_decl_use; | |
2292 | #else | |
2293 | (void) $as_decl_name; | |
2294 | #endif | |
2295 | #endif | |
2296 | ||
81ecdfbb RW |
2297 | ; |
2298 | return 0; | |
2299 | } | |
2300 | _ACEOF | |
2301 | if ac_fn_c_try_compile "$LINENO"; then : | |
55a8c076 | 2302 | eval "$3=yes" |
81ecdfbb | 2303 | else |
55a8c076 | 2304 | eval "$3=no" |
81ecdfbb RW |
2305 | fi |
2306 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2307 | fi | |
55a8c076 | 2308 | eval ac_res=\$$3 |
81ecdfbb RW |
2309 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
2310 | $as_echo "$ac_res" >&6; } | |
2311 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 2312 | |
55a8c076 | 2313 | } # ac_fn_c_check_decl |
bec39cab | 2314 | |
55a8c076 YQ |
2315 | # ac_fn_c_check_func LINENO FUNC VAR |
2316 | # ---------------------------------- | |
2317 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2318 | ac_fn_c_check_func () | |
81ecdfbb RW |
2319 | { |
2320 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2322 | $as_echo_n "checking for $2... " >&6; } | |
2323 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2324 | $as_echo_n "(cached) " >&6 | |
2325 | else | |
81ecdfbb RW |
2326 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2327 | /* end confdefs.h. */ | |
55a8c076 YQ |
2328 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2329 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2330 | #define $2 innocuous_$2 | |
2331 | ||
2332 | /* System header to define __stub macros and hopefully few prototypes, | |
2333 | which can conflict with char $2 (); below. | |
2334 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2335 | <limits.h> exists even on freestanding compilers. */ | |
2336 | ||
2337 | #ifdef __STDC__ | |
2338 | # include <limits.h> | |
2339 | #else | |
2340 | # include <assert.h> | |
2341 | #endif | |
2342 | ||
2343 | #undef $2 | |
2344 | ||
2345 | /* Override any GCC internal prototype to avoid an error. | |
2346 | Use char because int might match the return type of a GCC | |
2347 | builtin and then its argument prototype would still apply. */ | |
2348 | #ifdef __cplusplus | |
2349 | extern "C" | |
2350 | #endif | |
2351 | char $2 (); | |
2352 | /* The GNU C library defines this for functions which it implements | |
2353 | to always fail with ENOSYS. Some functions are actually named | |
2354 | something starting with __ and the normal name is an alias. */ | |
2355 | #if defined __stub_$2 || defined __stub___$2 | |
2356 | choke me | |
2357 | #endif | |
2358 | ||
2359 | int | |
2360 | main () | |
2361 | { | |
2362 | return $2 (); | |
2363 | ; | |
2364 | return 0; | |
2365 | } | |
2366 | _ACEOF | |
2367 | if ac_fn_c_try_link "$LINENO"; then : | |
2368 | eval "$3=yes" | |
2369 | else | |
2370 | eval "$3=no" | |
2371 | fi | |
2372 | rm -f core conftest.err conftest.$ac_objext \ | |
2373 | conftest$ac_exeext conftest.$ac_ext | |
2374 | fi | |
2375 | eval ac_res=\$$3 | |
2376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2377 | $as_echo "$ac_res" >&6; } | |
2378 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2379 | ||
2380 | } # ac_fn_c_check_func | |
2381 | ||
2382 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
2383 | # ---------------------------------------------------- | |
2384 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2385 | # INCLUDES, setting cache variable VAR accordingly. | |
2386 | ac_fn_c_check_member () | |
2387 | { | |
2388 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2389 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2390 | $as_echo_n "checking for $2.$3... " >&6; } | |
2391 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2392 | $as_echo_n "(cached) " >&6 | |
2393 | else | |
2394 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2395 | /* end confdefs.h. */ | |
2396 | $5 | |
2397 | int | |
2398 | main () | |
2399 | { | |
2400 | static $2 ac_aggr; | |
2401 | if (ac_aggr.$3) | |
2402 | return 0; | |
2403 | ; | |
2404 | return 0; | |
2405 | } | |
2406 | _ACEOF | |
2407 | if ac_fn_c_try_compile "$LINENO"; then : | |
2408 | eval "$4=yes" | |
2409 | else | |
2410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2411 | /* end confdefs.h. */ | |
2412 | $5 | |
2413 | int | |
2414 | main () | |
2415 | { | |
2416 | static $2 ac_aggr; | |
2417 | if (sizeof ac_aggr.$3) | |
2418 | return 0; | |
2419 | ; | |
2420 | return 0; | |
2421 | } | |
2422 | _ACEOF | |
2423 | if ac_fn_c_try_compile "$LINENO"; then : | |
2424 | eval "$4=yes" | |
2425 | else | |
2426 | eval "$4=no" | |
2427 | fi | |
2428 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2429 | fi | |
2430 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2431 | fi | |
2432 | eval ac_res=\$$4 | |
2433 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2434 | $as_echo "$ac_res" >&6; } | |
2435 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2436 | ||
2437 | } # ac_fn_c_check_member | |
2438 | ||
2439 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2440 | # ------------------------------------------- | |
2441 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2442 | # variable VAR accordingly. | |
2443 | ac_fn_c_check_type () | |
2444 | { | |
2445 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2447 | $as_echo_n "checking for $2... " >&6; } | |
2448 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2449 | $as_echo_n "(cached) " >&6 | |
2450 | else | |
2451 | eval "$3=no" | |
2452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2453 | /* end confdefs.h. */ | |
2454 | $4 | |
2455 | int | |
2456 | main () | |
2457 | { | |
2458 | if (sizeof ($2)) | |
2459 | return 0; | |
2460 | ; | |
2461 | return 0; | |
2462 | } | |
2463 | _ACEOF | |
2464 | if ac_fn_c_try_compile "$LINENO"; then : | |
2465 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2466 | /* end confdefs.h. */ | |
2467 | $4 | |
2468 | int | |
2469 | main () | |
2470 | { | |
2471 | if (sizeof (($2))) | |
2472 | return 0; | |
2473 | ; | |
2474 | return 0; | |
2475 | } | |
2476 | _ACEOF | |
2477 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2478 | |
81ecdfbb RW |
2479 | else |
2480 | eval "$3=yes" | |
2481 | fi | |
2482 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2483 | fi | |
2484 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2485 | fi | |
2486 | eval ac_res=\$$3 | |
2487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2488 | $as_echo "$ac_res" >&6; } | |
2489 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2490 | |
81ecdfbb RW |
2491 | } # ac_fn_c_check_type |
2492 | cat >config.log <<_ACEOF | |
2493 | This file contains any messages produced by compilers while | |
2494 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2495 | |
81ecdfbb RW |
2496 | It was created by $as_me, which was |
2497 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2498 | |
81ecdfbb | 2499 | $ $0 $@ |
413ccac7 | 2500 | |
81ecdfbb RW |
2501 | _ACEOF |
2502 | exec 5>>config.log | |
2503 | { | |
2504 | cat <<_ASUNAME | |
2505 | ## --------- ## | |
2506 | ## Platform. ## | |
2507 | ## --------- ## | |
413ccac7 | 2508 | |
81ecdfbb RW |
2509 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2510 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2511 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2512 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2513 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2514 | |
81ecdfbb RW |
2515 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2516 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2517 | |
81ecdfbb RW |
2518 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2519 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2520 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2521 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2522 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2523 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2524 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2525 | |
81ecdfbb | 2526 | _ASUNAME |
bec39cab | 2527 | |
bec39cab AC |
2528 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2529 | for as_dir in $PATH | |
2530 | do | |
2531 | IFS=$as_save_IFS | |
2532 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2533 | $as_echo "PATH: $as_dir" |
2534 | done | |
2535 | IFS=$as_save_IFS | |
bec39cab | 2536 | |
81ecdfbb | 2537 | } >&5 |
bec39cab | 2538 | |
81ecdfbb | 2539 | cat >&5 <<_ACEOF |
bec39cab | 2540 | |
bec39cab | 2541 | |
81ecdfbb RW |
2542 | ## ----------- ## |
2543 | ## Core tests. ## | |
2544 | ## ----------- ## | |
2545 | ||
2546 | _ACEOF | |
2547 | ||
2548 | ||
2549 | # Keep a trace of the command line. | |
2550 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2551 | # Strip out --silent because we don't want to record it for future runs. | |
2552 | # Also quote any args containing shell meta-characters. | |
2553 | # Make two passes to allow for proper duplicate-argument suppression. | |
2554 | ac_configure_args= | |
2555 | ac_configure_args0= | |
2556 | ac_configure_args1= | |
2557 | ac_must_keep_next=false | |
2558 | for ac_pass in 1 2 | |
2559 | do | |
2560 | for ac_arg | |
2561 | do | |
2562 | case $ac_arg in | |
2563 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2564 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2565 | | -silent | --silent | --silen | --sile | --sil) | |
2566 | continue ;; | |
2567 | *\'*) | |
2568 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2569 | esac | |
2570 | case $ac_pass in | |
2571 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2572 | 2) | |
2573 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2574 | if test $ac_must_keep_next = true; then | |
2575 | ac_must_keep_next=false # Got value, back to normal. | |
2576 | else | |
2577 | case $ac_arg in | |
2578 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2579 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2580 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2581 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2582 | case "$ac_configure_args0 " in | |
2583 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2584 | esac | |
2585 | ;; | |
2586 | -* ) ac_must_keep_next=true ;; | |
2587 | esac | |
2588 | fi | |
2589 | as_fn_append ac_configure_args " '$ac_arg'" | |
2590 | ;; | |
2591 | esac | |
2592 | done | |
2593 | done | |
2594 | { ac_configure_args0=; unset ac_configure_args0;} | |
2595 | { ac_configure_args1=; unset ac_configure_args1;} | |
2596 | ||
2597 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2598 | # config.log. We remove comments because anyway the quotes in there | |
2599 | # would cause problems or look ugly. | |
2600 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2601 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2602 | trap 'exit_status=$? | |
2603 | # Save into config.log some information that might help in debugging. | |
2604 | { | |
2605 | echo | |
2606 | ||
2607 | cat <<\_ASBOX | |
2608 | ## ---------------- ## | |
2609 | ## Cache variables. ## | |
2610 | ## ---------------- ## | |
2611 | _ASBOX | |
2612 | echo | |
2613 | # The following way of writing the cache mishandles newlines in values, | |
2614 | ( | |
2615 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2616 | eval ac_val=\$$ac_var | |
2617 | case $ac_val in #( | |
2618 | *${as_nl}*) | |
2619 | case $ac_var in #( | |
2620 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2621 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2622 | esac | |
2623 | case $ac_var in #( | |
2624 | _ | IFS | as_nl) ;; #( | |
2625 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2626 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2627 | esac ;; | |
2628 | esac | |
2629 | done | |
2630 | (set) 2>&1 | | |
2631 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2632 | *${as_nl}ac_space=\ *) | |
2633 | sed -n \ | |
2634 | "s/'\''/'\''\\\\'\'''\''/g; | |
2635 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2636 | ;; #( | |
2637 | *) | |
2638 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2639 | ;; | |
2640 | esac | | |
2641 | sort | |
2642 | ) | |
2643 | echo | |
2644 | ||
2645 | cat <<\_ASBOX | |
2646 | ## ----------------- ## | |
2647 | ## Output variables. ## | |
2648 | ## ----------------- ## | |
2649 | _ASBOX | |
2650 | echo | |
2651 | for ac_var in $ac_subst_vars | |
2652 | do | |
2653 | eval ac_val=\$$ac_var | |
2654 | case $ac_val in | |
2655 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2656 | esac | |
2657 | $as_echo "$ac_var='\''$ac_val'\''" | |
2658 | done | sort | |
2659 | echo | |
2660 | ||
2661 | if test -n "$ac_subst_files"; then | |
2662 | cat <<\_ASBOX | |
2663 | ## ------------------- ## | |
2664 | ## File substitutions. ## | |
2665 | ## ------------------- ## | |
2666 | _ASBOX | |
2667 | echo | |
2668 | for ac_var in $ac_subst_files | |
2669 | do | |
2670 | eval ac_val=\$$ac_var | |
2671 | case $ac_val in | |
2672 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2673 | esac | |
2674 | $as_echo "$ac_var='\''$ac_val'\''" | |
2675 | done | sort | |
2676 | echo | |
2677 | fi | |
2678 | ||
2679 | if test -s confdefs.h; then | |
2680 | cat <<\_ASBOX | |
2681 | ## ----------- ## | |
2682 | ## confdefs.h. ## | |
2683 | ## ----------- ## | |
2684 | _ASBOX | |
2685 | echo | |
2686 | cat confdefs.h | |
2687 | echo | |
2688 | fi | |
2689 | test "$ac_signal" != 0 && | |
2690 | $as_echo "$as_me: caught signal $ac_signal" | |
2691 | $as_echo "$as_me: exit $exit_status" | |
2692 | } >&5 | |
2693 | rm -f core *.core core.conftest.* && | |
2694 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2695 | exit $exit_status | |
2696 | ' 0 | |
2697 | for ac_signal in 1 2 13 15; do | |
2698 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2699 | done | |
2700 | ac_signal=0 | |
2701 | ||
2702 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2703 | rm -f -r conftest* confdefs.h | |
2704 | ||
2705 | $as_echo "/* confdefs.h */" > confdefs.h | |
2706 | ||
2707 | # Predefined preprocessor variables. | |
2708 | ||
2709 | cat >>confdefs.h <<_ACEOF | |
2710 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2711 | _ACEOF | |
2712 | ||
2713 | cat >>confdefs.h <<_ACEOF | |
2714 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2715 | _ACEOF | |
2716 | ||
2717 | cat >>confdefs.h <<_ACEOF | |
2718 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2719 | _ACEOF | |
2720 | ||
2721 | cat >>confdefs.h <<_ACEOF | |
2722 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2723 | _ACEOF | |
2724 | ||
2725 | cat >>confdefs.h <<_ACEOF | |
2726 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2727 | _ACEOF | |
2728 | ||
2729 | cat >>confdefs.h <<_ACEOF | |
2730 | #define PACKAGE_URL "$PACKAGE_URL" | |
2731 | _ACEOF | |
2732 | ||
2733 | ||
2734 | # Let the site file select an alternate cache file if it wants to. | |
2735 | # Prefer an explicitly selected file to automatically selected ones. | |
2736 | ac_site_file1=NONE | |
2737 | ac_site_file2=NONE | |
2738 | if test -n "$CONFIG_SITE"; then | |
2739 | ac_site_file1=$CONFIG_SITE | |
2740 | elif test "x$prefix" != xNONE; then | |
2741 | ac_site_file1=$prefix/share/config.site | |
2742 | ac_site_file2=$prefix/etc/config.site | |
2743 | else | |
2744 | ac_site_file1=$ac_default_prefix/share/config.site | |
2745 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2746 | fi | |
2747 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2748 | do | |
2749 | test "x$ac_site_file" = xNONE && continue | |
2750 | if test -r "$ac_site_file"; then | |
2751 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2752 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2753 | sed 's/^/| /' "$ac_site_file" >&5 | |
2754 | . "$ac_site_file" | |
2755 | fi | |
2756 | done | |
2757 | ||
2758 | if test -r "$cache_file"; then | |
2759 | # Some versions of bash will fail to source /dev/null (special | |
2760 | # files actually), so we avoid doing that. | |
2761 | if test -f "$cache_file"; then | |
2762 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2763 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2764 | case $cache_file in | |
2765 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2766 | *) . "./$cache_file";; | |
2767 | esac | |
2768 | fi | |
2769 | else | |
2770 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2771 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2772 | >$cache_file | |
bec39cab AC |
2773 | fi |
2774 | ||
55a8c076 YQ |
2775 | gl_header_list="$gl_header_list stdint.h" |
2776 | gl_header_list="$gl_header_list wchar.h" | |
2777 | gl_header_list="$gl_header_list inttypes.h" | |
f434ba03 PA |
2778 | gl_header_list="$gl_header_list sys/mman.h" |
2779 | gl_func_list="$gl_func_list mprotect" | |
2780 | gl_func_list="$gl_func_list memchr" | |
2781 | gl_header_list="$gl_header_list stddef.h" | |
81ecdfbb RW |
2782 | gl_header_list="$gl_header_list string.h" |
2783 | # Check that the precious variables saved in the cache have kept the same | |
2784 | # value. | |
2785 | ac_cache_corrupted=false | |
2786 | for ac_var in $ac_precious_vars; do | |
2787 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2788 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2789 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2790 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2791 | case $ac_old_set,$ac_new_set in | |
2792 | set,) | |
2793 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2794 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2795 | ac_cache_corrupted=: ;; | |
2796 | ,set) | |
2797 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2798 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2799 | ac_cache_corrupted=: ;; | |
2800 | ,);; | |
2801 | *) | |
2802 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2803 | # differences in whitespace do not lead to failure. | |
2804 | ac_old_val_w=`echo x $ac_old_val` | |
2805 | ac_new_val_w=`echo x $ac_new_val` | |
2806 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2807 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2808 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2809 | ac_cache_corrupted=: | |
2810 | else | |
2811 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2812 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2813 | eval $ac_var=\$ac_old_val | |
2814 | fi | |
2815 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2816 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2817 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2818 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2819 | fi;; | |
2820 | esac | |
2821 | # Pass precious variables to config.status. | |
2822 | if test "$ac_new_set" = set; then | |
2823 | case $ac_new_val in | |
2824 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2825 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2826 | esac | |
2827 | case " $ac_configure_args " in | |
2828 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2829 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2830 | esac | |
2831 | fi | |
2832 | done | |
2833 | if $ac_cache_corrupted; then | |
2834 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2835 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2836 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2837 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2838 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2839 | fi | |
2840 | ## -------------------- ## | |
2841 | ## Main body of script. ## | |
2842 | ## -------------------- ## | |
2843 | ||
2844 | ac_ext=c | |
2845 | ac_cpp='$CPP $CPPFLAGS' | |
2846 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2847 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2848 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2849 | ||
2850 | ||
2851 | ||
2852 | ||
2853 | ||
2854 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2855 | ||
2856 | ||
2857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2858 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2859 | # Check whether --enable-maintainer-mode was given. | |
2860 | if test "${enable_maintainer_mode+set}" = set; then : | |
2861 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2862 | else | |
2863 | USE_MAINTAINER_MODE=no | |
2864 | fi | |
2865 | ||
2866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2867 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2868 | if test $USE_MAINTAINER_MODE = yes; then | |
2869 | MAINTAINER_MODE_TRUE= | |
2870 | MAINTAINER_MODE_FALSE='#' | |
2871 | else | |
2872 | MAINTAINER_MODE_TRUE='#' | |
2873 | MAINTAINER_MODE_FALSE= | |
2874 | fi | |
2875 | ||
2876 | MAINT=$MAINTAINER_MODE_TRUE | |
2877 | ||
2878 | ||
2879 | ||
2880 | ac_ext=c | |
2881 | ac_cpp='$CPP $CPPFLAGS' | |
2882 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2883 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2884 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2885 | if test -n "$ac_tool_prefix"; then | |
2886 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2887 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2889 | $as_echo_n "checking for $ac_word... " >&6; } | |
2890 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2891 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2892 | else |
2893 | if test -n "$CC"; then | |
2894 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2895 | else | |
bec39cab AC |
2896 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2897 | for as_dir in $PATH | |
2898 | do | |
2899 | IFS=$as_save_IFS | |
2900 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2901 | for ac_exec_ext in '' $ac_executable_extensions; do |
2902 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2903 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2904 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2905 | break 2 |
2906 | fi | |
2907 | done | |
81ecdfbb RW |
2908 | done |
2909 | IFS=$as_save_IFS | |
bec39cab | 2910 | |
c906108c SS |
2911 | fi |
2912 | fi | |
bec39cab | 2913 | CC=$ac_cv_prog_CC |
c906108c | 2914 | if test -n "$CC"; then |
81ecdfbb RW |
2915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2916 | $as_echo "$CC" >&6; } | |
c906108c | 2917 | else |
81ecdfbb RW |
2918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2919 | $as_echo "no" >&6; } | |
c906108c SS |
2920 | fi |
2921 | ||
81ecdfbb | 2922 | |
b4e70030 JB |
2923 | fi |
2924 | if test -z "$ac_cv_prog_CC"; then | |
2925 | ac_ct_CC=$CC | |
81ecdfbb RW |
2926 | # Extract the first word of "gcc", so it can be a program name with args. |
2927 | set dummy gcc; ac_word=$2 | |
2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2929 | $as_echo_n "checking for $ac_word... " >&6; } | |
2930 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2931 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2932 | else |
2933 | if test -n "$ac_ct_CC"; then | |
2934 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2935 | else | |
2936 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2937 | for as_dir in $PATH | |
2938 | do | |
2939 | IFS=$as_save_IFS | |
2940 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2941 | for ac_exec_ext in '' $ac_executable_extensions; do |
2942 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2943 | ac_cv_prog_ac_ct_CC="gcc" | |
2944 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2945 | break 2 |
4e8d927d | 2946 | fi |
b4e70030 | 2947 | done |
81ecdfbb RW |
2948 | done |
2949 | IFS=$as_save_IFS | |
b4e70030 JB |
2950 | |
2951 | fi | |
2952 | fi | |
2953 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2954 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2956 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2957 | else |
81ecdfbb RW |
2958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2959 | $as_echo "no" >&6; } | |
b4e70030 JB |
2960 | fi |
2961 | ||
81ecdfbb RW |
2962 | if test "x$ac_ct_CC" = x; then |
2963 | CC="" | |
2964 | else | |
2965 | case $cross_compiling:$ac_tool_warned in | |
2966 | yes:) | |
2967 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2968 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2969 | ac_tool_warned=yes ;; | |
2970 | esac | |
2971 | CC=$ac_ct_CC | |
2972 | fi | |
b4e70030 JB |
2973 | else |
2974 | CC="$ac_cv_prog_CC" | |
2975 | fi | |
2976 | ||
c906108c | 2977 | if test -z "$CC"; then |
81ecdfbb RW |
2978 | if test -n "$ac_tool_prefix"; then |
2979 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2980 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2981 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2982 | $as_echo_n "checking for $ac_word... " >&6; } | |
2983 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2984 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2985 | else |
2986 | if test -n "$CC"; then | |
2987 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2988 | else | |
bec39cab AC |
2989 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2990 | for as_dir in $PATH | |
2991 | do | |
2992 | IFS=$as_save_IFS | |
2993 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2994 | for ac_exec_ext in '' $ac_executable_extensions; do |
2995 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2996 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2997 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2998 | break 2 |
2999 | fi | |
3000 | done | |
81ecdfbb RW |
3001 | done |
3002 | IFS=$as_save_IFS | |
3003 | ||
3004 | fi | |
3005 | fi | |
3006 | CC=$ac_cv_prog_CC | |
3007 | if test -n "$CC"; then | |
3008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3009 | $as_echo "$CC" >&6; } | |
3010 | else | |
3011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3012 | $as_echo "no" >&6; } | |
3013 | fi | |
3014 | ||
3015 | ||
3016 | fi | |
3017 | fi | |
3018 | if test -z "$CC"; then | |
3019 | # Extract the first word of "cc", so it can be a program name with args. | |
3020 | set dummy cc; ac_word=$2 | |
3021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3022 | $as_echo_n "checking for $ac_word... " >&6; } | |
3023 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3024 | $as_echo_n "(cached) " >&6 | |
3025 | else | |
3026 | if test -n "$CC"; then | |
3027 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3028 | else | |
3029 | ac_prog_rejected=no | |
3030 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3031 | for as_dir in $PATH | |
3032 | do | |
3033 | IFS=$as_save_IFS | |
3034 | test -z "$as_dir" && as_dir=. | |
3035 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3036 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
3037 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3038 | ac_prog_rejected=yes | |
3039 | continue | |
3040 | fi | |
3041 | ac_cv_prog_CC="cc" | |
3042 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3043 | break 2 | |
3044 | fi | |
3045 | done | |
3046 | done | |
3047 | IFS=$as_save_IFS | |
bec39cab | 3048 | |
c906108c SS |
3049 | if test $ac_prog_rejected = yes; then |
3050 | # We found a bogon in the path, so make sure we never use it. | |
3051 | set dummy $ac_cv_prog_CC | |
3052 | shift | |
bec39cab | 3053 | if test $# != 0; then |
c906108c SS |
3054 | # We chose a different compiler from the bogus one. |
3055 | # However, it has the same basename, so the bogon will be chosen | |
3056 | # first if we set CC to just the basename; use the full file name. | |
3057 | shift | |
bec39cab | 3058 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
3059 | fi |
3060 | fi | |
3061 | fi | |
3062 | fi | |
bec39cab | 3063 | CC=$ac_cv_prog_CC |
c906108c | 3064 | if test -n "$CC"; then |
81ecdfbb RW |
3065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3066 | $as_echo "$CC" >&6; } | |
c906108c | 3067 | else |
81ecdfbb RW |
3068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3069 | $as_echo "no" >&6; } | |
c906108c SS |
3070 | fi |
3071 | ||
81ecdfbb | 3072 | |
bec39cab AC |
3073 | fi |
3074 | if test -z "$CC"; then | |
3075 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 3076 | for ac_prog in cl.exe |
bec39cab AC |
3077 | do |
3078 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3079 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
3080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3081 | $as_echo_n "checking for $ac_word... " >&6; } | |
3082 | if test "${ac_cv_prog_CC+set}" = set; then : | |
3083 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
3084 | else |
3085 | if test -n "$CC"; then | |
3086 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
3087 | else | |
bec39cab AC |
3088 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3089 | for as_dir in $PATH | |
3090 | do | |
3091 | IFS=$as_save_IFS | |
3092 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3093 | for ac_exec_ext in '' $ac_executable_extensions; do |
3094 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3095 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 3096 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
3097 | break 2 |
3098 | fi | |
3099 | done | |
81ecdfbb RW |
3100 | done |
3101 | IFS=$as_save_IFS | |
bec39cab | 3102 | |
c906108c SS |
3103 | fi |
3104 | fi | |
bec39cab | 3105 | CC=$ac_cv_prog_CC |
c906108c | 3106 | if test -n "$CC"; then |
81ecdfbb RW |
3107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
3108 | $as_echo "$CC" >&6; } | |
c906108c | 3109 | else |
81ecdfbb RW |
3110 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3111 | $as_echo "no" >&6; } | |
c906108c | 3112 | fi |
bec39cab | 3113 | |
81ecdfbb | 3114 | |
bec39cab AC |
3115 | test -n "$CC" && break |
3116 | done | |
3117 | fi | |
3118 | if test -z "$CC"; then | |
3119 | ac_ct_CC=$CC | |
81ecdfbb | 3120 | for ac_prog in cl.exe |
bec39cab AC |
3121 | do |
3122 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3123 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
3124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
3125 | $as_echo_n "checking for $ac_word... " >&6; } | |
3126 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
3127 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3128 | else |
3129 | if test -n "$ac_ct_CC"; then | |
3130 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3131 | else | |
3132 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3133 | for as_dir in $PATH | |
3134 | do | |
3135 | IFS=$as_save_IFS | |
3136 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3137 | for ac_exec_ext in '' $ac_executable_extensions; do |
3138 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 3139 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 3140 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 3141 | break 2 |
c906108c | 3142 | fi |
bec39cab | 3143 | done |
81ecdfbb RW |
3144 | done |
3145 | IFS=$as_save_IFS | |
bec39cab AC |
3146 | |
3147 | fi | |
3148 | fi | |
3149 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3150 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
3151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
3152 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 3153 | else |
81ecdfbb RW |
3154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3155 | $as_echo "no" >&6; } | |
c906108c SS |
3156 | fi |
3157 | ||
81ecdfbb | 3158 | |
bec39cab AC |
3159 | test -n "$ac_ct_CC" && break |
3160 | done | |
c906108c | 3161 | |
81ecdfbb RW |
3162 | if test "x$ac_ct_CC" = x; then |
3163 | CC="" | |
3164 | else | |
3165 | case $cross_compiling:$ac_tool_warned in | |
3166 | yes:) | |
3167 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3168 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3169 | ac_tool_warned=yes ;; | |
3170 | esac | |
3171 | CC=$ac_ct_CC | |
3172 | fi | |
bec39cab AC |
3173 | fi |
3174 | ||
3175 | fi | |
3176 | ||
3177 | ||
81ecdfbb RW |
3178 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3179 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3180 | as_fn_error "no acceptable C compiler found in \$PATH | |
3181 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3182 | |
3183 | # Provide some information about the compiler. | |
81ecdfbb RW |
3184 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3185 | set X $ac_compile | |
3186 | ac_compiler=$2 | |
3187 | for ac_option in --version -v -V -qversion; do | |
3188 | { { ac_try="$ac_compiler $ac_option >&5" | |
3189 | case "(($ac_try" in | |
3190 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3191 | *) ac_try_echo=$ac_try;; | |
3192 | esac | |
3193 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3194 | $as_echo "$ac_try_echo"; } >&5 | |
3195 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3196 | ac_status=$? |
81ecdfbb RW |
3197 | if test -s conftest.err; then |
3198 | sed '10a\ | |
3199 | ... rest of stderr output deleted ... | |
3200 | 10q' conftest.err >conftest.er1 | |
3201 | cat conftest.er1 >&5 | |
3202 | rm -f conftest.er1 conftest.err | |
3203 | fi | |
3204 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3205 | test $ac_status = 0; } | |
3206 | done | |
bec39cab | 3207 | |
81ecdfbb | 3208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3209 | /* end confdefs.h. */ |
3210 | ||
3211 | int | |
3212 | main () | |
3213 | { | |
3214 | ||
3215 | ; | |
3216 | return 0; | |
3217 | } | |
3218 | _ACEOF | |
3219 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3220 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3221 | # Try to create an executable without -o first, disregard a.out. |
3222 | # It will help us diagnose broken compilers, and finding out an intuition | |
3223 | # of exeext. | |
81ecdfbb RW |
3224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3225 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3226 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3227 | ||
3228 | # The possible output files: | |
3229 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3230 | ||
3231 | ac_rmfiles= | |
3232 | for ac_file in $ac_files | |
3233 | do | |
3234 | case $ac_file in | |
3235 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3236 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3237 | esac | |
3238 | done | |
3239 | rm -f $ac_rmfiles | |
3240 | ||
3241 | if { { ac_try="$ac_link_default" | |
3242 | case "(($ac_try" in | |
3243 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3244 | *) ac_try_echo=$ac_try;; | |
3245 | esac | |
3246 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3247 | $as_echo "$ac_try_echo"; } >&5 | |
3248 | (eval "$ac_link_default") 2>&5 | |
3249 | ac_status=$? | |
3250 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3251 | test $ac_status = 0; }; then : | |
3252 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3253 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3254 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3255 | # so that the user can short-circuit this test for compilers unknown to | |
3256 | # Autoconf. | |
3257 | for ac_file in $ac_files '' | |
bec39cab AC |
3258 | do |
3259 | test -f "$ac_file" || continue | |
3260 | case $ac_file in | |
81ecdfbb | 3261 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3262 | ;; |
3263 | [ab].out ) | |
3264 | # We found the default executable, but exeext='' is most | |
3265 | # certainly right. | |
3266 | break;; | |
3267 | *.* ) | |
81ecdfbb RW |
3268 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3269 | then :; else | |
3270 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3271 | fi | |
3272 | # We set ac_cv_exeext here because the later test for it is not | |
3273 | # safe: cross compilers may not add the suffix if given an `-o' | |
3274 | # argument, so we may need to know it at that point already. | |
3275 | # Even if this section looks crufty: it has the advantage of | |
3276 | # actually working. | |
b4e70030 JB |
3277 | break;; |
3278 | * ) | |
3279 | break;; | |
bec39cab AC |
3280 | esac |
3281 | done | |
81ecdfbb RW |
3282 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3283 | ||
bec39cab | 3284 | else |
81ecdfbb RW |
3285 | ac_file='' |
3286 | fi | |
3287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3288 | $as_echo "$ac_file" >&6; } | |
3289 | if test -z "$ac_file"; then : | |
3290 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3291 | sed 's/^/| /' conftest.$ac_ext >&5 |
3292 | ||
81ecdfbb RW |
3293 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3294 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3295 | { as_fn_set_status 77 | |
3296 | as_fn_error "C compiler cannot create executables | |
3297 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3298 | fi |
b4e70030 | 3299 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3300 | |
81ecdfbb | 3301 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3302 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3304 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3305 | # If not cross compiling, check that we can run a simple program. |
3306 | if test "$cross_compiling" != yes; then | |
3307 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3308 | { { case "(($ac_try" in |
3309 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3310 | *) ac_try_echo=$ac_try;; | |
3311 | esac | |
3312 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3313 | $as_echo "$ac_try_echo"; } >&5 | |
3314 | (eval "$ac_try") 2>&5 | |
bec39cab | 3315 | ac_status=$? |
81ecdfbb RW |
3316 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3317 | test $ac_status = 0; }; }; then | |
bec39cab | 3318 | cross_compiling=no |
c906108c | 3319 | else |
bec39cab AC |
3320 | if test "$cross_compiling" = maybe; then |
3321 | cross_compiling=yes | |
3322 | else | |
81ecdfbb RW |
3323 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3324 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3325 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3326 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3327 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3328 | fi |
c906108c | 3329 | fi |
bec39cab | 3330 | fi |
81ecdfbb RW |
3331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3332 | $as_echo "yes" >&6; } | |
bec39cab | 3333 | |
81ecdfbb | 3334 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3335 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3336 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3337 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3339 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3341 | $as_echo "$cross_compiling" >&6; } | |
3342 | ||
3343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3344 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3345 | if { { ac_try="$ac_link" | |
3346 | case "(($ac_try" in | |
3347 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3348 | *) ac_try_echo=$ac_try;; | |
3349 | esac | |
3350 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3351 | $as_echo "$ac_try_echo"; } >&5 | |
3352 | (eval "$ac_link") 2>&5 | |
bec39cab | 3353 | ac_status=$? |
81ecdfbb RW |
3354 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3355 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3356 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3357 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3358 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3359 | # `rm'. | |
3360 | for ac_file in conftest.exe conftest conftest.*; do | |
3361 | test -f "$ac_file" || continue | |
3362 | case $ac_file in | |
81ecdfbb | 3363 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3364 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3365 | break;; |
3366 | * ) break;; | |
3367 | esac | |
3368 | done | |
c906108c | 3369 | else |
81ecdfbb RW |
3370 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3371 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3372 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3373 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3374 | fi |
b4e70030 | 3375 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3377 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3378 | |
b4e70030 | 3379 | rm -f conftest.$ac_ext |
bec39cab AC |
3380 | EXEEXT=$ac_cv_exeext |
3381 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3383 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3384 | if test "${ac_cv_objext+set}" = set; then : | |
3385 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3386 | else |
81ecdfbb | 3387 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3388 | /* end confdefs.h. */ |
3389 | ||
3390 | int | |
3391 | main () | |
3392 | { | |
3393 | ||
3394 | ; | |
3395 | return 0; | |
3396 | } | |
3397 | _ACEOF | |
3398 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3399 | if { { ac_try="$ac_compile" |
3400 | case "(($ac_try" in | |
3401 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3402 | *) ac_try_echo=$ac_try;; | |
3403 | esac | |
3404 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3405 | $as_echo "$ac_try_echo"; } >&5 | |
3406 | (eval "$ac_compile") 2>&5 | |
3407 | ac_status=$? | |
3408 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3409 | test $ac_status = 0; }; then : | |
3410 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3411 | test -f "$ac_file" || continue; | |
bec39cab | 3412 | case $ac_file in |
81ecdfbb | 3413 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3414 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3415 | break;; | |
3416 | esac | |
3417 | done | |
c906108c | 3418 | else |
81ecdfbb | 3419 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3420 | sed 's/^/| /' conftest.$ac_ext >&5 |
3421 | ||
81ecdfbb RW |
3422 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3423 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3424 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3425 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3426 | fi |
b4e70030 | 3427 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3428 | fi |
81ecdfbb RW |
3429 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3430 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3431 | OBJEXT=$ac_cv_objext |
3432 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3434 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3435 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3436 | $as_echo_n "(cached) " >&6 | |
c906108c | 3437 | else |
81ecdfbb | 3438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3439 | /* end confdefs.h. */ |
3440 | ||
3441 | int | |
3442 | main () | |
3443 | { | |
3444 | #ifndef __GNUC__ | |
3445 | choke me | |
3446 | #endif | |
3447 | ||
3448 | ; | |
3449 | return 0; | |
3450 | } | |
3451 | _ACEOF | |
81ecdfbb | 3452 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3453 | ac_compiler_gnu=yes |
3454 | else | |
81ecdfbb | 3455 | ac_compiler_gnu=no |
bec39cab | 3456 | fi |
81ecdfbb | 3457 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3458 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3459 | ||
3460 | fi | |
81ecdfbb RW |
3461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3462 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3463 | if test $ac_compiler_gnu = yes; then | |
3464 | GCC=yes | |
3465 | else | |
3466 | GCC= | |
3467 | fi | |
bec39cab AC |
3468 | ac_test_CFLAGS=${CFLAGS+set} |
3469 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3471 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3472 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3473 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3474 | else |
81ecdfbb RW |
3475 | ac_save_c_werror_flag=$ac_c_werror_flag |
3476 | ac_c_werror_flag=yes | |
3477 | ac_cv_prog_cc_g=no | |
3478 | CFLAGS="-g" | |
3479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3480 | /* end confdefs.h. */ |
3481 | ||
3482 | int | |
3483 | main () | |
3484 | { | |
3485 | ||
3486 | ; | |
3487 | return 0; | |
3488 | } | |
3489 | _ACEOF | |
81ecdfbb | 3490 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3491 | ac_cv_prog_cc_g=yes |
3492 | else | |
81ecdfbb RW |
3493 | CFLAGS="" |
3494 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3495 | /* end confdefs.h. */ | |
3496 | ||
3497 | int | |
3498 | main () | |
3499 | { | |
3500 | ||
3501 | ; | |
3502 | return 0; | |
3503 | } | |
3504 | _ACEOF | |
3505 | if ac_fn_c_try_compile "$LINENO"; then : | |
3506 | ||
3507 | else | |
3508 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3509 | CFLAGS="-g" | |
3510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3511 | /* end confdefs.h. */ | |
3512 | ||
3513 | int | |
3514 | main () | |
3515 | { | |
c906108c | 3516 | |
81ecdfbb RW |
3517 | ; |
3518 | return 0; | |
3519 | } | |
3520 | _ACEOF | |
3521 | if ac_fn_c_try_compile "$LINENO"; then : | |
3522 | ac_cv_prog_cc_g=yes | |
3523 | fi | |
3524 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3525 | fi | |
3526 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3527 | fi |
81ecdfbb RW |
3528 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3529 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3530 | fi |
81ecdfbb RW |
3531 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3532 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3533 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3534 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3535 | elif test $ac_cv_prog_cc_g = yes; then |
3536 | if test "$GCC" = yes; then | |
3537 | CFLAGS="-g -O2" | |
3538 | else | |
3539 | CFLAGS="-g" | |
3540 | fi | |
3541 | else | |
3542 | if test "$GCC" = yes; then | |
3543 | CFLAGS="-O2" | |
3544 | else | |
3545 | CFLAGS= | |
3546 | fi | |
3547 | fi | |
81ecdfbb RW |
3548 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3549 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3550 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3551 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3552 | else |
81ecdfbb | 3553 | ac_cv_prog_cc_c89=no |
bec39cab | 3554 | ac_save_CC=$CC |
81ecdfbb | 3555 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3556 | /* end confdefs.h. */ |
c906108c SS |
3557 | #include <stdarg.h> |
3558 | #include <stdio.h> | |
3559 | #include <sys/types.h> | |
3560 | #include <sys/stat.h> | |
3561 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3562 | struct buf { int x; }; | |
3563 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3564 | static char *e (p, i) | |
3565 | char **p; | |
3566 | int i; | |
3567 | { | |
3568 | return p[i]; | |
3569 | } | |
3570 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3571 | { | |
3572 | char *s; | |
3573 | va_list v; | |
3574 | va_start (v,p); | |
3575 | s = g (p, va_arg (v,int)); | |
3576 | va_end (v); | |
3577 | return s; | |
3578 | } | |
bec39cab AC |
3579 | |
3580 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3581 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3582 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3583 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3584 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3585 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3586 | that's true only with -std. */ |
bec39cab AC |
3587 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3588 | ||
81ecdfbb RW |
3589 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3590 | inside strings and character constants. */ | |
3591 | #define FOO(x) 'x' | |
3592 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3593 | ||
c906108c SS |
3594 | int test (int i, double x); |
3595 | struct s1 {int (*f) (int a);}; | |
3596 | struct s2 {int (*f) (double a);}; | |
3597 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3598 | int argc; | |
3599 | char **argv; | |
bec39cab AC |
3600 | int |
3601 | main () | |
3602 | { | |
c906108c | 3603 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3604 | ; |
3605 | return 0; | |
3606 | } | |
3607 | _ACEOF | |
81ecdfbb RW |
3608 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3609 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3610 | do |
3611 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3612 | if ac_fn_c_try_compile "$LINENO"; then : |
3613 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3614 | fi |
81ecdfbb RW |
3615 | rm -f core conftest.err conftest.$ac_objext |
3616 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3617 | done |
81ecdfbb | 3618 | rm -f conftest.$ac_ext |
bec39cab | 3619 | CC=$ac_save_CC |
c906108c SS |
3620 | |
3621 | fi | |
81ecdfbb RW |
3622 | # AC_CACHE_VAL |
3623 | case "x$ac_cv_prog_cc_c89" in | |
3624 | x) | |
3625 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3626 | $as_echo "none needed" >&6; } ;; | |
3627 | xno) | |
3628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3629 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3630 | *) |
81ecdfbb RW |
3631 | CC="$CC $ac_cv_prog_cc_c89" |
3632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3633 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3634 | esac |
81ecdfbb | 3635 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3636 | |
b4e70030 JB |
3637 | fi |
3638 | ||
bec39cab AC |
3639 | ac_ext=c |
3640 | ac_cpp='$CPP $CPPFLAGS' | |
3641 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3642 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3643 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3644 | |
f434ba03 PA |
3645 | ac_aux_dir= |
3646 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3647 | for ac_t in install-sh install.sh shtool; do | |
3648 | if test -f "$ac_dir/$ac_t"; then | |
3649 | ac_aux_dir=$ac_dir | |
3650 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3651 | break 2 | |
3652 | fi | |
3653 | done | |
3654 | done | |
3655 | if test -z "$ac_aux_dir"; then | |
3656 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3657 | fi | |
3658 | ||
3659 | # These three variables are undocumented and unsupported, | |
3660 | # and are intended to be withdrawn in a future Autoconf release. | |
3661 | # They can cause serious problems if a builder's source tree is in a directory | |
3662 | # whose full name contains unusual characters. | |
3663 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3664 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3665 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
3666 | ||
3667 | ||
3668 | # Make sure we can run config.sub. | |
3669 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3670 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3671 | ||
3672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3673 | $as_echo_n "checking build system type... " >&6; } | |
3674 | if test "${ac_cv_build+set}" = set; then : | |
3675 | $as_echo_n "(cached) " >&6 | |
3676 | else | |
3677 | ac_build_alias=$build_alias | |
3678 | test "x$ac_build_alias" = x && | |
3679 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3680 | test "x$ac_build_alias" = x && | |
3681 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3682 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3683 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3684 | ||
3685 | fi | |
3686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3687 | $as_echo "$ac_cv_build" >&6; } | |
3688 | case $ac_cv_build in | |
3689 | *-*-*) ;; | |
3690 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
3691 | esac | |
3692 | build=$ac_cv_build | |
3693 | ac_save_IFS=$IFS; IFS='-' | |
3694 | set x $ac_cv_build | |
3695 | shift | |
3696 | build_cpu=$1 | |
3697 | build_vendor=$2 | |
3698 | shift; shift | |
3699 | # Remember, the first character of IFS is used to create $*, | |
3700 | # except with old shells: | |
3701 | build_os=$* | |
3702 | IFS=$ac_save_IFS | |
3703 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3704 | ||
3705 | ||
3706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3707 | $as_echo_n "checking host system type... " >&6; } | |
3708 | if test "${ac_cv_host+set}" = set; then : | |
3709 | $as_echo_n "(cached) " >&6 | |
3710 | else | |
3711 | if test "x$host_alias" = x; then | |
3712 | ac_cv_host=$ac_cv_build | |
3713 | else | |
3714 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3715 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
3716 | fi | |
3717 | ||
3718 | fi | |
3719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3720 | $as_echo "$ac_cv_host" >&6; } | |
3721 | case $ac_cv_host in | |
3722 | *-*-*) ;; | |
3723 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
3724 | esac | |
3725 | host=$ac_cv_host | |
3726 | ac_save_IFS=$IFS; IFS='-' | |
3727 | set x $ac_cv_host | |
3728 | shift | |
3729 | host_cpu=$1 | |
3730 | host_vendor=$2 | |
3731 | shift; shift | |
3732 | # Remember, the first character of IFS is used to create $*, | |
3733 | # except with old shells: | |
3734 | host_os=$* | |
3735 | IFS=$ac_save_IFS | |
3736 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3737 | ||
3738 | ||
60ca704f | 3739 | |
bec39cab AC |
3740 | ac_ext=c |
3741 | ac_cpp='$CPP $CPPFLAGS' | |
3742 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3743 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3744 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3746 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3747 | # On Suns, sometimes $CPP names a directory. |
3748 | if test -n "$CPP" && test -d "$CPP"; then | |
3749 | CPP= | |
8bb2c122 | 3750 | fi |
bec39cab | 3751 | if test -z "$CPP"; then |
81ecdfbb RW |
3752 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3753 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3754 | else |
3755 | # Double quotes because CPP needs to be expanded | |
3756 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3757 | do | |
3758 | ac_preproc_ok=false | |
3759 | for ac_c_preproc_warn_flag in '' yes | |
3760 | do | |
3761 | # Use a header file that comes with gcc, so configuring glibc | |
3762 | # with a fresh cross-compiler works. | |
3763 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3764 | # <limits.h> exists even on freestanding compilers. | |
3765 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3766 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3768 | /* end confdefs.h. */ |
3769 | #ifdef __STDC__ | |
3770 | # include <limits.h> | |
3771 | #else | |
3772 | # include <assert.h> | |
3773 | #endif | |
3774 | Syntax error | |
3775 | _ACEOF | |
81ecdfbb | 3776 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3777 | |
81ecdfbb | 3778 | else |
bec39cab AC |
3779 | # Broken: fails on valid input. |
3780 | continue | |
3781 | fi | |
3782 | rm -f conftest.err conftest.$ac_ext | |
3783 | ||
81ecdfbb | 3784 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3785 | # can be detected and how. |
81ecdfbb | 3786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3787 | /* end confdefs.h. */ |
3788 | #include <ac_nonexistent.h> | |
3789 | _ACEOF | |
81ecdfbb | 3790 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3791 | # Broken: success on invalid input. |
3792 | continue | |
8bb2c122 | 3793 | else |
bec39cab AC |
3794 | # Passes both tests. |
3795 | ac_preproc_ok=: | |
3796 | break | |
8bb2c122 | 3797 | fi |
bec39cab | 3798 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3799 | |
bec39cab AC |
3800 | done |
3801 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3802 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3803 | if $ac_preproc_ok; then : |
bec39cab AC |
3804 | break |
3805 | fi | |
8bb2c122 | 3806 | |
bec39cab AC |
3807 | done |
3808 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3809 | |
c906108c | 3810 | fi |
bec39cab AC |
3811 | CPP=$ac_cv_prog_CPP |
3812 | else | |
3813 | ac_cv_prog_CPP=$CPP | |
c906108c | 3814 | fi |
81ecdfbb RW |
3815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3816 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3817 | ac_preproc_ok=false |
3818 | for ac_c_preproc_warn_flag in '' yes | |
3819 | do | |
3820 | # Use a header file that comes with gcc, so configuring glibc | |
3821 | # with a fresh cross-compiler works. | |
3822 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3823 | # <limits.h> exists even on freestanding compilers. | |
3824 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3825 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3826 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3827 | /* end confdefs.h. */ |
3828 | #ifdef __STDC__ | |
3829 | # include <limits.h> | |
3830 | #else | |
3831 | # include <assert.h> | |
3832 | #endif | |
3833 | Syntax error | |
3834 | _ACEOF | |
81ecdfbb | 3835 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3836 | |
81ecdfbb | 3837 | else |
bec39cab AC |
3838 | # Broken: fails on valid input. |
3839 | continue | |
3840 | fi | |
3841 | rm -f conftest.err conftest.$ac_ext | |
3842 | ||
81ecdfbb | 3843 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3844 | # can be detected and how. |
81ecdfbb | 3845 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3846 | /* end confdefs.h. */ |
3847 | #include <ac_nonexistent.h> | |
3848 | _ACEOF | |
81ecdfbb | 3849 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3850 | # Broken: success on invalid input. |
3851 | continue | |
c906108c | 3852 | else |
bec39cab AC |
3853 | # Passes both tests. |
3854 | ac_preproc_ok=: | |
3855 | break | |
c906108c | 3856 | fi |
bec39cab | 3857 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3858 | |
bec39cab AC |
3859 | done |
3860 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3861 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3862 | if $ac_preproc_ok; then : |
3863 | ||
c906108c | 3864 | else |
81ecdfbb RW |
3865 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3866 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3867 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3868 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3869 | fi |
c906108c | 3870 | |
bec39cab AC |
3871 | ac_ext=c |
3872 | ac_cpp='$CPP $CPPFLAGS' | |
3873 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3874 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3875 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3876 | ||
3877 | ||
81ecdfbb RW |
3878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3879 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3880 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3881 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3882 | else |
81ecdfbb RW |
3883 | if test -z "$GREP"; then |
3884 | ac_path_GREP_found=false | |
3885 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3886 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3887 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3888 | do | |
3889 | IFS=$as_save_IFS | |
3890 | test -z "$as_dir" && as_dir=. | |
3891 | for ac_prog in grep ggrep; do | |
3892 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3893 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3894 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3895 | # Check for GNU ac_path_GREP and select it if it is found. | |
3896 | # Check for GNU $ac_path_GREP | |
3897 | case `"$ac_path_GREP" --version 2>&1` in | |
3898 | *GNU*) | |
3899 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3900 | *) | |
3901 | ac_count=0 | |
3902 | $as_echo_n 0123456789 >"conftest.in" | |
3903 | while : | |
3904 | do | |
3905 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3906 | mv "conftest.tmp" "conftest.in" | |
3907 | cp "conftest.in" "conftest.nl" | |
3908 | $as_echo 'GREP' >> "conftest.nl" | |
3909 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3910 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3911 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3912 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3913 | # Best one so far, save it but keep looking for a better one | |
3914 | ac_cv_path_GREP="$ac_path_GREP" | |
3915 | ac_path_GREP_max=$ac_count | |
bec39cab | 3916 | fi |
81ecdfbb RW |
3917 | # 10*(2^10) chars as input seems more than enough |
3918 | test $ac_count -gt 10 && break | |
3919 | done | |
3920 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3921 | esac | |
bec39cab | 3922 | |
81ecdfbb RW |
3923 | $ac_path_GREP_found && break 3 |
3924 | done | |
3925 | done | |
3926 | done | |
3927 | IFS=$as_save_IFS | |
3928 | if test -z "$ac_cv_path_GREP"; then | |
3929 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3930 | fi | |
c906108c | 3931 | else |
81ecdfbb | 3932 | ac_cv_path_GREP=$GREP |
c906108c | 3933 | fi |
c906108c | 3934 | |
81ecdfbb RW |
3935 | fi |
3936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3937 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3938 | GREP="$ac_cv_path_GREP" | |
c906108c | 3939 | |
c906108c | 3940 | |
81ecdfbb RW |
3941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3942 | $as_echo_n "checking for egrep... " >&6; } | |
3943 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3944 | $as_echo_n "(cached) " >&6 | |
783e057b | 3945 | else |
81ecdfbb RW |
3946 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3947 | then ac_cv_path_EGREP="$GREP -E" | |
3948 | else | |
3949 | if test -z "$EGREP"; then | |
3950 | ac_path_EGREP_found=false | |
3951 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3952 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3953 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3954 | do |
3955 | IFS=$as_save_IFS | |
3956 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3957 | for ac_prog in egrep; do |
3958 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3959 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3960 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3961 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3962 | # Check for GNU $ac_path_EGREP | |
3963 | case `"$ac_path_EGREP" --version 2>&1` in | |
3964 | *GNU*) | |
3965 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3966 | *) | |
3967 | ac_count=0 | |
3968 | $as_echo_n 0123456789 >"conftest.in" | |
3969 | while : | |
3970 | do | |
3971 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3972 | mv "conftest.tmp" "conftest.in" | |
3973 | cp "conftest.in" "conftest.nl" | |
3974 | $as_echo 'EGREP' >> "conftest.nl" | |
3975 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3976 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3977 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3978 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3979 | # Best one so far, save it but keep looking for a better one | |
3980 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3981 | ac_path_EGREP_max=$ac_count | |
3982 | fi | |
3983 | # 10*(2^10) chars as input seems more than enough | |
3984 | test $ac_count -gt 10 && break | |
3985 | done | |
3986 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3987 | esac | |
bec39cab | 3988 | |
81ecdfbb RW |
3989 | $ac_path_EGREP_found && break 3 |
3990 | done | |
3991 | done | |
3992 | done | |
3993 | IFS=$as_save_IFS | |
3994 | if test -z "$ac_cv_path_EGREP"; then | |
3995 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3996 | fi |
783e057b | 3997 | else |
81ecdfbb | 3998 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3999 | fi |
4000 | ||
81ecdfbb | 4001 | fi |
783e057b | 4002 | fi |
81ecdfbb RW |
4003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
4004 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
4005 | EGREP="$ac_cv_path_EGREP" | |
4006 | ||
783e057b | 4007 | |
81ecdfbb RW |
4008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
4009 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
4010 | if test "${ac_cv_header_stdc+set}" = set; then : | |
4011 | $as_echo_n "(cached) " >&6 | |
783e057b | 4012 | else |
81ecdfbb | 4013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 4014 | /* end confdefs.h. */ |
783e057b | 4015 | #include <stdlib.h> |
bec39cab | 4016 | #include <stdarg.h> |
783e057b DJ |
4017 | #include <string.h> |
4018 | #include <float.h> | |
c906108c | 4019 | |
bec39cab AC |
4020 | int |
4021 | main () | |
4022 | { | |
c906108c | 4023 | |
bec39cab AC |
4024 | ; |
4025 | return 0; | |
4026 | } | |
4027 | _ACEOF | |
81ecdfbb | 4028 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4029 | ac_cv_header_stdc=yes |
c906108c | 4030 | else |
81ecdfbb | 4031 | ac_cv_header_stdc=no |
c906108c | 4032 | fi |
81ecdfbb | 4033 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 4034 | |
783e057b DJ |
4035 | if test $ac_cv_header_stdc = yes; then |
4036 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 4037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4038 | /* end confdefs.h. */ |
4039 | #include <string.h> | |
c906108c | 4040 | |
783e057b DJ |
4041 | _ACEOF |
4042 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4043 | $EGREP "memchr" >/dev/null 2>&1; then : |
4044 | ||
c906108c | 4045 | else |
783e057b | 4046 | ac_cv_header_stdc=no |
c906108c | 4047 | fi |
783e057b | 4048 | rm -f conftest* |
c906108c SS |
4049 | |
4050 | fi | |
4051 | ||
783e057b DJ |
4052 | if test $ac_cv_header_stdc = yes; then |
4053 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 4054 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4055 | /* end confdefs.h. */ |
4056 | #include <stdlib.h> | |
bec39cab | 4057 | |
783e057b DJ |
4058 | _ACEOF |
4059 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
4060 | $EGREP "free" >/dev/null 2>&1; then : |
4061 | ||
bec39cab | 4062 | else |
783e057b | 4063 | ac_cv_header_stdc=no |
bec39cab | 4064 | fi |
783e057b | 4065 | rm -f conftest* |
bec39cab AC |
4066 | |
4067 | fi | |
bec39cab | 4068 | |
783e057b DJ |
4069 | if test $ac_cv_header_stdc = yes; then |
4070 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 4071 | if test "$cross_compiling" = yes; then : |
783e057b | 4072 | : |
bec39cab | 4073 | else |
81ecdfbb | 4074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4075 | /* end confdefs.h. */ |
4076 | #include <ctype.h> | |
81ecdfbb | 4077 | #include <stdlib.h> |
783e057b DJ |
4078 | #if ((' ' & 0x0FF) == 0x020) |
4079 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4080 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4081 | #else | |
4082 | # define ISLOWER(c) \ | |
4083 | (('a' <= (c) && (c) <= 'i') \ | |
4084 | || ('j' <= (c) && (c) <= 'r') \ | |
4085 | || ('s' <= (c) && (c) <= 'z')) | |
4086 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4087 | #endif | |
4088 | ||
4089 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4090 | int | |
4091 | main () | |
4092 | { | |
4093 | int i; | |
4094 | for (i = 0; i < 256; i++) | |
4095 | if (XOR (islower (i), ISLOWER (i)) | |
4096 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
4097 | return 2; |
4098 | return 0; | |
783e057b DJ |
4099 | } |
4100 | _ACEOF | |
81ecdfbb | 4101 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 4102 | |
81ecdfbb RW |
4103 | else |
4104 | ac_cv_header_stdc=no | |
783e057b | 4105 | fi |
81ecdfbb RW |
4106 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
4107 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 4108 | fi |
81ecdfbb | 4109 | |
783e057b DJ |
4110 | fi |
4111 | fi | |
81ecdfbb RW |
4112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
4113 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
4114 | if test $ac_cv_header_stdc = yes; then |
4115 | ||
81ecdfbb | 4116 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
4117 | |
4118 | fi | |
4119 | ||
4120 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
4121 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
4122 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
4123 | do : |
4124 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4125 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4126 | " | |
4127 | eval as_val=\$$as_ac_Header | |
4128 | if test "x$as_val" = x""yes; then : | |
783e057b | 4129 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 4130 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
4131 | _ACEOF |
4132 | ||
4133 | fi | |
4134 | ||
4135 | done | |
4136 | ||
4137 | ||
4138 | ||
f434ba03 PA |
4139 | |
4140 | ||
81ecdfbb RW |
4141 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
4142 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
4143 | MINIX=yes |
4144 | else | |
4145 | MINIX= | |
4146 | fi | |
4147 | ||
4148 | ||
4149 | if test "$MINIX" = yes; then | |
4150 | ||
81ecdfbb | 4151 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
4152 | |
4153 | ||
81ecdfbb | 4154 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
4155 | |
4156 | ||
81ecdfbb | 4157 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
4158 | |
4159 | fi | |
4160 | ||
f434ba03 PA |
4161 | case "$host_os" in |
4162 | hpux*) | |
4163 | ||
4164 | $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h | |
4165 | ||
4166 | ;; | |
4167 | esac | |
4168 | ||
783e057b | 4169 | |
81ecdfbb RW |
4170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
4171 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
4172 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
4173 | $as_echo_n "(cached) " >&6 | |
783e057b | 4174 | else |
81ecdfbb | 4175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4176 | /* end confdefs.h. */ |
4177 | ||
f434ba03 PA |
4178 | # define __EXTENSIONS__ 1 |
4179 | $ac_includes_default | |
783e057b DJ |
4180 | int |
4181 | main () | |
4182 | { | |
4183 | ||
4184 | ; | |
4185 | return 0; | |
4186 | } | |
4187 | _ACEOF | |
81ecdfbb | 4188 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
4189 | ac_cv_safe_to_define___extensions__=yes |
4190 | else | |
81ecdfbb | 4191 | ac_cv_safe_to_define___extensions__=no |
783e057b | 4192 | fi |
81ecdfbb | 4193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 4194 | fi |
81ecdfbb RW |
4195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
4196 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 4197 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 4198 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 4199 | |
81ecdfbb | 4200 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 4201 | |
81ecdfbb | 4202 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 4203 | |
81ecdfbb | 4204 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 4205 | |
81ecdfbb | 4206 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
4207 | |
4208 | ||
81ecdfbb RW |
4209 | if test -n "$ac_tool_prefix"; then |
4210 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4211 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4213 | $as_echo_n "checking for $ac_word... " >&6; } | |
4214 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
4215 | $as_echo_n "(cached) " >&6 | |
4216 | else | |
4217 | if test -n "$RANLIB"; then | |
4218 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4219 | else | |
4220 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4221 | for as_dir in $PATH | |
4222 | do | |
4223 | IFS=$as_save_IFS | |
4224 | test -z "$as_dir" && as_dir=. | |
4225 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4226 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4227 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4228 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4229 | break 2 | |
4230 | fi | |
4231 | done | |
4232 | done | |
4233 | IFS=$as_save_IFS | |
783e057b | 4234 | |
81ecdfbb RW |
4235 | fi |
4236 | fi | |
4237 | RANLIB=$ac_cv_prog_RANLIB | |
4238 | if test -n "$RANLIB"; then | |
4239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
4240 | $as_echo "$RANLIB" >&6; } | |
4241 | else | |
4242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4243 | $as_echo "no" >&6; } | |
4244 | fi | |
783e057b DJ |
4245 | |
4246 | ||
81ecdfbb RW |
4247 | fi |
4248 | if test -z "$ac_cv_prog_RANLIB"; then | |
4249 | ac_ct_RANLIB=$RANLIB | |
4250 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4251 | set dummy ranlib; ac_word=$2 | |
4252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4253 | $as_echo_n "checking for $ac_word... " >&6; } | |
4254 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
4255 | $as_echo_n "(cached) " >&6 | |
783e057b | 4256 | else |
81ecdfbb RW |
4257 | if test -n "$ac_ct_RANLIB"; then |
4258 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4259 | else | |
4260 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4261 | for as_dir in $PATH | |
4262 | do | |
4263 | IFS=$as_save_IFS | |
4264 | test -z "$as_dir" && as_dir=. | |
4265 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4266 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
4267 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4268 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4269 | break 2 | |
4270 | fi | |
4271 | done | |
4272 | done | |
4273 | IFS=$as_save_IFS | |
4274 | ||
4275 | fi | |
4276 | fi | |
4277 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4278 | if test -n "$ac_ct_RANLIB"; then | |
4279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
4280 | $as_echo "$ac_ct_RANLIB" >&6; } | |
4281 | else | |
4282 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4283 | $as_echo "no" >&6; } | |
4284 | fi | |
4285 | ||
4286 | if test "x$ac_ct_RANLIB" = x; then | |
4287 | RANLIB=":" | |
4288 | else | |
4289 | case $cross_compiling:$ac_tool_warned in | |
4290 | yes:) | |
4291 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4292 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4293 | ac_tool_warned=yes ;; | |
4294 | esac | |
4295 | RANLIB=$ac_ct_RANLIB | |
4296 | fi | |
4297 | else | |
4298 | RANLIB="$ac_cv_prog_RANLIB" | |
4299 | fi | |
4300 | ||
4301 | ||
4302 | ||
4303 | ||
4304 | ||
4305 | ||
3388710e JM |
4306 | |
4307 | ||
3388710e | 4308 | |
f434ba03 PA |
4309 | # Code from module arg-nonnull: |
4310 | # Code from module c++defs: | |
4311 | # Code from module extensions: | |
3388710e | 4312 | |
f434ba03 | 4313 | # Code from module include_next: |
55a8c076 | 4314 | # Code from module inttypes: |
f434ba03 PA |
4315 | # Code from module memchr: |
4316 | # Code from module memmem: | |
4317 | # Code from module memmem-simple: | |
4318 | # Code from module multiarch: | |
4319 | # Code from module stddef: | |
4320 | # Code from module stdint: | |
4321 | # Code from module string: | |
4322 | # Code from module warn-on-use: | |
4323 | # Code from module wchar: | |
3388710e JM |
4324 | |
4325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4326 | $as_echo_n "checking target system type... " >&6; } | |
4327 | if test "${ac_cv_target+set}" = set; then : | |
4328 | $as_echo_n "(cached) " >&6 | |
4329 | else | |
4330 | if test "x$target_alias" = x; then | |
4331 | ac_cv_target=$ac_cv_host | |
4332 | else | |
4333 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4334 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4335 | fi | |
4336 | ||
4337 | fi | |
4338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4339 | $as_echo "$ac_cv_target" >&6; } | |
4340 | case $ac_cv_target in | |
4341 | *-*-*) ;; | |
4342 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4343 | esac | |
4344 | target=$ac_cv_target | |
4345 | ac_save_IFS=$IFS; IFS='-' | |
4346 | set x $ac_cv_target | |
4347 | shift | |
4348 | target_cpu=$1 | |
4349 | target_vendor=$2 | |
4350 | shift; shift | |
4351 | # Remember, the first character of IFS is used to create $*, | |
4352 | # except with old shells: | |
4353 | target_os=$* | |
4354 | IFS=$ac_save_IFS | |
4355 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4356 | ||
4357 | ||
4358 | # The aliases save the names the user supplied, while $host etc. | |
4359 | # will get canonicalized. | |
4360 | test -n "$target_alias" && | |
4361 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4362 | NONENONEs,x,x, && | |
4363 | program_prefix=${target_alias}- | |
4364 | ||
4365 | # The tests for host and target for $enable_largefile require | |
4366 | # canonical names. | |
4367 | ||
4368 | ||
81ecdfbb | 4369 | |
da2f07f1 JK |
4370 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4371 | # even in directories otherwise not depending on the $plugins option. | |
4372 | ||
4373 | ||
4374 | # Check whether --enable-plugins was given. | |
4375 | if test "${enable_plugins+set}" = set; then : | |
4376 | enableval=$enable_plugins; case "${enableval}" in | |
4377 | yes | "") plugins=yes ;; | |
4378 | no) plugins=no ;; | |
4379 | *) plugins=yes ;; | |
4380 | esac | |
4381 | else | |
4382 | plugins=no | |
4383 | fi | |
4384 | ||
4385 | ||
4386 | ||
4387 | case "${host}" in | |
4388 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4389 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4390 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4391 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4392 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4393 | # large-file support through the --enable-largefile switch, disable | |
4394 | # large-file support in favor of procfs support. | |
4395 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4396 | && : ${enable_largefile="no"} | |
4397 | ;; | |
4398 | esac | |
4399 | ||
4400 | # Check whether --enable-largefile was given. | |
4401 | if test "${enable_largefile+set}" = set; then : | |
4402 | enableval=$enable_largefile; | |
4403 | fi | |
4404 | ||
4405 | if test "$enable_largefile" != no; then | |
4406 | ||
4407 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4408 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4409 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4410 | $as_echo_n "(cached) " >&6 | |
4411 | else | |
4412 | ac_cv_sys_largefile_CC=no | |
4413 | if test "$GCC" != yes; then | |
4414 | ac_save_CC=$CC | |
4415 | while :; do | |
4416 | # IRIX 6.2 and later do not support large files by default, | |
4417 | # so use the C compiler's -n32 option if that helps. | |
4418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4419 | /* end confdefs.h. */ | |
4420 | #include <sys/types.h> | |
4421 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4422 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4423 | since some C++ compilers masquerading as C compilers | |
4424 | incorrectly reject 9223372036854775807. */ | |
4425 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4426 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4427 | && LARGE_OFF_T % 2147483647 == 1) | |
4428 | ? 1 : -1]; | |
4429 | int | |
4430 | main () | |
4431 | { | |
4432 | ||
4433 | ; | |
4434 | return 0; | |
4435 | } | |
4436 | _ACEOF | |
4437 | if ac_fn_c_try_compile "$LINENO"; then : | |
4438 | break | |
4439 | fi | |
4440 | rm -f core conftest.err conftest.$ac_objext | |
4441 | CC="$CC -n32" | |
4442 | if ac_fn_c_try_compile "$LINENO"; then : | |
4443 | ac_cv_sys_largefile_CC=' -n32'; break | |
4444 | fi | |
4445 | rm -f core conftest.err conftest.$ac_objext | |
4446 | break | |
4447 | done | |
4448 | CC=$ac_save_CC | |
4449 | rm -f conftest.$ac_ext | |
4450 | fi | |
4451 | fi | |
4452 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4453 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4454 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4455 | CC=$CC$ac_cv_sys_largefile_CC | |
4456 | fi | |
4457 | ||
4458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4459 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4460 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4461 | $as_echo_n "(cached) " >&6 | |
4462 | else | |
4463 | while :; do | |
4464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4465 | /* end confdefs.h. */ | |
4466 | #include <sys/types.h> | |
4467 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4468 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4469 | since some C++ compilers masquerading as C compilers | |
4470 | incorrectly reject 9223372036854775807. */ | |
4471 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4472 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4473 | && LARGE_OFF_T % 2147483647 == 1) | |
4474 | ? 1 : -1]; | |
4475 | int | |
4476 | main () | |
4477 | { | |
4478 | ||
4479 | ; | |
4480 | return 0; | |
4481 | } | |
4482 | _ACEOF | |
4483 | if ac_fn_c_try_compile "$LINENO"; then : | |
4484 | ac_cv_sys_file_offset_bits=no; break | |
4485 | fi | |
4486 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4488 | /* end confdefs.h. */ | |
4489 | #define _FILE_OFFSET_BITS 64 | |
4490 | #include <sys/types.h> | |
4491 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4492 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4493 | since some C++ compilers masquerading as C compilers | |
4494 | incorrectly reject 9223372036854775807. */ | |
4495 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4496 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4497 | && LARGE_OFF_T % 2147483647 == 1) | |
4498 | ? 1 : -1]; | |
4499 | int | |
4500 | main () | |
4501 | { | |
4502 | ||
4503 | ; | |
4504 | return 0; | |
4505 | } | |
4506 | _ACEOF | |
4507 | if ac_fn_c_try_compile "$LINENO"; then : | |
4508 | ac_cv_sys_file_offset_bits=64; break | |
4509 | fi | |
4510 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4511 | ac_cv_sys_file_offset_bits=unknown | |
4512 | break | |
4513 | done | |
4514 | fi | |
4515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4516 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4517 | case $ac_cv_sys_file_offset_bits in #( | |
4518 | no | unknown) ;; | |
4519 | *) | |
4520 | cat >>confdefs.h <<_ACEOF | |
4521 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4522 | _ACEOF | |
4523 | ;; | |
4524 | esac | |
4525 | rm -rf conftest* | |
4526 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4527 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4528 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4529 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4530 | $as_echo_n "(cached) " >&6 | |
4531 | else | |
4532 | while :; do | |
4533 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4534 | /* end confdefs.h. */ | |
4535 | #include <sys/types.h> | |
4536 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4537 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4538 | since some C++ compilers masquerading as C compilers | |
4539 | incorrectly reject 9223372036854775807. */ | |
4540 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4541 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4542 | && LARGE_OFF_T % 2147483647 == 1) | |
4543 | ? 1 : -1]; | |
4544 | int | |
4545 | main () | |
4546 | { | |
4547 | ||
4548 | ; | |
4549 | return 0; | |
4550 | } | |
4551 | _ACEOF | |
4552 | if ac_fn_c_try_compile "$LINENO"; then : | |
4553 | ac_cv_sys_large_files=no; break | |
4554 | fi | |
4555 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4557 | /* end confdefs.h. */ | |
4558 | #define _LARGE_FILES 1 | |
4559 | #include <sys/types.h> | |
4560 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4561 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4562 | since some C++ compilers masquerading as C compilers | |
4563 | incorrectly reject 9223372036854775807. */ | |
4564 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4565 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4566 | && LARGE_OFF_T % 2147483647 == 1) | |
4567 | ? 1 : -1]; | |
4568 | int | |
4569 | main () | |
4570 | { | |
4571 | ||
4572 | ; | |
4573 | return 0; | |
4574 | } | |
4575 | _ACEOF | |
4576 | if ac_fn_c_try_compile "$LINENO"; then : | |
4577 | ac_cv_sys_large_files=1; break | |
4578 | fi | |
4579 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4580 | ac_cv_sys_large_files=unknown | |
4581 | break | |
4582 | done | |
4583 | fi | |
4584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4585 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4586 | case $ac_cv_sys_large_files in #( | |
4587 | no | unknown) ;; | |
4588 | *) | |
4589 | cat >>confdefs.h <<_ACEOF | |
4590 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4591 | _ACEOF | |
4592 | ;; | |
4593 | esac | |
4594 | rm -rf conftest* | |
4595 | fi | |
4596 | fi | |
4597 | ||
4598 | ||
4599 | ||
81ecdfbb RW |
4600 | |
4601 | ||
4602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4603 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4604 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4605 | $as_echo_n "(cached) " >&6 | |
4606 | else | |
4607 | am_cv_prog_cc_stdc=no | |
4608 | ac_save_CC="$CC" | |
4609 | # Don't try gcc -ansi; that turns off useful extensions and | |
4610 | # breaks some systems' header files. | |
4611 | # AIX -qlanglvl=ansi | |
4612 | # Ultrix and OSF/1 -std1 | |
4613 | # HP-UX 10.20 and later -Ae | |
4614 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4615 | # SVR4 -Xc -D__EXTENSIONS__ | |
4616 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4617 | do | |
783e057b | 4618 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4620 | /* end confdefs.h. */ |
4621 | #include <stdarg.h> | |
4622 | #include <stdio.h> | |
4623 | #include <sys/types.h> | |
4624 | #include <sys/stat.h> | |
4625 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4626 | struct buf { int x; }; | |
4627 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4628 | static char *e (p, i) | |
4629 | char **p; | |
4630 | int i; | |
4631 | { | |
4632 | return p[i]; | |
4633 | } | |
4634 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4635 | { | |
4636 | char *s; | |
4637 | va_list v; | |
4638 | va_start (v,p); | |
4639 | s = g (p, va_arg (v,int)); | |
4640 | va_end (v); | |
4641 | return s; | |
4642 | } | |
4643 | int test (int i, double x); | |
4644 | struct s1 {int (*f) (int a);}; | |
4645 | struct s2 {int (*f) (double a);}; | |
4646 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4647 | int argc; | |
4648 | char **argv; | |
4649 | ||
4650 | int | |
4651 | main () | |
4652 | { | |
4653 | ||
4654 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4655 | ||
4656 | ; | |
4657 | return 0; | |
4658 | } | |
4659 | _ACEOF | |
81ecdfbb | 4660 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4661 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4662 | fi |
81ecdfbb | 4663 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4664 | done |
4665 | CC="$ac_save_CC" | |
4666 | ||
4667 | fi | |
4668 | ||
4669 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4671 | $as_echo "none needed" >&6; } | |
783e057b | 4672 | else |
81ecdfbb RW |
4673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4674 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4675 | fi |
4676 | case "x$am_cv_prog_cc_stdc" in | |
4677 | x|xno) ;; | |
4678 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4679 | esac | |
4680 | ||
4681 | ||
4682 | ac_aux_dir= | |
81ecdfbb RW |
4683 | for ac_dir in .. "$srcdir"/..; do |
4684 | for ac_t in install-sh install.sh shtool; do | |
4685 | if test -f "$ac_dir/$ac_t"; then | |
4686 | ac_aux_dir=$ac_dir | |
4687 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4688 | break 2 | |
4689 | fi | |
4690 | done | |
783e057b DJ |
4691 | done |
4692 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4693 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4694 | fi |
81ecdfbb RW |
4695 | |
4696 | # These three variables are undocumented and unsupported, | |
4697 | # and are intended to be withdrawn in a future Autoconf release. | |
4698 | # They can cause serious problems if a builder's source tree is in a directory | |
4699 | # whose full name contains unusual characters. | |
4700 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4701 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4702 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4703 | ||
783e057b | 4704 | |
783e057b | 4705 | |
81ecdfbb | 4706 | |
a417dc56 RW |
4707 | # Dependency checking. |
4708 | rm -rf .tst 2>/dev/null | |
4709 | mkdir .tst 2>/dev/null | |
4710 | if test -d .tst; then | |
4711 | am__leading_dot=. | |
4712 | else | |
4713 | am__leading_dot=_ | |
4714 | fi | |
4715 | rmdir .tst 2>/dev/null | |
4716 | ||
4717 | DEPDIR="${am__leading_dot}deps" | |
4718 | ||
81ecdfbb | 4719 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4720 | |
4721 | ||
4722 | depcc="$CC" am_compiler_list= | |
4723 | ||
4724 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4726 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4727 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4728 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4729 | else |
4730 | if test -f "$am_depcomp"; then | |
4731 | # We make a subdir and do the tests there. Otherwise we can end up | |
4732 | # making bogus files that we don't know about and never remove. For | |
4733 | # instance it was reported that on HP-UX the gcc test will end up | |
4734 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4735 | # in D'. | |
4736 | mkdir conftest.dir | |
4737 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4738 | # using a relative directory. | |
4739 | cp "$am_depcomp" conftest.dir | |
4740 | cd conftest.dir | |
4741 | # We will build objects and dependencies in a subdirectory because | |
4742 | # it helps to detect inapplicable dependency modes. For instance | |
4743 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4744 | # side effect of compilation, but ICC will put the dependencies in | |
4745 | # the current directory while Tru64 will put them in the object | |
4746 | # directory. | |
4747 | mkdir sub | |
4748 | ||
4749 | am_cv_CC_dependencies_compiler_type=none | |
4750 | if test "$am_compiler_list" = ""; then | |
4751 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4752 | fi | |
4753 | for depmode in $am_compiler_list; do | |
4754 | if test $depmode = none; then break; fi | |
4755 | ||
81ecdfbb | 4756 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4757 | # Setup a source with many dependencies, because some compilers |
4758 | # like to wrap large dependency lists on column 80 (with \), and | |
4759 | # we should not choose a depcomp mode which is confused by this. | |
4760 | # | |
4761 | # We need to recreate these files for each test, as the compiler may | |
4762 | # overwrite some of them when testing with obscure command lines. | |
4763 | # This happens at least with the AIX C compiler. | |
4764 | : > sub/conftest.c | |
4765 | for i in 1 2 3 4 5 6; do | |
4766 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4767 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4768 | # Solaris 8's {/usr,}/bin/sh. | |
4769 | touch sub/conftst$i.h | |
4770 | done | |
4771 | echo "include sub/conftest.Po" > confmf | |
4772 | ||
4773 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4774 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4775 | # handle `-M -o', and we need to detect this. | |
4776 | depcmd="depmode=$depmode \ | |
4777 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4778 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4779 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4780 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4781 | if env $depcmd > conftest.err 2>&1 && | |
4782 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4783 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4784 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4785 | # icc doesn't choke on unknown options, it will just issue warnings | |
4786 | # or remarks (even with -Werror). So we grep stderr for any message | |
4787 | # that says an option was ignored or not supported. | |
4788 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4789 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4790 | # The diagnosis changed in icc 8.0: | |
4791 | # icc: Command line remark: option '-MP' not supported | |
4792 | if (grep 'ignoring option' conftest.err || | |
4793 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4794 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4795 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4796 | break |
4797 | fi | |
4798 | fi | |
81ecdfbb | 4799 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4800 | sed -e 's/^/| /' < conftest.err >&5 |
4801 | done | |
4802 | ||
4803 | cd .. | |
4804 | rm -rf conftest.dir | |
4805 | else | |
4806 | am_cv_CC_dependencies_compiler_type=none | |
4807 | fi | |
4808 | ||
4809 | fi | |
81ecdfbb RW |
4810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4811 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4812 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4813 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4814 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4815 | ||
4816 | fi | |
4817 | ||
4818 | ||
4819 | # Check for the 'make' the user wants to use. | |
4820 | for ac_prog in make | |
4821 | do | |
4822 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4823 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4825 | $as_echo_n "checking for $ac_word... " >&6; } | |
4826 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4827 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4828 | else |
4829 | if test -n "$MAKE"; then | |
4830 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4831 | else | |
4832 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4833 | for as_dir in $PATH | |
4834 | do | |
4835 | IFS=$as_save_IFS | |
4836 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4837 | for ac_exec_ext in '' $ac_executable_extensions; do |
4838 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4839 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4840 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4841 | break 2 |
4842 | fi | |
4843 | done | |
81ecdfbb RW |
4844 | done |
4845 | IFS=$as_save_IFS | |
a417dc56 RW |
4846 | |
4847 | fi | |
4848 | fi | |
4849 | MAKE=$ac_cv_prog_MAKE | |
4850 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4852 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4853 | else |
81ecdfbb RW |
4854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4855 | $as_echo "no" >&6; } | |
a417dc56 RW |
4856 | fi |
4857 | ||
81ecdfbb | 4858 | |
a417dc56 RW |
4859 | test -n "$MAKE" && break |
4860 | done | |
4861 | ||
4862 | MAKE_IS_GNU= | |
4863 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4864 | *GNU*) | |
4865 | MAKE_IS_GNU=yes | |
4866 | ;; | |
4867 | esac | |
81ecdfbb | 4868 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4869 | GMAKE_TRUE= |
4870 | GMAKE_FALSE='#' | |
4871 | else | |
4872 | GMAKE_TRUE='#' | |
4873 | GMAKE_FALSE= | |
4874 | fi | |
4875 | ||
81ecdfbb RW |
4876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4877 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4878 | set x ${MAKE-make} | |
4879 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4880 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4881 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4882 | else |
4883 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4884 | SHELL = /bin/sh |
a417dc56 | 4885 | all: |
81ecdfbb | 4886 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4887 | _ACEOF |
4888 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4889 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4890 | *@@@%%%=?*=@@@%%%*) | |
4891 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4892 | *) | |
4893 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4894 | esac | |
a417dc56 RW |
4895 | rm -f conftest.make |
4896 | fi | |
81ecdfbb RW |
4897 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4899 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4900 | SET_MAKE= |
4901 | else | |
81ecdfbb RW |
4902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4903 | $as_echo "no" >&6; } | |
a417dc56 RW |
4904 | SET_MAKE="MAKE=${MAKE-make}" |
4905 | fi | |
4906 | ||
4907 | ||
783e057b DJ |
4908 | |
4909 | CONFIG_OBS= | |
4910 | CONFIG_DEPS= | |
4911 | CONFIG_SRCS= | |
4912 | ENABLE_CFLAGS= | |
4913 | ||
4914 | CONFIG_ALL= | |
4915 | CONFIG_CLEAN= | |
4916 | CONFIG_INSTALL= | |
4917 | CONFIG_UNINSTALL= | |
4918 | ||
4919 | # If we haven't got the data from the intl directory, | |
4920 | # assume NLS is disabled. | |
4921 | USE_NLS=no | |
4922 | LIBINTL= | |
4923 | LIBINTL_DEP= | |
4924 | INCINTL= | |
4925 | XGETTEXT= | |
4926 | GMSGFMT= | |
4927 | POSUB= | |
4928 | ||
4929 | if test -f ../intl/config.intl; then | |
4930 | . ../intl/config.intl | |
4931 | fi | |
81ecdfbb RW |
4932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4933 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4934 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4936 | $as_echo "no" >&6; } | |
783e057b | 4937 | else |
81ecdfbb RW |
4938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4939 | $as_echo "yes" >&6; } | |
783e057b | 4940 | |
81ecdfbb | 4941 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4942 | |
4943 | ||
81ecdfbb RW |
4944 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4945 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4946 | # Look for .po and .gmo files in the source directory. |
4947 | CATALOGS= | |
4948 | XLINGUAS= | |
4949 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4950 | # If there aren't any .gmo files the shell will give us the | |
4951 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4952 | # weeded out. | |
4953 | case "$cat" in *\**) | |
4954 | continue;; | |
4955 | esac | |
4956 | # The quadruple backslash is collapsed to a double backslash | |
4957 | # by the backticks, then collapsed again by the double quotes, | |
4958 | # leaving us with one backslash in the sed expression (right | |
4959 | # before the dot that mustn't act as a wildcard). | |
4960 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
4961 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4962 | # The user is allowed to set LINGUAS to a list of languages to | |
4963 | # install catalogs for. If it's empty that means "all of them." | |
4964 | if test "x$LINGUAS" = x; then | |
4965 | CATALOGS="$CATALOGS $cat" | |
4966 | XLINGUAS="$XLINGUAS $lang" | |
4967 | else | |
4968 | case "$LINGUAS" in *$lang*) | |
4969 | CATALOGS="$CATALOGS $cat" | |
4970 | XLINGUAS="$XLINGUAS $lang" | |
4971 | ;; | |
4972 | esac | |
4973 | fi | |
4974 | done | |
4975 | LINGUAS="$XLINGUAS" | |
81ecdfbb RW |
4976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
4977 | $as_echo "$LINGUAS" >&6; } | |
783e057b DJ |
4978 | |
4979 | ||
4980 | DATADIRNAME=share | |
4981 | ||
4982 | INSTOBJEXT=.mo | |
4983 | ||
4984 | GENCAT=gencat | |
4985 | ||
4986 | CATOBJEXT=.gmo | |
4987 | ||
4988 | fi | |
4989 | ||
4990 | localedir='${datadir}/locale' | |
4991 | ||
4992 | ||
4993 | if test x"$USE_NLS" = xyes; then | |
4994 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4995 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4996 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4997 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
4998 | fi | |
4999 | ||
5000 | ||
f434ba03 PA |
5001 | |
5002 | ||
5003 | ||
5004 | LIBC_FATAL_STDERR_=1 | |
5005 | export LIBC_FATAL_STDERR_ | |
5006 | ||
5007 | ||
55a8c076 YQ |
5008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 |
5009 | $as_echo_n "checking for long long int... " >&6; } | |
5010 | if test "${ac_cv_type_long_long_int+set}" = set; then : | |
5011 | $as_echo_n "(cached) " >&6 | |
5012 | else | |
5013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5014 | /* end confdefs.h. */ | |
f434ba03 | 5015 | |
55a8c076 YQ |
5016 | /* For now, do not test the preprocessor; as of 2007 there are too many |
5017 | implementations with broken preprocessors. Perhaps this can | |
5018 | be revisited in 2012. In the meantime, code should not expect | |
5019 | #if to work with literals wider than 32 bits. */ | |
5020 | /* Test literals. */ | |
5021 | long long int ll = 9223372036854775807ll; | |
5022 | long long int nll = -9223372036854775807LL; | |
5023 | unsigned long long int ull = 18446744073709551615ULL; | |
5024 | /* Test constant expressions. */ | |
5025 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
5026 | ? 1 : -1)]; | |
5027 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
5028 | ? 1 : -1)]; | |
5029 | int i = 63; | |
5030 | int | |
5031 | main () | |
5032 | { | |
5033 | /* Test availability of runtime routines for shift and division. */ | |
5034 | long long int llmax = 9223372036854775807ll; | |
5035 | unsigned long long int ullmax = 18446744073709551615ull; | |
5036 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
5037 | | (llmax / ll) | (llmax % ll) | |
5038 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5039 | | (ullmax / ull) | (ullmax % ull)); | |
5040 | ; | |
5041 | return 0; | |
5042 | } | |
f434ba03 | 5043 | |
f434ba03 | 5044 | _ACEOF |
55a8c076 YQ |
5045 | if ac_fn_c_try_link "$LINENO"; then : |
5046 | if test "$cross_compiling" = yes; then : | |
5047 | ac_cv_type_long_long_int=yes | |
5048 | else | |
5049 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5050 | /* end confdefs.h. */ | |
5051 | #include <limits.h> | |
5052 | #ifndef LLONG_MAX | |
5053 | # define HALF \ | |
5054 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
5055 | # define LLONG_MAX (HALF - 1 + HALF) | |
5056 | #endif | |
5057 | int | |
5058 | main () | |
5059 | { | |
5060 | long long int n = 1; | |
5061 | int i; | |
5062 | for (i = 0; ; i++) | |
5063 | { | |
5064 | long long int m = n << i; | |
5065 | if (m >> i != n) | |
5066 | return 1; | |
5067 | if (LLONG_MAX / 2 < m) | |
5068 | break; | |
5069 | } | |
5070 | return 0; | |
5071 | ; | |
5072 | return 0; | |
5073 | } | |
5074 | _ACEOF | |
5075 | if ac_fn_c_try_run "$LINENO"; then : | |
5076 | ac_cv_type_long_long_int=yes | |
5077 | else | |
5078 | ac_cv_type_long_long_int=no | |
5079 | fi | |
5080 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5081 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
f434ba03 PA |
5082 | fi |
5083 | ||
55a8c076 YQ |
5084 | else |
5085 | ac_cv_type_long_long_int=no | |
5086 | fi | |
5087 | rm -f core conftest.err conftest.$ac_objext \ | |
5088 | conftest$ac_exeext conftest.$ac_ext | |
5089 | fi | |
5090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
5091 | $as_echo "$ac_cv_type_long_long_int" >&6; } | |
5092 | if test $ac_cv_type_long_long_int = yes; then | |
5093 | ||
5094 | $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h | |
5095 | ||
5096 | fi | |
5097 | ||
5098 | ||
5099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 | |
5100 | $as_echo_n "checking for unsigned long long int... " >&6; } | |
5101 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : | |
5102 | $as_echo_n "(cached) " >&6 | |
5103 | else | |
5104 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5105 | /* end confdefs.h. */ | |
5106 | ||
5107 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
5108 | implementations with broken preprocessors. Perhaps this can | |
5109 | be revisited in 2012. In the meantime, code should not expect | |
5110 | #if to work with literals wider than 32 bits. */ | |
5111 | /* Test literals. */ | |
5112 | long long int ll = 9223372036854775807ll; | |
5113 | long long int nll = -9223372036854775807LL; | |
5114 | unsigned long long int ull = 18446744073709551615ULL; | |
5115 | /* Test constant expressions. */ | |
5116 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
5117 | ? 1 : -1)]; | |
5118 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
5119 | ? 1 : -1)]; | |
5120 | int i = 63; | |
5121 | int | |
5122 | main () | |
5123 | { | |
5124 | /* Test availability of runtime routines for shift and division. */ | |
5125 | long long int llmax = 9223372036854775807ll; | |
5126 | unsigned long long int ullmax = 18446744073709551615ull; | |
5127 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
5128 | | (llmax / ll) | (llmax % ll) | |
5129 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
5130 | | (ullmax / ull) | (ullmax % ull)); | |
5131 | ; | |
5132 | return 0; | |
5133 | } | |
5134 | ||
5135 | _ACEOF | |
5136 | if ac_fn_c_try_link "$LINENO"; then : | |
5137 | ac_cv_type_unsigned_long_long_int=yes | |
5138 | else | |
5139 | ac_cv_type_unsigned_long_long_int=no | |
5140 | fi | |
5141 | rm -f core conftest.err conftest.$ac_objext \ | |
5142 | conftest$ac_exeext conftest.$ac_ext | |
5143 | fi | |
5144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
5145 | $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } | |
5146 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
5147 | ||
5148 | $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h | |
5149 | ||
5150 | fi | |
5151 | ||
5152 | ||
5153 | ||
5154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 | |
5155 | $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } | |
5156 | if test "${gl_cv_have_include_next+set}" = set; then : | |
5157 | $as_echo_n "(cached) " >&6 | |
5158 | else | |
5159 | rm -rf conftestd1a conftestd1b conftestd2 | |
5160 | mkdir conftestd1a conftestd1b conftestd2 | |
5161 | cat <<EOF > conftestd1a/conftest.h | |
5162 | #define DEFINED_IN_CONFTESTD1 | |
5163 | #include_next <conftest.h> | |
5164 | #ifdef DEFINED_IN_CONFTESTD2 | |
5165 | int foo; | |
5166 | #else | |
5167 | #error "include_next doesn't work" | |
5168 | #endif | |
5169 | EOF | |
5170 | cat <<EOF > conftestd1b/conftest.h | |
5171 | #define DEFINED_IN_CONFTESTD1 | |
5172 | #include <stdio.h> | |
5173 | #include_next <conftest.h> | |
5174 | #ifdef DEFINED_IN_CONFTESTD2 | |
5175 | int foo; | |
5176 | #else | |
5177 | #error "include_next doesn't work" | |
5178 | #endif | |
5179 | EOF | |
5180 | cat <<EOF > conftestd2/conftest.h | |
5181 | #ifndef DEFINED_IN_CONFTESTD1 | |
5182 | #error "include_next test doesn't work" | |
5183 | #endif | |
5184 | #define DEFINED_IN_CONFTESTD2 | |
5185 | EOF | |
5186 | gl_save_CPPFLAGS="$CPPFLAGS" | |
5187 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" | |
5188 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5189 | /* end confdefs.h. */ | |
5190 | #include <conftest.h> | |
5191 | _ACEOF | |
5192 | if ac_fn_c_try_compile "$LINENO"; then : | |
5193 | gl_cv_have_include_next=yes | |
5194 | else | |
5195 | CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" | |
5196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5197 | /* end confdefs.h. */ | |
5198 | #include <conftest.h> | |
5199 | _ACEOF | |
5200 | if ac_fn_c_try_compile "$LINENO"; then : | |
5201 | gl_cv_have_include_next=buggy | |
5202 | else | |
5203 | gl_cv_have_include_next=no | |
5204 | fi | |
5205 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5206 | ||
5207 | fi | |
5208 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5209 | CPPFLAGS="$gl_save_CPPFLAGS" | |
5210 | rm -rf conftestd1a conftestd1b conftestd2 | |
5211 | ||
5212 | fi | |
5213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 | |
5214 | $as_echo "$gl_cv_have_include_next" >&6; } | |
5215 | PRAGMA_SYSTEM_HEADER= | |
5216 | if test $gl_cv_have_include_next = yes; then | |
5217 | INCLUDE_NEXT=include_next | |
5218 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5219 | if test -n "$GCC"; then | |
5220 | PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' | |
5221 | fi | |
5222 | else | |
5223 | if test $gl_cv_have_include_next = buggy; then | |
5224 | INCLUDE_NEXT=include | |
5225 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next | |
5226 | else | |
5227 | INCLUDE_NEXT=include | |
5228 | INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include | |
5229 | fi | |
5230 | fi | |
5231 | ||
5232 | ||
5233 | ||
5234 | ||
5235 | ||
5236 | ||
5237 | ||
5238 | ||
5239 | for ac_header in $gl_header_list | |
5240 | do : | |
5241 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5242 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5243 | eval as_val=\$$as_ac_Header | |
5244 | if test "x$as_val" = x""yes; then : | |
5245 | cat >>confdefs.h <<_ACEOF | |
5246 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5247 | _ACEOF | |
5248 | ||
5249 | fi | |
5250 | ||
5251 | done | |
5252 | ||
5253 | ||
5254 | ||
5255 | ||
5256 | ||
5257 | ||
5258 | ||
5259 | ||
5260 | ||
5261 | ||
5262 | ||
5263 | gl_cv_c_multiarch=no | |
5264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5265 | /* end confdefs.h. */ | |
5266 | #ifndef __APPLE_CC__ | |
5267 | not a universal capable compiler | |
5268 | #endif | |
5269 | typedef int dummy; | |
5270 | ||
5271 | _ACEOF | |
5272 | if ac_fn_c_try_compile "$LINENO"; then : | |
5273 | ||
5274 | arch= | |
5275 | prev= | |
5276 | for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do | |
5277 | if test -n "$prev"; then | |
5278 | case $word in | |
5279 | i?86 | x86_64 | ppc | ppc64) | |
5280 | if test -z "$arch" || test "$arch" = "$word"; then | |
5281 | arch="$word" | |
5282 | else | |
5283 | gl_cv_c_multiarch=yes | |
5284 | fi | |
5285 | ;; | |
5286 | esac | |
5287 | prev= | |
5288 | else | |
5289 | if test "x$word" = "x-arch"; then | |
5290 | prev=arch | |
5291 | fi | |
5292 | fi | |
5293 | done | |
5294 | ||
5295 | fi | |
5296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5297 | if test $gl_cv_c_multiarch = yes; then | |
5298 | ||
5299 | $as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
5300 | ||
5301 | APPLE_UNIVERSAL_BUILD=1 | |
5302 | else | |
5303 | APPLE_UNIVERSAL_BUILD=0 | |
5304 | fi | |
5305 | ||
5306 | ||
5307 | ||
5308 | ||
5309 | ||
5310 | if test $ac_cv_type_long_long_int = yes; then | |
5311 | HAVE_LONG_LONG_INT=1 | |
5312 | else | |
5313 | HAVE_LONG_LONG_INT=0 | |
5314 | fi | |
5315 | ||
5316 | ||
5317 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
5318 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
5319 | else | |
5320 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
5321 | fi | |
5322 | ||
5323 | ||
5324 | if test $ac_cv_header_inttypes_h = yes; then | |
5325 | HAVE_INTTYPES_H=1 | |
5326 | else | |
5327 | HAVE_INTTYPES_H=0 | |
5328 | fi | |
5329 | ||
5330 | ||
5331 | if test $ac_cv_header_sys_types_h = yes; then | |
5332 | HAVE_SYS_TYPES_H=1 | |
5333 | else | |
5334 | HAVE_SYS_TYPES_H=0 | |
5335 | fi | |
5336 | ||
5337 | ||
5338 | ||
5339 | ||
5340 | ||
5341 | ||
5342 | : | |
5343 | ||
5344 | ||
5345 | ||
5346 | ||
5347 | ||
5348 | ||
5349 | ||
5350 | if test $gl_cv_have_include_next = yes; then | |
5351 | gl_cv_next_stdint_h='<'stdint.h'>' | |
5352 | else | |
5353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 | |
5354 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
5355 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
5356 | $as_echo_n "(cached) " >&6 | |
5357 | else | |
5358 | ||
5359 | if test $ac_cv_header_stdint_h = yes; then | |
5360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5361 | /* end confdefs.h. */ | |
5362 | #include <stdint.h> | |
5363 | ||
5364 | _ACEOF | |
5365 | case "$host_os" in | |
5366 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
5367 | *) gl_absname_cpp="$ac_cpp" ;; | |
5368 | esac | |
5369 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
5370 | sed -n '\#/stdint.h#{ | |
5371 | s#.*"\(.*/stdint.h\)".*#\1# | |
5372 | s#^/[^/]#//&# | |
5373 | p | |
5374 | q | |
5375 | }'`'"' | |
5376 | else | |
5377 | gl_cv_next_stdint_h='<'stdint.h'>' | |
5378 | fi | |
5379 | ||
5380 | fi | |
5381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 | |
5382 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
5383 | fi | |
5384 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
5385 | ||
5386 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
5387 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
5388 | gl_next_as_first_directive='<'stdint.h'>' | |
5389 | else | |
5390 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
5391 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
5392 | fi | |
5393 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
5394 | ||
5395 | ||
5396 | ||
5397 | if test $ac_cv_header_stdint_h = yes; then | |
5398 | HAVE_STDINT_H=1 | |
5399 | else | |
5400 | HAVE_STDINT_H=0 | |
5401 | fi | |
5402 | ||
5403 | ||
5404 | if test $ac_cv_header_stdint_h = yes; then | |
5405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 | |
5406 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
5407 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
5408 | $as_echo_n "(cached) " >&6 | |
5409 | else | |
5410 | gl_cv_header_working_stdint_h=no | |
5411 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5412 | /* end confdefs.h. */ | |
5413 | ||
5414 | ||
5415 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
5416 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
5417 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
5418 | #include <stdint.h> | |
5419 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
5420 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
5421 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
5422 | #endif | |
5423 | ||
5424 | ||
5425 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5426 | included before <wchar.h>. */ | |
5427 | #include <stddef.h> | |
5428 | #include <signal.h> | |
5429 | #if HAVE_WCHAR_H | |
5430 | # include <stdio.h> | |
5431 | # include <time.h> | |
5432 | # include <wchar.h> | |
5433 | #endif | |
5434 | ||
5435 | ||
5436 | #ifdef INT8_MAX | |
5437 | int8_t a1 = INT8_MAX; | |
5438 | int8_t a1min = INT8_MIN; | |
5439 | #endif | |
5440 | #ifdef INT16_MAX | |
5441 | int16_t a2 = INT16_MAX; | |
5442 | int16_t a2min = INT16_MIN; | |
5443 | #endif | |
5444 | #ifdef INT32_MAX | |
5445 | int32_t a3 = INT32_MAX; | |
5446 | int32_t a3min = INT32_MIN; | |
5447 | #endif | |
5448 | #ifdef INT64_MAX | |
5449 | int64_t a4 = INT64_MAX; | |
5450 | int64_t a4min = INT64_MIN; | |
5451 | #endif | |
5452 | #ifdef UINT8_MAX | |
5453 | uint8_t b1 = UINT8_MAX; | |
5454 | #else | |
5455 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
5456 | #endif | |
5457 | #ifdef UINT16_MAX | |
5458 | uint16_t b2 = UINT16_MAX; | |
5459 | #endif | |
5460 | #ifdef UINT32_MAX | |
5461 | uint32_t b3 = UINT32_MAX; | |
5462 | #endif | |
5463 | #ifdef UINT64_MAX | |
5464 | uint64_t b4 = UINT64_MAX; | |
5465 | #endif | |
5466 | int_least8_t c1 = INT8_C (0x7f); | |
5467 | int_least8_t c1max = INT_LEAST8_MAX; | |
5468 | int_least8_t c1min = INT_LEAST8_MIN; | |
5469 | int_least16_t c2 = INT16_C (0x7fff); | |
5470 | int_least16_t c2max = INT_LEAST16_MAX; | |
5471 | int_least16_t c2min = INT_LEAST16_MIN; | |
5472 | int_least32_t c3 = INT32_C (0x7fffffff); | |
5473 | int_least32_t c3max = INT_LEAST32_MAX; | |
5474 | int_least32_t c3min = INT_LEAST32_MIN; | |
5475 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
5476 | int_least64_t c4max = INT_LEAST64_MAX; | |
5477 | int_least64_t c4min = INT_LEAST64_MIN; | |
5478 | uint_least8_t d1 = UINT8_C (0xff); | |
5479 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
5480 | uint_least16_t d2 = UINT16_C (0xffff); | |
5481 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
5482 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
5483 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
5484 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
5485 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
5486 | int_fast8_t e1 = INT_FAST8_MAX; | |
5487 | int_fast8_t e1min = INT_FAST8_MIN; | |
5488 | int_fast16_t e2 = INT_FAST16_MAX; | |
5489 | int_fast16_t e2min = INT_FAST16_MIN; | |
5490 | int_fast32_t e3 = INT_FAST32_MAX; | |
5491 | int_fast32_t e3min = INT_FAST32_MIN; | |
5492 | int_fast64_t e4 = INT_FAST64_MAX; | |
5493 | int_fast64_t e4min = INT_FAST64_MIN; | |
5494 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
5495 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
5496 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
5497 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
5498 | #ifdef INTPTR_MAX | |
5499 | intptr_t g = INTPTR_MAX; | |
5500 | intptr_t gmin = INTPTR_MIN; | |
5501 | #endif | |
5502 | #ifdef UINTPTR_MAX | |
5503 | uintptr_t h = UINTPTR_MAX; | |
5504 | #endif | |
5505 | intmax_t i = INTMAX_MAX; | |
5506 | uintmax_t j = UINTMAX_MAX; | |
5507 | ||
5508 | #include <limits.h> /* for CHAR_BIT */ | |
5509 | #define TYPE_MINIMUM(t) \ | |
5510 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
5511 | #define TYPE_MAXIMUM(t) \ | |
5512 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
5513 | struct s { | |
5514 | int check_PTRDIFF: | |
5515 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
5516 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
5517 | ? 1 : -1; | |
5518 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
5519 | int check_SIG_ATOMIC: | |
5520 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
5521 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
5522 | ? 1 : -1; | |
5523 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
5524 | int check_WCHAR: | |
5525 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
5526 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
5527 | ? 1 : -1; | |
5528 | /* Detect bug in mingw. */ | |
5529 | int check_WINT: | |
5530 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
5531 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
5532 | ? 1 : -1; | |
5533 | ||
5534 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ | |
5535 | int check_UINT8_C: | |
5536 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
5537 | int check_UINT16_C: | |
5538 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
5539 | ||
5540 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
5541 | #ifdef UINT8_MAX | |
5542 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
5543 | #endif | |
5544 | #ifdef UINT16_MAX | |
5545 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
5546 | #endif | |
5547 | #ifdef UINT32_MAX | |
5548 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
5549 | #endif | |
5550 | #ifdef UINT64_MAX | |
5551 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
5552 | #endif | |
5553 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
5554 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
5555 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
5556 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
5557 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
5558 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
5559 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
5560 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
5561 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
5562 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
5563 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
5564 | }; | |
5565 | ||
5566 | int | |
5567 | main () | |
5568 | { | |
5569 | ||
5570 | ; | |
5571 | return 0; | |
5572 | } | |
5573 | _ACEOF | |
5574 | if ac_fn_c_try_compile "$LINENO"; then : | |
5575 | if test "$cross_compiling" = yes; then : | |
5576 | gl_cv_header_working_stdint_h=yes | |
5577 | ||
5578 | else | |
5579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5580 | /* end confdefs.h. */ | |
5581 | ||
5582 | ||
5583 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
5584 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
5585 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
5586 | #include <stdint.h> | |
5587 | ||
5588 | ||
5589 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5590 | included before <wchar.h>. */ | |
5591 | #include <stddef.h> | |
5592 | #include <signal.h> | |
5593 | #if HAVE_WCHAR_H | |
5594 | # include <stdio.h> | |
5595 | # include <time.h> | |
5596 | # include <wchar.h> | |
5597 | #endif | |
5598 | ||
5599 | ||
5600 | #include <stdio.h> | |
5601 | #include <string.h> | |
5602 | #define MVAL(macro) MVAL1(macro) | |
5603 | #define MVAL1(expression) #expression | |
5604 | static const char *macro_values[] = | |
5605 | { | |
5606 | #ifdef INT8_MAX | |
5607 | MVAL (INT8_MAX), | |
5608 | #endif | |
5609 | #ifdef INT16_MAX | |
5610 | MVAL (INT16_MAX), | |
5611 | #endif | |
5612 | #ifdef INT32_MAX | |
5613 | MVAL (INT32_MAX), | |
5614 | #endif | |
5615 | #ifdef INT64_MAX | |
5616 | MVAL (INT64_MAX), | |
5617 | #endif | |
5618 | #ifdef UINT8_MAX | |
5619 | MVAL (UINT8_MAX), | |
5620 | #endif | |
5621 | #ifdef UINT16_MAX | |
5622 | MVAL (UINT16_MAX), | |
5623 | #endif | |
5624 | #ifdef UINT32_MAX | |
5625 | MVAL (UINT32_MAX), | |
5626 | #endif | |
5627 | #ifdef UINT64_MAX | |
5628 | MVAL (UINT64_MAX), | |
5629 | #endif | |
5630 | NULL | |
5631 | }; | |
5632 | ||
5633 | int | |
5634 | main () | |
5635 | { | |
5636 | ||
5637 | const char **mv; | |
5638 | for (mv = macro_values; *mv != NULL; mv++) | |
5639 | { | |
5640 | const char *value = *mv; | |
5641 | /* Test whether it looks like a cast expression. */ | |
5642 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
5643 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
5644 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
5645 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
5646 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
5647 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
5648 | return 1; | |
5649 | } | |
5650 | return 0; | |
5651 | ||
5652 | ; | |
5653 | return 0; | |
5654 | } | |
5655 | _ACEOF | |
5656 | if ac_fn_c_try_run "$LINENO"; then : | |
5657 | gl_cv_header_working_stdint_h=yes | |
5658 | fi | |
5659 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
5660 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
5661 | fi | |
5662 | ||
5663 | ||
5664 | fi | |
5665 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5666 | ||
5667 | fi | |
5668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 | |
5669 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
5670 | fi | |
5671 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
5672 | STDINT_H= | |
5673 | else | |
5674 | for ac_header in sys/inttypes.h sys/bitypes.h | |
5675 | do : | |
5676 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5677 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5678 | eval as_val=\$$as_ac_Header | |
5679 | if test "x$as_val" = x""yes; then : | |
5680 | cat >>confdefs.h <<_ACEOF | |
5681 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5682 | _ACEOF | |
5683 | ||
5684 | fi | |
5685 | ||
5686 | done | |
5687 | ||
5688 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
5689 | HAVE_SYS_INTTYPES_H=1 | |
5690 | else | |
5691 | HAVE_SYS_INTTYPES_H=0 | |
5692 | fi | |
5693 | ||
5694 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
5695 | HAVE_SYS_BITYPES_H=1 | |
5696 | else | |
5697 | HAVE_SYS_BITYPES_H=0 | |
5698 | fi | |
5699 | ||
5700 | ||
5701 | ||
5702 | : | |
5703 | ||
5704 | ||
5705 | ||
5706 | ||
5707 | ||
5708 | ||
5709 | ||
5710 | ||
5711 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
5712 | ||
5713 | ||
5714 | for gltype in ptrdiff_t size_t ; do | |
5715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
5716 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
5717 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5718 | $as_echo_n "(cached) " >&6 | |
5719 | else | |
5720 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
5721 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5722 | included before <wchar.h>. */ | |
5723 | #include <stddef.h> | |
5724 | #include <signal.h> | |
5725 | #if HAVE_WCHAR_H | |
5726 | # include <stdio.h> | |
5727 | # include <time.h> | |
5728 | # include <wchar.h> | |
5729 | #endif | |
5730 | ||
5731 | #include <limits.h>"; then : | |
5732 | ||
5733 | else | |
5734 | result=unknown | |
5735 | fi | |
5736 | ||
5737 | eval gl_cv_bitsizeof_${gltype}=\$result | |
5738 | ||
5739 | fi | |
5740 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
5741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5742 | $as_echo "$ac_res" >&6; } | |
5743 | eval result=\$gl_cv_bitsizeof_${gltype} | |
5744 | if test $result = unknown; then | |
5745 | result=0 | |
5746 | fi | |
5747 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5748 | cat >>confdefs.h <<_ACEOF | |
5749 | #define BITSIZEOF_${GLTYPE} $result | |
5750 | _ACEOF | |
5751 | ||
5752 | eval BITSIZEOF_${GLTYPE}=\$result | |
5753 | done | |
5754 | ||
5755 | ||
5756 | fi | |
5757 | ||
5758 | ||
5759 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
5760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
5761 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
5762 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5763 | $as_echo_n "(cached) " >&6 | |
5764 | else | |
5765 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
5766 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5767 | included before <wchar.h>. */ | |
5768 | #include <stddef.h> | |
5769 | #include <signal.h> | |
5770 | #if HAVE_WCHAR_H | |
5771 | # include <stdio.h> | |
5772 | # include <time.h> | |
5773 | # include <wchar.h> | |
5774 | #endif | |
5775 | ||
5776 | #include <limits.h>"; then : | |
5777 | ||
5778 | else | |
5779 | result=unknown | |
5780 | fi | |
5781 | ||
5782 | eval gl_cv_bitsizeof_${gltype}=\$result | |
5783 | ||
5784 | fi | |
5785 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
5786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5787 | $as_echo "$ac_res" >&6; } | |
5788 | eval result=\$gl_cv_bitsizeof_${gltype} | |
5789 | if test $result = unknown; then | |
5790 | result=0 | |
5791 | fi | |
5792 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5793 | cat >>confdefs.h <<_ACEOF | |
5794 | #define BITSIZEOF_${GLTYPE} $result | |
5795 | _ACEOF | |
5796 | ||
5797 | eval BITSIZEOF_${GLTYPE}=\$result | |
5798 | done | |
5799 | ||
5800 | ||
5801 | ||
5802 | ||
5803 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
5804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
5805 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
5806 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5807 | $as_echo_n "(cached) " >&6 | |
5808 | else | |
5809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5810 | /* end confdefs.h. */ | |
5811 | ||
5812 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5813 | included before <wchar.h>. */ | |
5814 | #include <stddef.h> | |
5815 | #include <signal.h> | |
5816 | #if HAVE_WCHAR_H | |
5817 | # include <stdio.h> | |
5818 | # include <time.h> | |
5819 | # include <wchar.h> | |
5820 | #endif | |
5821 | ||
5822 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
5823 | int | |
5824 | main () | |
5825 | { | |
5826 | ||
5827 | ; | |
5828 | return 0; | |
5829 | } | |
5830 | _ACEOF | |
5831 | if ac_fn_c_try_compile "$LINENO"; then : | |
5832 | result=yes | |
5833 | else | |
5834 | result=no | |
5835 | fi | |
5836 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5837 | eval gl_cv_type_${gltype}_signed=\$result | |
5838 | ||
5839 | fi | |
5840 | eval ac_res=\$gl_cv_type_${gltype}_signed | |
5841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5842 | $as_echo "$ac_res" >&6; } | |
5843 | eval result=\$gl_cv_type_${gltype}_signed | |
5844 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5845 | if test "$result" = yes; then | |
5846 | cat >>confdefs.h <<_ACEOF | |
5847 | #define HAVE_SIGNED_${GLTYPE} 1 | |
5848 | _ACEOF | |
5849 | ||
5850 | eval HAVE_SIGNED_${GLTYPE}=1 | |
5851 | else | |
5852 | eval HAVE_SIGNED_${GLTYPE}=0 | |
5853 | fi | |
5854 | done | |
5855 | ||
5856 | ||
5857 | gl_cv_type_ptrdiff_t_signed=yes | |
5858 | gl_cv_type_size_t_signed=no | |
5859 | if test $APPLE_UNIVERSAL_BUILD = 0; then | |
5860 | ||
5861 | ||
5862 | for gltype in ptrdiff_t size_t ; do | |
5863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
5864 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
5865 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5866 | $as_echo_n "(cached) " >&6 | |
5867 | else | |
5868 | eval gl_cv_type_${gltype}_suffix=no | |
5869 | eval result=\$gl_cv_type_${gltype}_signed | |
5870 | if test "$result" = yes; then | |
5871 | glsufu= | |
5872 | else | |
5873 | glsufu=u | |
5874 | fi | |
5875 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
5876 | case $glsuf in | |
5877 | '') gltype1='int';; | |
5878 | l) gltype1='long int';; | |
5879 | ll) gltype1='long long int';; | |
5880 | i64) gltype1='__int64';; | |
5881 | u) gltype1='unsigned int';; | |
5882 | ul) gltype1='unsigned long int';; | |
5883 | ull) gltype1='unsigned long long int';; | |
5884 | ui64)gltype1='unsigned __int64';; | |
5885 | esac | |
5886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5887 | /* end confdefs.h. */ | |
5888 | ||
5889 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5890 | included before <wchar.h>. */ | |
5891 | #include <stddef.h> | |
5892 | #include <signal.h> | |
5893 | #if HAVE_WCHAR_H | |
5894 | # include <stdio.h> | |
5895 | # include <time.h> | |
5896 | # include <wchar.h> | |
5897 | #endif | |
5898 | ||
5899 | extern $gltype foo; | |
5900 | extern $gltype1 foo; | |
5901 | int | |
5902 | main () | |
5903 | { | |
5904 | ||
5905 | ; | |
5906 | return 0; | |
5907 | } | |
5908 | _ACEOF | |
5909 | if ac_fn_c_try_compile "$LINENO"; then : | |
5910 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
5911 | fi | |
5912 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5913 | eval result=\$gl_cv_type_${gltype}_suffix | |
5914 | test "$result" != no && break | |
5915 | done | |
5916 | fi | |
5917 | eval ac_res=\$gl_cv_type_${gltype}_suffix | |
5918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5919 | $as_echo "$ac_res" >&6; } | |
5920 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5921 | eval result=\$gl_cv_type_${gltype}_suffix | |
5922 | test "$result" = no && result= | |
5923 | eval ${GLTYPE}_SUFFIX=\$result | |
5924 | cat >>confdefs.h <<_ACEOF | |
5925 | #define ${GLTYPE}_SUFFIX $result | |
5926 | _ACEOF | |
5927 | ||
5928 | done | |
5929 | ||
5930 | ||
5931 | fi | |
5932 | ||
5933 | ||
5934 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
5935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
5936 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
5937 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
5938 | $as_echo_n "(cached) " >&6 | |
5939 | else | |
5940 | eval gl_cv_type_${gltype}_suffix=no | |
5941 | eval result=\$gl_cv_type_${gltype}_signed | |
5942 | if test "$result" = yes; then | |
5943 | glsufu= | |
5944 | else | |
5945 | glsufu=u | |
5946 | fi | |
5947 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
5948 | case $glsuf in | |
5949 | '') gltype1='int';; | |
5950 | l) gltype1='long int';; | |
5951 | ll) gltype1='long long int';; | |
5952 | i64) gltype1='__int64';; | |
5953 | u) gltype1='unsigned int';; | |
5954 | ul) gltype1='unsigned long int';; | |
5955 | ull) gltype1='unsigned long long int';; | |
5956 | ui64)gltype1='unsigned __int64';; | |
5957 | esac | |
5958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5959 | /* end confdefs.h. */ | |
5960 | ||
5961 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5962 | included before <wchar.h>. */ | |
5963 | #include <stddef.h> | |
5964 | #include <signal.h> | |
5965 | #if HAVE_WCHAR_H | |
5966 | # include <stdio.h> | |
5967 | # include <time.h> | |
5968 | # include <wchar.h> | |
5969 | #endif | |
5970 | ||
5971 | extern $gltype foo; | |
5972 | extern $gltype1 foo; | |
5973 | int | |
5974 | main () | |
5975 | { | |
5976 | ||
5977 | ; | |
5978 | return 0; | |
5979 | } | |
5980 | _ACEOF | |
5981 | if ac_fn_c_try_compile "$LINENO"; then : | |
5982 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
5983 | fi | |
5984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5985 | eval result=\$gl_cv_type_${gltype}_suffix | |
5986 | test "$result" != no && break | |
5987 | done | |
5988 | fi | |
5989 | eval ac_res=\$gl_cv_type_${gltype}_suffix | |
5990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
5991 | $as_echo "$ac_res" >&6; } | |
5992 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
5993 | eval result=\$gl_cv_type_${gltype}_suffix | |
5994 | test "$result" = no && result= | |
5995 | eval ${GLTYPE}_SUFFIX=\$result | |
5996 | cat >>confdefs.h <<_ACEOF | |
5997 | #define ${GLTYPE}_SUFFIX $result | |
5998 | _ACEOF | |
5999 | ||
6000 | done | |
6001 | ||
6002 | ||
6003 | ||
6004 | STDINT_H=stdint.h | |
6005 | fi | |
6006 | ||
6007 | ||
6008 | ||
6009 | for ac_header in inttypes.h | |
6010 | do : | |
6011 | ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" | |
6012 | if test "x$ac_cv_header_inttypes_h" = x""yes; then : | |
6013 | cat >>confdefs.h <<_ACEOF | |
6014 | #define HAVE_INTTYPES_H 1 | |
6015 | _ACEOF | |
6016 | ||
6017 | fi | |
6018 | ||
6019 | done | |
6020 | ||
6021 | if test $ac_cv_header_inttypes_h = yes; then | |
6022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 | |
6023 | $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } | |
6024 | if test "${gt_cv_inttypes_pri_broken+set}" = set; then : | |
6025 | $as_echo_n "(cached) " >&6 | |
6026 | else | |
6027 | ||
6028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6029 | /* end confdefs.h. */ | |
6030 | #include <inttypes.h> | |
6031 | #ifdef PRId32 | |
6032 | char *p = PRId32; | |
6033 | #endif | |
6034 | ||
6035 | int | |
6036 | main () | |
6037 | { | |
6038 | ||
6039 | ; | |
6040 | return 0; | |
6041 | } | |
6042 | _ACEOF | |
6043 | if ac_fn_c_try_compile "$LINENO"; then : | |
6044 | gt_cv_inttypes_pri_broken=no | |
6045 | else | |
6046 | gt_cv_inttypes_pri_broken=yes | |
6047 | fi | |
6048 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6049 | ||
6050 | fi | |
6051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 | |
6052 | $as_echo "$gt_cv_inttypes_pri_broken" >&6; } | |
6053 | fi | |
6054 | if test "$gt_cv_inttypes_pri_broken" = yes; then | |
6055 | ||
6056 | cat >>confdefs.h <<_ACEOF | |
6057 | #define PRI_MACROS_BROKEN 1 | |
6058 | _ACEOF | |
6059 | ||
6060 | PRI_MACROS_BROKEN=1 | |
6061 | else | |
6062 | PRI_MACROS_BROKEN=0 | |
6063 | fi | |
6064 | ||
6065 | ||
6066 | ||
6067 | ||
6068 | ||
6069 | ||
6070 | ||
6071 | ||
6072 | ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default" | |
6073 | if test "x$ac_cv_have_decl_imaxabs" = x""yes; then : | |
6074 | ac_have_decl=1 | |
6075 | else | |
6076 | ac_have_decl=0 | |
6077 | fi | |
6078 | ||
6079 | cat >>confdefs.h <<_ACEOF | |
6080 | #define HAVE_DECL_IMAXABS $ac_have_decl | |
6081 | _ACEOF | |
6082 | ||
6083 | ||
6084 | ||
6085 | ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default" | |
6086 | if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then : | |
6087 | ac_have_decl=1 | |
6088 | else | |
6089 | ac_have_decl=0 | |
6090 | fi | |
6091 | ||
6092 | cat >>confdefs.h <<_ACEOF | |
6093 | #define HAVE_DECL_IMAXDIV $ac_have_decl | |
6094 | _ACEOF | |
6095 | ||
6096 | ||
6097 | ||
6098 | ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" | |
6099 | if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : | |
6100 | ac_have_decl=1 | |
6101 | else | |
6102 | ac_have_decl=0 | |
6103 | fi | |
6104 | ||
6105 | cat >>confdefs.h <<_ACEOF | |
6106 | #define HAVE_DECL_STRTOIMAX $ac_have_decl | |
6107 | _ACEOF | |
6108 | ||
6109 | ||
6110 | ||
6111 | ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" | |
6112 | if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : | |
6113 | ac_have_decl=1 | |
6114 | else | |
6115 | ac_have_decl=0 | |
6116 | fi | |
6117 | ||
6118 | cat >>confdefs.h <<_ACEOF | |
6119 | #define HAVE_DECL_STRTOUMAX $ac_have_decl | |
6120 | _ACEOF | |
6121 | ||
6122 | ||
6123 | ||
6124 | GNULIB_IMAXABS=0; | |
6125 | GNULIB_IMAXDIV=0; | |
6126 | GNULIB_STRTOIMAX=0; | |
6127 | GNULIB_STRTOUMAX=0; | |
6128 | HAVE_DECL_IMAXABS=1; | |
6129 | HAVE_DECL_IMAXDIV=1; | |
6130 | HAVE_DECL_STRTOIMAX=1; | |
6131 | HAVE_DECL_STRTOUMAX=1; | |
6132 | ||
6133 | ||
6134 | ||
f434ba03 PA |
6135 | |
6136 | ||
6137 | ||
6138 | ||
6139 | ||
6140 | ||
6141 | ||
6142 | for ac_func in $gl_func_list | |
6143 | do : | |
6144 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6145 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
6146 | eval as_val=\$$as_ac_var | |
6147 | if test "x$as_val" = x""yes; then : | |
6148 | cat >>confdefs.h <<_ACEOF | |
6149 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6150 | _ACEOF | |
6151 | ||
6152 | fi | |
6153 | done | |
6154 | ||
6155 | ||
6156 | ||
6157 | ||
6158 | ||
6159 | ||
6160 | GNULIB_MEMCHR=0; | |
6161 | GNULIB_MEMMEM=0; | |
6162 | GNULIB_MEMPCPY=0; | |
6163 | GNULIB_MEMRCHR=0; | |
6164 | GNULIB_RAWMEMCHR=0; | |
6165 | GNULIB_STPCPY=0; | |
6166 | GNULIB_STPNCPY=0; | |
6167 | GNULIB_STRCHRNUL=0; | |
6168 | GNULIB_STRDUP=0; | |
6169 | GNULIB_STRNCAT=0; | |
6170 | GNULIB_STRNDUP=0; | |
6171 | GNULIB_STRNLEN=0; | |
6172 | GNULIB_STRPBRK=0; | |
6173 | GNULIB_STRSEP=0; | |
6174 | GNULIB_STRSTR=0; | |
6175 | GNULIB_STRCASESTR=0; | |
6176 | GNULIB_STRTOK_R=0; | |
6177 | GNULIB_MBSLEN=0; | |
6178 | GNULIB_MBSNLEN=0; | |
6179 | GNULIB_MBSCHR=0; | |
6180 | GNULIB_MBSRCHR=0; | |
6181 | GNULIB_MBSSTR=0; | |
6182 | GNULIB_MBSCASECMP=0; | |
6183 | GNULIB_MBSNCASECMP=0; | |
6184 | GNULIB_MBSPCASECMP=0; | |
6185 | GNULIB_MBSCASESTR=0; | |
6186 | GNULIB_MBSCSPN=0; | |
6187 | GNULIB_MBSPBRK=0; | |
6188 | GNULIB_MBSSPN=0; | |
6189 | GNULIB_MBSSEP=0; | |
6190 | GNULIB_MBSTOK_R=0; | |
6191 | GNULIB_STRERROR=0; | |
6192 | GNULIB_STRSIGNAL=0; | |
6193 | GNULIB_STRVERSCMP=0; | |
6194 | HAVE_MBSLEN=0; | |
6195 | HAVE_MEMCHR=1; | |
6196 | HAVE_DECL_MEMMEM=1; | |
6197 | HAVE_MEMPCPY=1; | |
6198 | HAVE_DECL_MEMRCHR=1; | |
6199 | HAVE_RAWMEMCHR=1; | |
6200 | HAVE_STPCPY=1; | |
6201 | HAVE_STPNCPY=1; | |
6202 | HAVE_STRCHRNUL=1; | |
6203 | HAVE_DECL_STRDUP=1; | |
6204 | HAVE_DECL_STRNDUP=1; | |
6205 | HAVE_DECL_STRNLEN=1; | |
6206 | HAVE_STRPBRK=1; | |
6207 | HAVE_STRSEP=1; | |
6208 | HAVE_STRCASESTR=1; | |
6209 | HAVE_DECL_STRTOK_R=1; | |
6210 | HAVE_DECL_STRSIGNAL=1; | |
6211 | HAVE_STRVERSCMP=1; | |
6212 | REPLACE_MEMCHR=0; | |
783e057b | 6213 | REPLACE_MEMMEM=0; |
f434ba03 PA |
6214 | REPLACE_STPNCPY=0; |
6215 | REPLACE_STRDUP=0; | |
783e057b | 6216 | REPLACE_STRSTR=0; |
f434ba03 PA |
6217 | REPLACE_STRCASESTR=0; |
6218 | REPLACE_STRERROR=0; | |
6219 | REPLACE_STRNCAT=0; | |
6220 | REPLACE_STRNDUP=0; | |
6221 | REPLACE_STRNLEN=0; | |
6222 | REPLACE_STRSIGNAL=0; | |
6223 | REPLACE_STRTOK_R=0; | |
6224 | UNDEFINE_STRTOK_R=0; | |
6225 | ||
6226 | ||
6227 | ||
6228 | ||
6229 | ||
6230 | ||
6231 | ||
6232 | ||
6233 | ||
6234 | ||
6235 | ||
6236 | ||
6237 | ||
6238 | # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it | |
6239 | # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is | |
6240 | # irrelevant for anonymous mappings. | |
6241 | ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" | |
6242 | if test "x$ac_cv_func_mmap" = x""yes; then : | |
6243 | gl_have_mmap=yes | |
6244 | else | |
6245 | gl_have_mmap=no | |
6246 | fi | |
6247 | ||
6248 | ||
6249 | # Try to allow MAP_ANONYMOUS. | |
6250 | gl_have_mmap_anonymous=no | |
6251 | if test $gl_have_mmap = yes; then | |
6252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 | |
6253 | $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } | |
6254 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6255 | /* end confdefs.h. */ | |
6256 | ||
6257 | #include <sys/mman.h> | |
6258 | #ifdef MAP_ANONYMOUS | |
6259 | I cant identify this map. | |
6260 | #endif | |
6261 | ||
6262 | _ACEOF | |
6263 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6264 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
6265 | gl_have_mmap_anonymous=yes | |
6266 | fi | |
6267 | rm -f conftest* | |
6268 | ||
6269 | if test $gl_have_mmap_anonymous != yes; then | |
6270 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6271 | /* end confdefs.h. */ | |
6272 | ||
6273 | #include <sys/mman.h> | |
6274 | #ifdef MAP_ANON | |
6275 | I cant identify this map. | |
6276 | #endif | |
6277 | ||
6278 | _ACEOF | |
6279 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6280 | $EGREP "I cant identify this map." >/dev/null 2>&1; then : | |
6281 | ||
6282 | $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h | |
6283 | ||
6284 | gl_have_mmap_anonymous=yes | |
6285 | fi | |
6286 | rm -f conftest* | |
6287 | ||
6288 | fi | |
6289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 | |
6290 | $as_echo "$gl_have_mmap_anonymous" >&6; } | |
6291 | if test $gl_have_mmap_anonymous = yes; then | |
6292 | ||
6293 | $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h | |
6294 | ||
6295 | fi | |
6296 | fi | |
6297 | ||
6298 | ||
6299 | : | |
6300 | ||
6301 | ||
6302 | ||
6303 | ||
6304 | ||
6305 | ||
6306 | : | |
6307 | ||
6308 | ||
6309 | ||
6310 | ||
6311 | ||
6312 | ||
6313 | ||
6314 | ||
6315 | : | |
6316 | ||
6317 | ||
6318 | ||
6319 | ||
6320 | ||
6321 | if test $ac_cv_func_memchr = yes; then | |
6322 | # Detect platform-specific bugs in some versions of glibc: | |
6323 | # memchr should not dereference anything with length 0 | |
6324 | # http://bugzilla.redhat.com/499689 | |
6325 | # memchr should not dereference overestimated length after a match | |
6326 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 | |
6327 | # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 | |
6328 | # Assume that memchr works on platforms that lack mprotect. | |
6329 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 | |
6330 | $as_echo_n "checking whether memchr works... " >&6; } | |
6331 | if test "${gl_cv_func_memchr_works+set}" = set; then : | |
6332 | $as_echo_n "(cached) " >&6 | |
6333 | else | |
6334 | if test "$cross_compiling" = yes; then : | |
6335 | gl_cv_func_memchr_works="guessing no" | |
6336 | else | |
6337 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6338 | /* end confdefs.h. */ | |
6339 | ||
6340 | #include <string.h> | |
6341 | #if HAVE_SYS_MMAN_H | |
6342 | # include <fcntl.h> | |
6343 | # include <unistd.h> | |
6344 | # include <sys/types.h> | |
6345 | # include <sys/mman.h> | |
6346 | # ifndef MAP_FILE | |
6347 | # define MAP_FILE 0 | |
6348 | # endif | |
6349 | #endif | |
6350 | ||
6351 | int | |
6352 | main () | |
6353 | { | |
6354 | ||
6355 | char *fence = NULL; | |
6356 | #if HAVE_SYS_MMAN_H && HAVE_MPROTECT | |
6357 | # if HAVE_MAP_ANONYMOUS | |
6358 | const int flags = MAP_ANONYMOUS | MAP_PRIVATE; | |
6359 | const int fd = -1; | |
6360 | # else /* !HAVE_MAP_ANONYMOUS */ | |
6361 | const int flags = MAP_FILE | MAP_PRIVATE; | |
6362 | int fd = open ("/dev/zero", O_RDONLY, 0666); | |
6363 | if (fd >= 0) | |
6364 | # endif | |
6365 | { | |
6366 | int pagesize = getpagesize (); | |
6367 | char *two_pages = | |
6368 | (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, | |
6369 | flags, fd, 0); | |
6370 | if (two_pages != (char *)(-1) | |
6371 | && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) | |
6372 | fence = two_pages + pagesize; | |
6373 | } | |
6374 | #endif | |
6375 | if (fence) | |
6376 | { | |
6377 | if (memchr (fence, 0, 0)) | |
6378 | return 1; | |
6379 | strcpy (fence - 9, "12345678"); | |
6380 | if (memchr (fence - 9, 0, 79) != fence - 1) | |
6381 | return 2; | |
6382 | } | |
6383 | return 0; | |
6384 | ||
6385 | ; | |
6386 | return 0; | |
6387 | } | |
6388 | _ACEOF | |
6389 | if ac_fn_c_try_run "$LINENO"; then : | |
6390 | gl_cv_func_memchr_works=yes | |
6391 | else | |
6392 | gl_cv_func_memchr_works=no | |
6393 | fi | |
6394 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
6395 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6396 | fi | |
6397 | ||
6398 | fi | |
6399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 | |
6400 | $as_echo "$gl_cv_func_memchr_works" >&6; } | |
6401 | if test "$gl_cv_func_memchr_works" != yes; then | |
6402 | REPLACE_MEMCHR=1 | |
6403 | fi | |
6404 | else | |
6405 | HAVE_MEMCHR=0 | |
6406 | fi | |
6407 | if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then | |
6408 | ||
6409 | ||
6410 | ||
6411 | ||
6412 | ||
6413 | ||
6414 | ||
6415 | ||
6416 | gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" | |
6417 | ||
6418 | ||
6419 | for ac_header in bp-sym.h | |
6420 | do : | |
6421 | ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" | |
6422 | if test "x$ac_cv_header_bp_sym_h" = x""yes; then : | |
6423 | cat >>confdefs.h <<_ACEOF | |
6424 | #define HAVE_BP_SYM_H 1 | |
6425 | _ACEOF | |
6426 | ||
6427 | fi | |
6428 | ||
6429 | done | |
6430 | ||
6431 | ||
6432 | fi | |
783e057b DJ |
6433 | |
6434 | ||
81ecdfbb RW |
6435 | ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" |
6436 | if test "x$ac_cv_have_decl_memmem" = x""yes; then : | |
6437 | ac_have_decl=1 | |
783e057b | 6438 | else |
81ecdfbb | 6439 | ac_have_decl=0 |
783e057b | 6440 | fi |
783e057b DJ |
6441 | |
6442 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 6443 | #define HAVE_DECL_MEMMEM $ac_have_decl |
783e057b DJ |
6444 | _ACEOF |
6445 | ||
6446 | ||
783e057b DJ |
6447 | |
6448 | ||
6449 | ||
6450 | ||
6451 | ||
6452 | ||
6453 | ||
6454 | ||
783e057b | 6455 | |
783e057b | 6456 | |
783e057b | 6457 | |
f434ba03 | 6458 | |
81ecdfbb RW |
6459 | for ac_func in memmem |
6460 | do : | |
6461 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
6462 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 6463 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6464 | #define HAVE_MEMMEM 1 |
783e057b DJ |
6465 | _ACEOF |
6466 | ||
6467 | else | |
6468 | ||
6469 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
6470 | ||
6471 | fi | |
6472 | done | |
6473 | ||
6474 | ||
6475 | ||
6476 | : | |
6477 | ||
6478 | ||
6479 | ||
6480 | ||
6481 | ||
6482 | if test $ac_cv_have_decl_memmem = no; then | |
6483 | HAVE_DECL_MEMMEM=0 | |
6484 | fi | |
6485 | : | |
6486 | ||
6487 | ||
55a8c076 YQ |
6488 | REPLACE_NULL=0; |
6489 | HAVE_WCHAR_T=1; | |
6490 | STDDEF_H=''; | |
6491 | ||
6492 | ||
6493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
6494 | $as_echo_n "checking for wchar_t... " >&6; } | |
6495 | if test "${gt_cv_c_wchar_t+set}" = set; then : | |
6496 | $as_echo_n "(cached) " >&6 | |
6497 | else | |
f434ba03 PA |
6498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6499 | /* end confdefs.h. */ | |
55a8c076 YQ |
6500 | #include <stddef.h> |
6501 | wchar_t foo = (wchar_t)'\0'; | |
6502 | int | |
6503 | main () | |
6504 | { | |
f434ba03 | 6505 | |
55a8c076 YQ |
6506 | ; |
6507 | return 0; | |
6508 | } | |
f434ba03 PA |
6509 | _ACEOF |
6510 | if ac_fn_c_try_compile "$LINENO"; then : | |
55a8c076 YQ |
6511 | gt_cv_c_wchar_t=yes |
6512 | else | |
6513 | gt_cv_c_wchar_t=no | |
6514 | fi | |
6515 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6516 | fi | |
6517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
6518 | $as_echo "$gt_cv_c_wchar_t" >&6; } | |
6519 | if test $gt_cv_c_wchar_t = yes; then | |
f434ba03 | 6520 | |
55a8c076 YQ |
6521 | $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h |
6522 | ||
6523 | fi | |
6524 | ||
6525 | ||
6526 | ||
6527 | ||
6528 | ||
6529 | ||
6530 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
6531 | $as_echo_n "checking for C/C++ restrict keyword... " >&6; } | |
6532 | if test "${ac_cv_c_restrict+set}" = set; then : | |
6533 | $as_echo_n "(cached) " >&6 | |
6534 | else | |
6535 | ac_cv_c_restrict=no | |
6536 | # The order here caters to the fact that C++ does not require restrict. | |
6537 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
6538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6539 | /* end confdefs.h. */ | |
6540 | typedef int * int_ptr; | |
6541 | int foo (int_ptr $ac_kw ip) { | |
6542 | return ip[0]; | |
6543 | } | |
6544 | int | |
6545 | main () | |
6546 | { | |
6547 | int s[1]; | |
6548 | int * $ac_kw t = s; | |
6549 | t[0] = 0; | |
6550 | return foo(t) | |
6551 | ; | |
6552 | return 0; | |
6553 | } | |
6554 | _ACEOF | |
6555 | if ac_fn_c_try_compile "$LINENO"; then : | |
6556 | ac_cv_c_restrict=$ac_kw | |
6557 | fi | |
6558 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6559 | test "$ac_cv_c_restrict" != no && break | |
6560 | done | |
6561 | ||
6562 | fi | |
6563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 | |
6564 | $as_echo "$ac_cv_c_restrict" >&6; } | |
6565 | ||
6566 | case $ac_cv_c_restrict in | |
6567 | restrict) ;; | |
6568 | no) $as_echo "#define restrict /**/" >>confdefs.h | |
6569 | ;; | |
6570 | *) cat >>confdefs.h <<_ACEOF | |
6571 | #define restrict $ac_cv_c_restrict | |
6572 | _ACEOF | |
6573 | ;; | |
6574 | esac | |
6575 | ||
6576 | ||
6577 | ||
6578 | ||
6579 | ||
6580 | ||
6581 | ||
6582 | ||
6583 | ||
6584 | ||
6585 | ||
6586 | ||
6587 | ||
6588 | : | |
6589 | ||
6590 | ||
6591 | ||
6592 | ||
6593 | ||
6594 | ||
6595 | ||
6596 | if test $gl_cv_have_include_next = yes; then | |
6597 | gl_cv_next_string_h='<'string.h'>' | |
6598 | else | |
6599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 | |
6600 | $as_echo_n "checking absolute name of <string.h>... " >&6; } | |
6601 | if test "${gl_cv_next_string_h+set}" = set; then : | |
6602 | $as_echo_n "(cached) " >&6 | |
6603 | else | |
6604 | ||
6605 | if test $ac_cv_header_string_h = yes; then | |
6606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6607 | /* end confdefs.h. */ | |
6608 | #include <string.h> | |
6609 | ||
6610 | _ACEOF | |
6611 | case "$host_os" in | |
6612 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
6613 | *) gl_absname_cpp="$ac_cpp" ;; | |
6614 | esac | |
6615 | gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
6616 | sed -n '\#/string.h#{ | |
6617 | s#.*"\(.*/string.h\)".*#\1# | |
6618 | s#^/[^/]#//&# | |
6619 | p | |
6620 | q | |
6621 | }'`'"' | |
6622 | else | |
6623 | gl_cv_next_string_h='<'string.h'>' | |
6624 | fi | |
f434ba03 PA |
6625 | |
6626 | fi | |
55a8c076 YQ |
6627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 |
6628 | $as_echo "$gl_cv_next_string_h" >&6; } | |
6629 | fi | |
6630 | NEXT_STRING_H=$gl_cv_next_string_h | |
f434ba03 | 6631 | |
55a8c076 YQ |
6632 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
6633 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
6634 | gl_next_as_first_directive='<'string.h'>' | |
6635 | else | |
6636 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
6637 | gl_next_as_first_directive=$gl_cv_next_string_h | |
6638 | fi | |
6639 | NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive | |
f434ba03 PA |
6640 | |
6641 | ||
6642 | ||
f434ba03 PA |
6643 | |
6644 | ||
55a8c076 YQ |
6645 | for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do |
6646 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
6647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
6648 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
6649 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
f434ba03 PA |
6650 | $as_echo_n "(cached) " >&6 |
6651 | else | |
6652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6653 | /* end confdefs.h. */ | |
55a8c076 YQ |
6654 | #include <string.h> |
6655 | ||
f434ba03 PA |
6656 | int |
6657 | main () | |
6658 | { | |
55a8c076 YQ |
6659 | #undef $gl_func |
6660 | (void) $gl_func; | |
f434ba03 PA |
6661 | ; |
6662 | return 0; | |
6663 | } | |
6664 | _ACEOF | |
6665 | if ac_fn_c_try_compile "$LINENO"; then : | |
55a8c076 | 6666 | eval "$as_gl_Symbol=yes" |
f434ba03 | 6667 | else |
55a8c076 | 6668 | eval "$as_gl_Symbol=no" |
f434ba03 PA |
6669 | fi |
6670 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6671 | fi | |
55a8c076 YQ |
6672 | eval ac_res=\$$as_gl_Symbol |
6673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
6674 | $as_echo "$ac_res" >&6; } | |
6675 | eval as_val=\$$as_gl_Symbol | |
6676 | if test "x$as_val" = x""yes; then : | |
6677 | cat >>confdefs.h <<_ACEOF | |
6678 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
f434ba03 | 6679 | _ACEOF |
f434ba03 | 6680 | |
55a8c076 | 6681 | eval ac_cv_have_decl_$gl_func=yes |
f434ba03 | 6682 | fi |
55a8c076 | 6683 | done |
f434ba03 PA |
6684 | |
6685 | ||
6686 | ||
55a8c076 YQ |
6687 | GNULIB_BTOWC=0; |
6688 | GNULIB_WCTOB=0; | |
6689 | GNULIB_MBSINIT=0; | |
6690 | GNULIB_MBRTOWC=0; | |
6691 | GNULIB_MBRLEN=0; | |
6692 | GNULIB_MBSRTOWCS=0; | |
6693 | GNULIB_MBSNRTOWCS=0; | |
6694 | GNULIB_WCRTOMB=0; | |
6695 | GNULIB_WCSRTOMBS=0; | |
6696 | GNULIB_WCSNRTOMBS=0; | |
6697 | GNULIB_WCWIDTH=0; | |
6698 | HAVE_BTOWC=1; | |
6699 | HAVE_MBSINIT=1; | |
6700 | HAVE_MBRTOWC=1; | |
6701 | HAVE_MBRLEN=1; | |
6702 | HAVE_MBSRTOWCS=1; | |
6703 | HAVE_MBSNRTOWCS=1; | |
6704 | HAVE_WCRTOMB=1; | |
6705 | HAVE_WCSRTOMBS=1; | |
6706 | HAVE_WCSNRTOMBS=1; | |
6707 | HAVE_DECL_WCTOB=1; | |
6708 | HAVE_DECL_WCWIDTH=1; | |
6709 | REPLACE_MBSTATE_T=0; | |
6710 | REPLACE_BTOWC=0; | |
6711 | REPLACE_WCTOB=0; | |
6712 | REPLACE_MBSINIT=0; | |
6713 | REPLACE_MBRTOWC=0; | |
6714 | REPLACE_MBRLEN=0; | |
6715 | REPLACE_MBSRTOWCS=0; | |
6716 | REPLACE_MBSNRTOWCS=0; | |
6717 | REPLACE_WCRTOMB=0; | |
6718 | REPLACE_WCSRTOMBS=0; | |
6719 | REPLACE_WCSNRTOMBS=0; | |
6720 | REPLACE_WCWIDTH=0; | |
f434ba03 PA |
6721 | |
6722 | ||
55a8c076 YQ |
6723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 |
6724 | $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } | |
6725 | if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : | |
81ecdfbb | 6726 | $as_echo_n "(cached) " >&6 |
783e057b | 6727 | else |
55a8c076 YQ |
6728 | gl_cv_header_wchar_h_correct_inline=yes |
6729 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b | 6730 | /* end confdefs.h. */ |
81ecdfbb | 6731 | |
55a8c076 YQ |
6732 | #define wcstod renamed_wcstod |
6733 | #include <wchar.h> | |
6734 | extern int zero (void); | |
6735 | int main () { return zero(); } | |
6736 | ||
783e057b | 6737 | _ACEOF |
55a8c076 YQ |
6738 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
6739 | (eval $ac_compile) 2>&5 | |
6740 | ac_status=$? | |
6741 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6742 | test $ac_status = 0; }; then | |
6743 | mv conftest.$ac_objext conftest1.$ac_objext | |
6744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6745 | /* end confdefs.h. */ | |
783e057b | 6746 | |
55a8c076 YQ |
6747 | #define wcstod renamed_wcstod |
6748 | #include <wchar.h> | |
6749 | int zero (void) { return 0; } | |
783e057b | 6750 | |
55a8c076 YQ |
6751 | _ACEOF |
6752 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 | |
6753 | (eval $ac_compile) 2>&5 | |
6754 | ac_status=$? | |
6755 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6756 | test $ac_status = 0; }; then | |
6757 | mv conftest.$ac_objext conftest2.$ac_objext | |
6758 | if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then | |
6759 | : | |
6760 | else | |
6761 | gl_cv_header_wchar_h_correct_inline=no | |
6762 | fi | |
6763 | fi | |
6764 | fi | |
6765 | rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext | |
783e057b | 6766 | |
55a8c076 YQ |
6767 | fi |
6768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 | |
6769 | $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } | |
6770 | if test $gl_cv_header_wchar_h_correct_inline = no; then | |
6771 | as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). | |
6772 | This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in | |
6773 | C99 mode. You have four options: | |
6774 | - Add the flag -fgnu89-inline to CC and reconfigure, or | |
6775 | - Fix your include files, using parts of | |
6776 | <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or | |
6777 | - Use a gcc version older than 4.3, or | |
6778 | - Don't use the flags -std=c99 or -std=gnu99. | |
6779 | Configuration aborted." "$LINENO" 5 | |
783e057b DJ |
6780 | fi |
6781 | ||
6782 | ||
55a8c076 YQ |
6783 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 |
6784 | $as_echo_n "checking for wint_t... " >&6; } | |
6785 | if test "${gt_cv_c_wint_t+set}" = set; then : | |
81ecdfbb | 6786 | $as_echo_n "(cached) " >&6 |
783e057b | 6787 | else |
81ecdfbb | 6788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 6789 | /* end confdefs.h. */ |
81ecdfbb | 6790 | |
55a8c076 YQ |
6791 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
6792 | <wchar.h>. | |
6793 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | |
6794 | before <wchar.h>. */ | |
6795 | #include <stddef.h> | |
6796 | #include <stdio.h> | |
6797 | #include <time.h> | |
6798 | #include <wchar.h> | |
6799 | wint_t foo = (wchar_t)'\0'; | |
783e057b DJ |
6800 | int |
6801 | main () | |
6802 | { | |
55a8c076 | 6803 | |
783e057b DJ |
6804 | ; |
6805 | return 0; | |
6806 | } | |
783e057b | 6807 | _ACEOF |
55a8c076 YQ |
6808 | if ac_fn_c_try_compile "$LINENO"; then : |
6809 | gt_cv_c_wint_t=yes | |
783e057b | 6810 | else |
55a8c076 | 6811 | gt_cv_c_wint_t=no |
783e057b | 6812 | fi |
55a8c076 | 6813 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 6814 | fi |
55a8c076 YQ |
6815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 |
6816 | $as_echo "$gt_cv_c_wint_t" >&6; } | |
6817 | if test $gt_cv_c_wint_t = yes; then | |
783e057b | 6818 | |
55a8c076 | 6819 | $as_echo "#define HAVE_WINT_T 1" >>confdefs.h |
783e057b DJ |
6820 | |
6821 | fi | |
6822 | ||
6823 | ||
55a8c076 YQ |
6824 | if false; then |
6825 | GL_COND_LIBTOOL_TRUE= | |
6826 | GL_COND_LIBTOOL_FALSE='#' | |
6827 | else | |
6828 | GL_COND_LIBTOOL_TRUE='#' | |
6829 | GL_COND_LIBTOOL_FALSE= | |
6830 | fi | |
783e057b | 6831 | |
55a8c076 YQ |
6832 | gl_cond_libtool=false |
6833 | gl_libdeps= | |
6834 | gl_ltlibdeps= | |
6835 | gl_m4_base='gnulib/m4' | |
783e057b DJ |
6836 | |
6837 | ||
6838 | ||
6839 | ||
6840 | ||
6841 | ||
6842 | ||
6843 | ||
55a8c076 YQ |
6844 | |
6845 | gl_source_base='gnulib' | |
6846 | # Code from module arg-nonnull: | |
6847 | # Code from module c++defs: | |
6848 | # Code from module extensions: | |
6849 | # Code from module include_next: | |
6850 | # Code from module inttypes: | |
6851 | ||
6852 | ||
6853 | ||
6854 | ||
6855 | : | |
6856 | ||
6857 | ||
6858 | ||
6859 | ||
6860 | ||
6861 | ||
6862 | : | |
6863 | ||
6864 | ||
6865 | ||
6866 | ||
6867 | ||
6868 | ||
6869 | : | |
6870 | ||
6871 | ||
6872 | ||
6873 | ||
6874 | ||
6875 | ||
6876 | : | |
6877 | ||
6878 | ||
6879 | ||
6880 | ||
6881 | ||
6882 | ||
6883 | : | |
6884 | ||
6885 | ||
6886 | ||
6887 | ||
6888 | ||
6889 | ||
6890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5 | |
6891 | $as_echo_n "checking whether inttypes.h conforms to C99... " >&6; } | |
6892 | if test "${gl_cv_header_working_inttypes_h+set}" = set; then : | |
81ecdfbb | 6893 | $as_echo_n "(cached) " >&6 |
783e057b | 6894 | else |
55a8c076 YQ |
6895 | gl_cv_header_working_inttypes_h=no |
6896 | if test "$gl_cv_header_working_stdint_h" = yes \ | |
6897 | && test $ac_cv_header_inttypes_h = yes \ | |
6898 | && test "$ac_cv_have_decl_imaxabs" = yes \ | |
6899 | && test "$ac_cv_have_decl_imaxdiv" = yes \ | |
6900 | && test "$ac_cv_have_decl_strtoimax" = yes \ | |
6901 | && test "$ac_cv_have_decl_strtoumax" = yes; then | |
6902 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b | 6903 | /* end confdefs.h. */ |
55a8c076 YQ |
6904 | |
6905 | ||
6906 | #include <stddef.h> | |
6907 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
6908 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
6909 | #define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ | |
6910 | #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ | |
6911 | #include <inttypes.h> | |
6912 | ||
6913 | /* No need to duplicate the tests of stdint.m4; they are subsumed by | |
6914 | $gl_cv_header_working_stdint_h = yes. */ | |
6915 | ||
6916 | /* Tests for macros supposed to be defined in inttypes.h. */ | |
6917 | ||
6918 | const char *k = /* implicit string concatenation */ | |
6919 | #ifdef INT8_MAX | |
6920 | PRId8 PRIi8 | |
6921 | #endif | |
6922 | #ifdef UINT8_MAX | |
6923 | PRIo8 PRIu8 PRIx8 PRIX8 | |
6924 | #endif | |
6925 | #ifdef INT16_MAX | |
6926 | PRId16 PRIi16 | |
6927 | #endif | |
6928 | #ifdef UINT16_MAX | |
6929 | PRIo16 PRIu16 PRIx16 PRIX16 | |
6930 | #endif | |
6931 | #ifdef INT32_MAX | |
6932 | PRId32 PRIi32 | |
6933 | #endif | |
6934 | #ifdef UINT32_MAX | |
6935 | PRIo32 PRIu32 PRIx32 PRIX32 | |
6936 | #endif | |
6937 | #ifdef INT64_MAX | |
6938 | PRId64 PRIi64 | |
6939 | #endif | |
6940 | #ifdef UINT64_MAX | |
6941 | PRIo64 PRIu64 PRIx64 PRIX64 | |
6942 | #endif | |
6943 | PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 | |
6944 | PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 | |
6945 | PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 | |
6946 | PRIdLEAST64 PRIiLEAST64 | |
6947 | PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 | |
6948 | PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 | |
6949 | PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 | |
6950 | PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 | |
6951 | PRIdFAST64 PRIiFAST64 | |
6952 | PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 | |
6953 | PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX | |
6954 | #ifdef INTPTR_MAX | |
6955 | PRIdPTR PRIiPTR | |
6956 | #endif | |
6957 | #ifdef UINTPTR_MAX | |
6958 | PRIoPTR PRIuPTR PRIxPTR PRIXPTR | |
6959 | #endif | |
6960 | ; | |
6961 | const char *l = /* implicit string concatenation */ | |
6962 | #ifdef INT8_MAX | |
6963 | SCNd8 SCNi8 | |
6964 | #endif | |
6965 | #ifdef UINT8_MAX | |
6966 | SCNo8 SCNu8 SCNx8 | |
6967 | #endif | |
6968 | #ifdef INT16_MAX | |
6969 | SCNd16 SCNi16 | |
6970 | #endif | |
6971 | #ifdef UINT16_MAX | |
6972 | SCNo16 SCNu16 SCNx16 | |
6973 | #endif | |
6974 | #ifdef INT32_MAX | |
6975 | SCNd32 SCNi32 | |
6976 | #endif | |
6977 | #ifdef UINT32_MAX | |
6978 | SCNo32 SCNu32 SCNx32 | |
6979 | #endif | |
6980 | #ifdef INT64_MAX | |
6981 | SCNd64 SCNi64 | |
6982 | #endif | |
6983 | #ifdef UINT64_MAX | |
6984 | SCNo64 SCNu64 SCNx64 | |
6985 | #endif | |
6986 | SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 | |
6987 | SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 | |
6988 | SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 | |
6989 | SCNdLEAST64 SCNiLEAST64 | |
6990 | SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 | |
6991 | SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 | |
6992 | SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 | |
6993 | SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 | |
6994 | SCNdFAST64 SCNiFAST64 | |
6995 | SCNoFAST64 SCNuFAST64 SCNxFAST64 | |
6996 | SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX | |
6997 | #ifdef INTPTR_MAX | |
6998 | SCNdPTR SCNiPTR | |
6999 | #endif | |
7000 | #ifdef UINTPTR_MAX | |
7001 | SCNoPTR SCNuPTR SCNxPTR | |
7002 | #endif | |
7003 | ; | |
7004 | ||
783e057b DJ |
7005 | int |
7006 | main () | |
7007 | { | |
55a8c076 | 7008 | |
783e057b DJ |
7009 | ; |
7010 | return 0; | |
7011 | } | |
7012 | _ACEOF | |
81ecdfbb | 7013 | if ac_fn_c_try_compile "$LINENO"; then : |
55a8c076 | 7014 | gl_cv_header_working_inttypes_h=yes |
783e057b | 7015 | fi |
81ecdfbb | 7016 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
55a8c076 | 7017 | fi |
783e057b | 7018 | fi |
55a8c076 YQ |
7019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5 |
7020 | $as_echo "$gl_cv_header_working_inttypes_h" >&6; } | |
783e057b DJ |
7021 | |
7022 | ||
7023 | ||
7024 | ||
7025 | ||
f434ba03 | 7026 | |
783e057b DJ |
7027 | : |
7028 | ||
7029 | ||
7030 | ||
7031 | ||
7032 | ||
7033 | ||
7034 | ||
f434ba03 | 7035 | if test $gl_cv_have_include_next = yes; then |
55a8c076 | 7036 | gl_cv_next_inttypes_h='<'inttypes.h'>' |
f434ba03 | 7037 | else |
55a8c076 YQ |
7038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 |
7039 | $as_echo_n "checking absolute name of <inttypes.h>... " >&6; } | |
7040 | if test "${gl_cv_next_inttypes_h+set}" = set; then : | |
f434ba03 PA |
7041 | $as_echo_n "(cached) " >&6 |
7042 | else | |
7043 | ||
55a8c076 | 7044 | if test $ac_cv_header_inttypes_h = yes; then |
f434ba03 PA |
7045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
7046 | /* end confdefs.h. */ | |
55a8c076 | 7047 | #include <inttypes.h> |
f434ba03 PA |
7048 | |
7049 | _ACEOF | |
7050 | case "$host_os" in | |
7051 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
7052 | *) gl_absname_cpp="$ac_cpp" ;; | |
7053 | esac | |
55a8c076 YQ |
7054 | gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | |
7055 | sed -n '\#/inttypes.h#{ | |
7056 | s#.*"\(.*/inttypes.h\)".*#\1# | |
f434ba03 PA |
7057 | s#^/[^/]#//&# |
7058 | p | |
7059 | q | |
7060 | }'`'"' | |
7061 | else | |
55a8c076 | 7062 | gl_cv_next_inttypes_h='<'inttypes.h'>' |
f434ba03 PA |
7063 | fi |
7064 | ||
7065 | fi | |
55a8c076 YQ |
7066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 |
7067 | $as_echo "$gl_cv_next_inttypes_h" >&6; } | |
f434ba03 | 7068 | fi |
55a8c076 | 7069 | NEXT_INTTYPES_H=$gl_cv_next_inttypes_h |
f434ba03 PA |
7070 | |
7071 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
7072 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
55a8c076 | 7073 | gl_next_as_first_directive='<'inttypes.h'>' |
f434ba03 PA |
7074 | else |
7075 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
55a8c076 | 7076 | gl_next_as_first_directive=$gl_cv_next_inttypes_h |
f434ba03 | 7077 | fi |
55a8c076 | 7078 | NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive |
f434ba03 PA |
7079 | |
7080 | ||
7081 | ||
7082 | ||
7083 | ||
f434ba03 | 7084 | |
55a8c076 YQ |
7085 | |
7086 | $as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h | |
7087 | ||
7088 | ||
7089 | ||
7090 | PRIPTR_PREFIX= | |
7091 | if test -n "$STDINT_H"; then | |
7092 | PRIPTR_PREFIX='"l"' | |
7093 | else | |
7094 | for glpfx in '' l ll I64; do | |
7095 | case $glpfx in | |
7096 | '') gltype1='int';; | |
7097 | l) gltype1='long int';; | |
7098 | ll) gltype1='long long int';; | |
7099 | I64) gltype1='__int64';; | |
7100 | esac | |
7101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7102 | /* end confdefs.h. */ | |
7103 | #include <stdint.h> | |
7104 | extern intptr_t foo; | |
7105 | extern $gltype1 foo; | |
f434ba03 PA |
7106 | int |
7107 | main () | |
7108 | { | |
55a8c076 | 7109 | |
f434ba03 PA |
7110 | ; |
7111 | return 0; | |
7112 | } | |
7113 | _ACEOF | |
7114 | if ac_fn_c_try_compile "$LINENO"; then : | |
55a8c076 | 7115 | PRIPTR_PREFIX='"'$glpfx'"' |
f434ba03 PA |
7116 | fi |
7117 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
55a8c076 YQ |
7118 | test -n "$PRIPTR_PREFIX" && break |
7119 | done | |
7120 | fi | |
f434ba03 | 7121 | |
f434ba03 | 7122 | |
55a8c076 YQ |
7123 | if test "$ac_cv_have_decl_imaxabs" = yes; then |
7124 | HAVE_DECL_IMAXABS=1 | |
7125 | else | |
7126 | HAVE_DECL_IMAXABS=0 | |
7127 | fi | |
f434ba03 | 7128 | |
55a8c076 YQ |
7129 | if test "$ac_cv_have_decl_imaxdiv" = yes; then |
7130 | HAVE_DECL_IMAXDIV=1 | |
7131 | else | |
7132 | HAVE_DECL_IMAXDIV=0 | |
7133 | fi | |
f434ba03 | 7134 | |
55a8c076 YQ |
7135 | if test "$ac_cv_have_decl_strtoimax" = yes; then |
7136 | HAVE_DECL_STRTOIMAX=1 | |
7137 | else | |
7138 | HAVE_DECL_STRTOIMAX=0 | |
7139 | fi | |
f434ba03 | 7140 | |
55a8c076 YQ |
7141 | if test "$ac_cv_have_decl_strtoumax" = yes; then |
7142 | HAVE_DECL_STRTOUMAX=1 | |
7143 | else | |
7144 | HAVE_DECL_STRTOUMAX=0 | |
7145 | fi | |
f434ba03 | 7146 | |
55a8c076 YQ |
7147 | |
7148 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 | |
7149 | $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } | |
7150 | if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then : | |
81ecdfbb | 7151 | $as_echo_n "(cached) " >&6 |
783e057b | 7152 | else |
55a8c076 | 7153 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 7154 | /* end confdefs.h. */ |
55a8c076 YQ |
7155 | /* Work also in C++ mode. */ |
7156 | #define __STDC_LIMIT_MACROS 1 | |
7157 | ||
7158 | /* Work if build is not clean. */ | |
7159 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
7160 | ||
7161 | #include <limits.h> | |
7162 | #if HAVE_STDINT_H | |
7163 | #include <stdint.h> | |
7164 | #endif | |
7165 | ||
7166 | #if defined INT32_MAX && defined INTMAX_MAX | |
7167 | #define CONDITION (INT32_MAX < INTMAX_MAX) | |
7168 | #elif HAVE_LONG_LONG_INT | |
7169 | #define CONDITION (sizeof (int) < sizeof (long long int)) | |
7170 | #else | |
7171 | #define CONDITION 0 | |
7172 | #endif | |
7173 | int test[CONDITION ? 1 : -1]; | |
7174 | int | |
7175 | main () | |
7176 | { | |
f434ba03 | 7177 | |
55a8c076 YQ |
7178 | ; |
7179 | return 0; | |
7180 | } | |
783e057b | 7181 | _ACEOF |
55a8c076 YQ |
7182 | if ac_fn_c_try_compile "$LINENO"; then : |
7183 | gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes | |
7184 | else | |
7185 | gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no | |
783e057b | 7186 | fi |
55a8c076 YQ |
7187 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
7188 | fi | |
7189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 | |
7190 | $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } | |
7191 | if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then | |
7192 | INT32_MAX_LT_INTMAX_MAX=1; | |
7193 | else | |
7194 | INT32_MAX_LT_INTMAX_MAX=0; | |
f434ba03 | 7195 | fi |
783e057b DJ |
7196 | |
7197 | ||
55a8c076 YQ |
7198 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
7199 | ||
7200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 | |
7201 | $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } | |
7202 | if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then : | |
f434ba03 PA |
7203 | $as_echo_n "(cached) " >&6 |
7204 | else | |
7205 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7206 | /* end confdefs.h. */ | |
55a8c076 YQ |
7207 | /* Work also in C++ mode. */ |
7208 | #define __STDC_LIMIT_MACROS 1 | |
7209 | ||
7210 | /* Work if build is not clean. */ | |
7211 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
7212 | ||
7213 | #include <limits.h> | |
7214 | #if HAVE_STDINT_H | |
7215 | #include <stdint.h> | |
7216 | #endif | |
7217 | ||
7218 | #if defined INT64_MAX | |
7219 | #define CONDITION (INT64_MAX == LONG_MAX) | |
7220 | #elif HAVE_LONG_LONG_INT | |
7221 | #define CONDITION (sizeof (long long int) == sizeof (long int)) | |
7222 | #else | |
7223 | #define CONDITION 0 | |
7224 | #endif | |
7225 | int test[CONDITION ? 1 : -1]; | |
f434ba03 PA |
7226 | int |
7227 | main () | |
7228 | { | |
783e057b | 7229 | |
f434ba03 PA |
7230 | ; |
7231 | return 0; | |
7232 | } | |
7233 | _ACEOF | |
7234 | if ac_fn_c_try_compile "$LINENO"; then : | |
55a8c076 | 7235 | gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes |
f434ba03 | 7236 | else |
55a8c076 | 7237 | gl_cv_test_INT64_MAX_EQ_LONG_MAX=no |
f434ba03 PA |
7238 | fi |
7239 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7240 | fi | |
55a8c076 YQ |
7241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 |
7242 | $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } | |
7243 | if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then | |
7244 | INT64_MAX_EQ_LONG_MAX=1; | |
7245 | else | |
7246 | INT64_MAX_EQ_LONG_MAX=0; | |
7247 | fi | |
783e057b | 7248 | |
783e057b | 7249 | |
55a8c076 YQ |
7250 | else |
7251 | INT64_MAX_EQ_LONG_MAX=-1 | |
f434ba03 | 7252 | fi |
783e057b | 7253 | |
55a8c076 YQ |
7254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 |
7255 | $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } | |
7256 | if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then : | |
7257 | $as_echo_n "(cached) " >&6 | |
7258 | else | |
7259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7260 | /* end confdefs.h. */ | |
7261 | /* Work also in C++ mode. */ | |
7262 | #define __STDC_LIMIT_MACROS 1 | |
7263 | ||
7264 | /* Work if build is not clean. */ | |
7265 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
7266 | ||
7267 | #include <limits.h> | |
7268 | #if HAVE_STDINT_H | |
7269 | #include <stdint.h> | |
7270 | #endif | |
7271 | ||
7272 | #if defined UINT32_MAX && defined UINTMAX_MAX | |
7273 | #define CONDITION (UINT32_MAX < UINTMAX_MAX) | |
7274 | #elif HAVE_LONG_LONG_INT | |
7275 | #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) | |
7276 | #else | |
7277 | #define CONDITION 0 | |
7278 | #endif | |
7279 | int test[CONDITION ? 1 : -1]; | |
7280 | int | |
7281 | main () | |
7282 | { | |
783e057b | 7283 | |
55a8c076 YQ |
7284 | ; |
7285 | return 0; | |
7286 | } | |
7287 | _ACEOF | |
7288 | if ac_fn_c_try_compile "$LINENO"; then : | |
7289 | gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes | |
783e057b | 7290 | else |
55a8c076 YQ |
7291 | gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no |
7292 | fi | |
7293 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
783e057b | 7294 | fi |
55a8c076 YQ |
7295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 |
7296 | $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } | |
7297 | if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then | |
7298 | UINT32_MAX_LT_UINTMAX_MAX=1; | |
7299 | else | |
7300 | UINT32_MAX_LT_UINTMAX_MAX=0; | |
7301 | fi | |
783e057b | 7302 | |
783e057b | 7303 | |
55a8c076 YQ |
7304 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
7305 | ||
7306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 | |
7307 | $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } | |
7308 | if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then : | |
7309 | $as_echo_n "(cached) " >&6 | |
7310 | else | |
7311 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7312 | /* end confdefs.h. */ | |
7313 | /* Work also in C++ mode. */ | |
7314 | #define __STDC_LIMIT_MACROS 1 | |
7315 | ||
7316 | /* Work if build is not clean. */ | |
7317 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H | |
7318 | ||
7319 | #include <limits.h> | |
7320 | #if HAVE_STDINT_H | |
7321 | #include <stdint.h> | |
7322 | #endif | |
7323 | ||
7324 | #if defined UINT64_MAX | |
7325 | #define CONDITION (UINT64_MAX == ULONG_MAX) | |
7326 | #elif HAVE_LONG_LONG_INT | |
7327 | #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) | |
7328 | #else | |
7329 | #define CONDITION 0 | |
7330 | #endif | |
7331 | int test[CONDITION ? 1 : -1]; | |
7332 | int | |
7333 | main () | |
7334 | { | |
7335 | ||
7336 | ; | |
7337 | return 0; | |
7338 | } | |
7339 | _ACEOF | |
7340 | if ac_fn_c_try_compile "$LINENO"; then : | |
7341 | gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes | |
7342 | else | |
7343 | gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no | |
7344 | fi | |
7345 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7346 | fi | |
7347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 | |
7348 | $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } | |
7349 | if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then | |
7350 | UINT64_MAX_EQ_ULONG_MAX=1; | |
7351 | else | |
7352 | UINT64_MAX_EQ_ULONG_MAX=0; | |
7353 | fi | |
783e057b DJ |
7354 | |
7355 | ||
55a8c076 YQ |
7356 | else |
7357 | UINT64_MAX_EQ_ULONG_MAX=-1 | |
7358 | fi | |
783e057b DJ |
7359 | |
7360 | ||
55a8c076 YQ |
7361 | for gl_func in imaxabs imaxdiv strtoimax strtoumax; do |
7362 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
7363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
7364 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
7365 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
7366 | $as_echo_n "(cached) " >&6 | |
7367 | else | |
7368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7369 | /* end confdefs.h. */ | |
7370 | #include <inttypes.h> | |
783e057b | 7371 | |
55a8c076 YQ |
7372 | int |
7373 | main () | |
7374 | { | |
7375 | #undef $gl_func | |
7376 | (void) $gl_func; | |
7377 | ; | |
7378 | return 0; | |
7379 | } | |
7380 | _ACEOF | |
7381 | if ac_fn_c_try_compile "$LINENO"; then : | |
7382 | eval "$as_gl_Symbol=yes" | |
7383 | else | |
7384 | eval "$as_gl_Symbol=no" | |
7385 | fi | |
7386 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7387 | fi | |
7388 | eval ac_res=\$$as_gl_Symbol | |
7389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
7390 | $as_echo "$ac_res" >&6; } | |
7391 | eval as_val=\$$as_gl_Symbol | |
7392 | if test "x$as_val" = x""yes; then : | |
7393 | cat >>confdefs.h <<_ACEOF | |
7394 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
7395 | _ACEOF | |
783e057b | 7396 | |
55a8c076 YQ |
7397 | eval ac_cv_have_decl_$gl_func=yes |
7398 | fi | |
7399 | done | |
783e057b DJ |
7400 | |
7401 | ||
f434ba03 | 7402 | # Code from module memchr: |
783e057b | 7403 | |
783e057b | 7404 | |
783e057b | 7405 | |
783e057b | 7406 | |
f434ba03 | 7407 | GNULIB_MEMCHR=1 |
783e057b | 7408 | |
783e057b | 7409 | |
783e057b | 7410 | |
f434ba03 | 7411 | $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h |
783e057b | 7412 | |
783e057b DJ |
7413 | |
7414 | ||
f434ba03 | 7415 | # Code from module memmem: |
783e057b DJ |
7416 | |
7417 | ||
f434ba03 PA |
7418 | if test $ac_cv_have_decl_memmem = yes; then |
7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 | |
7420 | $as_echo_n "checking whether memmem works in linear time... " >&6; } | |
7421 | if test "${gl_cv_func_memmem_works+set}" = set; then : | |
81ecdfbb | 7422 | $as_echo_n "(cached) " >&6 |
783e057b | 7423 | else |
81ecdfbb | 7424 | if test "$cross_compiling" = yes; then : |
f434ba03 | 7425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b | 7426 | /* end confdefs.h. */ |
783e057b | 7427 | |
f434ba03 PA |
7428 | #include <features.h> |
7429 | #ifdef __GNU_LIBRARY__ | |
7430 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2) | |
7431 | Lucky user | |
7432 | #endif | |
7433 | #endif | |
7434 | #ifdef __CYGWIN__ | |
7435 | #include <cygwin/version.h> | |
7436 | #if CYGWIN_VERSION_DLL_MAJOR >= 1007 | |
7437 | Lucky user | |
7438 | #endif | |
7439 | #endif | |
783e057b | 7440 | |
783e057b | 7441 | _ACEOF |
f434ba03 PA |
7442 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
7443 | $EGREP "Lucky user" >/dev/null 2>&1; then : | |
7444 | gl_cv_func_memmem_works=yes | |
783e057b | 7445 | else |
f434ba03 | 7446 | gl_cv_func_memmem_works="guessing no" |
783e057b | 7447 | fi |
f434ba03 | 7448 | rm -f conftest* |
783e057b DJ |
7449 | |
7450 | ||
783e057b | 7451 | else |
81ecdfbb | 7452 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
7453 | /* end confdefs.h. */ |
7454 | ||
f434ba03 | 7455 | #include <signal.h> /* for signal */ |
783e057b DJ |
7456 | #include <string.h> /* for memmem */ |
7457 | #include <stdlib.h> /* for malloc */ | |
7458 | #include <unistd.h> /* for alarm */ | |
7459 | ||
7460 | int | |
7461 | main () | |
7462 | { | |
7463 | size_t m = 1000000; | |
7464 | char *haystack = (char *) malloc (2 * m + 1); | |
7465 | char *needle = (char *) malloc (m + 1); | |
7466 | void *result = 0; | |
7467 | /* Failure to compile this test due to missing alarm is okay, | |
7468 | since all such platforms (mingw) also lack memmem. */ | |
f434ba03 | 7469 | signal (SIGALRM, SIG_DFL); |
783e057b DJ |
7470 | alarm (5); |
7471 | /* Check for quadratic performance. */ | |
7472 | if (haystack && needle) | |
7473 | { | |
f434ba03 PA |
7474 | memset (haystack, 'A', 2 * m); |
7475 | haystack[2 * m] = 'B'; | |
7476 | memset (needle, 'A', m); | |
7477 | needle[m] = 'B'; | |
7478 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
783e057b DJ |
7479 | } |
7480 | /* Check for empty needle behavior. */ | |
7481 | return !result || !memmem ("a", 1, 0, 0); | |
7482 | ; | |
7483 | return 0; | |
7484 | } | |
7485 | _ACEOF | |
81ecdfbb | 7486 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b DJ |
7487 | gl_cv_func_memmem_works=yes |
7488 | else | |
81ecdfbb | 7489 | gl_cv_func_memmem_works=no |
783e057b | 7490 | fi |
81ecdfbb RW |
7491 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
7492 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 7493 | fi |
81ecdfbb | 7494 | |
f434ba03 | 7495 | |
783e057b | 7496 | fi |
81ecdfbb RW |
7497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5 |
7498 | $as_echo "$gl_cv_func_memmem_works" >&6; } | |
783e057b DJ |
7499 | if test "$gl_cv_func_memmem_works" != yes; then |
7500 | REPLACE_MEMMEM=1 | |
7501 | ||
7502 | ||
7503 | ||
7504 | ||
7505 | ||
7506 | ||
7507 | ||
f434ba03 | 7508 | |
783e057b DJ |
7509 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" |
7510 | ||
7511 | fi | |
7512 | fi | |
7513 | ||
f434ba03 PA |
7514 | # Code from module memmem-simple: |
7515 | ||
783e057b DJ |
7516 | |
7517 | ||
7518 | ||
7519 | ||
7520 | ||
7521 | ||
7522 | ||
7523 | ||
7524 | ||
7525 | ||
7526 | ||
81ecdfbb RW |
7527 | for ac_func in memmem |
7528 | do : | |
7529 | ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" | |
7530 | if test "x$ac_cv_func_memmem" = x""yes; then : | |
783e057b | 7531 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7532 | #define HAVE_MEMMEM 1 |
783e057b DJ |
7533 | _ACEOF |
7534 | ||
7535 | else | |
7536 | ||
7537 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
7538 | ||
7539 | fi | |
7540 | done | |
7541 | ||
7542 | ||
7543 | ||
7544 | : | |
7545 | ||
7546 | ||
7547 | ||
7548 | ||
7549 | ||
7550 | if test $ac_cv_have_decl_memmem = no; then | |
7551 | HAVE_DECL_MEMMEM=0 | |
7552 | fi | |
7553 | : | |
7554 | ||
7555 | ||
7556 | ||
f434ba03 | 7557 | |
783e057b DJ |
7558 | GNULIB_MEMMEM=1 |
7559 | ||
7560 | ||
7561 | ||
f434ba03 PA |
7562 | $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h |
7563 | ||
7564 | ||
7565 | ||
7566 | # Code from module multiarch: | |
7567 | ||
7568 | # Code from module stddef: | |
7569 | ||
7570 | ||
7571 | ||
7572 | if test $gt_cv_c_wchar_t = no; then | |
7573 | HAVE_WCHAR_T=0 | |
7574 | STDDEF_H=stddef.h | |
7575 | fi | |
7576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 | |
7577 | $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } | |
7578 | if test "${gl_cv_decl_null_works+set}" = set; then : | |
7579 | $as_echo_n "(cached) " >&6 | |
7580 | else | |
7581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7582 | /* end confdefs.h. */ | |
7583 | #include <stddef.h> | |
7584 | int test[2 * (sizeof NULL == sizeof (void *)) -1]; | |
7585 | ||
7586 | int | |
7587 | main () | |
7588 | { | |
7589 | ||
7590 | ; | |
7591 | return 0; | |
7592 | } | |
7593 | _ACEOF | |
7594 | if ac_fn_c_try_compile "$LINENO"; then : | |
7595 | gl_cv_decl_null_works=yes | |
7596 | else | |
7597 | gl_cv_decl_null_works=no | |
7598 | fi | |
7599 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7600 | fi | |
7601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 | |
7602 | $as_echo "$gl_cv_decl_null_works" >&6; } | |
7603 | if test $gl_cv_decl_null_works = no; then | |
7604 | REPLACE_NULL=1 | |
7605 | STDDEF_H=stddef.h | |
7606 | fi | |
7607 | if test -n "$STDDEF_H"; then | |
7608 | ||
7609 | ||
7610 | ||
7611 | ||
7612 | : | |
7613 | ||
7614 | ||
7615 | ||
7616 | ||
7617 | ||
7618 | ||
7619 | ||
7620 | if test $gl_cv_have_include_next = yes; then | |
7621 | gl_cv_next_stddef_h='<'stddef.h'>' | |
7622 | else | |
7623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 | |
7624 | $as_echo_n "checking absolute name of <stddef.h>... " >&6; } | |
7625 | if test "${gl_cv_next_stddef_h+set}" = set; then : | |
7626 | $as_echo_n "(cached) " >&6 | |
7627 | else | |
7628 | ||
7629 | if test $ac_cv_header_stddef_h = yes; then | |
7630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7631 | /* end confdefs.h. */ | |
7632 | #include <stddef.h> | |
7633 | ||
7634 | _ACEOF | |
7635 | case "$host_os" in | |
7636 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
7637 | *) gl_absname_cpp="$ac_cpp" ;; | |
7638 | esac | |
7639 | gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
7640 | sed -n '\#/stddef.h#{ | |
7641 | s#.*"\(.*/stddef.h\)".*#\1# | |
7642 | s#^/[^/]#//&# | |
7643 | p | |
7644 | q | |
7645 | }'`'"' | |
7646 | else | |
7647 | gl_cv_next_stddef_h='<'stddef.h'>' | |
7648 | fi | |
7649 | ||
7650 | fi | |
7651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 | |
7652 | $as_echo "$gl_cv_next_stddef_h" >&6; } | |
7653 | fi | |
7654 | NEXT_STDDEF_H=$gl_cv_next_stddef_h | |
7655 | ||
7656 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then | |
7657 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
7658 | gl_next_as_first_directive='<'stddef.h'>' | |
7659 | else | |
7660 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
7661 | gl_next_as_first_directive=$gl_cv_next_stddef_h | |
7662 | fi | |
7663 | NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive | |
7664 | ||
7665 | ||
7666 | ||
7667 | fi | |
7668 | ||
7669 | # Code from module stdint: | |
7670 | ||
7671 | ||
783e057b DJ |
7672 | |
7673 | if test $ac_cv_type_long_long_int = yes; then | |
7674 | HAVE_LONG_LONG_INT=1 | |
7675 | else | |
7676 | HAVE_LONG_LONG_INT=0 | |
7677 | fi | |
7678 | ||
7679 | ||
7680 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
7681 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
7682 | else | |
7683 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
7684 | fi | |
7685 | ||
7686 | ||
7687 | if test $ac_cv_header_inttypes_h = yes; then | |
7688 | HAVE_INTTYPES_H=1 | |
7689 | else | |
7690 | HAVE_INTTYPES_H=0 | |
7691 | fi | |
7692 | ||
7693 | ||
7694 | if test $ac_cv_header_sys_types_h = yes; then | |
7695 | HAVE_SYS_TYPES_H=1 | |
7696 | else | |
7697 | HAVE_SYS_TYPES_H=0 | |
7698 | fi | |
7699 | ||
7700 | ||
7701 | ||
7702 | ||
7703 | ||
f434ba03 | 7704 | |
783e057b DJ |
7705 | : |
7706 | ||
7707 | ||
7708 | ||
7709 | ||
7710 | ||
7711 | ||
7712 | ||
7713 | if test $gl_cv_have_include_next = yes; then | |
7714 | gl_cv_next_stdint_h='<'stdint.h'>' | |
7715 | else | |
81ecdfbb RW |
7716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 |
7717 | $as_echo_n "checking absolute name of <stdint.h>... " >&6; } | |
7718 | if test "${gl_cv_next_stdint_h+set}" = set; then : | |
7719 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
7720 | else |
7721 | ||
f434ba03 PA |
7722 | if test $ac_cv_header_stdint_h = yes; then |
7723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
7724 | /* end confdefs.h. */ |
7725 | #include <stdint.h> | |
7726 | ||
7727 | _ACEOF | |
f434ba03 PA |
7728 | case "$host_os" in |
7729 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
7730 | *) gl_absname_cpp="$ac_cpp" ;; | |
7731 | esac | |
7732 | gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
7733 | sed -n '\#/stdint.h#{ | |
7734 | s#.*"\(.*/stdint.h\)".*#\1# | |
7735 | s#^/[^/]#//&# | |
7736 | p | |
7737 | q | |
7738 | }'`'"' | |
7739 | else | |
7740 | gl_cv_next_stdint_h='<'stdint.h'>' | |
7741 | fi | |
783e057b DJ |
7742 | |
7743 | fi | |
81ecdfbb RW |
7744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 |
7745 | $as_echo "$gl_cv_next_stdint_h" >&6; } | |
783e057b DJ |
7746 | fi |
7747 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
7748 | ||
f434ba03 PA |
7749 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
7750 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
7751 | gl_next_as_first_directive='<'stdint.h'>' | |
7752 | else | |
7753 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
7754 | gl_next_as_first_directive=$gl_cv_next_stdint_h | |
7755 | fi | |
7756 | NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive | |
7757 | ||
783e057b DJ |
7758 | |
7759 | ||
7760 | if test $ac_cv_header_stdint_h = yes; then | |
7761 | HAVE_STDINT_H=1 | |
7762 | else | |
7763 | HAVE_STDINT_H=0 | |
7764 | fi | |
7765 | ||
7766 | ||
7767 | if test $ac_cv_header_stdint_h = yes; then | |
81ecdfbb RW |
7768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 |
7769 | $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } | |
7770 | if test "${gl_cv_header_working_stdint_h+set}" = set; then : | |
7771 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
7772 | else |
7773 | gl_cv_header_working_stdint_h=no | |
81ecdfbb | 7774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
7775 | /* end confdefs.h. */ |
7776 | ||
81ecdfbb | 7777 | |
783e057b DJ |
7778 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ |
7779 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
7780 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
7781 | #include <stdint.h> | |
7782 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
7783 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
7784 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
7785 | #endif | |
7786 | ||
7787 | ||
7788 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
7789 | included before <wchar.h>. */ | |
7790 | #include <stddef.h> | |
7791 | #include <signal.h> | |
7792 | #if HAVE_WCHAR_H | |
7793 | # include <stdio.h> | |
7794 | # include <time.h> | |
7795 | # include <wchar.h> | |
7796 | #endif | |
7797 | ||
7798 | ||
7799 | #ifdef INT8_MAX | |
7800 | int8_t a1 = INT8_MAX; | |
7801 | int8_t a1min = INT8_MIN; | |
7802 | #endif | |
7803 | #ifdef INT16_MAX | |
7804 | int16_t a2 = INT16_MAX; | |
7805 | int16_t a2min = INT16_MIN; | |
7806 | #endif | |
7807 | #ifdef INT32_MAX | |
7808 | int32_t a3 = INT32_MAX; | |
7809 | int32_t a3min = INT32_MIN; | |
7810 | #endif | |
7811 | #ifdef INT64_MAX | |
7812 | int64_t a4 = INT64_MAX; | |
7813 | int64_t a4min = INT64_MIN; | |
7814 | #endif | |
7815 | #ifdef UINT8_MAX | |
7816 | uint8_t b1 = UINT8_MAX; | |
7817 | #else | |
7818 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
7819 | #endif | |
7820 | #ifdef UINT16_MAX | |
7821 | uint16_t b2 = UINT16_MAX; | |
7822 | #endif | |
7823 | #ifdef UINT32_MAX | |
7824 | uint32_t b3 = UINT32_MAX; | |
7825 | #endif | |
7826 | #ifdef UINT64_MAX | |
7827 | uint64_t b4 = UINT64_MAX; | |
7828 | #endif | |
7829 | int_least8_t c1 = INT8_C (0x7f); | |
7830 | int_least8_t c1max = INT_LEAST8_MAX; | |
7831 | int_least8_t c1min = INT_LEAST8_MIN; | |
7832 | int_least16_t c2 = INT16_C (0x7fff); | |
7833 | int_least16_t c2max = INT_LEAST16_MAX; | |
7834 | int_least16_t c2min = INT_LEAST16_MIN; | |
7835 | int_least32_t c3 = INT32_C (0x7fffffff); | |
7836 | int_least32_t c3max = INT_LEAST32_MAX; | |
7837 | int_least32_t c3min = INT_LEAST32_MIN; | |
7838 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
7839 | int_least64_t c4max = INT_LEAST64_MAX; | |
7840 | int_least64_t c4min = INT_LEAST64_MIN; | |
7841 | uint_least8_t d1 = UINT8_C (0xff); | |
7842 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
7843 | uint_least16_t d2 = UINT16_C (0xffff); | |
7844 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
7845 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
7846 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
7847 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
7848 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
7849 | int_fast8_t e1 = INT_FAST8_MAX; | |
7850 | int_fast8_t e1min = INT_FAST8_MIN; | |
7851 | int_fast16_t e2 = INT_FAST16_MAX; | |
7852 | int_fast16_t e2min = INT_FAST16_MIN; | |
7853 | int_fast32_t e3 = INT_FAST32_MAX; | |
7854 | int_fast32_t e3min = INT_FAST32_MIN; | |
7855 | int_fast64_t e4 = INT_FAST64_MAX; | |
7856 | int_fast64_t e4min = INT_FAST64_MIN; | |
7857 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
7858 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
7859 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
7860 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
7861 | #ifdef INTPTR_MAX | |
7862 | intptr_t g = INTPTR_MAX; | |
7863 | intptr_t gmin = INTPTR_MIN; | |
7864 | #endif | |
7865 | #ifdef UINTPTR_MAX | |
7866 | uintptr_t h = UINTPTR_MAX; | |
7867 | #endif | |
7868 | intmax_t i = INTMAX_MAX; | |
7869 | uintmax_t j = UINTMAX_MAX; | |
7870 | ||
7871 | #include <limits.h> /* for CHAR_BIT */ | |
7872 | #define TYPE_MINIMUM(t) \ | |
7873 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
7874 | #define TYPE_MAXIMUM(t) \ | |
7875 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
7876 | struct s { | |
7877 | int check_PTRDIFF: | |
7878 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
7879 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
7880 | ? 1 : -1; | |
7881 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
7882 | int check_SIG_ATOMIC: | |
7883 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
7884 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
7885 | ? 1 : -1; | |
7886 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
7887 | int check_WCHAR: | |
7888 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
7889 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
7890 | ? 1 : -1; | |
7891 | /* Detect bug in mingw. */ | |
7892 | int check_WINT: | |
7893 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
7894 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
7895 | ? 1 : -1; | |
7896 | ||
f434ba03 PA |
7897 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ |
7898 | int check_UINT8_C: | |
7899 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
7900 | int check_UINT16_C: | |
7901 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
7902 | ||
7903 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
7904 | #ifdef UINT8_MAX | |
7905 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
7906 | #endif | |
7907 | #ifdef UINT16_MAX | |
7908 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
7909 | #endif | |
7910 | #ifdef UINT32_MAX | |
7911 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
7912 | #endif | |
7913 | #ifdef UINT64_MAX | |
7914 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
7915 | #endif | |
7916 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
7917 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
7918 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
7919 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
7920 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
7921 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
7922 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
7923 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
7924 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
7925 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
7926 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
7927 | }; | |
7928 | ||
7929 | int | |
7930 | main () | |
7931 | { | |
7932 | ||
7933 | ; | |
7934 | return 0; | |
7935 | } | |
7936 | _ACEOF | |
7937 | if ac_fn_c_try_compile "$LINENO"; then : | |
7938 | if test "$cross_compiling" = yes; then : | |
7939 | gl_cv_header_working_stdint_h=yes | |
7940 | ||
7941 | else | |
7942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7943 | /* end confdefs.h. */ | |
7944 | ||
7945 | ||
7946 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
7947 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
7948 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
7949 | #include <stdint.h> | |
7950 | ||
783e057b | 7951 | |
f434ba03 PA |
7952 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
7953 | included before <wchar.h>. */ | |
7954 | #include <stddef.h> | |
7955 | #include <signal.h> | |
7956 | #if HAVE_WCHAR_H | |
7957 | # include <stdio.h> | |
7958 | # include <time.h> | |
7959 | # include <wchar.h> | |
7960 | #endif | |
7961 | ||
7962 | ||
7963 | #include <stdio.h> | |
7964 | #include <string.h> | |
7965 | #define MVAL(macro) MVAL1(macro) | |
7966 | #define MVAL1(expression) #expression | |
7967 | static const char *macro_values[] = | |
7968 | { | |
7969 | #ifdef INT8_MAX | |
7970 | MVAL (INT8_MAX), | |
7971 | #endif | |
7972 | #ifdef INT16_MAX | |
7973 | MVAL (INT16_MAX), | |
7974 | #endif | |
7975 | #ifdef INT32_MAX | |
7976 | MVAL (INT32_MAX), | |
7977 | #endif | |
7978 | #ifdef INT64_MAX | |
7979 | MVAL (INT64_MAX), | |
7980 | #endif | |
783e057b | 7981 | #ifdef UINT8_MAX |
f434ba03 | 7982 | MVAL (UINT8_MAX), |
783e057b DJ |
7983 | #endif |
7984 | #ifdef UINT16_MAX | |
f434ba03 | 7985 | MVAL (UINT16_MAX), |
783e057b DJ |
7986 | #endif |
7987 | #ifdef UINT32_MAX | |
f434ba03 | 7988 | MVAL (UINT32_MAX), |
783e057b DJ |
7989 | #endif |
7990 | #ifdef UINT64_MAX | |
f434ba03 | 7991 | MVAL (UINT64_MAX), |
783e057b | 7992 | #endif |
f434ba03 PA |
7993 | NULL |
7994 | }; | |
783e057b DJ |
7995 | |
7996 | int | |
7997 | main () | |
7998 | { | |
7999 | ||
f434ba03 PA |
8000 | const char **mv; |
8001 | for (mv = macro_values; *mv != NULL; mv++) | |
8002 | { | |
8003 | const char *value = *mv; | |
8004 | /* Test whether it looks like a cast expression. */ | |
8005 | if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 | |
8006 | || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 | |
8007 | || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 | |
8008 | || strncmp (value, "((int)"/*)*/, 6) == 0 | |
8009 | || strncmp (value, "((signed short)"/*)*/, 15) == 0 | |
8010 | || strncmp (value, "((signed char)"/*)*/, 14) == 0) | |
8011 | return 1; | |
8012 | } | |
8013 | return 0; | |
8014 | ||
783e057b DJ |
8015 | ; |
8016 | return 0; | |
8017 | } | |
8018 | _ACEOF | |
f434ba03 | 8019 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 8020 | gl_cv_header_working_stdint_h=yes |
f434ba03 PA |
8021 | fi |
8022 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8023 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8024 | fi | |
8025 | ||
8026 | ||
783e057b | 8027 | fi |
81ecdfbb | 8028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 | 8029 | |
783e057b | 8030 | fi |
81ecdfbb RW |
8031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 |
8032 | $as_echo "$gl_cv_header_working_stdint_h" >&6; } | |
783e057b DJ |
8033 | fi |
8034 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
8035 | STDINT_H= | |
8036 | else | |
81ecdfbb RW |
8037 | for ac_header in sys/inttypes.h sys/bitypes.h |
8038 | do : | |
8039 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8040 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8041 | eval as_val=\$$as_ac_Header | |
8042 | if test "x$as_val" = x""yes; then : | |
783e057b | 8043 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8044 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
8045 | _ACEOF |
8046 | ||
8047 | fi | |
8048 | ||
8049 | done | |
8050 | ||
8051 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
8052 | HAVE_SYS_INTTYPES_H=1 | |
8053 | else | |
8054 | HAVE_SYS_INTTYPES_H=0 | |
8055 | fi | |
8056 | ||
8057 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
8058 | HAVE_SYS_BITYPES_H=1 | |
8059 | else | |
8060 | HAVE_SYS_BITYPES_H=0 | |
8061 | fi | |
8062 | ||
8063 | ||
8064 | ||
8065 | : | |
8066 | ||
8067 | ||
8068 | ||
8069 | ||
8070 | ||
8071 | ||
8072 | ||
8073 | ||
f434ba03 PA |
8074 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
8075 | ||
8076 | ||
8077 | for gltype in ptrdiff_t size_t ; do | |
8078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 | |
8079 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
8080 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8081 | $as_echo_n "(cached) " >&6 | |
8082 | else | |
8083 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
8084 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
8085 | included before <wchar.h>. */ | |
8086 | #include <stddef.h> | |
8087 | #include <signal.h> | |
8088 | #if HAVE_WCHAR_H | |
8089 | # include <stdio.h> | |
8090 | # include <time.h> | |
8091 | # include <wchar.h> | |
8092 | #endif | |
8093 | ||
8094 | #include <limits.h>"; then : | |
8095 | ||
8096 | else | |
8097 | result=unknown | |
8098 | fi | |
8099 | ||
8100 | eval gl_cv_bitsizeof_${gltype}=\$result | |
8101 | ||
8102 | fi | |
8103 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
8104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8105 | $as_echo "$ac_res" >&6; } | |
8106 | eval result=\$gl_cv_bitsizeof_${gltype} | |
8107 | if test $result = unknown; then | |
8108 | result=0 | |
8109 | fi | |
8110 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
8111 | cat >>confdefs.h <<_ACEOF | |
8112 | #define BITSIZEOF_${GLTYPE} $result | |
8113 | _ACEOF | |
8114 | ||
8115 | eval BITSIZEOF_${GLTYPE}=\$result | |
8116 | done | |
8117 | ||
8118 | ||
8119 | fi | |
8120 | ||
783e057b | 8121 | |
f434ba03 | 8122 | for gltype in sig_atomic_t wchar_t wint_t ; do |
81ecdfbb RW |
8123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 |
8124 | $as_echo_n "checking for bit size of $gltype... " >&6; } | |
8125 | if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8126 | $as_echo_n "(cached) " >&6 | |
8127 | else | |
8128 | if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " | |
8129 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
8130 | included before <wchar.h>. */ | |
8131 | #include <stddef.h> | |
8132 | #include <signal.h> | |
8133 | #if HAVE_WCHAR_H | |
8134 | # include <stdio.h> | |
8135 | # include <time.h> | |
8136 | # include <wchar.h> | |
8137 | #endif | |
8138 | ||
8139 | #include <limits.h>"; then : | |
8140 | ||
8141 | else | |
8142 | result=unknown | |
8143 | fi | |
8144 | ||
8145 | eval gl_cv_bitsizeof_${gltype}=\$result | |
8146 | ||
8147 | fi | |
8148 | eval ac_res=\$gl_cv_bitsizeof_${gltype} | |
8149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8150 | $as_echo "$ac_res" >&6; } | |
8151 | eval result=\$gl_cv_bitsizeof_${gltype} | |
8152 | if test $result = unknown; then | |
8153 | result=0 | |
8154 | fi | |
8155 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
8156 | cat >>confdefs.h <<_ACEOF | |
8157 | #define BITSIZEOF_${GLTYPE} $result | |
8158 | _ACEOF | |
783e057b | 8159 | |
81ecdfbb RW |
8160 | eval BITSIZEOF_${GLTYPE}=\$result |
8161 | done | |
783e057b DJ |
8162 | |
8163 | ||
8164 | ||
8165 | ||
81ecdfbb RW |
8166 | for gltype in sig_atomic_t wchar_t wint_t ; do |
8167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 | |
8168 | $as_echo_n "checking whether $gltype is signed... " >&6; } | |
8169 | if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8170 | $as_echo_n "(cached) " >&6 | |
783e057b | 8171 | else |
81ecdfbb | 8172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
8173 | /* end confdefs.h. */ |
8174 | ||
8175 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
8176 | included before <wchar.h>. */ | |
8177 | #include <stddef.h> | |
8178 | #include <signal.h> | |
8179 | #if HAVE_WCHAR_H | |
8180 | # include <stdio.h> | |
8181 | # include <time.h> | |
8182 | # include <wchar.h> | |
8183 | #endif | |
8184 | ||
8185 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
8186 | int | |
8187 | main () | |
8188 | { | |
8189 | ||
8190 | ; | |
8191 | return 0; | |
8192 | } | |
8193 | _ACEOF | |
81ecdfbb | 8194 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
8195 | result=yes |
8196 | else | |
81ecdfbb | 8197 | result=no |
20e95c23 | 8198 | fi |
81ecdfbb | 8199 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
8200 | eval gl_cv_type_${gltype}_signed=\$result |
8201 | ||
8202 | fi | |
81ecdfbb RW |
8203 | eval ac_res=\$gl_cv_type_${gltype}_signed |
8204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8205 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
8206 | eval result=\$gl_cv_type_${gltype}_signed |
8207 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
8208 | if test "$result" = yes; then | |
8209 | cat >>confdefs.h <<_ACEOF | |
8210 | #define HAVE_SIGNED_${GLTYPE} 1 | |
8211 | _ACEOF | |
8212 | ||
8213 | eval HAVE_SIGNED_${GLTYPE}=1 | |
8214 | else | |
8215 | eval HAVE_SIGNED_${GLTYPE}=0 | |
8216 | fi | |
8217 | done | |
8218 | ||
8219 | ||
8220 | gl_cv_type_ptrdiff_t_signed=yes | |
8221 | gl_cv_type_size_t_signed=no | |
f434ba03 | 8222 | if test $APPLE_UNIVERSAL_BUILD = 0; then |
783e057b DJ |
8223 | |
8224 | ||
f434ba03 | 8225 | for gltype in ptrdiff_t size_t ; do |
81ecdfbb RW |
8226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 |
8227 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
8228 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8229 | $as_echo_n "(cached) " >&6 | |
c906108c | 8230 | else |
783e057b DJ |
8231 | eval gl_cv_type_${gltype}_suffix=no |
8232 | eval result=\$gl_cv_type_${gltype}_signed | |
8233 | if test "$result" = yes; then | |
8234 | glsufu= | |
8235 | else | |
8236 | glsufu=u | |
8237 | fi | |
8238 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
8239 | case $glsuf in | |
8240 | '') gltype1='int';; | |
f434ba03 PA |
8241 | l) gltype1='long int';; |
8242 | ll) gltype1='long long int';; | |
8243 | i64) gltype1='__int64';; | |
8244 | u) gltype1='unsigned int';; | |
8245 | ul) gltype1='unsigned long int';; | |
8246 | ull) gltype1='unsigned long long int';; | |
783e057b DJ |
8247 | ui64)gltype1='unsigned __int64';; |
8248 | esac | |
81ecdfbb | 8249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
8250 | /* end confdefs.h. */ |
8251 | ||
8252 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
8253 | included before <wchar.h>. */ | |
8254 | #include <stddef.h> | |
8255 | #include <signal.h> | |
8256 | #if HAVE_WCHAR_H | |
8257 | # include <stdio.h> | |
8258 | # include <time.h> | |
8259 | # include <wchar.h> | |
8260 | #endif | |
8261 | ||
8262 | extern $gltype foo; | |
8263 | extern $gltype1 foo; | |
8264 | int | |
8265 | main () | |
8266 | { | |
8267 | ||
8268 | ; | |
8269 | return 0; | |
8270 | } | |
8271 | _ACEOF | |
81ecdfbb | 8272 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 8273 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 8274 | fi |
81ecdfbb | 8275 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
8276 | eval result=\$gl_cv_type_${gltype}_suffix |
8277 | test "$result" != no && break | |
8278 | done | |
8279 | fi | |
81ecdfbb RW |
8280 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
8281 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8282 | $as_echo "$ac_res" >&6; } | |
783e057b DJ |
8283 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` |
8284 | eval result=\$gl_cv_type_${gltype}_suffix | |
8285 | test "$result" = no && result= | |
8286 | eval ${GLTYPE}_SUFFIX=\$result | |
8287 | cat >>confdefs.h <<_ACEOF | |
8288 | #define ${GLTYPE}_SUFFIX $result | |
8289 | _ACEOF | |
8290 | ||
8291 | done | |
8292 | ||
8293 | ||
783e057b DJ |
8294 | fi |
8295 | ||
8296 | ||
f434ba03 PA |
8297 | for gltype in sig_atomic_t wchar_t wint_t ; do |
8298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 | |
8299 | $as_echo_n "checking for $gltype integer literal suffix... " >&6; } | |
8300 | if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : | |
81ecdfbb | 8301 | $as_echo_n "(cached) " >&6 |
783e057b | 8302 | else |
f434ba03 PA |
8303 | eval gl_cv_type_${gltype}_suffix=no |
8304 | eval result=\$gl_cv_type_${gltype}_signed | |
8305 | if test "$result" = yes; then | |
8306 | glsufu= | |
8307 | else | |
8308 | glsufu=u | |
8309 | fi | |
8310 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
8311 | case $glsuf in | |
8312 | '') gltype1='int';; | |
8313 | l) gltype1='long int';; | |
8314 | ll) gltype1='long long int';; | |
8315 | i64) gltype1='__int64';; | |
8316 | u) gltype1='unsigned int';; | |
8317 | ul) gltype1='unsigned long int';; | |
8318 | ull) gltype1='unsigned long long int';; | |
8319 | ui64)gltype1='unsigned __int64';; | |
8320 | esac | |
8321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
81ecdfbb | 8322 | /* end confdefs.h. */ |
f434ba03 PA |
8323 | |
8324 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
8325 | included before <wchar.h>. */ | |
8326 | #include <stddef.h> | |
8327 | #include <signal.h> | |
8328 | #if HAVE_WCHAR_H | |
8329 | # include <stdio.h> | |
8330 | # include <time.h> | |
8331 | # include <wchar.h> | |
8332 | #endif | |
8333 | ||
8334 | extern $gltype foo; | |
8335 | extern $gltype1 foo; | |
8336 | int | |
8337 | main () | |
8338 | { | |
8339 | ||
8340 | ; | |
8341 | return 0; | |
8342 | } | |
783e057b | 8343 | _ACEOF |
81ecdfbb | 8344 | if ac_fn_c_try_compile "$LINENO"; then : |
f434ba03 | 8345 | eval gl_cv_type_${gltype}_suffix=\$glsuf |
783e057b | 8346 | fi |
81ecdfbb | 8347 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
f434ba03 PA |
8348 | eval result=\$gl_cv_type_${gltype}_suffix |
8349 | test "$result" != no && break | |
8350 | done | |
783e057b | 8351 | fi |
f434ba03 PA |
8352 | eval ac_res=\$gl_cv_type_${gltype}_suffix |
8353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8354 | $as_echo "$ac_res" >&6; } | |
8355 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
8356 | eval result=\$gl_cv_type_${gltype}_suffix | |
8357 | test "$result" = no && result= | |
8358 | eval ${GLTYPE}_SUFFIX=\$result | |
8359 | cat >>confdefs.h <<_ACEOF | |
8360 | #define ${GLTYPE}_SUFFIX $result | |
8361 | _ACEOF | |
8362 | ||
8363 | done | |
8364 | ||
8365 | ||
8366 | ||
8367 | STDINT_H=stdint.h | |
783e057b DJ |
8368 | fi |
8369 | ||
8370 | ||
f434ba03 PA |
8371 | # Code from module string: |
8372 | ||
8373 | ||
8374 | ||
8375 | # Code from module warn-on-use: | |
8376 | # Code from module wchar: | |
8377 | ||
8378 | ||
8379 | ||
8380 | ||
783e057b DJ |
8381 | : |
8382 | ||
8383 | ||
8384 | ||
8385 | ||
8386 | ||
783e057b DJ |
8387 | |
8388 | ||
8389 | ||
8390 | ||
8391 | : | |
8392 | ||
8393 | ||
8394 | ||
8395 | ||
8396 | ||
8397 | ||
8398 | ||
8399 | if test $gl_cv_have_include_next = yes; then | |
8400 | gl_cv_next_wchar_h='<'wchar.h'>' | |
8401 | else | |
81ecdfbb RW |
8402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 |
8403 | $as_echo_n "checking absolute name of <wchar.h>... " >&6; } | |
8404 | if test "${gl_cv_next_wchar_h+set}" = set; then : | |
8405 | $as_echo_n "(cached) " >&6 | |
783e057b DJ |
8406 | else |
8407 | ||
f434ba03 PA |
8408 | if test $ac_cv_header_wchar_h = yes; then |
8409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
783e057b DJ |
8410 | /* end confdefs.h. */ |
8411 | #include <wchar.h> | |
8412 | ||
8413 | _ACEOF | |
f434ba03 PA |
8414 | case "$host_os" in |
8415 | aix*) gl_absname_cpp="$ac_cpp -C" ;; | |
8416 | *) gl_absname_cpp="$ac_cpp" ;; | |
8417 | esac | |
8418 | gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | | |
8419 | sed -n '\#/wchar.h#{ | |
8420 | s#.*"\(.*/wchar.h\)".*#\1# | |
8421 | s#^/[^/]#//&# | |
8422 | p | |
8423 | q | |
8424 | }'`'"' | |
8425 | else | |
8426 | gl_cv_next_wchar_h='<'wchar.h'>' | |
8427 | fi | |
783e057b DJ |
8428 | |
8429 | fi | |
81ecdfbb RW |
8430 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 |
8431 | $as_echo "$gl_cv_next_wchar_h" >&6; } | |
783e057b DJ |
8432 | fi |
8433 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
8434 | ||
f434ba03 PA |
8435 | if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then |
8436 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' | |
8437 | gl_next_as_first_directive='<'wchar.h'>' | |
8438 | else | |
8439 | # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' | |
8440 | gl_next_as_first_directive=$gl_cv_next_wchar_h | |
8441 | fi | |
8442 | NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive | |
8443 | ||
8444 | ||
8445 | ||
8446 | if test $ac_cv_header_wchar_h = yes; then | |
8447 | HAVE_WCHAR_H=1 | |
8448 | else | |
8449 | HAVE_WCHAR_H=0 | |
8450 | fi | |
8451 | ||
8452 | ||
8453 | ||
8454 | if test $gt_cv_c_wint_t = yes; then | |
8455 | HAVE_WINT_T=1 | |
8456 | else | |
8457 | HAVE_WINT_T=0 | |
8458 | fi | |
8459 | ||
8460 | ||
8461 | ||
8462 | for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do | |
8463 | as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` | |
8464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 | |
8465 | $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } | |
8466 | if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8467 | $as_echo_n "(cached) " >&6 | |
8468 | else | |
8469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8470 | /* end confdefs.h. */ | |
8471 | ||
8472 | /* Some systems require additional headers. */ | |
8473 | #ifndef __GLIBC__ | |
8474 | # include <stddef.h> | |
8475 | # include <stdio.h> | |
8476 | # include <time.h> | |
8477 | #endif | |
8478 | #include <wchar.h> | |
8479 | ||
8480 | int | |
8481 | main () | |
8482 | { | |
8483 | #undef $gl_func | |
8484 | (void) $gl_func; | |
8485 | ; | |
8486 | return 0; | |
8487 | } | |
8488 | _ACEOF | |
8489 | if ac_fn_c_try_compile "$LINENO"; then : | |
8490 | eval "$as_gl_Symbol=yes" | |
8491 | else | |
8492 | eval "$as_gl_Symbol=no" | |
8493 | fi | |
8494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8495 | fi | |
8496 | eval ac_res=\$$as_gl_Symbol | |
8497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8498 | $as_echo "$ac_res" >&6; } | |
8499 | eval as_val=\$$as_gl_Symbol | |
8500 | if test "x$as_val" = x""yes; then : | |
8501 | cat >>confdefs.h <<_ACEOF | |
8502 | #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 | |
8503 | _ACEOF | |
8504 | ||
8505 | eval ac_cv_have_decl_$gl_func=yes | |
8506 | fi | |
8507 | done | |
8508 | ||
8509 | ||
8510 | # Code from module dummy: | |
8511 | # End of code from modules | |
8512 | ||
8513 | ||
c906108c | 8514 | |
c906108c | 8515 | |
c906108c | 8516 | |
c906108c | 8517 | |
c906108c | 8518 | |
c906108c | 8519 | |
c906108c | 8520 | |
783e057b DJ |
8521 | gltests_libdeps= |
8522 | gltests_ltlibdeps= | |
20e95c23 | 8523 | |
20e95c23 | 8524 | |
20e95c23 | 8525 | |
f434ba03 PA |
8526 | |
8527 | ||
8528 | ||
8529 | ||
8530 | ||
8531 | ||
783e057b | 8532 | gl_source_base='tests' |
f434ba03 PA |
8533 | gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS |
8534 | ||
8535 | gl_module_indicator_condition=$gltests_WITNESS | |
8536 | ||
8537 | ||
8538 | ||
8539 | ||
8540 | ||
c906108c | 8541 | |
bec39cab | 8542 | |
bec39cab | 8543 | |
783e057b DJ |
8544 | |
8545 | LIBGNU_LIBDEPS="$gl_libdeps" | |
8546 | ||
8547 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
8548 | ||
8549 | ||
e28b3332 | 8550 | |
d5af19ba DJ |
8551 | # For Makefile dependencies. |
8552 | GNULIB_STDINT_H= | |
8553 | if test x"$STDINT_H" != x; then | |
8554 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
8555 | fi | |
8556 | ||
8557 | ||
bec39cab AC |
8558 | PACKAGE=gdb |
8559 | ||
8560 | cat >>confdefs.h <<_ACEOF | |
8561 | #define PACKAGE "$PACKAGE" | |
8562 | _ACEOF | |
8563 | ||
8564 | ||
8565 | ||
f06e05e0 JK |
8566 | # We never need to detect it in this sub-configure. |
8567 | # But preserve it for config.status --recheck. | |
5048e516 | 8568 | |
5048e516 JK |
8569 | |
8570 | ||
8571 | MAKEINFO_EXTRA_FLAGS="" | |
8572 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
8573 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
8574 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
8575 | $as_echo_n "(cached) " >&6 | |
8576 | else | |
8577 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
8578 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
8579 | gdb_cv_have_makeinfo_click=yes | |
8580 | else | |
8581 | gdb_cv_have_makeinfo_click=no | |
8582 | fi | |
8583 | fi | |
8584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
8585 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
8586 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
8587 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
8588 | fi | |
8589 | ||
8590 | ||
e28b3332 DJ |
8591 | # GDB does not use automake, but gnulib does. This line lets us |
8592 | # generate its Makefile.in. | |
81ecdfbb RW |
8593 | am__api_version='1.11' |
8594 | ||
e28b3332 DJ |
8595 | # Find a good install program. We prefer a C program (faster), |
8596 | # so one script is as good as another. But avoid the broken or | |
8597 | # incompatible versions: | |
8598 | # SysV /etc/install, /usr/sbin/install | |
8599 | # SunOS /usr/etc/install | |
8600 | # IRIX /sbin/install | |
8601 | # AIX /bin/install | |
8602 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
8603 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
8604 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
8605 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
8606 | # OS/2's system install, which has a completely different semantic | |
8607 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 8608 | # Reject install programs that cannot install multiple files. |
81ecdfbb RW |
8609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
8610 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
e28b3332 | 8611 | if test -z "$INSTALL"; then |
81ecdfbb RW |
8612 | if test "${ac_cv_path_install+set}" = set; then : |
8613 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
8614 | else |
8615 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8616 | for as_dir in $PATH | |
8617 | do | |
8618 | IFS=$as_save_IFS | |
8619 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8620 | # Account for people who put trailing slashes in PATH elements. |
8621 | case $as_dir/ in #(( | |
8622 | ./ | .// | /[cC]/* | \ | |
e28b3332 | 8623 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
81ecdfbb | 8624 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
e28b3332 DJ |
8625 | /usr/ucb/* ) ;; |
8626 | *) | |
8627 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
8628 | # Don't use installbsd from OSF since it installs stuff as root | |
8629 | # by default. | |
8630 | for ac_prog in ginstall scoinst install; do | |
8631 | for ac_exec_ext in '' $ac_executable_extensions; do | |
81ecdfbb | 8632 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then |
e28b3332 DJ |
8633 | if test $ac_prog = install && |
8634 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
8635 | # AIX install. It has an incompatible calling convention. | |
8636 | : | |
8637 | elif test $ac_prog = install && | |
8638 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
8639 | # program-specific install script used by HP pwplus--don't use. | |
8640 | : | |
8641 | else | |
85541719 DE |
8642 | rm -rf conftest.one conftest.two conftest.dir |
8643 | echo one > conftest.one | |
8644 | echo two > conftest.two | |
8645 | mkdir conftest.dir | |
8646 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
8647 | test -s conftest.one && test -s conftest.two && | |
8648 | test -s conftest.dir/conftest.one && | |
8649 | test -s conftest.dir/conftest.two | |
8650 | then | |
8651 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
8652 | break 3 | |
8653 | fi | |
e28b3332 DJ |
8654 | fi |
8655 | fi | |
8656 | done | |
8657 | done | |
8658 | ;; | |
8659 | esac | |
81ecdfbb RW |
8660 | |
8661 | done | |
8662 | IFS=$as_save_IFS | |
e28b3332 | 8663 | |
85541719 | 8664 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
8665 | |
8666 | fi | |
8667 | if test "${ac_cv_path_install+set}" = set; then | |
8668 | INSTALL=$ac_cv_path_install | |
8669 | else | |
85541719 DE |
8670 | # As a last resort, use the slow shell script. Don't cache a |
8671 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 8672 | # break other packages using the cache if that directory is |
85541719 | 8673 | # removed, or if the value is a relative name. |
e28b3332 DJ |
8674 | INSTALL=$ac_install_sh |
8675 | fi | |
8676 | fi | |
81ecdfbb RW |
8677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
8678 | $as_echo "$INSTALL" >&6; } | |
e28b3332 DJ |
8679 | |
8680 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
8681 | # It thinks the first close brace ends the variable substitution. | |
8682 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
8683 | ||
8684 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
8685 | ||
8686 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
8687 | ||
81ecdfbb RW |
8688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 |
8689 | $as_echo_n "checking whether build environment is sane... " >&6; } | |
e28b3332 DJ |
8690 | # Just in case |
8691 | sleep 1 | |
8692 | echo timestamp > conftest.file | |
81ecdfbb RW |
8693 | # Reject unsafe characters in $srcdir or the absolute working directory |
8694 | # name. Accept space and tab only in the latter. | |
8695 | am_lf=' | |
8696 | ' | |
8697 | case `pwd` in | |
8698 | *[\\\"\#\$\&\'\`$am_lf]*) | |
8699 | as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; | |
8700 | esac | |
8701 | case $srcdir in | |
8702 | *[\\\"\#\$\&\'\`$am_lf\ \ ]*) | |
8703 | as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; | |
8704 | esac | |
8705 | ||
e28b3332 DJ |
8706 | # Do `set' in a subshell so we don't clobber the current shell's |
8707 | # arguments. Must try -L first in case configure is actually a | |
8708 | # symlink; some systems play weird games with the mod time of symlinks | |
8709 | # (eg FreeBSD returns the mod time of the symlink's containing | |
8710 | # directory). | |
8711 | if ( | |
81ecdfbb | 8712 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
e28b3332 DJ |
8713 | if test "$*" = "X"; then |
8714 | # -L didn't work. | |
81ecdfbb | 8715 | set X `ls -t "$srcdir/configure" conftest.file` |
e28b3332 DJ |
8716 | fi |
8717 | rm -f conftest.file | |
8718 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
8719 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
8720 | ||
8721 | # If neither matched, then we have a broken ls. This can happen | |
8722 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
8723 | # broken ls alias from the environment. This has actually | |
8724 | # happened. Such a system could not be considered "sane". | |
81ecdfbb RW |
8725 | as_fn_error "ls -t appears to fail. Make sure there is not a broken |
8726 | alias in your environment" "$LINENO" 5 | |
e28b3332 DJ |
8727 | fi |
8728 | ||
8729 | test "$2" = conftest.file | |
8730 | ) | |
8731 | then | |
8732 | # Ok. | |
8733 | : | |
8734 | else | |
81ecdfbb RW |
8735 | as_fn_error "newly created file is older than distributed files! |
8736 | Check your system clock" "$LINENO" 5 | |
e28b3332 | 8737 | fi |
81ecdfbb RW |
8738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
8739 | $as_echo "yes" >&6; } | |
e28b3332 | 8740 | test "$program_prefix" != NONE && |
81ecdfbb | 8741 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
e28b3332 DJ |
8742 | # Use a double $ so make ignores it. |
8743 | test "$program_suffix" != NONE && | |
81ecdfbb RW |
8744 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
8745 | # Double any \ or $. | |
e28b3332 | 8746 | # By default was `s,x,x', remove it if useless. |
81ecdfbb RW |
8747 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
8748 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
e28b3332 DJ |
8749 | |
8750 | # expand $ac_aux_dir to an absolute path | |
8751 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
8752 | ||
81ecdfbb RW |
8753 | if test x"${MISSING+set}" != xset; then |
8754 | case $am_aux_dir in | |
8755 | *\ * | *\ *) | |
8756 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
8757 | *) | |
8758 | MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
8759 | esac | |
8760 | fi | |
e28b3332 DJ |
8761 | # Use eval to expand $SHELL |
8762 | if eval "$MISSING --run true"; then | |
8763 | am_missing_run="$MISSING --run " | |
8764 | else | |
8765 | am_missing_run= | |
81ecdfbb RW |
8766 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 |
8767 | $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
8768 | fi | |
8769 | ||
8770 | if test x"${install_sh}" != xset; then | |
8771 | case $am_aux_dir in | |
8772 | *\ * | *\ *) | |
8773 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
8774 | *) | |
8775 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
8776 | esac | |
8777 | fi | |
8778 | ||
8779 | # Installed binaries are usually stripped using `strip' when the user | |
8780 | # run `make install-strip'. However `strip' might not be the right | |
8781 | # tool to use in cross-compilation environments, therefore Automake | |
8782 | # will honor the `STRIP' environment variable to overrule this program. | |
8783 | if test "$cross_compiling" != no; then | |
8784 | if test -n "$ac_tool_prefix"; then | |
8785 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
8786 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
8787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8788 | $as_echo_n "checking for $ac_word... " >&6; } | |
8789 | if test "${ac_cv_prog_STRIP+set}" = set; then : | |
8790 | $as_echo_n "(cached) " >&6 | |
8791 | else | |
8792 | if test -n "$STRIP"; then | |
8793 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
8794 | else | |
8795 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8796 | for as_dir in $PATH | |
8797 | do | |
8798 | IFS=$as_save_IFS | |
8799 | test -z "$as_dir" && as_dir=. | |
8800 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8801 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8802 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
8803 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8804 | break 2 | |
8805 | fi | |
8806 | done | |
8807 | done | |
8808 | IFS=$as_save_IFS | |
8809 | ||
8810 | fi | |
8811 | fi | |
8812 | STRIP=$ac_cv_prog_STRIP | |
8813 | if test -n "$STRIP"; then | |
8814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
8815 | $as_echo "$STRIP" >&6; } | |
8816 | else | |
8817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8818 | $as_echo "no" >&6; } | |
8819 | fi | |
8820 | ||
8821 | ||
8822 | fi | |
8823 | if test -z "$ac_cv_prog_STRIP"; then | |
8824 | ac_ct_STRIP=$STRIP | |
8825 | # Extract the first word of "strip", so it can be a program name with args. | |
8826 | set dummy strip; ac_word=$2 | |
8827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8828 | $as_echo_n "checking for $ac_word... " >&6; } | |
8829 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : | |
8830 | $as_echo_n "(cached) " >&6 | |
8831 | else | |
8832 | if test -n "$ac_ct_STRIP"; then | |
8833 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
8834 | else | |
8835 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8836 | for as_dir in $PATH | |
8837 | do | |
8838 | IFS=$as_save_IFS | |
8839 | test -z "$as_dir" && as_dir=. | |
8840 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8841 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8842 | ac_cv_prog_ac_ct_STRIP="strip" | |
8843 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8844 | break 2 | |
8845 | fi | |
8846 | done | |
8847 | done | |
8848 | IFS=$as_save_IFS | |
8849 | ||
8850 | fi | |
8851 | fi | |
8852 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
8853 | if test -n "$ac_ct_STRIP"; then | |
8854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
8855 | $as_echo "$ac_ct_STRIP" >&6; } | |
8856 | else | |
8857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8858 | $as_echo "no" >&6; } | |
8859 | fi | |
8860 | ||
8861 | if test "x$ac_ct_STRIP" = x; then | |
8862 | STRIP=":" | |
8863 | else | |
8864 | case $cross_compiling:$ac_tool_warned in | |
8865 | yes:) | |
8866 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
8867 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
8868 | ac_tool_warned=yes ;; | |
8869 | esac | |
8870 | STRIP=$ac_ct_STRIP | |
8871 | fi | |
8872 | else | |
8873 | STRIP="$ac_cv_prog_STRIP" | |
8874 | fi | |
8875 | ||
8876 | fi | |
8877 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
8878 | ||
8879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 | |
8880 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } | |
8881 | if test -z "$MKDIR_P"; then | |
8882 | if test "${ac_cv_path_mkdir+set}" = set; then : | |
8883 | $as_echo_n "(cached) " >&6 | |
8884 | else | |
8885 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8886 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
8887 | do | |
8888 | IFS=$as_save_IFS | |
8889 | test -z "$as_dir" && as_dir=. | |
8890 | for ac_prog in mkdir gmkdir; do | |
8891 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8892 | { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue | |
8893 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
8894 | 'mkdir (GNU coreutils) '* | \ | |
8895 | 'mkdir (coreutils) '* | \ | |
8896 | 'mkdir (fileutils) '4.1*) | |
8897 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext | |
8898 | break 3;; | |
8899 | esac | |
8900 | done | |
8901 | done | |
e28b3332 | 8902 | done |
81ecdfbb RW |
8903 | IFS=$as_save_IFS |
8904 | ||
8905 | fi | |
8906 | ||
8907 | if test "${ac_cv_path_mkdir+set}" = set; then | |
8908 | MKDIR_P="$ac_cv_path_mkdir -p" | |
e28b3332 | 8909 | else |
81ecdfbb RW |
8910 | # As a last resort, use the slow shell script. Don't cache a |
8911 | # value for MKDIR_P within a source directory, because that will | |
8912 | # break other packages using the cache if that directory is | |
8913 | # removed, or if the value is a relative name. | |
8914 | test -d ./--version && rmdir ./--version | |
8915 | MKDIR_P="$ac_install_sh -d" | |
e28b3332 DJ |
8916 | fi |
8917 | fi | |
81ecdfbb RW |
8918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
8919 | $as_echo "$MKDIR_P" >&6; } | |
8920 | ||
f434ba03 | 8921 | |
81ecdfbb RW |
8922 | mkdir_p="$MKDIR_P" |
8923 | case $mkdir_p in | |
8924 | [\\/$]* | ?:[\\/]*) ;; | |
8925 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; | |
8926 | esac | |
e28b3332 DJ |
8927 | |
8928 | for ac_prog in gawk mawk nawk awk | |
8929 | do | |
8930 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8931 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
8932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
8933 | $as_echo_n "checking for $ac_word... " >&6; } | |
8934 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
8935 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
8936 | else |
8937 | if test -n "$AWK"; then | |
8938 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
8939 | else | |
8940 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8941 | for as_dir in $PATH | |
8942 | do | |
8943 | IFS=$as_save_IFS | |
8944 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
8945 | for ac_exec_ext in '' $ac_executable_extensions; do |
8946 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
e28b3332 | 8947 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 8948 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
e28b3332 DJ |
8949 | break 2 |
8950 | fi | |
8951 | done | |
81ecdfbb RW |
8952 | done |
8953 | IFS=$as_save_IFS | |
e28b3332 DJ |
8954 | |
8955 | fi | |
8956 | fi | |
8957 | AWK=$ac_cv_prog_AWK | |
8958 | if test -n "$AWK"; then | |
81ecdfbb RW |
8959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
8960 | $as_echo "$AWK" >&6; } | |
e28b3332 | 8961 | else |
81ecdfbb RW |
8962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
8963 | $as_echo "no" >&6; } | |
e28b3332 DJ |
8964 | fi |
8965 | ||
81ecdfbb | 8966 | |
e28b3332 DJ |
8967 | test -n "$AWK" && break |
8968 | done | |
8969 | ||
81ecdfbb | 8970 | ac_config_commands="$ac_config_commands depfiles" |
e28b3332 DJ |
8971 | |
8972 | ||
8973 | am_make=${MAKE-make} | |
8974 | cat > confinc << 'END' | |
8975 | am__doit: | |
81ecdfbb | 8976 | @echo this is the am__doit target |
e28b3332 DJ |
8977 | .PHONY: am__doit |
8978 | END | |
8979 | # If we don't find an include directive, just comment out the code. | |
81ecdfbb RW |
8980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 |
8981 | $as_echo_n "checking for style of include used by $am_make... " >&6; } | |
e28b3332 DJ |
8982 | am__include="#" |
8983 | am__quote= | |
8984 | _am_result=none | |
8985 | # First try GNU make style include. | |
8986 | echo "include confinc" > confmf | |
81ecdfbb RW |
8987 | # Ignore all kinds of additional output from `make'. |
8988 | case `$am_make -s -f confmf 2> /dev/null` in #( | |
8989 | *the\ am__doit\ target*) | |
8990 | am__include=include | |
8991 | am__quote= | |
8992 | _am_result=GNU | |
8993 | ;; | |
8994 | esac | |
e28b3332 DJ |
8995 | # Now try BSD make style include. |
8996 | if test "$am__include" = "#"; then | |
8997 | echo '.include "confinc"' > confmf | |
81ecdfbb RW |
8998 | case `$am_make -s -f confmf 2> /dev/null` in #( |
8999 | *the\ am__doit\ target*) | |
9000 | am__include=.include | |
9001 | am__quote="\"" | |
9002 | _am_result=BSD | |
9003 | ;; | |
9004 | esac | |
e28b3332 DJ |
9005 | fi |
9006 | ||
9007 | ||
81ecdfbb RW |
9008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 |
9009 | $as_echo "$_am_result" >&6; } | |
e28b3332 DJ |
9010 | rm -f confinc confmf |
9011 | ||
81ecdfbb RW |
9012 | # Check whether --enable-dependency-tracking was given. |
9013 | if test "${enable_dependency_tracking+set}" = set; then : | |
9014 | enableval=$enable_dependency_tracking; | |
9015 | fi | |
e28b3332 | 9016 | |
e28b3332 DJ |
9017 | if test "x$enable_dependency_tracking" != xno; then |
9018 | am_depcomp="$ac_aux_dir/depcomp" | |
9019 | AMDEPBACKSLASH='\' | |
9020 | fi | |
81ecdfbb | 9021 | if test "x$enable_dependency_tracking" != xno; then |
e28b3332 DJ |
9022 | AMDEP_TRUE= |
9023 | AMDEP_FALSE='#' | |
9024 | else | |
9025 | AMDEP_TRUE='#' | |
9026 | AMDEP_FALSE= | |
9027 | fi | |
9028 | ||
9029 | ||
81ecdfbb RW |
9030 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
9031 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
9032 | # is not polluted with repeated "-I." | |
9033 | am__isrc=' -I$(srcdir)' | |
9034 | # test to see if srcdir already configured | |
9035 | if test -f $srcdir/config.status; then | |
9036 | as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 | |
9037 | fi | |
e28b3332 DJ |
9038 | fi |
9039 | ||
9040 | # test whether we have cygpath | |
9041 | if test -z "$CYGPATH_W"; then | |
9042 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
9043 | CYGPATH_W='cygpath -w' | |
9044 | else | |
9045 | CYGPATH_W=echo | |
9046 | fi | |
9047 | fi | |
9048 | ||
9049 | ||
9050 | # Define the identity of the package. | |
9051 | PACKAGE=gdb | |
9052 | VERSION=UNUSED-VERSION | |
9053 | ||
9054 | ||
9055 | # Some tools Automake needs. | |
9056 | ||
9057 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
9058 | ||
9059 | ||
9060 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
9061 | ||
9062 | ||
9063 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
9064 | ||
9065 | ||
9066 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
9067 | ||
9068 | ||
9069 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
9070 | ||
e28b3332 DJ |
9071 | # We need awk for the "check" target. The system "awk" is bad on |
9072 | # some platforms. | |
9073 | # Always define AMTAR for backward compatibility. | |
9074 | ||
9075 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
9076 | ||
9077 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
9078 | ||
9079 | ||
9080 | ||
9081 | ||
9082 | depcc="$CC" am_compiler_list= | |
9083 | ||
81ecdfbb RW |
9084 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
9085 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
9086 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
9087 | $as_echo_n "(cached) " >&6 | |
e28b3332 DJ |
9088 | else |
9089 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
9090 | # We make a subdir and do the tests there. Otherwise we can end up | |
9091 | # making bogus files that we don't know about and never remove. For | |
9092 | # instance it was reported that on HP-UX the gcc test will end up | |
9093 | # making a dummy file named `D' -- because `-MD' means `put the output | |
9094 | # in D'. | |
9095 | mkdir conftest.dir | |
9096 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
9097 | # using a relative directory. | |
9098 | cp "$am_depcomp" conftest.dir | |
9099 | cd conftest.dir | |
9100 | # We will build objects and dependencies in a subdirectory because | |
9101 | # it helps to detect inapplicable dependency modes. For instance | |
9102 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
9103 | # side effect of compilation, but ICC will put the dependencies in | |
9104 | # the current directory while Tru64 will put them in the object | |
9105 | # directory. | |
9106 | mkdir sub | |
9107 | ||
9108 | am_cv_CC_dependencies_compiler_type=none | |
9109 | if test "$am_compiler_list" = ""; then | |
9110 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
9111 | fi | |
81ecdfbb RW |
9112 | am__universal=false |
9113 | case " $depcc " in #( | |
9114 | *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
9115 | esac | |
9116 | ||
e28b3332 DJ |
9117 | for depmode in $am_compiler_list; do |
9118 | # Setup a source with many dependencies, because some compilers | |
9119 | # like to wrap large dependency lists on column 80 (with \), and | |
9120 | # we should not choose a depcomp mode which is confused by this. | |
9121 | # | |
9122 | # We need to recreate these files for each test, as the compiler may | |
9123 | # overwrite some of them when testing with obscure command lines. | |
9124 | # This happens at least with the AIX C compiler. | |
9125 | : > sub/conftest.c | |
9126 | for i in 1 2 3 4 5 6; do | |
9127 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
9128 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
9129 | # Solaris 8's {/usr,}/bin/sh. | |
9130 | touch sub/conftst$i.h | |
9131 | done | |
9132 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
9133 | ||
81ecdfbb RW |
9134 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
9135 | # mode. It turns out that the SunPro C++ compiler does not properly | |
9136 | # handle `-M -o', and we need to detect this. Also, some Intel | |
9137 | # versions had trouble with output in subdirs | |
9138 | am__obj=sub/conftest.${OBJEXT-o} | |
9139 | am__minus_obj="-o $am__obj" | |
e28b3332 | 9140 | case $depmode in |
81ecdfbb RW |
9141 | gcc) |
9142 | # This depmode causes a compiler race in universal mode. | |
9143 | test "$am__universal" = false || continue | |
9144 | ;; | |
e28b3332 DJ |
9145 | nosideeffect) |
9146 | # after this tag, mechanisms are not by side-effect, so they'll | |
9147 | # only be used when explicitly requested | |
9148 | if test "x$enable_dependency_tracking" = xyes; then | |
9149 | continue | |
9150 | else | |
9151 | break | |
9152 | fi | |
9153 | ;; | |
81ecdfbb RW |
9154 | msvisualcpp | msvcmsys) |
9155 | # This compiler won't grok `-c -o', but also, the minuso test has | |
9156 | # not run yet. These depmodes are late enough in the game, and | |
9157 | # so weak that their functioning should not be impacted. | |
9158 | am__obj=conftest.${OBJEXT-o} | |
9159 | am__minus_obj= | |
9160 | ;; | |
e28b3332 DJ |
9161 | none) break ;; |
9162 | esac | |
e28b3332 | 9163 | if depmode=$depmode \ |
81ecdfbb | 9164 | source=sub/conftest.c object=$am__obj \ |
e28b3332 | 9165 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
81ecdfbb | 9166 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
e28b3332 | 9167 | >/dev/null 2>conftest.err && |
81ecdfbb | 9168 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 | 9169 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
81ecdfbb | 9170 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
e28b3332 DJ |
9171 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
9172 | # icc doesn't choke on unknown options, it will just issue warnings | |
9173 | # or remarks (even with -Werror). So we grep stderr for any message | |
9174 | # that says an option was ignored or not supported. | |
9175 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
9176 | # icc: Command line warning: ignoring option '-M'; no argument required | |
9177 | # The diagnosis changed in icc 8.0: | |
9178 | # icc: Command line remark: option '-MP' not supported | |
9179 | if (grep 'ignoring option' conftest.err || | |
9180 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
9181 | am_cv_CC_dependencies_compiler_type=$depmode | |
9182 | break | |
9183 | fi | |
9184 | fi | |
9185 | done | |
9186 | ||
9187 | cd .. | |
9188 | rm -rf conftest.dir | |
9189 | else | |
9190 | am_cv_CC_dependencies_compiler_type=none | |
9191 | fi | |
9192 | ||
9193 | fi | |
81ecdfbb RW |
9194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
9195 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
e28b3332 DJ |
9196 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
9197 | ||
81ecdfbb | 9198 | if |
e28b3332 DJ |
9199 | test "x$enable_dependency_tracking" != xno \ |
9200 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
9201 | am__fastdepCC_TRUE= | |
9202 | am__fastdepCC_FALSE='#' | |
9203 | else | |
9204 | am__fastdepCC_TRUE='#' | |
9205 | am__fastdepCC_FALSE= | |
9206 | fi | |
9207 | ||
9208 | ||
9209 | ||
9210 | ||
bec39cab AC |
9211 | |
9212 | ||
81ecdfbb RW |
9213 | # Check whether --with-separate-debug-dir was given. |
9214 | if test "${with_separate_debug_dir+set}" = set; then : | |
9215 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
9216 | DEBUGDIR=$withval |
9217 | else | |
9218 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
9219 | fi |
9220 | ||
20e95c23 | 9221 | |
783e057b DJ |
9222 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
9223 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 9224 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 9225 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 9226 | |
783e057b DJ |
9227 | cat >>confdefs.h <<_ACEOF |
9228 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 9229 | _ACEOF |
20e95c23 | 9230 | |
20e95c23 | 9231 | |
20e95c23 | 9232 | |
0c4a4063 | 9233 | |
b14b1491 TT |
9234 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
9235 | if test "x$prefix" = xNONE; then | |
9236 | test_prefix=/usr/local | |
9237 | else | |
9238 | test_prefix=$prefix | |
9239 | fi | |
783e057b | 9240 | else |
b14b1491 | 9241 | test_prefix=$exec_prefix |
783e057b | 9242 | fi |
b14b1491 TT |
9243 | value=0 |
9244 | case ${ac_define_dir} in | |
9245 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9246 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9247 | value=1 | |
9248 | ;; | |
9249 | esac | |
9250 | ||
9251 | cat >>confdefs.h <<_ACEOF | |
9252 | #define DEBUGDIR_RELOCATABLE $value | |
9253 | _ACEOF | |
9254 | ||
9255 | ||
9256 | ||
0c4a4063 | 9257 | |
f83d8a90 DE |
9258 | # We can't pass paths as command line arguments. |
9259 | # Mingw32 tries to be clever and will convert the paths for us. | |
9260 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
9261 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
9262 | # This breaks GDB's relocatable path conversions since paths passed in | |
9263 | # config.h would not get so translated, the path prefixes no longer match. | |
9264 | ||
9265 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9266 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9267 | ac_define_dir=`eval echo $bindir` | |
9268 | ac_define_dir=`eval echo $ac_define_dir` | |
9269 | ||
9270 | cat >>confdefs.h <<_ACEOF | |
9271 | #define BINDIR "$ac_define_dir" | |
9272 | _ACEOF | |
9273 | ||
9274 | ||
9275 | ||
b14b1491 TT |
9276 | # GDB's datadir relocation |
9277 | ||
9278 | ||
9279 | ||
81ecdfbb RW |
9280 | # Check whether --with-gdb-datadir was given. |
9281 | if test "${with_gdb_datadir+set}" = set; then : | |
9282 | withval=$with_gdb_datadir; | |
b14b1491 | 9283 | GDB_DATADIR=$withval |
20e95c23 | 9284 | else |
b14b1491 | 9285 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
9286 | fi |
9287 | ||
20e95c23 | 9288 | |
b14b1491 TT |
9289 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
9290 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9291 | ac_define_dir=`eval echo $GDB_DATADIR` | |
9292 | ac_define_dir=`eval echo $ac_define_dir` | |
9293 | ||
9294 | cat >>confdefs.h <<_ACEOF | |
9295 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
9296 | _ACEOF |
9297 | ||
b14b1491 TT |
9298 | |
9299 | ||
0c4a4063 | 9300 | |
b14b1491 TT |
9301 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
9302 | if test "x$prefix" = xNONE; then | |
9303 | test_prefix=/usr/local | |
9304 | else | |
9305 | test_prefix=$prefix | |
9306 | fi | |
9307 | else | |
9308 | test_prefix=$exec_prefix | |
9309 | fi | |
9310 | value=0 | |
9311 | case ${ac_define_dir} in | |
9312 | "${test_prefix}"|"${test_prefix}/"*|\ | |
9313 | '${exec_prefix}'|'${exec_prefix}/'*) | |
9314 | value=1 | |
9315 | ;; | |
9316 | esac | |
9317 | ||
9318 | cat >>confdefs.h <<_ACEOF | |
9319 | #define GDB_DATADIR_RELOCATABLE $value | |
9320 | _ACEOF | |
9321 | ||
9322 | ||
783e057b | 9323 | |
20e95c23 | 9324 | |
0c4a4063 | 9325 | |
81ecdfbb RW |
9326 | # Check whether --with-relocated-sources was given. |
9327 | if test "${with_relocated_sources+set}" = set; then : | |
9328 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
9329 | |
9330 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9331 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9332 | ac_define_dir=`eval echo $reloc_srcdir` | |
9333 | ac_define_dir=`eval echo $ac_define_dir` | |
9334 | ||
9335 | cat >>confdefs.h <<_ACEOF | |
9336 | #define RELOC_SRCDIR "$ac_define_dir" | |
9337 | _ACEOF | |
9338 | ||
9339 | ||
9340 | ||
81ecdfbb RW |
9341 | fi |
9342 | ||
29b0e8a2 | 9343 | |
bccbefd2 JK |
9344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
9345 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
9346 | ||
9347 | # Check whether --with-auto-load-safe-path was given. | |
9348 | if test "${with_auto_load_safe_path+set}" = set; then : | |
9349 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
9350 | with_auto_load_safe_path="" | |
9351 | fi | |
9352 | else | |
9353 | with_auto_load_safe_path="$prefix" | |
9354 | fi | |
9355 | ||
9356 | ||
9357 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
9358 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9359 | ac_define_dir=`eval echo $with_auto_load_safe_path` | |
9360 | ac_define_dir=`eval echo $ac_define_dir` | |
9361 | ||
9362 | cat >>confdefs.h <<_ACEOF | |
9363 | #define DEFAULT_AUTO_LOAD_SAFE_PATH "$ac_define_dir" | |
9364 | _ACEOF | |
9365 | ||
9366 | ||
9367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
9368 | $as_echo "$with_auto_load_safe_path" >&6; } | |
9369 | ||
29b0e8a2 | 9370 | |
20e95c23 | 9371 | |
5ae98d25 | 9372 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
9373 | |
9374 | ||
783e057b | 9375 | # Check whether to support alternative target configurations |
81ecdfbb RW |
9376 | # Check whether --enable-targets was given. |
9377 | if test "${enable_targets+set}" = set; then : | |
9378 | enableval=$enable_targets; case "${enableval}" in | |
9379 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
9380 | ;; |
9381 | no) enable_targets= ;; | |
9382 | *) enable_targets=$enableval ;; | |
9383 | esac | |
81ecdfbb RW |
9384 | fi |
9385 | ||
20e95c23 | 9386 | |
783e057b | 9387 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
9388 | # Check whether --enable-64-bit-bfd was given. |
9389 | if test "${enable_64_bit_bfd+set}" = set; then : | |
9390 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
9391 | yes) want64=true ;; |
9392 | no) want64=false ;; | |
81ecdfbb | 9393 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
9394 | esac |
9395 | else | |
9396 | want64=false | |
81ecdfbb RW |
9397 | fi |
9398 | ||
783e057b DJ |
9399 | # Provide defaults for some variables set by the per-host and per-target |
9400 | # configuration. | |
9401 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 9402 | |
783e057b DJ |
9403 | if test "${target}" = "${host}"; then |
9404 | gdb_native=yes | |
9405 | else | |
9406 | gdb_native=no | |
9407 | fi | |
20e95c23 | 9408 | |
783e057b | 9409 | . $srcdir/configure.host |
20e95c23 | 9410 | |
783e057b | 9411 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 9412 | |
783e057b DJ |
9413 | TARGET_OBS= |
9414 | all_targets= | |
20e95c23 | 9415 | |
783e057b | 9416 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 9417 | do |
783e057b DJ |
9418 | if test "$targ_alias" = "all"; then |
9419 | all_targets=true | |
9420 | else | |
9421 | # Canonicalize the secondary target names. | |
9422 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
9423 | if test -n "$result"; then | |
9424 | targ=$result | |
9425 | else | |
9426 | targ=$targ_alias | |
9427 | fi | |
20e95c23 | 9428 | |
783e057b | 9429 | . ${srcdir}/configure.tgt |
20e95c23 | 9430 | |
bf307134 JB |
9431 | if test -z "${gdb_target_obs}"; then : |
9432 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
9433 | fi | |
9434 | ||
783e057b DJ |
9435 | # Target-specific object files |
9436 | for i in ${gdb_target_obs}; do | |
9437 | case " $TARGET_OBS " in | |
9438 | *" ${i} "*) ;; | |
9439 | *) | |
9440 | TARGET_OBS="$TARGET_OBS ${i}" | |
9441 | ;; | |
9442 | esac | |
9443 | done | |
20e95c23 | 9444 | |
783e057b DJ |
9445 | # Check whether this target needs 64-bit CORE_ADDR |
9446 | if test x${want64} = xfalse; then | |
9447 | . ${srcdir}/../bfd/config.bfd | |
9448 | fi | |
9449 | fi | |
20e95c23 DJ |
9450 | done |
9451 | ||
783e057b DJ |
9452 | if test x${all_targets} = xtrue; then |
9453 | ||
9454 | # We want all 64-bit targets if we either: | |
9455 | # - run on a 64-bit host or | |
9456 | # - already require 64-bit support for some other target or | |
9457 | # - the --enable-64-bit-bfd option was supplied | |
9458 | # Otherwise we only support all 32-bit targets. | |
9459 | # | |
9460 | # NOTE: This test must be in sync with the corresponding | |
9461 | # tests in BFD! | |
20e95c23 | 9462 | |
783e057b | 9463 | if test x${want64} = xfalse; then |
81ecdfbb RW |
9464 | # The cast to long int works around a bug in the HP C Compiler |
9465 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
9466 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
9467 | # This bug is HP SR number 8606223364. | |
9468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
9469 | $as_echo_n "checking size of long... " >&6; } | |
9470 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
9471 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 9472 | else |
81ecdfbb | 9473 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 9474 | |
81ecdfbb RW |
9475 | else |
9476 | if test "$ac_cv_type_long" = yes; then | |
9477 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
9478 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
9479 | { as_fn_set_status 77 | |
9480 | as_fn_error "cannot compute sizeof (long) | |
9481 | See \`config.log' for more details." "$LINENO" 5; }; } | |
9482 | else | |
9483 | ac_cv_sizeof_long=0 | |
9484 | fi | |
c0993dbe | 9485 | fi |
81ecdfbb | 9486 | |
c0993dbe | 9487 | fi |
81ecdfbb RW |
9488 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
9489 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 9490 | |
c0993dbe | 9491 | |
c0993dbe | 9492 | |
c0993dbe UW |
9493 | cat >>confdefs.h <<_ACEOF |
9494 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
9495 | _ACEOF | |
9496 | ||
9497 | ||
9498 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
9499 | want64=true | |
9500 | fi | |
9501 | fi | |
9502 | if test x${want64} = xtrue; then | |
9503 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
9504 | else | |
9505 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
9506 | fi | |
9507 | fi | |
9508 | ||
9509 | ||
9510 | ||
9511 | # For other settings, only the main target counts. | |
9512 | gdb_sim= | |
9513 | gdb_osabi= | |
9514 | build_gdbserver= | |
9515 | targ=$target; . ${srcdir}/configure.tgt | |
9516 | ||
9517 | # Fetch the default architecture and default target vector from BFD. | |
9518 | targ=$target; . $srcdir/../bfd/config.bfd | |
9519 | ||
9520 | # We only want the first architecture, so strip off the others if | |
9521 | # there is more than one. | |
9522 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
9523 | ||
9524 | if test "x$targ_archs" != x; then | |
9525 | ||
9526 | cat >>confdefs.h <<_ACEOF | |
9527 | #define DEFAULT_BFD_ARCH $targ_archs | |
9528 | _ACEOF | |
9529 | ||
9530 | fi | |
9531 | if test "x$targ_defvec" != x; then | |
9532 | ||
9533 | cat >>confdefs.h <<_ACEOF | |
9534 | #define DEFAULT_BFD_VEC $targ_defvec | |
9535 | _ACEOF | |
9536 | ||
9537 | fi | |
9538 | ||
c0993dbe UW |
9539 | # The CLI cannot be disabled yet, but may be in the future. |
9540 | ||
9541 | # Enable CLI. | |
81ecdfbb RW |
9542 | # Check whether --enable-gdbcli was given. |
9543 | if test "${enable_gdbcli+set}" = set; then : | |
9544 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
9545 | yes) |
9546 | ;; | |
9547 | no) | |
81ecdfbb | 9548 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 9549 | *) |
81ecdfbb | 9550 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
9551 | esac |
9552 | else | |
9553 | enable_gdbcli=yes | |
81ecdfbb RW |
9554 | fi |
9555 | ||
c0993dbe UW |
9556 | if test x"$enable_gdbcli" = xyes; then |
9557 | if test -d $srcdir/cli; then | |
9558 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
9559 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
9560 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
9561 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
9562 | fi | |
9563 | fi | |
9564 | ||
9565 | # Enable MI. | |
81ecdfbb RW |
9566 | # Check whether --enable-gdbmi was given. |
9567 | if test "${enable_gdbmi+set}" = set; then : | |
9568 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
9569 | yes | no) |
9570 | ;; | |
9571 | *) | |
81ecdfbb | 9572 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
9573 | esac |
9574 | else | |
9575 | enable_gdbmi=yes | |
81ecdfbb RW |
9576 | fi |
9577 | ||
c0993dbe UW |
9578 | if test x"$enable_gdbmi" = xyes; then |
9579 | if test -d $srcdir/mi; then | |
9580 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
9581 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
9582 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
9583 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
9584 | fi | |
9585 | fi | |
9586 | ||
9587 | # Enable TUI. | |
81ecdfbb RW |
9588 | # Check whether --enable-tui was given. |
9589 | if test "${enable_tui+set}" = set; then : | |
9590 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 9591 | yes | no | auto) |
c0993dbe UW |
9592 | ;; |
9593 | *) | |
81ecdfbb | 9594 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
9595 | esac |
9596 | else | |
3ca64bd3 | 9597 | enable_tui=auto |
81ecdfbb RW |
9598 | fi |
9599 | ||
c0993dbe UW |
9600 | |
9601 | # Enable gdbtk. | |
81ecdfbb RW |
9602 | # Check whether --enable-gdbtk was given. |
9603 | if test "${enable_gdbtk+set}" = set; then : | |
9604 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
9605 | yes | no) |
9606 | ;; | |
9607 | *) | |
81ecdfbb | 9608 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
9609 | esac |
9610 | else | |
5062cc19 | 9611 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
9612 | enable_gdbtk=yes |
9613 | else | |
9614 | enable_gdbtk=no | |
9615 | fi | |
81ecdfbb RW |
9616 | fi |
9617 | ||
c0993dbe UW |
9618 | # We unconditionally disable gdbtk tests on selected platforms. |
9619 | case $host_os in | |
9620 | go32* | windows*) | |
81ecdfbb RW |
9621 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
9622 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
9623 | enable_gdbtk=no ;; |
9624 | esac | |
9625 | ||
05e7c244 | 9626 | # Libunwind support for ia64. |
bec39cab | 9627 | |
05e7c244 JK |
9628 | |
9629 | # Check whether --with-libunwind-ia64 was given. | |
9630 | if test "${with_libunwind_ia64+set}" = set; then : | |
9631 | withval=$with_libunwind_ia64; | |
bec39cab | 9632 | else |
05e7c244 JK |
9633 | with_libunwind_ia64=auto |
9634 | fi | |
bec39cab | 9635 | |
05e7c244 JK |
9636 | |
9637 | # Backward compatibility option. | |
9638 | if test "${with_libunwind+set}" = set; then | |
9639 | if test x"$with_libunwind_ia64" != xauto; then | |
9640 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
9641 | fi | |
9642 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
9643 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
9644 | with_libunwind_ia64="$with_libunwind" | |
9645 | fi | |
9646 | ||
9647 | case "$with_libunwind_ia64" in | |
9648 | yes | no) | |
9649 | ;; | |
9650 | auto) | |
9651 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 9652 | do : |
b54a8fd7 PA |
9653 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
9654 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 9655 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 9656 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
9657 | _ACEOF |
9658 | ||
9659 | fi | |
9660 | ||
9661 | done | |
9662 | ||
05e7c244 JK |
9663 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
9664 | ;; | |
9665 | *) | |
9666 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
9667 | ;; | |
9668 | esac | |
bec39cab | 9669 | |
05e7c244 | 9670 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 9671 | for ac_header in libunwind-ia64.h |
81ecdfbb | 9672 | do : |
b54a8fd7 PA |
9673 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
9674 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 9675 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 9676 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
9677 | _ACEOF |
9678 | ||
9679 | fi | |
9680 | ||
9681 | done | |
9682 | ||
05e7c244 JK |
9683 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
9684 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
9685 | fi | |
9686 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
9687 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
9688 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
9689 | fi |
9690 | ||
cb01cfba JB |
9691 | opt_curses=no |
9692 | ||
81ecdfbb RW |
9693 | # Check whether --with-curses was given. |
9694 | if test "${with_curses+set}" = set; then : | |
9695 | withval=$with_curses; opt_curses=$withval | |
9696 | fi | |
9697 | ||
cb01cfba | 9698 | |
76a39ba7 | 9699 | prefer_curses=no |
cb01cfba | 9700 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 9701 | prefer_curses=yes |
cb01cfba JB |
9702 | fi |
9703 | ||
a9322a30 | 9704 | # Profiling support. |
81ecdfbb RW |
9705 | # Check whether --enable-profiling was given. |
9706 | if test "${enable_profiling+set}" = set; then : | |
9707 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
9708 | yes | no) |
9709 | ;; | |
9710 | *) | |
81ecdfbb | 9711 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
9712 | esac |
9713 | else | |
9714 | enable_profiling=no | |
81ecdfbb | 9715 | fi |
bec39cab | 9716 | |
a9322a30 TT |
9717 | |
9718 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
9719 | do : |
9720 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9721 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9722 | eval as_val=\$$as_ac_var | |
9723 | if test "x$as_val" = x""yes; then : | |
9724 | cat >>confdefs.h <<_ACEOF | |
9725 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 9726 | _ACEOF |
a9322a30 | 9727 | |
81ecdfbb RW |
9728 | fi |
9729 | done | |
a9322a30 | 9730 | |
81ecdfbb RW |
9731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
9732 | $as_echo_n "checking for _etext... " >&6; } | |
9733 | if test "${ac_cv_var__etext+set}" = set; then : | |
9734 | $as_echo_n "(cached) " >&6 | |
9735 | else | |
9736 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9737 | /* end confdefs.h. */ | |
9738 | #include <stdlib.h> | |
9739 | extern char _etext; | |
a9322a30 TT |
9740 | |
9741 | int | |
9742 | main () | |
9743 | { | |
9744 | free (&_etext); | |
9745 | ; | |
9746 | return 0; | |
9747 | } | |
bec39cab | 9748 | _ACEOF |
81ecdfbb | 9749 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9750 | ac_cv_var__etext=yes |
bec39cab | 9751 | else |
81ecdfbb | 9752 | ac_cv_var__etext=no |
bec39cab | 9753 | fi |
81ecdfbb RW |
9754 | rm -f core conftest.err conftest.$ac_objext \ |
9755 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9756 | fi |
81ecdfbb RW |
9757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
9758 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 9759 | if test $ac_cv_var__etext = yes; then |
60ca704f | 9760 | |
81ecdfbb | 9761 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 9762 | |
bec39cab | 9763 | fi |
81ecdfbb RW |
9764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
9765 | $as_echo_n "checking for etext... " >&6; } | |
9766 | if test "${ac_cv_var_etext+set}" = set; then : | |
9767 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9768 | else |
81ecdfbb | 9769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9770 | /* end confdefs.h. */ |
a9322a30 TT |
9771 | #include <stdlib.h> |
9772 | extern char etext; | |
bec39cab AC |
9773 | |
9774 | int | |
9775 | main () | |
9776 | { | |
a9322a30 | 9777 | free (&etext); |
bec39cab AC |
9778 | ; |
9779 | return 0; | |
9780 | } | |
9781 | _ACEOF | |
81ecdfbb | 9782 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9783 | ac_cv_var_etext=yes |
bec39cab | 9784 | else |
81ecdfbb | 9785 | ac_cv_var_etext=no |
bec39cab | 9786 | fi |
81ecdfbb RW |
9787 | rm -f core conftest.err conftest.$ac_objext \ |
9788 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9789 | fi |
81ecdfbb RW |
9790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
9791 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
9792 | if test $ac_cv_var_etext = yes; then |
9793 | ||
81ecdfbb | 9794 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
9795 | |
9796 | fi | |
a9322a30 TT |
9797 | if test "$enable_profiling" = yes ; then |
9798 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 9799 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
9800 | fi |
9801 | PROFILE_CFLAGS=-pg | |
9802 | OLD_CFLAGS="$CFLAGS" | |
9803 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 9804 | |
81ecdfbb RW |
9805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
9806 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
9807 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
9808 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9809 | else |
81ecdfbb | 9810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9811 | /* end confdefs.h. */ |
bec39cab AC |
9812 | |
9813 | int | |
9814 | main () | |
9815 | { | |
a9322a30 | 9816 | int x; |
bec39cab AC |
9817 | ; |
9818 | return 0; | |
9819 | } | |
9820 | _ACEOF | |
81ecdfbb | 9821 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9822 | ac_cv_cc_supports_pg=yes |
bec39cab | 9823 | else |
81ecdfbb | 9824 | ac_cv_cc_supports_pg=no |
bec39cab | 9825 | fi |
81ecdfbb | 9826 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9827 | fi |
81ecdfbb RW |
9828 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
9829 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 9830 | |
a9322a30 | 9831 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 9832 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 9833 | fi |
bec39cab | 9834 | |
a9322a30 | 9835 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
9836 | fi |
9837 | ||
c16158bc JM |
9838 | |
9839 | ||
81ecdfbb RW |
9840 | # Check whether --with-pkgversion was given. |
9841 | if test "${with_pkgversion+set}" = set; then : | |
9842 | withval=$with_pkgversion; case "$withval" in | |
9843 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
9844 | no) PKGVERSION= ;; |
9845 | *) PKGVERSION="($withval) " ;; | |
9846 | esac | |
9847 | else | |
9848 | PKGVERSION="(GDB) " | |
9849 | ||
81ecdfbb | 9850 | fi |
c16158bc JM |
9851 | |
9852 | ||
9853 | ||
9854 | ||
81ecdfbb RW |
9855 | |
9856 | # Check whether --with-bugurl was given. | |
9857 | if test "${with_bugurl+set}" = set; then : | |
9858 | withval=$with_bugurl; case "$withval" in | |
9859 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
9860 | no) BUGURL= |
9861 | ;; | |
9862 | *) BUGURL="$withval" | |
9863 | ;; | |
9864 | esac | |
9865 | else | |
9866 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
9867 | ||
81ecdfbb RW |
9868 | fi |
9869 | ||
c16158bc JM |
9870 | case ${BUGURL} in |
9871 | "") | |
9872 | REPORT_BUGS_TO= | |
9873 | REPORT_BUGS_TEXI= | |
9874 | ;; | |
9875 | *) | |
9876 | REPORT_BUGS_TO="<$BUGURL>" | |
9877 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
9878 | ;; | |
9879 | esac; | |
9880 | ||
9881 | ||
9882 | ||
9883 | ||
9884 | cat >>confdefs.h <<_ACEOF | |
9885 | #define PKGVERSION "$PKGVERSION" | |
9886 | _ACEOF | |
9887 | ||
9888 | ||
9889 | cat >>confdefs.h <<_ACEOF | |
9890 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
9891 | _ACEOF | |
9892 | ||
9893 | ||
bec39cab AC |
9894 | # --------------------- # |
9895 | # Checks for programs. # | |
9896 | # --------------------- # | |
9897 | ||
9898 | for ac_prog in gawk mawk nawk awk | |
9899 | do | |
9900 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
9901 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
9902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
9903 | $as_echo_n "checking for $ac_word... " >&6; } | |
9904 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
9905 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9906 | else |
9907 | if test -n "$AWK"; then | |
9908 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
9909 | else | |
9910 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9911 | for as_dir in $PATH | |
9912 | do | |
9913 | IFS=$as_save_IFS | |
9914 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
9915 | for ac_exec_ext in '' $ac_executable_extensions; do |
9916 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 9917 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 9918 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
9919 | break 2 |
9920 | fi | |
9921 | done | |
81ecdfbb RW |
9922 | done |
9923 | IFS=$as_save_IFS | |
bec39cab AC |
9924 | |
9925 | fi | |
9926 | fi | |
9927 | AWK=$ac_cv_prog_AWK | |
9928 | if test -n "$AWK"; then | |
81ecdfbb RW |
9929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
9930 | $as_echo "$AWK" >&6; } | |
bec39cab | 9931 | else |
81ecdfbb RW |
9932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9933 | $as_echo "no" >&6; } | |
bec39cab AC |
9934 | fi |
9935 | ||
bec39cab | 9936 | |
81ecdfbb | 9937 | test -n "$AWK" && break |
bec39cab AC |
9938 | done |
9939 | ||
bec39cab | 9940 | |
81ecdfbb RW |
9941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
9942 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
9943 | LN_S=$as_ln_s |
9944 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
9945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
9946 | $as_echo "yes" >&6; } | |
bec39cab | 9947 | else |
81ecdfbb RW |
9948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
9949 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
9950 | fi |
9951 | ||
9952 | if test -n "$ac_tool_prefix"; then | |
9953 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
9954 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
9955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
9956 | $as_echo_n "checking for $ac_word... " >&6; } | |
9957 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
9958 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9959 | else |
9960 | if test -n "$RANLIB"; then | |
9961 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
9962 | else | |
9963 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9964 | for as_dir in $PATH | |
9965 | do | |
9966 | IFS=$as_save_IFS | |
9967 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
9968 | for ac_exec_ext in '' $ac_executable_extensions; do |
9969 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 9970 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 9971 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
9972 | break 2 |
9973 | fi | |
9974 | done | |
81ecdfbb RW |
9975 | done |
9976 | IFS=$as_save_IFS | |
bec39cab AC |
9977 | |
9978 | fi | |
9979 | fi | |
9980 | RANLIB=$ac_cv_prog_RANLIB | |
9981 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
9982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
9983 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 9984 | else |
81ecdfbb RW |
9985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
9986 | $as_echo "no" >&6; } | |
bec39cab AC |
9987 | fi |
9988 | ||
81ecdfbb | 9989 | |
bec39cab AC |
9990 | fi |
9991 | if test -z "$ac_cv_prog_RANLIB"; then | |
9992 | ac_ct_RANLIB=$RANLIB | |
9993 | # Extract the first word of "ranlib", so it can be a program name with args. | |
9994 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
9995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
9996 | $as_echo_n "checking for $ac_word... " >&6; } | |
9997 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
9998 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
9999 | else |
10000 | if test -n "$ac_ct_RANLIB"; then | |
10001 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
10002 | else | |
10003 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10004 | for as_dir in $PATH | |
10005 | do | |
10006 | IFS=$as_save_IFS | |
10007 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10008 | for ac_exec_ext in '' $ac_executable_extensions; do |
10009 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10010 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 10011 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10012 | break 2 |
10013 | fi | |
10014 | done | |
81ecdfbb RW |
10015 | done |
10016 | IFS=$as_save_IFS | |
bec39cab | 10017 | |
bec39cab AC |
10018 | fi |
10019 | fi | |
10020 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
10021 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
10022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
10023 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 10024 | else |
81ecdfbb RW |
10025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10026 | $as_echo "no" >&6; } | |
bec39cab AC |
10027 | fi |
10028 | ||
81ecdfbb RW |
10029 | if test "x$ac_ct_RANLIB" = x; then |
10030 | RANLIB=":" | |
10031 | else | |
10032 | case $cross_compiling:$ac_tool_warned in | |
10033 | yes:) | |
10034 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
10035 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
10036 | ac_tool_warned=yes ;; | |
10037 | esac | |
10038 | RANLIB=$ac_ct_RANLIB | |
10039 | fi | |
bec39cab AC |
10040 | else |
10041 | RANLIB="$ac_cv_prog_RANLIB" | |
10042 | fi | |
10043 | ||
10044 | for ac_prog in 'bison -y' byacc | |
10045 | do | |
10046 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
10047 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
10048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10049 | $as_echo_n "checking for $ac_word... " >&6; } | |
10050 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
10051 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10052 | else |
10053 | if test -n "$YACC"; then | |
10054 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
10055 | else | |
10056 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10057 | for as_dir in $PATH | |
10058 | do | |
10059 | IFS=$as_save_IFS | |
10060 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10061 | for ac_exec_ext in '' $ac_executable_extensions; do |
10062 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10063 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 10064 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10065 | break 2 |
10066 | fi | |
10067 | done | |
81ecdfbb RW |
10068 | done |
10069 | IFS=$as_save_IFS | |
bec39cab AC |
10070 | |
10071 | fi | |
10072 | fi | |
10073 | YACC=$ac_cv_prog_YACC | |
10074 | if test -n "$YACC"; then | |
81ecdfbb RW |
10075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
10076 | $as_echo "$YACC" >&6; } | |
bec39cab | 10077 | else |
81ecdfbb RW |
10078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10079 | $as_echo "no" >&6; } | |
bec39cab AC |
10080 | fi |
10081 | ||
81ecdfbb | 10082 | |
bec39cab AC |
10083 | test -n "$YACC" && break |
10084 | done | |
10085 | test -n "$YACC" || YACC="yacc" | |
10086 | ||
10087 | ||
10088 | if test -n "$ac_tool_prefix"; then | |
10089 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
10090 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
10091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10092 | $as_echo_n "checking for $ac_word... " >&6; } | |
10093 | if test "${ac_cv_prog_AR+set}" = set; then : | |
10094 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10095 | else |
10096 | if test -n "$AR"; then | |
10097 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
10098 | else | |
10099 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10100 | for as_dir in $PATH | |
10101 | do | |
10102 | IFS=$as_save_IFS | |
10103 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10104 | for ac_exec_ext in '' $ac_executable_extensions; do |
10105 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10106 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 10107 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10108 | break 2 |
10109 | fi | |
10110 | done | |
81ecdfbb RW |
10111 | done |
10112 | IFS=$as_save_IFS | |
bec39cab AC |
10113 | |
10114 | fi | |
10115 | fi | |
10116 | AR=$ac_cv_prog_AR | |
10117 | if test -n "$AR"; then | |
81ecdfbb RW |
10118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
10119 | $as_echo "$AR" >&6; } | |
bec39cab | 10120 | else |
81ecdfbb RW |
10121 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10122 | $as_echo "no" >&6; } | |
bec39cab AC |
10123 | fi |
10124 | ||
81ecdfbb | 10125 | |
bec39cab AC |
10126 | fi |
10127 | if test -z "$ac_cv_prog_AR"; then | |
10128 | ac_ct_AR=$AR | |
10129 | # Extract the first word of "ar", so it can be a program name with args. | |
10130 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
10131 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10132 | $as_echo_n "checking for $ac_word... " >&6; } | |
10133 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
10134 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10135 | else |
10136 | if test -n "$ac_ct_AR"; then | |
10137 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
10138 | else | |
10139 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10140 | for as_dir in $PATH | |
10141 | do | |
10142 | IFS=$as_save_IFS | |
10143 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10144 | for ac_exec_ext in '' $ac_executable_extensions; do |
10145 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10146 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 10147 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10148 | break 2 |
10149 | fi | |
10150 | done | |
81ecdfbb RW |
10151 | done |
10152 | IFS=$as_save_IFS | |
bec39cab AC |
10153 | |
10154 | fi | |
10155 | fi | |
10156 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
10157 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
10158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
10159 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 10160 | else |
81ecdfbb RW |
10161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10162 | $as_echo "no" >&6; } | |
bec39cab AC |
10163 | fi |
10164 | ||
81ecdfbb RW |
10165 | if test "x$ac_ct_AR" = x; then |
10166 | AR="" | |
10167 | else | |
10168 | case $cross_compiling:$ac_tool_warned in | |
10169 | yes:) | |
10170 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
10171 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
10172 | ac_tool_warned=yes ;; | |
10173 | esac | |
10174 | AR=$ac_ct_AR | |
10175 | fi | |
bec39cab AC |
10176 | else |
10177 | AR="$ac_cv_prog_AR" | |
10178 | fi | |
10179 | ||
10180 | if test -n "$ac_tool_prefix"; then | |
10181 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
10182 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
10183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10184 | $as_echo_n "checking for $ac_word... " >&6; } | |
10185 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
10186 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10187 | else |
10188 | if test -n "$DLLTOOL"; then | |
10189 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
10190 | else | |
10191 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10192 | for as_dir in $PATH | |
10193 | do | |
10194 | IFS=$as_save_IFS | |
10195 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10196 | for ac_exec_ext in '' $ac_executable_extensions; do |
10197 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10198 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 10199 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10200 | break 2 |
10201 | fi | |
10202 | done | |
81ecdfbb RW |
10203 | done |
10204 | IFS=$as_save_IFS | |
bec39cab AC |
10205 | |
10206 | fi | |
10207 | fi | |
10208 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
10209 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
10210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
10211 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 10212 | else |
81ecdfbb RW |
10213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10214 | $as_echo "no" >&6; } | |
bec39cab AC |
10215 | fi |
10216 | ||
81ecdfbb | 10217 | |
bec39cab AC |
10218 | fi |
10219 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
10220 | ac_ct_DLLTOOL=$DLLTOOL | |
10221 | # Extract the first word of "dlltool", so it can be a program name with args. | |
10222 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
10223 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10224 | $as_echo_n "checking for $ac_word... " >&6; } | |
10225 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
10226 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10227 | else |
10228 | if test -n "$ac_ct_DLLTOOL"; then | |
10229 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
10230 | else | |
10231 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10232 | for as_dir in $PATH | |
10233 | do | |
10234 | IFS=$as_save_IFS | |
10235 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10236 | for ac_exec_ext in '' $ac_executable_extensions; do |
10237 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10238 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 10239 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10240 | break 2 |
10241 | fi | |
10242 | done | |
81ecdfbb RW |
10243 | done |
10244 | IFS=$as_save_IFS | |
bec39cab AC |
10245 | |
10246 | fi | |
10247 | fi | |
10248 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
10249 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
10250 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
10251 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 10252 | else |
81ecdfbb RW |
10253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10254 | $as_echo "no" >&6; } | |
bec39cab AC |
10255 | fi |
10256 | ||
81ecdfbb RW |
10257 | if test "x$ac_ct_DLLTOOL" = x; then |
10258 | DLLTOOL="" | |
10259 | else | |
10260 | case $cross_compiling:$ac_tool_warned in | |
10261 | yes:) | |
10262 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
10263 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
10264 | ac_tool_warned=yes ;; | |
10265 | esac | |
10266 | DLLTOOL=$ac_ct_DLLTOOL | |
10267 | fi | |
bec39cab AC |
10268 | else |
10269 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
10270 | fi | |
10271 | ||
10272 | if test -n "$ac_tool_prefix"; then | |
10273 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
10274 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
10275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10276 | $as_echo_n "checking for $ac_word... " >&6; } | |
10277 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
10278 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10279 | else |
10280 | if test -n "$WINDRES"; then | |
10281 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
10282 | else | |
10283 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10284 | for as_dir in $PATH | |
10285 | do | |
10286 | IFS=$as_save_IFS | |
10287 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10288 | for ac_exec_ext in '' $ac_executable_extensions; do |
10289 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10290 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 10291 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10292 | break 2 |
10293 | fi | |
10294 | done | |
81ecdfbb RW |
10295 | done |
10296 | IFS=$as_save_IFS | |
bec39cab AC |
10297 | |
10298 | fi | |
10299 | fi | |
10300 | WINDRES=$ac_cv_prog_WINDRES | |
10301 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
10302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
10303 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 10304 | else |
81ecdfbb RW |
10305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10306 | $as_echo "no" >&6; } | |
bec39cab AC |
10307 | fi |
10308 | ||
81ecdfbb | 10309 | |
bec39cab AC |
10310 | fi |
10311 | if test -z "$ac_cv_prog_WINDRES"; then | |
10312 | ac_ct_WINDRES=$WINDRES | |
10313 | # Extract the first word of "windres", so it can be a program name with args. | |
10314 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
10315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10316 | $as_echo_n "checking for $ac_word... " >&6; } | |
10317 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
10318 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10319 | else |
10320 | if test -n "$ac_ct_WINDRES"; then | |
10321 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
10322 | else | |
10323 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10324 | for as_dir in $PATH | |
10325 | do | |
10326 | IFS=$as_save_IFS | |
10327 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10328 | for ac_exec_ext in '' $ac_executable_extensions; do |
10329 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10330 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 10331 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10332 | break 2 |
10333 | fi | |
10334 | done | |
81ecdfbb RW |
10335 | done |
10336 | IFS=$as_save_IFS | |
bec39cab AC |
10337 | |
10338 | fi | |
10339 | fi | |
10340 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
10341 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
10342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
10343 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 10344 | else |
81ecdfbb RW |
10345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10346 | $as_echo "no" >&6; } | |
c906108c | 10347 | fi |
bec39cab | 10348 | |
81ecdfbb RW |
10349 | if test "x$ac_ct_WINDRES" = x; then |
10350 | WINDRES="" | |
10351 | else | |
10352 | case $cross_compiling:$ac_tool_warned in | |
10353 | yes:) | |
10354 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
10355 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
10356 | ac_tool_warned=yes ;; | |
10357 | esac | |
10358 | WINDRES=$ac_ct_WINDRES | |
10359 | fi | |
c906108c | 10360 | else |
bec39cab | 10361 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
10362 | fi |
10363 | ||
bec39cab AC |
10364 | |
10365 | # Needed for GNU/Hurd. | |
10366 | if test -n "$ac_tool_prefix"; then | |
10367 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
10368 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
10369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10370 | $as_echo_n "checking for $ac_word... " >&6; } | |
10371 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
10372 | $as_echo_n "(cached) " >&6 | |
c906108c | 10373 | else |
bec39cab AC |
10374 | if test -n "$MIG"; then |
10375 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
10376 | else | |
10377 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10378 | for as_dir in $PATH | |
10379 | do | |
10380 | IFS=$as_save_IFS | |
10381 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10382 | for ac_exec_ext in '' $ac_executable_extensions; do |
10383 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10384 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 10385 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10386 | break 2 |
10387 | fi | |
10388 | done | |
81ecdfbb RW |
10389 | done |
10390 | IFS=$as_save_IFS | |
bec39cab | 10391 | |
c906108c | 10392 | fi |
bec39cab AC |
10393 | fi |
10394 | MIG=$ac_cv_prog_MIG | |
10395 | if test -n "$MIG"; then | |
81ecdfbb RW |
10396 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
10397 | $as_echo "$MIG" >&6; } | |
c906108c | 10398 | else |
81ecdfbb RW |
10399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10400 | $as_echo "no" >&6; } | |
c906108c SS |
10401 | fi |
10402 | ||
81ecdfbb | 10403 | |
bec39cab AC |
10404 | fi |
10405 | if test -z "$ac_cv_prog_MIG"; then | |
10406 | ac_ct_MIG=$MIG | |
10407 | # Extract the first word of "mig", so it can be a program name with args. | |
10408 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
10409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
10410 | $as_echo_n "checking for $ac_word... " >&6; } | |
10411 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
10412 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10413 | else |
10414 | if test -n "$ac_ct_MIG"; then | |
10415 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
10416 | else | |
10417 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
10418 | for as_dir in $PATH | |
10419 | do | |
10420 | IFS=$as_save_IFS | |
10421 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
10422 | for ac_exec_ext in '' $ac_executable_extensions; do |
10423 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 10424 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 10425 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
10426 | break 2 |
10427 | fi | |
10428 | done | |
81ecdfbb RW |
10429 | done |
10430 | IFS=$as_save_IFS | |
c906108c | 10431 | |
bec39cab AC |
10432 | fi |
10433 | fi | |
10434 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
10435 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
10436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
10437 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 10438 | else |
81ecdfbb RW |
10439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
10440 | $as_echo "no" >&6; } | |
bec39cab | 10441 | fi |
c906108c | 10442 | |
81ecdfbb RW |
10443 | if test "x$ac_ct_MIG" = x; then |
10444 | MIG="" | |
10445 | else | |
10446 | case $cross_compiling:$ac_tool_warned in | |
10447 | yes:) | |
10448 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
10449 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
10450 | ac_tool_warned=yes ;; | |
10451 | esac | |
10452 | MIG=$ac_ct_MIG | |
10453 | fi | |
bec39cab AC |
10454 | else |
10455 | MIG="$ac_cv_prog_MIG" | |
10456 | fi | |
c906108c | 10457 | |
c906108c | 10458 | |
bec39cab AC |
10459 | # ---------------------- # |
10460 | # Checks for libraries. # | |
10461 | # ---------------------- # | |
c906108c | 10462 | |
bec39cab | 10463 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
10464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
10465 | $as_echo_n "checking for main in -lm... " >&6; } | |
10466 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
10467 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10468 | else |
10469 | ac_check_lib_save_LIBS=$LIBS | |
10470 | LIBS="-lm $LIBS" | |
81ecdfbb | 10471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10472 | /* end confdefs.h. */ |
c906108c | 10473 | |
c906108c | 10474 | |
bec39cab AC |
10475 | int |
10476 | main () | |
10477 | { | |
81ecdfbb | 10478 | return main (); |
bec39cab AC |
10479 | ; |
10480 | return 0; | |
10481 | } | |
10482 | _ACEOF | |
81ecdfbb | 10483 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
10484 | ac_cv_lib_m_main=yes |
10485 | else | |
81ecdfbb | 10486 | ac_cv_lib_m_main=no |
bec39cab | 10487 | fi |
81ecdfbb RW |
10488 | rm -f core conftest.err conftest.$ac_objext \ |
10489 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
10490 | LIBS=$ac_check_lib_save_LIBS |
10491 | fi | |
81ecdfbb RW |
10492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
10493 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
10494 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
10495 | cat >>confdefs.h <<_ACEOF |
10496 | #define HAVE_LIBM 1 | |
10497 | _ACEOF | |
10498 | ||
10499 | LIBS="-lm $LIBS" | |
c906108c | 10500 | |
c906108c | 10501 | fi |
bec39cab AC |
10502 | |
10503 | ||
10504 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
10505 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
10506 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
10507 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
10508 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
10509 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 10510 | |
c906108c | 10511 | else |
81ecdfbb RW |
10512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
10513 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
10514 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
10515 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10516 | else |
10517 | ac_check_lib_save_LIBS=$LIBS | |
10518 | LIBS="-lw $LIBS" | |
81ecdfbb | 10519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10520 | /* end confdefs.h. */ |
c906108c | 10521 | |
81ecdfbb RW |
10522 | /* Override any GCC internal prototype to avoid an error. |
10523 | Use char because int might match the return type of a GCC | |
10524 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
10525 | #ifdef __cplusplus |
10526 | extern "C" | |
10527 | #endif | |
bec39cab AC |
10528 | char wctype (); |
10529 | int | |
10530 | main () | |
10531 | { | |
81ecdfbb | 10532 | return wctype (); |
bec39cab AC |
10533 | ; |
10534 | return 0; | |
10535 | } | |
10536 | _ACEOF | |
81ecdfbb | 10537 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
10538 | ac_cv_lib_w_wctype=yes |
10539 | else | |
81ecdfbb | 10540 | ac_cv_lib_w_wctype=no |
bec39cab | 10541 | fi |
81ecdfbb RW |
10542 | rm -f core conftest.err conftest.$ac_objext \ |
10543 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
10544 | LIBS=$ac_check_lib_save_LIBS |
10545 | fi | |
81ecdfbb RW |
10546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
10547 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
10548 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
10549 | cat >>confdefs.h <<_ACEOF |
10550 | #define HAVE_LIBW 1 | |
10551 | _ACEOF | |
c906108c | 10552 | |
bec39cab | 10553 | LIBS="-lw $LIBS" |
c906108c | 10554 | |
bec39cab | 10555 | fi |
c906108c | 10556 | |
bec39cab | 10557 | fi |
c906108c | 10558 | |
ddc9cd0f | 10559 | |
bec39cab | 10560 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
10561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
10562 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
10563 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
10564 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10565 | else |
10566 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 10567 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10568 | /* end confdefs.h. */ |
ddc9cd0f | 10569 | |
81ecdfbb RW |
10570 | /* Override any GCC internal prototype to avoid an error. |
10571 | Use char because int might match the return type of a GCC | |
10572 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
10573 | #ifdef __cplusplus |
10574 | extern "C" | |
10575 | #endif | |
bec39cab AC |
10576 | char gethostbyname (); |
10577 | int | |
10578 | main () | |
10579 | { | |
81ecdfbb | 10580 | return gethostbyname (); |
bec39cab AC |
10581 | ; |
10582 | return 0; | |
10583 | } | |
10584 | _ACEOF | |
81ecdfbb RW |
10585 | for ac_lib in '' nsl; do |
10586 | if test -z "$ac_lib"; then | |
10587 | ac_res="none required" | |
10588 | else | |
10589 | ac_res=-l$ac_lib | |
b4e70030 | 10590 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
10591 | fi |
10592 | if ac_fn_c_try_link "$LINENO"; then : | |
10593 | ac_cv_search_gethostbyname=$ac_res | |
10594 | fi | |
10595 | rm -f core conftest.err conftest.$ac_objext \ | |
10596 | conftest$ac_exeext | |
10597 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
10598 | break | |
10599 | fi | |
10600 | done | |
10601 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 10602 | |
bec39cab | 10603 | else |
81ecdfbb | 10604 | ac_cv_search_gethostbyname=no |
bec39cab | 10605 | fi |
81ecdfbb | 10606 | rm conftest.$ac_ext |
bec39cab AC |
10607 | LIBS=$ac_func_search_save_LIBS |
10608 | fi | |
81ecdfbb RW |
10609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
10610 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
10611 | ac_res=$ac_cv_search_gethostbyname | |
10612 | if test "$ac_res" != no; then : | |
10613 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 10614 | |
bec39cab | 10615 | fi |
96baa820 | 10616 | |
c906108c | 10617 | |
b4e70030 | 10618 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
10619 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
10620 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
10621 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
10622 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
10623 | else |
10624 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 10625 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
10626 | /* end confdefs.h. */ |
10627 | ||
81ecdfbb RW |
10628 | /* Override any GCC internal prototype to avoid an error. |
10629 | Use char because int might match the return type of a GCC | |
10630 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
10631 | #ifdef __cplusplus |
10632 | extern "C" | |
10633 | #endif | |
b4e70030 JB |
10634 | char socketpair (); |
10635 | int | |
10636 | main () | |
10637 | { | |
81ecdfbb | 10638 | return socketpair (); |
b4e70030 JB |
10639 | ; |
10640 | return 0; | |
10641 | } | |
10642 | _ACEOF | |
81ecdfbb RW |
10643 | for ac_lib in '' socket; do |
10644 | if test -z "$ac_lib"; then | |
10645 | ac_res="none required" | |
10646 | else | |
10647 | ac_res=-l$ac_lib | |
b4e70030 | 10648 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
10649 | fi |
10650 | if ac_fn_c_try_link "$LINENO"; then : | |
10651 | ac_cv_search_socketpair=$ac_res | |
10652 | fi | |
10653 | rm -f core conftest.err conftest.$ac_objext \ | |
10654 | conftest$ac_exeext | |
10655 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
10656 | break | |
10657 | fi | |
10658 | done | |
10659 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 10660 | |
b4e70030 | 10661 | else |
81ecdfbb | 10662 | ac_cv_search_socketpair=no |
b4e70030 | 10663 | fi |
81ecdfbb | 10664 | rm conftest.$ac_ext |
b4e70030 JB |
10665 | LIBS=$ac_func_search_save_LIBS |
10666 | fi | |
81ecdfbb RW |
10667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
10668 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
10669 | ac_res=$ac_cv_search_socketpair | |
10670 | if test "$ac_res" != no; then : | |
10671 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
10672 | |
10673 | fi | |
10674 | ||
10675 | ||
233a11ab | 10676 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
10677 | |
10678 | # See if the user specified whether he wants zlib support or not. | |
10679 | ||
10680 | # Check whether --with-zlib was given. | |
10681 | if test "${with_zlib+set}" = set; then : | |
10682 | withval=$with_zlib; | |
10683 | else | |
10684 | with_zlib=auto | |
10685 | fi | |
10686 | ||
10687 | ||
10688 | if test "$with_zlib" != "no"; then | |
10689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
10690 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
10691 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
10692 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
10693 | else |
10694 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 10695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
10696 | /* end confdefs.h. */ |
10697 | ||
81ecdfbb RW |
10698 | /* Override any GCC internal prototype to avoid an error. |
10699 | Use char because int might match the return type of a GCC | |
233a11ab | 10700 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
10701 | #ifdef __cplusplus |
10702 | extern "C" | |
10703 | #endif | |
233a11ab CS |
10704 | char zlibVersion (); |
10705 | int | |
10706 | main () | |
10707 | { | |
81ecdfbb | 10708 | return zlibVersion (); |
233a11ab CS |
10709 | ; |
10710 | return 0; | |
10711 | } | |
10712 | _ACEOF | |
81ecdfbb RW |
10713 | for ac_lib in '' z; do |
10714 | if test -z "$ac_lib"; then | |
10715 | ac_res="none required" | |
233a11ab | 10716 | else |
81ecdfbb RW |
10717 | ac_res=-l$ac_lib |
10718 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 10719 | fi |
81ecdfbb RW |
10720 | if ac_fn_c_try_link "$LINENO"; then : |
10721 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 10722 | fi |
81ecdfbb RW |
10723 | rm -f core conftest.err conftest.$ac_objext \ |
10724 | conftest$ac_exeext | |
10725 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
10726 | break | |
233a11ab | 10727 | fi |
81ecdfbb RW |
10728 | done |
10729 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 10730 | |
233a11ab | 10731 | else |
81ecdfbb | 10732 | ac_cv_search_zlibVersion=no |
233a11ab | 10733 | fi |
81ecdfbb RW |
10734 | rm conftest.$ac_ext |
10735 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 10736 | fi |
81ecdfbb RW |
10737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
10738 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
10739 | ac_res=$ac_cv_search_zlibVersion | |
10740 | if test "$ac_res" != no; then : | |
10741 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
10742 | for ac_header in zlib.h | |
10743 | do : | |
10744 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
10745 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 10746 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10747 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
10748 | _ACEOF |
10749 | ||
10750 | fi | |
10751 | ||
10752 | done | |
10753 | ||
10754 | fi | |
10755 | ||
b040ad30 JB |
10756 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
10757 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
10758 | fi | |
10759 | fi | |
10760 | ||
233a11ab | 10761 | |
77f120bf | 10762 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
10763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
10764 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
10765 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
10766 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
10767 | else |
10768 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 10769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10770 | /* end confdefs.h. */ |
c906108c | 10771 | |
81ecdfbb RW |
10772 | /* Override any GCC internal prototype to avoid an error. |
10773 | Use char because int might match the return type of a GCC | |
10774 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
10775 | #ifdef __cplusplus |
10776 | extern "C" | |
10777 | #endif | |
77f120bf | 10778 | char dlgetmodinfo (); |
bec39cab AC |
10779 | int |
10780 | main () | |
10781 | { | |
81ecdfbb | 10782 | return dlgetmodinfo (); |
bec39cab AC |
10783 | ; |
10784 | return 0; | |
10785 | } | |
10786 | _ACEOF | |
81ecdfbb RW |
10787 | for ac_lib in '' dl xpdl; do |
10788 | if test -z "$ac_lib"; then | |
10789 | ac_res="none required" | |
10790 | else | |
10791 | ac_res=-l$ac_lib | |
b4e70030 | 10792 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
10793 | fi |
10794 | if ac_fn_c_try_link "$LINENO"; then : | |
10795 | ac_cv_search_dlgetmodinfo=$ac_res | |
10796 | fi | |
10797 | rm -f core conftest.err conftest.$ac_objext \ | |
10798 | conftest$ac_exeext | |
10799 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
10800 | break | |
10801 | fi | |
10802 | done | |
10803 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 10804 | |
4e8d927d | 10805 | else |
81ecdfbb | 10806 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 10807 | fi |
81ecdfbb | 10808 | rm conftest.$ac_ext |
bec39cab AC |
10809 | LIBS=$ac_func_search_save_LIBS |
10810 | fi | |
81ecdfbb RW |
10811 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
10812 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
10813 | ac_res=$ac_cv_search_dlgetmodinfo | |
10814 | if test "$ac_res" != no; then : | |
10815 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 10816 | |
8bb2c122 | 10817 | fi |
8bb2c122 | 10818 | |
8bb2c122 | 10819 | |
77f120bf | 10820 | |
77f120bf | 10821 | |
6c7a06a3 | 10822 | |
81ecdfbb RW |
10823 | # Check whether --with-libiconv-prefix was given. |
10824 | if test "${with_libiconv_prefix+set}" = set; then : | |
10825 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 10826 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
10827 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
10828 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
10829 | done |
10830 | ||
81ecdfbb RW |
10831 | fi |
10832 | ||
6c7a06a3 | 10833 | |
f18c4681 | 10834 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
10835 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
10836 | ||
81ecdfbb RW |
10837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
10838 | $as_echo_n "checking for iconv... " >&6; } | |
10839 | if test "${am_cv_func_iconv+set}" = set; then : | |
10840 | $as_echo_n "(cached) " >&6 | |
d542061a | 10841 | else |
6c7a06a3 TT |
10842 | |
10843 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10844 | am_cv_lib_iconv=no | |
10845 | am_cv_use_build_libiconv=no | |
f0f20949 | 10846 | am_cv_build_libiconv_path= |
4edb1e84 JB |
10847 | |
10848 | # If libiconv is part of the build tree, then try using it over | |
10849 | # any system iconv. | |
10850 | if test -d ../libiconv; then | |
f18c4681 JB |
10851 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
10852 | am_save_LIBS="$LIBS" | |
10853 | am_save_CPPFLAGS="$CPPFLAGS" | |
10854 | LIBS="$LIBS $lib_dir/libiconv.a" | |
10855 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
10856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 10857 | /* end confdefs.h. */ |
6c7a06a3 TT |
10858 | #include <stdlib.h> |
10859 | #include <iconv.h> | |
d542061a UW |
10860 | int |
10861 | main () | |
10862 | { | |
6c7a06a3 | 10863 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
10864 | iconv(cd,NULL,NULL,NULL,NULL); |
10865 | iconv_close(cd); | |
d542061a UW |
10866 | ; |
10867 | return 0; | |
10868 | } | |
10869 | _ACEOF | |
81ecdfbb | 10870 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 10871 | am_cv_use_build_libiconv=yes |
f0f20949 | 10872 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
10873 | am_cv_lib_iconv=yes |
10874 | am_cv_func_iconv=yes | |
d542061a | 10875 | fi |
81ecdfbb RW |
10876 | rm -f core conftest.err conftest.$ac_objext \ |
10877 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
10878 | LIBS="$am_save_LIBS" |
10879 | CPPFLAGS="$am_save_CPPFLAGS" | |
10880 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
10881 | break |
10882 | fi | |
10883 | done | |
4edb1e84 | 10884 | fi |
94ae1714 | 10885 | |
4edb1e84 | 10886 | # Next, try to find iconv in libc. |
6c7a06a3 | 10887 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 10888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 10889 | /* end confdefs.h. */ |
6c7a06a3 TT |
10890 | #include <stdlib.h> |
10891 | #include <iconv.h> | |
d542061a UW |
10892 | int |
10893 | main () | |
10894 | { | |
6c7a06a3 TT |
10895 | iconv_t cd = iconv_open("",""); |
10896 | iconv(cd,NULL,NULL,NULL,NULL); | |
10897 | iconv_close(cd); | |
d542061a UW |
10898 | ; |
10899 | return 0; | |
10900 | } | |
10901 | _ACEOF | |
81ecdfbb | 10902 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 10903 | am_cv_func_iconv=yes |
d542061a | 10904 | fi |
81ecdfbb RW |
10905 | rm -f core conftest.err conftest.$ac_objext \ |
10906 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 10907 | fi |
94ae1714 | 10908 | |
4edb1e84 JB |
10909 | # If iconv was not in libc, try -liconv. In this case, arrange to |
10910 | # look in the libiconv prefix, if it was specified by the user. | |
10911 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 10912 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
10913 | am_save_LIBS="$LIBS" |
10914 | if test -n "$LIBICONV_INCLUDE"; then | |
10915 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
10916 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
10917 | fi | |
10918 | LIBS="$LIBS -liconv" | |
81ecdfbb | 10919 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10920 | /* end confdefs.h. */ |
6c7a06a3 TT |
10921 | #include <stdlib.h> |
10922 | #include <iconv.h> | |
bec39cab AC |
10923 | int |
10924 | main () | |
10925 | { | |
6c7a06a3 TT |
10926 | iconv_t cd = iconv_open("",""); |
10927 | iconv(cd,NULL,NULL,NULL,NULL); | |
10928 | iconv_close(cd); | |
bec39cab AC |
10929 | ; |
10930 | return 0; | |
10931 | } | |
10932 | _ACEOF | |
81ecdfbb | 10933 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 10934 | am_cv_lib_iconv=yes |
6c7a06a3 | 10935 | am_cv_func_iconv=yes |
627af7ea | 10936 | fi |
81ecdfbb RW |
10937 | rm -f core conftest.err conftest.$ac_objext \ |
10938 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10939 | LIBS="$am_save_LIBS" |
fc3b640d | 10940 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
10941 | fi |
10942 | ||
10943 | fi | |
81ecdfbb RW |
10944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
10945 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
10946 | |
10947 | # Set the various flags based on the cache variables. We can't rely | |
10948 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
10949 | LIBICONV= |
10950 | if test "$am_cv_lib_iconv" = yes; then | |
10951 | LIBICONV="-liconv" | |
94ae1714 TT |
10952 | else |
10953 | LIBICONV_LIBDIR= | |
10954 | LIBICONV_INCLUDE= | |
fc3b640d TT |
10955 | fi |
10956 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 10957 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 10958 | LIBICONV_LIBDIR="" |
fc3b640d TT |
10959 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
10960 | fi | |
10961 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
10962 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 10963 | |
6c7a06a3 TT |
10964 | if test "$am_cv_func_iconv" = yes; then |
10965 | ||
81ecdfbb | 10966 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 10967 | |
81ecdfbb RW |
10968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
10969 | $as_echo_n "checking for iconv declaration... " >&6; } | |
10970 | if test "${am_cv_proto_iconv+set}" = set; then : | |
10971 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
10972 | else |
10973 | ||
81ecdfbb | 10974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
10975 | /* end confdefs.h. */ |
10976 | ||
6c7a06a3 TT |
10977 | #include <stdlib.h> |
10978 | #include <iconv.h> | |
10979 | extern | |
b4e70030 | 10980 | #ifdef __cplusplus |
6c7a06a3 | 10981 | "C" |
b4e70030 | 10982 | #endif |
6c7a06a3 TT |
10983 | #if defined(__STDC__) || defined(__cplusplus) |
10984 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10985 | #else | |
10986 | size_t iconv(); | |
10987 | #endif | |
10988 | ||
b4e70030 JB |
10989 | int |
10990 | main () | |
10991 | { | |
6c7a06a3 | 10992 | |
b4e70030 JB |
10993 | ; |
10994 | return 0; | |
10995 | } | |
10996 | _ACEOF | |
81ecdfbb | 10997 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 10998 | am_cv_proto_iconv_arg1="" |
4e8d927d | 10999 | else |
81ecdfbb | 11000 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 11001 | fi |
81ecdfbb | 11002 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
11003 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
11004 | fi | |
11005 | ||
11006 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 11007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 11008 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
11009 | $as_echo "${ac_t:- |
11010 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
11011 | |
11012 | cat >>confdefs.h <<_ACEOF | |
11013 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
11014 | _ACEOF | |
11015 | ||
11016 | fi | |
6c7a06a3 TT |
11017 | |
11018 | ||
478aac75 DE |
11019 | # GDB may fork/exec the iconv program to get the list of supported character |
11020 | # sets. Allow the user to specify where to find it. | |
11021 | # There are several factors affecting the choice of option name: | |
11022 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
11023 | # the build-time location of libiconv files. | |
11024 | # - The program we need to find is iconv, which comes with glibc. The user | |
11025 | # doesn't necessarily have libiconv installed. Therefore naming this | |
11026 | # --with-libiconv-foo feels wrong. | |
11027 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
11028 | # defined to work on directories not files (though it really doesn't know | |
11029 | # the difference). | |
11030 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
11031 | # with --with-libiconv-prefix. | |
11032 | # Putting these together is why the option name is --with-iconv-bin. | |
11033 | ||
11034 | ||
11035 | # Check whether --with-iconv-bin was given. | |
11036 | if test "${with_iconv_bin+set}" = set; then : | |
11037 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
11038 | ||
11039 | cat >>confdefs.h <<_ACEOF | |
11040 | #define ICONV_BIN "${iconv_bin}" | |
11041 | _ACEOF | |
11042 | ||
11043 | ||
11044 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11045 | if test "x$prefix" = xNONE; then | |
11046 | test_prefix=/usr/local | |
11047 | else | |
11048 | test_prefix=$prefix | |
11049 | fi | |
11050 | else | |
11051 | test_prefix=$exec_prefix | |
11052 | fi | |
11053 | value=0 | |
11054 | case ${iconv_bin} in | |
11055 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11056 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11057 | value=1 | |
11058 | ;; | |
11059 | esac | |
11060 | ||
11061 | cat >>confdefs.h <<_ACEOF | |
11062 | #define ICONV_BIN_RELOCATABLE $value | |
11063 | _ACEOF | |
11064 | ||
11065 | ||
11066 | ||
11067 | fi | |
11068 | ||
11069 | ||
6c7a06a3 TT |
11070 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
11071 | # There is a very specific comment in /usr/include/curses.h explaining that | |
11072 | # termcap routines built into libcurses must not be used. | |
11073 | # | |
11074 | # The symptoms we observed so far is GDB unexpectedly changing | |
11075 | # the terminal settings when tgetent is called - this is particularly | |
11076 | # visible as the output is missing carriage returns, and so rapidly | |
11077 | # becomes very hard to read. | |
11078 | # | |
11079 | # The readline configure script has already decided that libtermcap | |
11080 | # was enough for its purposes, and so decided to build readline using | |
11081 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
11082 | # TUI enabled results in both libraries to be used at the same time, | |
11083 | # which is not allowed. This basically means that GDB with TUI is | |
11084 | # broken on alpha-osf. | |
11085 | ||
11086 | case $host_os in | |
6bcc772d RO |
11087 | osf* ) |
11088 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 11089 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 11090 | fi |
6bcc772d | 11091 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
11092 | enable_tui=no |
11093 | fi | |
11094 | ;; | |
11095 | esac | |
11096 | ||
cb01cfba | 11097 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 11098 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
11099 | prefer_curses=yes |
11100 | fi | |
11101 | ||
11102 | curses_found=no | |
11103 | if test x"$prefer_curses" = xyes; then | |
11104 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
11105 | # curses library because the latter might not provide all the | |
11106 | # functionality we need. However, this leads to problems on systems | |
11107 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
11108 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
11109 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
11110 | # a situation. | |
81ecdfbb RW |
11111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
11112 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
11113 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
11114 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
11115 | else |
11116 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 11117 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
11118 | /* end confdefs.h. */ |
11119 | ||
81ecdfbb RW |
11120 | /* Override any GCC internal prototype to avoid an error. |
11121 | Use char because int might match the return type of a GCC | |
11122 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
11123 | #ifdef __cplusplus |
11124 | extern "C" | |
11125 | #endif | |
6c7a06a3 TT |
11126 | char waddstr (); |
11127 | int | |
11128 | main () | |
11129 | { | |
81ecdfbb | 11130 | return waddstr (); |
6c7a06a3 TT |
11131 | ; |
11132 | return 0; | |
11133 | } | |
11134 | _ACEOF | |
81ecdfbb RW |
11135 | for ac_lib in '' ncurses cursesX curses; do |
11136 | if test -z "$ac_lib"; then | |
11137 | ac_res="none required" | |
11138 | else | |
11139 | ac_res=-l$ac_lib | |
11140 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11141 | fi | |
11142 | if ac_fn_c_try_link "$LINENO"; then : | |
11143 | ac_cv_search_waddstr=$ac_res | |
11144 | fi | |
11145 | rm -f core conftest.err conftest.$ac_objext \ | |
11146 | conftest$ac_exeext | |
11147 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
11148 | break | |
11149 | fi | |
11150 | done | |
11151 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
11152 | ||
6c7a06a3 | 11153 | else |
81ecdfbb RW |
11154 | ac_cv_search_waddstr=no |
11155 | fi | |
11156 | rm conftest.$ac_ext | |
11157 | LIBS=$ac_func_search_save_LIBS | |
11158 | fi | |
11159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
11160 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
11161 | ac_res=$ac_cv_search_waddstr | |
11162 | if test "$ac_res" != no; then : | |
11163 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
11164 | |
11165 | fi | |
11166 | ||
11167 | ||
cb01cfba JB |
11168 | if test "$ac_cv_search_waddstr" != no; then |
11169 | curses_found=yes | |
11170 | fi | |
11171 | fi | |
11172 | ||
11173 | # Check whether we should enable the TUI, but only do so if we really | |
11174 | # can. | |
11175 | if test x"$enable_tui" != xno; then | |
11176 | if test -d $srcdir/tui; then | |
11177 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
11178 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
11179 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
11180 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
11181 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
11182 | else |
11183 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 11184 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 11185 | else |
81ecdfbb RW |
11186 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
11187 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
11188 | fi |
11189 | fi | |
11190 | fi | |
11191 | fi | |
11192 | ||
11193 | # Since GDB uses Readline, we need termcap functionality. In many | |
11194 | # cases this will be provided by the curses library, but some systems | |
11195 | # have a seperate termcap library, or no curses library at all. | |
11196 | ||
11197 | case $host_os in | |
11198 | cygwin*) | |
11199 | if test -d $srcdir/libtermcap; then | |
11200 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
11201 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
11202 | fi ;; | |
11203 | go32* | *djgpp*) | |
11204 | ac_cv_search_tgetent="none required" | |
11205 | ;; | |
11206 | *mingw32*) | |
11207 | ac_cv_search_tgetent="none required" | |
11208 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
11209 | ;; | |
11210 | esac | |
11211 | ||
11212 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
11213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
11214 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
11215 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
11216 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
11217 | else |
11218 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 11219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
11220 | /* end confdefs.h. */ |
11221 | ||
81ecdfbb RW |
11222 | /* Override any GCC internal prototype to avoid an error. |
11223 | Use char because int might match the return type of a GCC | |
11224 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
11225 | #ifdef __cplusplus |
11226 | extern "C" | |
11227 | #endif | |
6c7a06a3 TT |
11228 | char tgetent (); |
11229 | int | |
11230 | main () | |
11231 | { | |
81ecdfbb | 11232 | return tgetent (); |
6c7a06a3 TT |
11233 | ; |
11234 | return 0; | |
11235 | } | |
11236 | _ACEOF | |
81ecdfbb RW |
11237 | for ac_lib in '' termcap tinfo curses ncurses; do |
11238 | if test -z "$ac_lib"; then | |
11239 | ac_res="none required" | |
11240 | else | |
11241 | ac_res=-l$ac_lib | |
6c7a06a3 | 11242 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
11243 | fi |
11244 | if ac_fn_c_try_link "$LINENO"; then : | |
11245 | ac_cv_search_tgetent=$ac_res | |
11246 | fi | |
11247 | rm -f core conftest.err conftest.$ac_objext \ | |
11248 | conftest$ac_exeext | |
11249 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
11250 | break | |
11251 | fi | |
11252 | done | |
11253 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 11254 | |
6c7a06a3 | 11255 | else |
81ecdfbb | 11256 | ac_cv_search_tgetent=no |
6c7a06a3 | 11257 | fi |
81ecdfbb | 11258 | rm conftest.$ac_ext |
6c7a06a3 TT |
11259 | LIBS=$ac_func_search_save_LIBS |
11260 | fi | |
81ecdfbb RW |
11261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
11262 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
11263 | ac_res=$ac_cv_search_tgetent | |
11264 | if test "$ac_res" != no; then : | |
11265 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 11266 | |
06825bd1 MK |
11267 | fi |
11268 | ||
06825bd1 | 11269 | |
bec39cab | 11270 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 11271 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
11272 | fi |
11273 | ||
3841debe | 11274 | |
81ecdfbb RW |
11275 | # Check whether --with-system-readline was given. |
11276 | if test "${with_system_readline+set}" = set; then : | |
11277 | withval=$with_system_readline; | |
11278 | fi | |
6a30b0a5 | 11279 | |
6a30b0a5 AS |
11280 | |
11281 | if test "$with_system_readline" = yes; then | |
11282 | READLINE=-lreadline | |
11283 | READLINE_DEPS= | |
11284 | READLINE_CFLAGS= | |
39037522 | 11285 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
11286 | else |
11287 | READLINE='$(READLINE_DIR)/libreadline.a' | |
11288 | READLINE_DEPS='$(READLINE)' | |
11289 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 11290 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
11291 | fi |
11292 | ||
11293 | ||
11294 | ||
11295 | ||
11296 | ||
f997c383 SD |
11297 | # Generate jit-reader.h |
11298 | ||
11299 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
11300 | TARGET_PTR= | |
11301 | ||
11302 | # The cast to long int works around a bug in the HP C Compiler | |
11303 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11304 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11305 | # This bug is HP SR number 8606223364. | |
11306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
11307 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
11308 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
11309 | $as_echo_n "(cached) " >&6 | |
11310 | else | |
11311 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
11312 | ||
11313 | else | |
11314 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
11315 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11316 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11317 | { as_fn_set_status 77 | |
11318 | as_fn_error "cannot compute sizeof (unsigned long long) | |
11319 | See \`config.log' for more details." "$LINENO" 5; }; } | |
11320 | else | |
11321 | ac_cv_sizeof_unsigned_long_long=0 | |
11322 | fi | |
11323 | fi | |
11324 | ||
11325 | fi | |
11326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
11327 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
11328 | ||
11329 | ||
11330 | ||
11331 | cat >>confdefs.h <<_ACEOF | |
11332 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
11333 | _ACEOF | |
11334 | ||
11335 | ||
11336 | # The cast to long int works around a bug in the HP C Compiler | |
11337 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11338 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11339 | # This bug is HP SR number 8606223364. | |
11340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
11341 | $as_echo_n "checking size of unsigned long... " >&6; } | |
11342 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
11343 | $as_echo_n "(cached) " >&6 | |
11344 | else | |
11345 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
11346 | ||
11347 | else | |
11348 | if test "$ac_cv_type_unsigned_long" = yes; then | |
11349 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11350 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11351 | { as_fn_set_status 77 | |
11352 | as_fn_error "cannot compute sizeof (unsigned long) | |
11353 | See \`config.log' for more details." "$LINENO" 5; }; } | |
11354 | else | |
11355 | ac_cv_sizeof_unsigned_long=0 | |
11356 | fi | |
11357 | fi | |
11358 | ||
11359 | fi | |
11360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
11361 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
11362 | ||
11363 | ||
11364 | ||
11365 | cat >>confdefs.h <<_ACEOF | |
11366 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
11367 | _ACEOF | |
11368 | ||
11369 | ||
11370 | # The cast to long int works around a bug in the HP C Compiler | |
11371 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
11372 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
11373 | # This bug is HP SR number 8606223364. | |
11374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
11375 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
11376 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
11377 | $as_echo_n "(cached) " >&6 | |
11378 | else | |
11379 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
11380 | ||
11381 | else | |
11382 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
11383 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
11384 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
11385 | { as_fn_set_status 77 | |
11386 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
11387 | See \`config.log' for more details." "$LINENO" 5; }; } | |
11388 | else | |
11389 | ac_cv_sizeof_unsigned___int128=0 | |
11390 | fi | |
11391 | fi | |
11392 | ||
11393 | fi | |
11394 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
11395 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
11396 | ||
11397 | ||
11398 | ||
11399 | cat >>confdefs.h <<_ACEOF | |
11400 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
11401 | _ACEOF | |
11402 | ||
11403 | ||
11404 | ||
11405 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
11406 | TARGET_PTR="unsigned long" | |
11407 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
11408 | TARGET_PTR="unsigned long long" | |
11409 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
11410 | TARGET_PTR="unsigned __int128" | |
11411 | else | |
11412 | TARGET_PTR="unsigned long" | |
11413 | fi | |
11414 | ||
11415 | ||
11416 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
11417 | ||
11418 | ||
a2d08b9e SD |
11419 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
11420 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
11421 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
11422 | $as_echo_n "(cached) " >&6 | |
11423 | else | |
11424 | ac_func_search_save_LIBS=$LIBS | |
11425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
11426 | /* end confdefs.h. */ | |
11427 | ||
11428 | /* Override any GCC internal prototype to avoid an error. | |
11429 | Use char because int might match the return type of a GCC | |
11430 | builtin and then its argument prototype would still apply. */ | |
11431 | #ifdef __cplusplus | |
11432 | extern "C" | |
11433 | #endif | |
11434 | char dlopen (); | |
11435 | int | |
11436 | main () | |
11437 | { | |
11438 | return dlopen (); | |
11439 | ; | |
11440 | return 0; | |
11441 | } | |
11442 | _ACEOF | |
11443 | for ac_lib in '' dl; do | |
11444 | if test -z "$ac_lib"; then | |
11445 | ac_res="none required" | |
11446 | else | |
11447 | ac_res=-l$ac_lib | |
11448 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11449 | fi | |
11450 | if ac_fn_c_try_link "$LINENO"; then : | |
11451 | ac_cv_search_dlopen=$ac_res | |
11452 | fi | |
11453 | rm -f core conftest.err conftest.$ac_objext \ | |
11454 | conftest$ac_exeext | |
11455 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
11456 | break | |
11457 | fi | |
11458 | done | |
11459 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
11460 | ||
11461 | else | |
11462 | ac_cv_search_dlopen=no | |
11463 | fi | |
11464 | rm conftest.$ac_ext | |
11465 | LIBS=$ac_func_search_save_LIBS | |
11466 | fi | |
11467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
11468 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
11469 | ac_res=$ac_cv_search_dlopen | |
11470 | if test "$ac_res" != no; then : | |
11471 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
11472 | ||
11473 | fi | |
11474 | ||
11475 | ||
39037522 | 11476 | |
b8e0a31c SD |
11477 | |
11478 | # Check whether --with-jit-reader-dir was given. | |
11479 | if test "${with_jit_reader_dir+set}" = set; then : | |
11480 | withval=$with_jit_reader_dir; | |
11481 | JIT_READER_DIR=$withval | |
11482 | else | |
11483 | JIT_READER_DIR=${libdir}/gdb | |
11484 | fi | |
11485 | ||
11486 | ||
11487 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
11488 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
11489 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
11490 | ac_define_dir=`eval echo $ac_define_dir` | |
11491 | ||
11492 | cat >>confdefs.h <<_ACEOF | |
11493 | #define JIT_READER_DIR "$ac_define_dir" | |
11494 | _ACEOF | |
11495 | ||
11496 | ||
11497 | ||
11498 | ||
11499 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
11500 | if test "x$prefix" = xNONE; then | |
11501 | test_prefix=/usr/local | |
11502 | else | |
11503 | test_prefix=$prefix | |
11504 | fi | |
11505 | else | |
11506 | test_prefix=$exec_prefix | |
11507 | fi | |
11508 | value=0 | |
11509 | case ${ac_define_dir} in | |
11510 | "${test_prefix}"|"${test_prefix}/"*|\ | |
11511 | '${exec_prefix}'|'${exec_prefix}/'*) | |
11512 | value=1 | |
11513 | ;; | |
11514 | esac | |
11515 | ||
11516 | cat >>confdefs.h <<_ACEOF | |
11517 | #define JIT_READER_DIR_RELOCATABLE $value | |
11518 | _ACEOF | |
11519 | ||
11520 | ||
11521 | ||
11522 | ||
11523 | ||
81ecdfbb RW |
11524 | # Check whether --with-expat was given. |
11525 | if test "${with_expat+set}" = set; then : | |
11526 | withval=$with_expat; | |
5c39566f DJ |
11527 | else |
11528 | with_expat=auto | |
81ecdfbb RW |
11529 | fi |
11530 | ||
11531 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
11532 | $as_echo_n "checking whether to use expat... " >&6; } | |
11533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
11534 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
11535 | |
11536 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
11537 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
11538 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
11539 | HAVE_LIBEXPAT=no |
11540 | else | |
11541 | ||
3841debe DJ |
11542 | if test "X$prefix" = "XNONE"; then |
11543 | acl_final_prefix="$ac_default_prefix" | |
11544 | else | |
11545 | acl_final_prefix="$prefix" | |
11546 | fi | |
11547 | if test "X$exec_prefix" = "XNONE"; then | |
11548 | acl_final_exec_prefix='${prefix}' | |
11549 | else | |
11550 | acl_final_exec_prefix="$exec_prefix" | |
11551 | fi | |
11552 | acl_save_prefix="$prefix" | |
11553 | prefix="$acl_final_prefix" | |
11554 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
11555 | prefix="$acl_save_prefix" | |
11556 | ||
11557 | ||
81ecdfbb RW |
11558 | # Check whether --with-gnu-ld was given. |
11559 | if test "${with_gnu_ld+set}" = set; then : | |
11560 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
11561 | else |
11562 | with_gnu_ld=no | |
81ecdfbb RW |
11563 | fi |
11564 | ||
3841debe DJ |
11565 | # Prepare PATH_SEPARATOR. |
11566 | # The user is always right. | |
11567 | if test "${PATH_SEPARATOR+set}" != set; then | |
11568 | echo "#! /bin/sh" >conf$$.sh | |
11569 | echo "exit 0" >>conf$$.sh | |
11570 | chmod +x conf$$.sh | |
11571 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
11572 | PATH_SEPARATOR=';' | |
11573 | else | |
11574 | PATH_SEPARATOR=: | |
11575 | fi | |
11576 | rm -f conf$$.sh | |
11577 | fi | |
11578 | ac_prog=ld | |
11579 | if test "$GCC" = yes; then | |
11580 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
11581 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
11582 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
11583 | case $host in |
11584 | *-*-mingw*) | |
11585 | # gcc leaves a trailing carriage return which upsets mingw | |
11586 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
11587 | *) | |
11588 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
11589 | esac | |
11590 | case $ac_prog in | |
11591 | # Accept absolute paths. | |
11592 | [\\/]* | [A-Za-z]:[\\/]*) | |
11593 | re_direlt='/[^/][^/]*/\.\./' | |
11594 | # Canonicalize the path of ld | |
11595 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
11596 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
11597 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
11598 | done | |
11599 | test -z "$LD" && LD="$ac_prog" | |
11600 | ;; | |
11601 | "") | |
11602 | # If it fails, then pretend we aren't using GCC. | |
11603 | ac_prog=ld | |
11604 | ;; | |
11605 | *) | |
11606 | # If it is relative, then search for the first ld in PATH. | |
11607 | with_gnu_ld=unknown | |
11608 | ;; | |
11609 | esac | |
11610 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
11611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
11612 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 11613 | else |
81ecdfbb RW |
11614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
11615 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 11616 | fi |
81ecdfbb RW |
11617 | if test "${acl_cv_path_LD+set}" = set; then : |
11618 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
11619 | else |
11620 | if test -z "$LD"; then | |
11621 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
11622 | for ac_dir in $PATH; do | |
11623 | test -z "$ac_dir" && ac_dir=. | |
11624 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
11625 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
11626 | # Check to see if the program is GNU ld. I'd rather use --version, | |
11627 | # but apparently some GNU ld's only accept -v. | |
11628 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
11629 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
11630 | test "$with_gnu_ld" != no && break | |
11631 | else | |
11632 | test "$with_gnu_ld" != yes && break | |
11633 | fi | |
11634 | fi | |
11635 | done | |
11636 | IFS="$ac_save_ifs" | |
11637 | else | |
11638 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
11639 | fi | |
11640 | fi | |
11641 | ||
11642 | LD="$acl_cv_path_LD" | |
11643 | if test -n "$LD"; then | |
81ecdfbb RW |
11644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
11645 | $as_echo "$LD" >&6; } | |
3841debe | 11646 | else |
81ecdfbb RW |
11647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11648 | $as_echo "no" >&6; } | |
3841debe | 11649 | fi |
81ecdfbb RW |
11650 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
11651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
11652 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
11653 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
11654 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
11655 | else |
11656 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
11657 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
11658 | acl_cv_prog_gnu_ld=yes | |
11659 | else | |
11660 | acl_cv_prog_gnu_ld=no | |
11661 | fi | |
11662 | fi | |
81ecdfbb RW |
11663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
11664 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
11665 | with_gnu_ld=$acl_cv_prog_gnu_ld |
11666 | ||
11667 | ||
11668 | ||
81ecdfbb RW |
11669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
11670 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
11671 | if test "${acl_cv_rpath+set}" = set; then : | |
11672 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
11673 | else |
11674 | ||
11675 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
11676 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
11677 | . ./conftest.sh | |
11678 | rm -f ./conftest.sh | |
11679 | acl_cv_rpath=done | |
11680 | ||
11681 | fi | |
81ecdfbb RW |
11682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
11683 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
11684 | wl="$acl_cv_wl" |
11685 | libext="$acl_cv_libext" | |
11686 | shlibext="$acl_cv_shlibext" | |
11687 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
11688 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
11689 | hardcode_direct="$acl_cv_hardcode_direct" | |
11690 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
11691 | # Check whether --enable-rpath was given. |
11692 | if test "${enable_rpath+set}" = set; then : | |
11693 | enableval=$enable_rpath; : | |
3841debe DJ |
11694 | else |
11695 | enable_rpath=yes | |
81ecdfbb RW |
11696 | fi |
11697 | ||
3841debe DJ |
11698 | |
11699 | ||
11700 | ||
11701 | ||
11702 | ||
11703 | ||
11704 | ||
11705 | ||
11706 | ||
11707 | use_additional=yes | |
11708 | ||
11709 | acl_save_prefix="$prefix" | |
11710 | prefix="$acl_final_prefix" | |
11711 | acl_save_exec_prefix="$exec_prefix" | |
11712 | exec_prefix="$acl_final_exec_prefix" | |
11713 | ||
11714 | eval additional_includedir=\"$includedir\" | |
11715 | eval additional_libdir=\"$libdir\" | |
11716 | ||
11717 | exec_prefix="$acl_save_exec_prefix" | |
11718 | prefix="$acl_save_prefix" | |
11719 | ||
11720 | ||
81ecdfbb RW |
11721 | # Check whether --with-libexpat-prefix was given. |
11722 | if test "${with_libexpat_prefix+set}" = set; then : | |
11723 | withval=$with_libexpat_prefix; | |
3841debe DJ |
11724 | if test "X$withval" = "Xno"; then |
11725 | use_additional=no | |
11726 | else | |
11727 | if test "X$withval" = "X"; then | |
11728 | ||
11729 | acl_save_prefix="$prefix" | |
11730 | prefix="$acl_final_prefix" | |
11731 | acl_save_exec_prefix="$exec_prefix" | |
11732 | exec_prefix="$acl_final_exec_prefix" | |
11733 | ||
11734 | eval additional_includedir=\"$includedir\" | |
11735 | eval additional_libdir=\"$libdir\" | |
11736 | ||
11737 | exec_prefix="$acl_save_exec_prefix" | |
11738 | prefix="$acl_save_prefix" | |
11739 | ||
11740 | else | |
11741 | additional_includedir="$withval/include" | |
11742 | additional_libdir="$withval/lib" | |
11743 | fi | |
11744 | fi | |
11745 | ||
81ecdfbb RW |
11746 | fi |
11747 | ||
3841debe DJ |
11748 | LIBEXPAT= |
11749 | LTLIBEXPAT= | |
11750 | INCEXPAT= | |
11751 | rpathdirs= | |
11752 | ltrpathdirs= | |
11753 | names_already_handled= | |
11754 | names_next_round='expat ' | |
11755 | while test -n "$names_next_round"; do | |
11756 | names_this_round="$names_next_round" | |
11757 | names_next_round= | |
11758 | for name in $names_this_round; do | |
11759 | already_handled= | |
11760 | for n in $names_already_handled; do | |
11761 | if test "$n" = "$name"; then | |
11762 | already_handled=yes | |
11763 | break | |
11764 | fi | |
11765 | done | |
11766 | if test -z "$already_handled"; then | |
11767 | names_already_handled="$names_already_handled $name" | |
11768 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
11769 | eval value=\"\$HAVE_LIB$uppername\" | |
11770 | if test -n "$value"; then | |
11771 | if test "$value" = yes; then | |
11772 | eval value=\"\$LIB$uppername\" | |
11773 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
11774 | eval value=\"\$LTLIB$uppername\" | |
11775 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
11776 | else | |
11777 | : | |
11778 | fi | |
11779 | else | |
11780 | found_dir= | |
11781 | found_la= | |
11782 | found_so= | |
11783 | found_a= | |
11784 | if test $use_additional = yes; then | |
11785 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
11786 | found_dir="$additional_libdir" | |
11787 | found_so="$additional_libdir/lib$name.$shlibext" | |
11788 | if test -f "$additional_libdir/lib$name.la"; then | |
11789 | found_la="$additional_libdir/lib$name.la" | |
11790 | fi | |
11791 | else | |
11792 | if test -f "$additional_libdir/lib$name.$libext"; then | |
11793 | found_dir="$additional_libdir" | |
11794 | found_a="$additional_libdir/lib$name.$libext" | |
11795 | if test -f "$additional_libdir/lib$name.la"; then | |
11796 | found_la="$additional_libdir/lib$name.la" | |
11797 | fi | |
11798 | fi | |
11799 | fi | |
11800 | fi | |
11801 | if test "X$found_dir" = "X"; then | |
11802 | for x in $LDFLAGS $LTLIBEXPAT; do | |
11803 | ||
11804 | acl_save_prefix="$prefix" | |
11805 | prefix="$acl_final_prefix" | |
11806 | acl_save_exec_prefix="$exec_prefix" | |
11807 | exec_prefix="$acl_final_exec_prefix" | |
11808 | eval x=\"$x\" | |
11809 | exec_prefix="$acl_save_exec_prefix" | |
11810 | prefix="$acl_save_prefix" | |
11811 | ||
11812 | case "$x" in | |
11813 | -L*) | |
11814 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
11815 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
11816 | found_dir="$dir" | |
11817 | found_so="$dir/lib$name.$shlibext" | |
11818 | if test -f "$dir/lib$name.la"; then | |
11819 | found_la="$dir/lib$name.la" | |
11820 | fi | |
11821 | else | |
11822 | if test -f "$dir/lib$name.$libext"; then | |
11823 | found_dir="$dir" | |
11824 | found_a="$dir/lib$name.$libext" | |
11825 | if test -f "$dir/lib$name.la"; then | |
11826 | found_la="$dir/lib$name.la" | |
11827 | fi | |
11828 | fi | |
11829 | fi | |
11830 | ;; | |
11831 | esac | |
11832 | if test "X$found_dir" != "X"; then | |
11833 | break | |
11834 | fi | |
11835 | done | |
11836 | fi | |
11837 | if test "X$found_dir" != "X"; then | |
11838 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
11839 | if test "X$found_so" != "X"; then | |
11840 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
11841 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11842 | else | |
11843 | haveit= | |
11844 | for x in $ltrpathdirs; do | |
11845 | if test "X$x" = "X$found_dir"; then | |
11846 | haveit=yes | |
11847 | break | |
11848 | fi | |
11849 | done | |
11850 | if test -z "$haveit"; then | |
11851 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11852 | fi | |
11853 | if test "$hardcode_direct" = yes; then | |
11854 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11855 | else | |
11856 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11857 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11858 | haveit= | |
11859 | for x in $rpathdirs; do | |
11860 | if test "X$x" = "X$found_dir"; then | |
11861 | haveit=yes | |
11862 | break | |
11863 | fi | |
11864 | done | |
11865 | if test -z "$haveit"; then | |
11866 | rpathdirs="$rpathdirs $found_dir" | |
11867 | fi | |
11868 | else | |
11869 | haveit= | |
11870 | for x in $LDFLAGS $LIBEXPAT; do | |
11871 | ||
11872 | acl_save_prefix="$prefix" | |
11873 | prefix="$acl_final_prefix" | |
11874 | acl_save_exec_prefix="$exec_prefix" | |
11875 | exec_prefix="$acl_final_exec_prefix" | |
11876 | eval x=\"$x\" | |
11877 | exec_prefix="$acl_save_exec_prefix" | |
11878 | prefix="$acl_save_prefix" | |
11879 | ||
11880 | if test "X$x" = "X-L$found_dir"; then | |
11881 | haveit=yes | |
11882 | break | |
11883 | fi | |
11884 | done | |
11885 | if test -z "$haveit"; then | |
11886 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
11887 | fi | |
11888 | if test "$hardcode_minus_L" != no; then | |
11889 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11890 | else | |
11891 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
11892 | fi | |
11893 | fi | |
11894 | fi | |
11895 | fi | |
11896 | else | |
11897 | if test "X$found_a" != "X"; then | |
11898 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
11899 | else | |
11900 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
11901 | fi | |
11902 | fi | |
11903 | additional_includedir= | |
11904 | case "$found_dir" in | |
11905 | */lib | */lib/) | |
11906 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11907 | additional_includedir="$basedir/include" | |
11908 | ;; | |
11909 | esac | |
11910 | if test "X$additional_includedir" != "X"; then | |
11911 | if test "X$additional_includedir" != "X/usr/include"; then | |
11912 | haveit= | |
11913 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11914 | if test -n "$GCC"; then | |
11915 | case $host_os in | |
11916 | linux*) haveit=yes;; | |
11917 | esac | |
11918 | fi | |
11919 | fi | |
11920 | if test -z "$haveit"; then | |
11921 | for x in $CPPFLAGS $INCEXPAT; do | |
11922 | ||
11923 | acl_save_prefix="$prefix" | |
11924 | prefix="$acl_final_prefix" | |
11925 | acl_save_exec_prefix="$exec_prefix" | |
11926 | exec_prefix="$acl_final_exec_prefix" | |
11927 | eval x=\"$x\" | |
11928 | exec_prefix="$acl_save_exec_prefix" | |
11929 | prefix="$acl_save_prefix" | |
11930 | ||
11931 | if test "X$x" = "X-I$additional_includedir"; then | |
11932 | haveit=yes | |
11933 | break | |
11934 | fi | |
11935 | done | |
11936 | if test -z "$haveit"; then | |
11937 | if test -d "$additional_includedir"; then | |
11938 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
11939 | fi | |
11940 | fi | |
11941 | fi | |
11942 | fi | |
11943 | fi | |
11944 | if test -n "$found_la"; then | |
11945 | save_libdir="$libdir" | |
11946 | case "$found_la" in | |
11947 | */* | *\\*) . "$found_la" ;; | |
11948 | *) . "./$found_la" ;; | |
11949 | esac | |
11950 | libdir="$save_libdir" | |
11951 | for dep in $dependency_libs; do | |
11952 | case "$dep" in | |
11953 | -L*) | |
11954 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11955 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11956 | haveit= | |
11957 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11958 | if test -n "$GCC"; then | |
11959 | case $host_os in | |
11960 | linux*) haveit=yes;; | |
11961 | esac | |
11962 | fi | |
11963 | fi | |
11964 | if test -z "$haveit"; then | |
11965 | haveit= | |
11966 | for x in $LDFLAGS $LIBEXPAT; do | |
11967 | ||
11968 | acl_save_prefix="$prefix" | |
11969 | prefix="$acl_final_prefix" | |
11970 | acl_save_exec_prefix="$exec_prefix" | |
11971 | exec_prefix="$acl_final_exec_prefix" | |
11972 | eval x=\"$x\" | |
11973 | exec_prefix="$acl_save_exec_prefix" | |
11974 | prefix="$acl_save_prefix" | |
11975 | ||
11976 | if test "X$x" = "X-L$additional_libdir"; then | |
11977 | haveit=yes | |
11978 | break | |
11979 | fi | |
11980 | done | |
11981 | if test -z "$haveit"; then | |
11982 | if test -d "$additional_libdir"; then | |
11983 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
11984 | fi | |
11985 | fi | |
11986 | haveit= | |
11987 | for x in $LDFLAGS $LTLIBEXPAT; do | |
11988 | ||
11989 | acl_save_prefix="$prefix" | |
11990 | prefix="$acl_final_prefix" | |
11991 | acl_save_exec_prefix="$exec_prefix" | |
11992 | exec_prefix="$acl_final_exec_prefix" | |
11993 | eval x=\"$x\" | |
11994 | exec_prefix="$acl_save_exec_prefix" | |
11995 | prefix="$acl_save_prefix" | |
11996 | ||
11997 | if test "X$x" = "X-L$additional_libdir"; then | |
11998 | haveit=yes | |
11999 | break | |
12000 | fi | |
12001 | done | |
12002 | if test -z "$haveit"; then | |
12003 | if test -d "$additional_libdir"; then | |
12004 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
12005 | fi | |
12006 | fi | |
12007 | fi | |
12008 | fi | |
12009 | ;; | |
12010 | -R*) | |
12011 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
12012 | if test "$enable_rpath" != no; then | |
12013 | haveit= | |
12014 | for x in $rpathdirs; do | |
12015 | if test "X$x" = "X$dir"; then | |
12016 | haveit=yes | |
12017 | break | |
12018 | fi | |
12019 | done | |
12020 | if test -z "$haveit"; then | |
12021 | rpathdirs="$rpathdirs $dir" | |
12022 | fi | |
12023 | haveit= | |
12024 | for x in $ltrpathdirs; do | |
12025 | if test "X$x" = "X$dir"; then | |
12026 | haveit=yes | |
12027 | break | |
12028 | fi | |
12029 | done | |
12030 | if test -z "$haveit"; then | |
12031 | ltrpathdirs="$ltrpathdirs $dir" | |
12032 | fi | |
12033 | fi | |
12034 | ;; | |
12035 | -l*) | |
12036 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
12037 | ;; | |
12038 | *.la) | |
12039 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
12040 | ;; | |
12041 | *) | |
12042 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
12043 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
12044 | ;; | |
81ecdfbb RW |
12045 | esac |
12046 | done | |
12047 | fi | |
12048 | else | |
12049 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
12050 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
12051 | fi | |
12052 | fi | |
12053 | fi | |
12054 | done | |
12055 | done | |
12056 | if test "X$rpathdirs" != "X"; then | |
12057 | if test -n "$hardcode_libdir_separator"; then | |
12058 | alldirs= | |
12059 | for found_dir in $rpathdirs; do | |
12060 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
12061 | done | |
12062 | acl_save_libdir="$libdir" | |
12063 | libdir="$alldirs" | |
12064 | eval flag=\"$hardcode_libdir_flag_spec\" | |
12065 | libdir="$acl_save_libdir" | |
12066 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
12067 | else | |
12068 | for found_dir in $rpathdirs; do | |
12069 | acl_save_libdir="$libdir" | |
12070 | libdir="$found_dir" | |
12071 | eval flag=\"$hardcode_libdir_flag_spec\" | |
12072 | libdir="$acl_save_libdir" | |
12073 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
12074 | done | |
12075 | fi | |
12076 | fi | |
12077 | if test "X$ltrpathdirs" != "X"; then | |
12078 | for found_dir in $ltrpathdirs; do | |
12079 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
12080 | done | |
12081 | fi | |
a9322a30 TT |
12082 | |
12083 | ||
81ecdfbb | 12084 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 12085 | |
81ecdfbb RW |
12086 | for element in $INCEXPAT; do |
12087 | haveit= | |
12088 | for x in $CPPFLAGS; do | |
a9322a30 | 12089 | |
81ecdfbb RW |
12090 | acl_save_prefix="$prefix" |
12091 | prefix="$acl_final_prefix" | |
12092 | acl_save_exec_prefix="$exec_prefix" | |
12093 | exec_prefix="$acl_final_exec_prefix" | |
12094 | eval x=\"$x\" | |
12095 | exec_prefix="$acl_save_exec_prefix" | |
12096 | prefix="$acl_save_prefix" | |
a8111142 | 12097 | |
81ecdfbb RW |
12098 | if test "X$x" = "X$element"; then |
12099 | haveit=yes | |
12100 | break | |
12101 | fi | |
12102 | done | |
12103 | if test -z "$haveit"; then | |
12104 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
12105 | fi | |
12106 | done | |
a9322a30 TT |
12107 | |
12108 | ||
81ecdfbb RW |
12109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
12110 | $as_echo_n "checking for libexpat... " >&6; } | |
12111 | if test "${ac_cv_libexpat+set}" = set; then : | |
12112 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12113 | else |
bec39cab | 12114 | |
81ecdfbb RW |
12115 | ac_save_LIBS="$LIBS" |
12116 | LIBS="$LIBS $LIBEXPAT" | |
12117 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12118 | /* end confdefs.h. */ |
81ecdfbb RW |
12119 | #include "expat.h" |
12120 | int | |
12121 | main () | |
12122 | { | |
12123 | XML_Parser p = XML_ParserCreate (0); | |
12124 | ; | |
12125 | return 0; | |
12126 | } | |
bec39cab | 12127 | _ACEOF |
81ecdfbb RW |
12128 | if ac_fn_c_try_link "$LINENO"; then : |
12129 | ac_cv_libexpat=yes | |
c906108c | 12130 | else |
81ecdfbb | 12131 | ac_cv_libexpat=no |
bec39cab | 12132 | fi |
81ecdfbb RW |
12133 | rm -f core conftest.err conftest.$ac_objext \ |
12134 | conftest$ac_exeext conftest.$ac_ext | |
12135 | LIBS="$ac_save_LIBS" | |
c906108c | 12136 | |
95ca63c4 | 12137 | fi |
81ecdfbb RW |
12138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
12139 | $as_echo "$ac_cv_libexpat" >&6; } | |
12140 | if test "$ac_cv_libexpat" = yes; then | |
12141 | HAVE_LIBEXPAT=yes | |
bec39cab | 12142 | |
81ecdfbb | 12143 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 12144 | |
81ecdfbb RW |
12145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
12146 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
12147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
12148 | $as_echo "$LIBEXPAT" >&6; } | |
12149 | else | |
12150 | HAVE_LIBEXPAT=no | |
12151 | CPPFLAGS="$ac_save_CPPFLAGS" | |
12152 | LIBEXPAT= | |
12153 | LTLIBEXPAT= | |
12154 | fi | |
95ca63c4 CF |
12155 | |
12156 | ||
12157 | ||
7cb9022a MK |
12158 | |
12159 | ||
bec39cab | 12160 | |
81ecdfbb RW |
12161 | if test "$HAVE_LIBEXPAT" != yes; then |
12162 | if test "$with_expat" = yes; then | |
12163 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
12164 | else | |
12165 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
12166 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
12167 | fi | |
12168 | else | |
12169 | save_LIBS=$LIBS | |
12170 | LIBS="$LIBS $LIBEXPAT" | |
12171 | for ac_func in XML_StopParser | |
12172 | do : | |
12173 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
12174 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 12175 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 12176 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 12177 | _ACEOF |
95ca63c4 | 12178 | |
bec39cab | 12179 | fi |
bec39cab | 12180 | done |
95ca63c4 | 12181 | |
81ecdfbb RW |
12182 | LIBS=$save_LIBS |
12183 | fi | |
a9322a30 TT |
12184 | fi |
12185 | ||
a9322a30 | 12186 | |
a9322a30 TT |
12187 | |
12188 | ||
ec685c5e | 12189 | |
0c4a4063 | 12190 | |
81ecdfbb RW |
12191 | # Check whether --with-python was given. |
12192 | if test "${with_python+set}" = set; then : | |
12193 | withval=$with_python; | |
bec39cab | 12194 | else |
81ecdfbb | 12195 | with_python=auto |
bec39cab | 12196 | fi |
bec39cab | 12197 | |
81ecdfbb RW |
12198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
12199 | $as_echo_n "checking whether to use python... " >&6; } | |
12200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
12201 | $as_echo "$with_python" >&6; } | |
9a156167 | 12202 | |
81ecdfbb RW |
12203 | if test "${with_python}" = no; then |
12204 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
12205 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
12206 | have_libpython=no | |
bec39cab | 12207 | else |
81ecdfbb | 12208 | case "${with_python}" in |
8c85a4e2 | 12209 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
12210 | if test -d ${with_python}; then |
12211 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 12212 | python_prog="${with_python}/bin/python" |
0c4a4063 | 12213 | python_prefix= |
9c4ea6c5 JB |
12214 | # If python does not exit ${with_python}/bin, then try in |
12215 | # ${with_python}. On Windows/MinGW, this is where the Python | |
12216 | # executable is. | |
12217 | if test ! -x "${python_prog}"; then | |
12218 | python_prog="${with_python}/python" | |
12219 | python_prefix= | |
12220 | fi | |
e7a30f46 | 12221 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
12222 | # Fall back to gdb 7.0/7.1 behaviour. |
12223 | python_prog=missing | |
0c4a4063 | 12224 | python_prefix=${with_python} |
ec685c5e | 12225 | fi |
e7a30f46 | 12226 | elif test -x "${with_python}"; then |
ec685c5e DE |
12227 | # While we can't run python compiled for $host (unless host == build), |
12228 | # the user could write a script that provides the needed information, | |
12229 | # so we support that. | |
ec685c5e | 12230 | python_prog=${with_python} |
0c4a4063 | 12231 | python_prefix= |
ec685c5e DE |
12232 | else |
12233 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
12234 | fi | |
81ecdfbb | 12235 | ;; |
ec685c5e DE |
12236 | */*) |
12237 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
12238 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
12239 | ;; | |
ec685c5e DE |
12240 | *) |
12241 | # The user has either specified auto, yes, or the name of the python | |
12242 | # program assumed to be in $PATH. | |
12243 | python_prefix= | |
12244 | case "${with_python}" in | |
12245 | yes | auto) | |
12246 | if test ${build} = ${host}; then | |
12247 | # Extract the first word of "python", so it can be a program name with args. | |
12248 | set dummy python; ac_word=$2 | |
12249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12250 | $as_echo_n "checking for $ac_word... " >&6; } | |
12251 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
12252 | $as_echo_n "(cached) " >&6 | |
12253 | else | |
12254 | case $python_prog_path in | |
12255 | [\\/]* | ?:[\\/]*) | |
12256 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
12257 | ;; | |
12258 | *) | |
12259 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12260 | for as_dir in $PATH | |
12261 | do | |
12262 | IFS=$as_save_IFS | |
12263 | test -z "$as_dir" && as_dir=. | |
12264 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12265 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12266 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
12267 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12268 | break 2 | |
12269 | fi | |
12270 | done | |
12271 | done | |
12272 | IFS=$as_save_IFS | |
12273 | ||
12274 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
12275 | ;; | |
12276 | esac | |
12277 | fi | |
12278 | python_prog_path=$ac_cv_path_python_prog_path | |
12279 | if test -n "$python_prog_path"; then | |
12280 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
12281 | $as_echo "$python_prog_path" >&6; } | |
12282 | else | |
12283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12284 | $as_echo "no" >&6; } | |
12285 | fi | |
12286 | ||
12287 | ||
12288 | if test "${python_prog_path}" = missing; then | |
12289 | python_prog=missing | |
12290 | else | |
12291 | python_prog=${python_prog_path} | |
12292 | fi | |
12293 | else | |
12294 | # Not much we can do except assume the cross-compiler will find the | |
12295 | # right files. | |
12296 | python_prog=missing | |
12297 | fi | |
12298 | ;; | |
12299 | *) | |
12300 | # While we can't run python compiled for $host (unless host == build), | |
12301 | # the user could write a script that provides the needed information, | |
12302 | # so we support that. | |
12303 | python_prog="${with_python}" | |
12304 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
12305 | set dummy ${python_prog}; ac_word=$2 | |
12306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
12307 | $as_echo_n "checking for $ac_word... " >&6; } | |
12308 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
12309 | $as_echo_n "(cached) " >&6 | |
12310 | else | |
12311 | case $python_prog_path in | |
12312 | [\\/]* | ?:[\\/]*) | |
12313 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
12314 | ;; | |
12315 | *) | |
12316 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12317 | for as_dir in $PATH | |
12318 | do | |
12319 | IFS=$as_save_IFS | |
12320 | test -z "$as_dir" && as_dir=. | |
12321 | for ac_exec_ext in '' $ac_executable_extensions; do | |
12322 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
12323 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
12324 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
12325 | break 2 | |
12326 | fi | |
12327 | done | |
12328 | done | |
12329 | IFS=$as_save_IFS | |
12330 | ||
12331 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
12332 | ;; | |
12333 | esac | |
12334 | fi | |
12335 | python_prog_path=$ac_cv_path_python_prog_path | |
12336 | if test -n "$python_prog_path"; then | |
12337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
12338 | $as_echo "$python_prog_path" >&6; } | |
12339 | else | |
12340 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
12341 | $as_echo "no" >&6; } | |
12342 | fi | |
12343 | ||
12344 | ||
12345 | if test "${python_prog_path}" = missing; then | |
12346 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
12347 | fi | |
12348 | ;; | |
12349 | esac | |
81ecdfbb RW |
12350 | esac |
12351 | ||
ec685c5e | 12352 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
12353 | # We have a python program to use, but it may be too old. |
12354 | # Don't flag an error for --with-python=auto (the default). | |
12355 | have_python_config=yes | |
ec685c5e DE |
12356 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
12357 | if test $? != 0; then | |
e7a30f46 DE |
12358 | have_python_config=failed |
12359 | if test "${with_python}" != auto; then | |
12360 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
12361 | fi | |
ec685c5e DE |
12362 | fi |
12363 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
12364 | if test $? != 0; then | |
e7a30f46 DE |
12365 | have_python_config=failed |
12366 | if test "${with_python}" != auto; then | |
12367 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
12368 | fi | |
ec685c5e | 12369 | fi |
0c4a4063 DE |
12370 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
12371 | if test $? != 0; then | |
e7a30f46 DE |
12372 | have_python_config=failed |
12373 | if test "${with_python}" != auto; then | |
12374 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
12375 | fi | |
0c4a4063 | 12376 | fi |
ec685c5e | 12377 | else |
ac534cba JB |
12378 | # We do not have a python executable we can use to determine where |
12379 | # to find the Python headers and libs. We cannot guess the include | |
12380 | # path from the python_prefix either, because that include path | |
12381 | # depends on the Python version. So, there is nothing much we can | |
12382 | # do except assume that the compiler will be able to find those files. | |
12383 | python_includes= | |
12384 | python_libs= | |
0c4a4063 | 12385 | have_python_config=no |
ec685c5e | 12386 | fi |
bec39cab | 12387 | |
ec685c5e DE |
12388 | # If we have python-config, only try the configuration it provides. |
12389 | # Otherwise fallback on the old way of trying different versions of | |
12390 | # python in turn. | |
81ecdfbb | 12391 | |
ec685c5e DE |
12392 | have_libpython=no |
12393 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
12394 | # Determine the Python version by extracting "-lpython<version>" |
12395 | # part of the python_libs. <version> is usually X.Y with X and Y | |
12396 | # being decimal numbers, but can also be XY (seen on Windows). | |
12397 | # | |
12398 | # The extraction is performed using sed with a regular expression. | |
12399 | # Initially, the regexp used was using the '?' quantifier to make | |
12400 | # the dot in the version number optional. Unfortunately, this | |
12401 | # does not work with non-GNU versions of sed because, because of | |
12402 | # what looks like a limitation (the '?' quantifier does not work | |
12403 | # with back-references). We work around this limitation by using | |
12404 | # the '*' quantifier instead. It means that, in theory, we might | |
12405 | # match unexpected version strings such as "-lpython2..7", but | |
12406 | # this seems unlikely in practice. And even if that happens, | |
12407 | # an error will be triggered later on, when checking that version | |
12408 | # number. | |
ec685c5e | 12409 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 12410 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
12411 | case "${python_version}" in |
12412 | python*) | |
ec685c5e DE |
12413 | |
12414 | version=${python_version} | |
12415 | ||
12416 | new_CPPFLAGS=${python_includes} | |
12417 | new_LIBS=${python_libs} | |
81ecdfbb RW |
12418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
12419 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 12420 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 12421 | save_LIBS=$LIBS |
ec685c5e DE |
12422 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
12423 | LIBS="$LIBS $new_LIBS" | |
12424 | found_usable_python=no | |
81ecdfbb | 12425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12426 | /* end confdefs.h. */ |
ac534cba | 12427 | #include "Python.h" |
81ecdfbb RW |
12428 | int |
12429 | main () | |
12430 | { | |
12431 | Py_Initialize (); | |
12432 | ; | |
12433 | return 0; | |
12434 | } | |
bec39cab | 12435 | _ACEOF |
81ecdfbb | 12436 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
12437 | have_libpython=${version} |
12438 | found_usable_python=yes | |
ac534cba JB |
12439 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
12440 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 12441 | fi |
81ecdfbb RW |
12442 | rm -f core conftest.err conftest.$ac_objext \ |
12443 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
12444 | CPPFLAGS=$save_CPPFLAGS |
12445 | LIBS=$save_LIBS | |
ec685c5e DE |
12446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
12447 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 12448 | |
0c4a4063 DE |
12449 | ;; |
12450 | *) | |
ec685c5e | 12451 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
12452 | ;; |
12453 | esac | |
e7a30f46 | 12454 | elif test "${have_python_config}" != failed; then |
ec685c5e | 12455 | if test "${have_libpython}" = no; then |
9a156167 | 12456 | |
420697bb TT |
12457 | version=python2.7 |
12458 | ||
12459 | new_CPPFLAGS=${python_includes} | |
12460 | new_LIBS="${python_libs} -lpython2.7" | |
12461 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
12462 | $as_echo_n "checking for ${version}... " >&6; } | |
12463 | save_CPPFLAGS=$CPPFLAGS | |
12464 | save_LIBS=$LIBS | |
12465 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
12466 | LIBS="$LIBS $new_LIBS" | |
12467 | found_usable_python=no | |
12468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12469 | /* end confdefs.h. */ | |
ac534cba | 12470 | #include "Python.h" |
420697bb TT |
12471 | int |
12472 | main () | |
12473 | { | |
12474 | Py_Initialize (); | |
12475 | ; | |
12476 | return 0; | |
12477 | } | |
12478 | _ACEOF | |
12479 | if ac_fn_c_try_link "$LINENO"; then : | |
12480 | have_libpython=${version} | |
12481 | found_usable_python=yes | |
ac534cba JB |
12482 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
12483 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
12484 | fi |
12485 | rm -f core conftest.err conftest.$ac_objext \ | |
12486 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
12487 | CPPFLAGS=$save_CPPFLAGS |
12488 | LIBS=$save_LIBS | |
420697bb TT |
12489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
12490 | $as_echo "${found_usable_python}" >&6; } | |
12491 | ||
12492 | fi | |
12493 | if test "${have_libpython}" = no; then | |
12494 | ||
ec685c5e DE |
12495 | version=python2.6 |
12496 | ||
12497 | new_CPPFLAGS=${python_includes} | |
12498 | new_LIBS="${python_libs} -lpython2.6" | |
12499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
12500 | $as_echo_n "checking for ${version}... " >&6; } | |
12501 | save_CPPFLAGS=$CPPFLAGS | |
12502 | save_LIBS=$LIBS | |
12503 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
12504 | LIBS="$LIBS $new_LIBS" | |
12505 | found_usable_python=no | |
12506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12507 | /* end confdefs.h. */ | |
ac534cba | 12508 | #include "Python.h" |
ec685c5e DE |
12509 | int |
12510 | main () | |
12511 | { | |
12512 | Py_Initialize (); | |
12513 | ; | |
12514 | return 0; | |
12515 | } | |
12516 | _ACEOF | |
12517 | if ac_fn_c_try_link "$LINENO"; then : | |
12518 | have_libpython=${version} | |
12519 | found_usable_python=yes | |
ac534cba JB |
12520 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
12521 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
12522 | fi |
12523 | rm -f core conftest.err conftest.$ac_objext \ | |
12524 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
12525 | CPPFLAGS=$save_CPPFLAGS |
12526 | LIBS=$save_LIBS | |
ec685c5e DE |
12527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
12528 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 12529 | |
81ecdfbb | 12530 | fi |
ec685c5e | 12531 | if test ${have_libpython} = no; then |
9a156167 | 12532 | |
81ecdfbb | 12533 | version=python2.5 |
9a156167 | 12534 | |
ec685c5e DE |
12535 | new_CPPFLAGS=${python_includes} |
12536 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
12537 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
12538 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 12539 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 12540 | save_LIBS=$LIBS |
ec685c5e DE |
12541 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
12542 | LIBS="$LIBS $new_LIBS" | |
12543 | found_usable_python=no | |
81ecdfbb | 12544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 12545 | /* end confdefs.h. */ |
ac534cba | 12546 | #include "Python.h" |
81ecdfbb RW |
12547 | int |
12548 | main () | |
12549 | { | |
12550 | Py_Initialize (); | |
12551 | ; | |
12552 | return 0; | |
12553 | } | |
436868fb | 12554 | _ACEOF |
81ecdfbb | 12555 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
12556 | have_libpython=${version} |
12557 | found_usable_python=yes | |
ac534cba JB |
12558 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
12559 | PYTHON_LIBS=$new_LIBS | |
436868fb | 12560 | fi |
81ecdfbb RW |
12561 | rm -f core conftest.err conftest.$ac_objext \ |
12562 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
12563 | CPPFLAGS=$save_CPPFLAGS |
12564 | LIBS=$save_LIBS | |
ec685c5e DE |
12565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
12566 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 12567 | |
81ecdfbb | 12568 | fi |
ec685c5e | 12569 | if test ${have_libpython} = no; then |
a9322a30 | 12570 | |
81ecdfbb | 12571 | version=python2.4 |
a9322a30 | 12572 | |
ec685c5e DE |
12573 | new_CPPFLAGS=${python_includes} |
12574 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
12575 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
12576 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 12577 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 12578 | save_LIBS=$LIBS |
ec685c5e DE |
12579 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
12580 | LIBS="$LIBS $new_LIBS" | |
12581 | found_usable_python=no | |
81ecdfbb | 12582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 12583 | /* end confdefs.h. */ |
ac534cba | 12584 | #include "Python.h" |
a9322a30 TT |
12585 | int |
12586 | main () | |
12587 | { | |
81ecdfbb | 12588 | Py_Initialize (); |
a9322a30 TT |
12589 | ; |
12590 | return 0; | |
12591 | } | |
436868fb | 12592 | _ACEOF |
81ecdfbb | 12593 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
12594 | have_libpython=${version} |
12595 | found_usable_python=yes | |
ac534cba JB |
12596 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
12597 | PYTHON_LIBS=$new_LIBS | |
436868fb | 12598 | fi |
81ecdfbb RW |
12599 | rm -f core conftest.err conftest.$ac_objext \ |
12600 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
12601 | CPPFLAGS=$save_CPPFLAGS |
12602 | LIBS=$save_LIBS | |
ec685c5e DE |
12603 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
12604 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 12605 | |
ec685c5e DE |
12606 | fi |
12607 | fi | |
9c4ea6c5 | 12608 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
12609 | |
12610 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
12611 | ||
9c4ea6c5 | 12612 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
12613 | |
12614 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
12615 | ||
9c4ea6c5 | 12616 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
12617 | |
12618 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
12619 | ||
9c4ea6c5 | 12620 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
12621 | |
12622 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
12623 | ||
81ecdfbb | 12624 | fi |
ec685c5e DE |
12625 | |
12626 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
12627 | case "${with_python}" in |
12628 | yes) | |
12629 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
12630 | ;; | |
12631 | auto) | |
12632 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
12633 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
12634 | ;; | |
12635 | *) | |
12636 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
12637 | ;; | |
12638 | esac | |
0c4a4063 DE |
12639 | else |
12640 | if test -n "${python_prefix}"; then | |
12641 | ||
12642 | cat >>confdefs.h <<_ACEOF | |
12643 | #define WITH_PYTHON_PATH "${python_prefix}" | |
12644 | _ACEOF | |
12645 | ||
12646 | ||
12647 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12648 | if test "x$prefix" = xNONE; then | |
12649 | test_prefix=/usr/local | |
12650 | else | |
12651 | test_prefix=$prefix | |
12652 | fi | |
12653 | else | |
12654 | test_prefix=$exec_prefix | |
12655 | fi | |
12656 | value=0 | |
12657 | case ${python_prefix} in | |
12658 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12659 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12660 | value=1 | |
12661 | ;; | |
12662 | esac | |
12663 | ||
12664 | cat >>confdefs.h <<_ACEOF | |
12665 | #define PYTHON_PATH_RELOCATABLE $value | |
12666 | _ACEOF | |
12667 | ||
12668 | ||
12669 | fi | |
81ecdfbb | 12670 | fi |
436868fb | 12671 | fi |
436868fb | 12672 | |
ec685c5e | 12673 | if test "${have_libpython}" != no; then |
436868fb | 12674 | |
81ecdfbb | 12675 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 12676 | |
81ecdfbb RW |
12677 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
12678 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
12679 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 12680 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 12681 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 12682 | |
81ecdfbb RW |
12683 | # Flags needed to compile Python code (taken from python-config --cflags). |
12684 | # We cannot call python-config directly because it will output whatever was | |
12685 | # used when compiling the Python interpreter itself, including flags which | |
12686 | # would make the python-related objects be compiled differently from the | |
12687 | # rest of GDB (e.g., -O2 and -fPIC). | |
12688 | if test "${GCC}" = yes; then | |
12689 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
12690 | fi | |
436868fb | 12691 | |
81ecdfbb RW |
12692 | if test "x${tentative_python_cflags}" != x; then |
12693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
12694 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
12695 | for flag in ${tentative_python_cflags}; do | |
12696 | # Check that the compiler accepts it | |
12697 | saved_CFLAGS="$CFLAGS" | |
12698 | CFLAGS="$CFLAGS $flag" | |
12699 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12700 | /* end confdefs.h. */ |
81ecdfbb | 12701 | |
a9322a30 TT |
12702 | int |
12703 | main () | |
12704 | { | |
a9322a30 TT |
12705 | |
12706 | ; | |
12707 | return 0; | |
12708 | } | |
bec39cab | 12709 | _ACEOF |
81ecdfbb RW |
12710 | if ac_fn_c_try_compile "$LINENO"; then : |
12711 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 12712 | fi |
81ecdfbb RW |
12713 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
12714 | CFLAGS="$saved_CFLAGS" | |
12715 | done | |
12716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
12717 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
12718 | fi | |
043b6510 JB |
12719 | |
12720 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
12721 | # #if _SGIAPI | |
12722 | # #define siginfo __siginfo | |
12723 | # #endif | |
12724 | # The problem is that including Python causes some XOPEN macros to be | |
12725 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
12726 | # to false. So, we work around this issue by defining siginfo ourself | |
12727 | # though the command-line. | |
12728 | case "$gdb_host" in | |
12729 | irix*) if test "${GCC}" = yes; then | |
12730 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
12731 | fi | |
12732 | ;; | |
12733 | esac | |
81ecdfbb RW |
12734 | else |
12735 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
12736 | # included. |
12737 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
12738 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
12739 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 12740 | fi |
9a156167 | 12741 | |
9a156167 | 12742 | |
ac534cba JB |
12743 | |
12744 | ||
81ecdfbb RW |
12745 | # ------------------------- # |
12746 | # Checks for header files. # | |
12747 | # ------------------------- # | |
c890192f | 12748 | |
81ecdfbb RW |
12749 | ac_header_dirent=no |
12750 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
12751 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
12752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
12753 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
12754 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
12755 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12756 | else |
81ecdfbb | 12757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12758 | /* end confdefs.h. */ |
81ecdfbb RW |
12759 | #include <sys/types.h> |
12760 | #include <$ac_hdr> | |
12761 | ||
a9322a30 TT |
12762 | int |
12763 | main () | |
12764 | { | |
81ecdfbb RW |
12765 | if ((DIR *) 0) |
12766 | return 0; | |
a9322a30 TT |
12767 | ; |
12768 | return 0; | |
12769 | } | |
bec39cab | 12770 | _ACEOF |
81ecdfbb RW |
12771 | if ac_fn_c_try_compile "$LINENO"; then : |
12772 | eval "$as_ac_Header=yes" | |
bec39cab | 12773 | else |
81ecdfbb | 12774 | eval "$as_ac_Header=no" |
bec39cab | 12775 | fi |
81ecdfbb | 12776 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 12777 | fi |
81ecdfbb RW |
12778 | eval ac_res=\$$as_ac_Header |
12779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
12780 | $as_echo "$ac_res" >&6; } | |
12781 | eval as_val=\$$as_ac_Header | |
12782 | if test "x$as_val" = x""yes; then : | |
12783 | cat >>confdefs.h <<_ACEOF | |
12784 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 12785 | _ACEOF |
bec39cab | 12786 | |
81ecdfbb RW |
12787 | ac_header_dirent=$ac_hdr; break |
12788 | fi | |
bec39cab | 12789 | |
81ecdfbb RW |
12790 | done |
12791 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
12792 | if test $ac_header_dirent = dirent.h; then | |
12793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
12794 | $as_echo_n "checking for library containing opendir... " >&6; } | |
12795 | if test "${ac_cv_search_opendir+set}" = set; then : | |
12796 | $as_echo_n "(cached) " >&6 | |
c890192f | 12797 | else |
81ecdfbb RW |
12798 | ac_func_search_save_LIBS=$LIBS |
12799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12800 | /* end confdefs.h. */ | |
12801 | ||
12802 | /* Override any GCC internal prototype to avoid an error. | |
12803 | Use char because int might match the return type of a GCC | |
12804 | builtin and then its argument prototype would still apply. */ | |
12805 | #ifdef __cplusplus | |
12806 | extern "C" | |
12807 | #endif | |
12808 | char opendir (); | |
12809 | int | |
12810 | main () | |
12811 | { | |
12812 | return opendir (); | |
12813 | ; | |
12814 | return 0; | |
12815 | } | |
bec39cab | 12816 | _ACEOF |
81ecdfbb RW |
12817 | for ac_lib in '' dir; do |
12818 | if test -z "$ac_lib"; then | |
12819 | ac_res="none required" | |
12820 | else | |
12821 | ac_res=-l$ac_lib | |
12822 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12823 | fi | |
12824 | if ac_fn_c_try_link "$LINENO"; then : | |
12825 | ac_cv_search_opendir=$ac_res | |
12826 | fi | |
12827 | rm -f core conftest.err conftest.$ac_objext \ | |
12828 | conftest$ac_exeext | |
12829 | if test "${ac_cv_search_opendir+set}" = set; then : | |
12830 | break | |
12831 | fi | |
12832 | done | |
12833 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 12834 | |
81ecdfbb RW |
12835 | else |
12836 | ac_cv_search_opendir=no | |
12837 | fi | |
12838 | rm conftest.$ac_ext | |
12839 | LIBS=$ac_func_search_save_LIBS | |
12840 | fi | |
12841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
12842 | $as_echo "$ac_cv_search_opendir" >&6; } | |
12843 | ac_res=$ac_cv_search_opendir | |
12844 | if test "$ac_res" != no; then : | |
12845 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 12846 | |
bec39cab | 12847 | fi |
81ecdfbb | 12848 | |
bec39cab | 12849 | else |
81ecdfbb RW |
12850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
12851 | $as_echo_n "checking for library containing opendir... " >&6; } | |
12852 | if test "${ac_cv_search_opendir+set}" = set; then : | |
12853 | $as_echo_n "(cached) " >&6 | |
12854 | else | |
12855 | ac_func_search_save_LIBS=$LIBS | |
12856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 12857 | /* end confdefs.h. */ |
81ecdfbb RW |
12858 | |
12859 | /* Override any GCC internal prototype to avoid an error. | |
12860 | Use char because int might match the return type of a GCC | |
12861 | builtin and then its argument prototype would still apply. */ | |
12862 | #ifdef __cplusplus | |
12863 | extern "C" | |
12864 | #endif | |
12865 | char opendir (); | |
a9322a30 TT |
12866 | int |
12867 | main () | |
12868 | { | |
81ecdfbb | 12869 | return opendir (); |
a9322a30 TT |
12870 | ; |
12871 | return 0; | |
12872 | } | |
bec39cab | 12873 | _ACEOF |
81ecdfbb RW |
12874 | for ac_lib in '' x; do |
12875 | if test -z "$ac_lib"; then | |
12876 | ac_res="none required" | |
12877 | else | |
12878 | ac_res=-l$ac_lib | |
12879 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12880 | fi | |
12881 | if ac_fn_c_try_link "$LINENO"; then : | |
12882 | ac_cv_search_opendir=$ac_res | |
12883 | fi | |
12884 | rm -f core conftest.err conftest.$ac_objext \ | |
12885 | conftest$ac_exeext | |
12886 | if test "${ac_cv_search_opendir+set}" = set; then : | |
12887 | break | |
12888 | fi | |
12889 | done | |
12890 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 12891 | |
81ecdfbb RW |
12892 | else |
12893 | ac_cv_search_opendir=no | |
bec39cab | 12894 | fi |
81ecdfbb RW |
12895 | rm conftest.$ac_ext |
12896 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 12897 | fi |
81ecdfbb RW |
12898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
12899 | $as_echo "$ac_cv_search_opendir" >&6; } | |
12900 | ac_res=$ac_cv_search_opendir | |
12901 | if test "$ac_res" != no; then : | |
12902 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 12903 | |
81ecdfbb | 12904 | fi |
bec39cab | 12905 | |
81ecdfbb | 12906 | fi |
bec39cab | 12907 | |
81ecdfbb RW |
12908 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
12909 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
12910 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
12911 | $as_echo_n "(cached) " >&6 | |
9a156167 | 12912 | else |
81ecdfbb RW |
12913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
12914 | /* end confdefs.h. */ | |
12915 | #include <sys/types.h> | |
12916 | #include <sys/stat.h> | |
12917 | ||
12918 | #if defined S_ISBLK && defined S_IFDIR | |
12919 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
12920 | #endif | |
12921 | ||
12922 | #if defined S_ISBLK && defined S_IFCHR | |
12923 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
12924 | #endif | |
12925 | ||
12926 | #if defined S_ISLNK && defined S_IFREG | |
12927 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
12928 | #endif | |
12929 | ||
12930 | #if defined S_ISSOCK && defined S_IFREG | |
12931 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
12932 | #endif | |
12933 | ||
bec39cab | 12934 | _ACEOF |
81ecdfbb RW |
12935 | if ac_fn_c_try_compile "$LINENO"; then : |
12936 | ac_cv_header_stat_broken=no | |
12937 | else | |
12938 | ac_cv_header_stat_broken=yes | |
12939 | fi | |
12940 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
12941 | fi | |
12942 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
12943 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
12944 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 12945 | |
81ecdfbb | 12946 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 12947 | |
bec39cab | 12948 | fi |
81ecdfbb RW |
12949 | |
12950 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
12951 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
12952 | if test "${ac_cv_header_stdc+set}" = set; then : | |
12953 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12954 | else |
81ecdfbb | 12955 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12956 | /* end confdefs.h. */ |
81ecdfbb RW |
12957 | #include <stdlib.h> |
12958 | #include <stdarg.h> | |
12959 | #include <string.h> | |
12960 | #include <float.h> | |
12961 | ||
a9322a30 TT |
12962 | int |
12963 | main () | |
12964 | { | |
a9322a30 TT |
12965 | |
12966 | ; | |
12967 | return 0; | |
12968 | } | |
bec39cab | 12969 | _ACEOF |
81ecdfbb RW |
12970 | if ac_fn_c_try_compile "$LINENO"; then : |
12971 | ac_cv_header_stdc=yes | |
bec39cab | 12972 | else |
81ecdfbb | 12973 | ac_cv_header_stdc=no |
a9322a30 | 12974 | fi |
81ecdfbb | 12975 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12976 | |
81ecdfbb RW |
12977 | if test $ac_cv_header_stdc = yes; then |
12978 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12979 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12980 | /* end confdefs.h. */ | |
12981 | #include <string.h> | |
bec39cab | 12982 | |
81ecdfbb RW |
12983 | _ACEOF |
12984 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12985 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 12986 | |
bec39cab | 12987 | else |
81ecdfbb RW |
12988 | ac_cv_header_stdc=no |
12989 | fi | |
12990 | rm -f conftest* | |
12991 | ||
12992 | fi | |
12993 | ||
12994 | if test $ac_cv_header_stdc = yes; then | |
12995 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12996 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12997 | /* end confdefs.h. */ | |
12998 | #include <stdlib.h> | |
12999 | ||
bec39cab | 13000 | _ACEOF |
81ecdfbb RW |
13001 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
13002 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 13003 | |
81ecdfbb RW |
13004 | else |
13005 | ac_cv_header_stdc=no | |
13006 | fi | |
13007 | rm -f conftest* | |
bec39cab | 13008 | |
bec39cab | 13009 | fi |
81ecdfbb RW |
13010 | |
13011 | if test $ac_cv_header_stdc = yes; then | |
13012 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
13013 | if test "$cross_compiling" = yes; then : | |
13014 | : | |
bec39cab | 13015 | else |
81ecdfbb | 13016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13017 | /* end confdefs.h. */ |
81ecdfbb RW |
13018 | #include <ctype.h> |
13019 | #include <stdlib.h> | |
13020 | #if ((' ' & 0x0FF) == 0x020) | |
13021 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
13022 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
13023 | #else | |
13024 | # define ISLOWER(c) \ | |
13025 | (('a' <= (c) && (c) <= 'i') \ | |
13026 | || ('j' <= (c) && (c) <= 'r') \ | |
13027 | || ('s' <= (c) && (c) <= 'z')) | |
13028 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
13029 | #endif | |
13030 | ||
13031 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
13032 | int |
13033 | main () | |
13034 | { | |
81ecdfbb RW |
13035 | int i; |
13036 | for (i = 0; i < 256; i++) | |
13037 | if (XOR (islower (i), ISLOWER (i)) | |
13038 | || toupper (i) != TOUPPER (i)) | |
13039 | return 2; | |
a9322a30 TT |
13040 | return 0; |
13041 | } | |
bec39cab | 13042 | _ACEOF |
81ecdfbb RW |
13043 | if ac_fn_c_try_run "$LINENO"; then : |
13044 | ||
bec39cab | 13045 | else |
81ecdfbb RW |
13046 | ac_cv_header_stdc=no |
13047 | fi | |
13048 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
13049 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
13050 | fi | |
bec39cab | 13051 | |
bec39cab | 13052 | fi |
a9322a30 | 13053 | fi |
81ecdfbb RW |
13054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
13055 | $as_echo "$ac_cv_header_stdc" >&6; } | |
13056 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 13057 | |
81ecdfbb | 13058 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 13059 | |
81ecdfbb | 13060 | fi |
bec39cab | 13061 | |
81ecdfbb RW |
13062 | # elf_hp.h is for HP/UX 64-bit shared library support. |
13063 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
13064 | # unconditionally, so what's the point in checking these? | |
13065 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
13066 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
13067 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
13068 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
13069 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
13070 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
13071 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
a2d08b9e | 13072 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \ |
2fa291ac | 13073 | dlfcn.h sys/socket.h sys/un.h |
81ecdfbb RW |
13074 | do : |
13075 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13076 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13077 | eval as_val=\$$as_ac_Header | |
13078 | if test "x$as_val" = x""yes; then : | |
bec39cab | 13079 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13080 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13081 | _ACEOF |
c906108c | 13082 | |
bec39cab | 13083 | fi |
81ecdfbb RW |
13084 | |
13085 | done | |
13086 | ||
13087 | for ac_header in link.h | |
13088 | do : | |
13089 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
13090 | # include <sys/types.h> | |
13091 | #endif | |
13092 | #if HAVE_NLIST_H | |
13093 | # include <nlist.h> | |
a9322a30 TT |
13094 | #endif |
13095 | ||
81ecdfbb RW |
13096 | " |
13097 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
13098 | cat >>confdefs.h <<_ACEOF | |
13099 | #define HAVE_LINK_H 1 | |
bec39cab | 13100 | _ACEOF |
bec39cab | 13101 | |
a9322a30 | 13102 | fi |
bec39cab | 13103 | |
81ecdfbb | 13104 | done |
c906108c | 13105 | |
81ecdfbb RW |
13106 | for ac_header in sys/proc.h |
13107 | do : | |
13108 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
13109 | # include <sys/param.h> | |
13110 | #endif | |
c906108c | 13111 | |
81ecdfbb RW |
13112 | " |
13113 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 13114 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13115 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 13116 | _ACEOF |
5ee754fc | 13117 | |
bec39cab | 13118 | fi |
81ecdfbb RW |
13119 | |
13120 | done | |
13121 | ||
13122 | for ac_header in sys/user.h | |
13123 | do : | |
13124 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
13125 | # include <sys/param.h> | |
a9322a30 TT |
13126 | #endif |
13127 | ||
81ecdfbb RW |
13128 | " |
13129 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
13130 | cat >>confdefs.h <<_ACEOF | |
13131 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 13132 | _ACEOF |
bec39cab | 13133 | |
a9322a30 | 13134 | fi |
bec39cab | 13135 | |
81ecdfbb | 13136 | done |
5ee754fc | 13137 | |
5ee754fc | 13138 | |
81ecdfbb RW |
13139 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
13140 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
13141 | # think that we don't have <curses.h> if we're using GCC. | |
13142 | case $host_os in | |
13143 | solaris2.[789]) | |
13144 | if test "$GCC" = yes; then | |
13145 | ||
13146 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
13147 | ||
13148 | fi ;; | |
13149 | esac | |
13150 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
13151 | do : | |
13152 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13153 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13154 | eval as_val=\$$as_ac_Header | |
13155 | if test "x$as_val" = x""yes; then : | |
bec39cab | 13156 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13157 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13158 | _ACEOF |
5ee754fc MK |
13159 | |
13160 | fi | |
13161 | ||
81ecdfbb | 13162 | done |
bec39cab | 13163 | |
81ecdfbb RW |
13164 | for ac_header in term.h |
13165 | do : | |
13166 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
13167 | # include <curses.h> | |
13168 | #endif | |
bec39cab | 13169 | |
81ecdfbb RW |
13170 | " |
13171 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
13172 | cat >>confdefs.h <<_ACEOF | |
13173 | #define HAVE_TERM_H 1 | |
a8111142 | 13174 | _ACEOF |
a8111142 | 13175 | |
a8111142 | 13176 | fi |
a8111142 | 13177 | |
81ecdfbb | 13178 | done |
a8111142 TT |
13179 | |
13180 | ||
81ecdfbb RW |
13181 | # ------------------------- # |
13182 | # Checks for declarations. # | |
13183 | # ------------------------- # | |
a9322a30 | 13184 | |
81ecdfbb RW |
13185 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
13186 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
13187 | ac_have_decl=1 | |
bec39cab | 13188 | else |
81ecdfbb RW |
13189 | ac_have_decl=0 |
13190 | fi | |
13191 | ||
13192 | cat >>confdefs.h <<_ACEOF | |
13193 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 13194 | _ACEOF |
81ecdfbb RW |
13195 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
13196 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
13197 | ac_have_decl=1 | |
13198 | else | |
13199 | ac_have_decl=0 | |
13200 | fi | |
13201 | ||
13202 | cat >>confdefs.h <<_ACEOF | |
13203 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 13204 | _ACEOF |
81ecdfbb RW |
13205 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
13206 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
13207 | ac_have_decl=1 | |
bec39cab | 13208 | else |
81ecdfbb RW |
13209 | ac_have_decl=0 |
13210 | fi | |
bec39cab | 13211 | |
81ecdfbb RW |
13212 | cat >>confdefs.h <<_ACEOF |
13213 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 13214 | _ACEOF |
81ecdfbb RW |
13215 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
13216 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
13217 | ac_have_decl=1 | |
13218 | else | |
13219 | ac_have_decl=0 | |
13220 | fi | |
13221 | ||
13222 | cat >>confdefs.h <<_ACEOF | |
13223 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 13224 | _ACEOF |
81ecdfbb RW |
13225 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
13226 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
13227 | ac_have_decl=1 | |
bec39cab | 13228 | else |
81ecdfbb RW |
13229 | ac_have_decl=0 |
13230 | fi | |
5ee754fc | 13231 | |
81ecdfbb RW |
13232 | cat >>confdefs.h <<_ACEOF |
13233 | #define HAVE_DECL_STRSTR $ac_have_decl | |
13234 | _ACEOF | |
13235 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
13236 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
13237 | ac_have_decl=1 | |
13238 | else | |
13239 | ac_have_decl=0 | |
5ee754fc | 13240 | fi |
81ecdfbb RW |
13241 | |
13242 | cat >>confdefs.h <<_ACEOF | |
13243 | #define HAVE_DECL_GETOPT $ac_have_decl | |
13244 | _ACEOF | |
13245 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
13246 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
13247 | ac_have_decl=1 | |
13248 | else | |
13249 | ac_have_decl=0 | |
5ee754fc | 13250 | fi |
81ecdfbb RW |
13251 | |
13252 | cat >>confdefs.h <<_ACEOF | |
13253 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
13254 | _ACEOF | |
13255 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
13256 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
13257 | ac_have_decl=1 | |
13258 | else | |
13259 | ac_have_decl=0 | |
5ee754fc MK |
13260 | fi |
13261 | ||
a9322a30 | 13262 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13263 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 13264 | _ACEOF |
5ee754fc | 13265 | |
5ee754fc | 13266 | |
81ecdfbb RW |
13267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
13268 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
13269 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
13270 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13271 | else |
81ecdfbb | 13272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13273 | /* end confdefs.h. */ |
81ecdfbb | 13274 | #include <locale.h> |
a9322a30 TT |
13275 | int |
13276 | main () | |
13277 | { | |
81ecdfbb | 13278 | return LC_MESSAGES |
a9322a30 TT |
13279 | ; |
13280 | return 0; | |
13281 | } | |
bec39cab | 13282 | _ACEOF |
81ecdfbb RW |
13283 | if ac_fn_c_try_link "$LINENO"; then : |
13284 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 13285 | else |
81ecdfbb RW |
13286 | am_cv_val_LC_MESSAGES=no |
13287 | fi | |
13288 | rm -f core conftest.err conftest.$ac_objext \ | |
13289 | conftest$ac_exeext conftest.$ac_ext | |
13290 | fi | |
13291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
13292 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
13293 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 13294 | |
81ecdfbb RW |
13295 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
13296 | ||
13297 | fi | |
13298 | ||
13299 | ||
13300 | # ----------------------- # | |
13301 | # Checks for structures. # | |
13302 | # ----------------------- # | |
13303 | ||
13304 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
13305 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
13306 | ||
13307 | cat >>confdefs.h <<_ACEOF | |
13308 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 13309 | _ACEOF |
7eb368b3 | 13310 | |
81ecdfbb | 13311 | |
7eb368b3 | 13312 | fi |
81ecdfbb RW |
13313 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
13314 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 13315 | |
a9322a30 TT |
13316 | cat >>confdefs.h <<_ACEOF |
13317 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
13318 | _ACEOF |
13319 | ||
a9322a30 | 13320 | |
7eb368b3 NR |
13321 | fi |
13322 | ||
7eb368b3 | 13323 | |
a9322a30 TT |
13324 | # ------------------ # |
13325 | # Checks for types. # | |
13326 | # ------------------ # | |
7eb368b3 | 13327 | |
81ecdfbb RW |
13328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
13329 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
13330 | if test "${ac_cv_type_signal+set}" = set; then : | |
13331 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13332 | else |
81ecdfbb | 13333 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13334 | /* end confdefs.h. */ |
a9322a30 TT |
13335 | #include <sys/types.h> |
13336 | #include <signal.h> | |
7cb9022a | 13337 | |
a9322a30 TT |
13338 | int |
13339 | main () | |
13340 | { | |
81ecdfbb | 13341 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
13342 | ; |
13343 | return 0; | |
13344 | } | |
bec39cab | 13345 | _ACEOF |
81ecdfbb RW |
13346 | if ac_fn_c_try_compile "$LINENO"; then : |
13347 | ac_cv_type_signal=int | |
bec39cab | 13348 | else |
81ecdfbb | 13349 | ac_cv_type_signal=void |
bec39cab | 13350 | fi |
81ecdfbb | 13351 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 13352 | fi |
81ecdfbb RW |
13353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
13354 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 13355 | |
a9322a30 TT |
13356 | cat >>confdefs.h <<_ACEOF |
13357 | #define RETSIGTYPE $ac_cv_type_signal | |
13358 | _ACEOF | |
5ee754fc | 13359 | |
bec39cab | 13360 | |
81ecdfbb | 13361 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
13362 | #include <sys/socket.h> |
13363 | ||
81ecdfbb RW |
13364 | " |
13365 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 13366 | |
a9322a30 TT |
13367 | cat >>confdefs.h <<_ACEOF |
13368 | #define HAVE_SOCKLEN_T 1 | |
13369 | _ACEOF | |
13370 | ||
13371 | ||
13372 | fi | |
13373 | ||
13374 | ||
13375 | # ------------------------------------- # | |
13376 | # Checks for compiler characteristics. # | |
13377 | # ------------------------------------- # | |
13378 | ||
81ecdfbb RW |
13379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
13380 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
13381 | if test "${ac_cv_c_const+set}" = set; then : | |
13382 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13383 | else |
81ecdfbb | 13384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13385 | /* end confdefs.h. */ |
a9322a30 TT |
13386 | |
13387 | int | |
13388 | main () | |
13389 | { | |
13390 | /* FIXME: Include the comments suggested by Paul. */ | |
13391 | #ifndef __cplusplus | |
13392 | /* Ultrix mips cc rejects this. */ | |
13393 | typedef int charset[2]; | |
81ecdfbb | 13394 | const charset cs; |
a9322a30 | 13395 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
13396 | char const *const *pcpcc; |
13397 | char **ppc; | |
a9322a30 TT |
13398 | /* NEC SVR4.0.2 mips cc rejects this. */ |
13399 | struct point {int x, y;}; | |
13400 | static struct point const zero = {0,0}; | |
13401 | /* AIX XL C 1.02.0.0 rejects this. | |
13402 | It does not let you subtract one const X* pointer from another in | |
13403 | an arm of an if-expression whose if-part is not a constant | |
13404 | expression */ | |
13405 | const char *g = "string"; | |
81ecdfbb | 13406 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 13407 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
13408 | ++pcpcc; |
13409 | ppc = (char**) pcpcc; | |
13410 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
13411 | { /* SCO 3.2v4 cc rejects this. */ |
13412 | char *t; | |
13413 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
13414 | ||
13415 | *t++ = 0; | |
81ecdfbb | 13416 | if (s) return 0; |
a9322a30 TT |
13417 | } |
13418 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
13419 | int x[] = {25, 17}; | |
13420 | const int *foo = &x[0]; | |
13421 | ++foo; | |
13422 | } | |
13423 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
13424 | typedef const int *iptr; | |
13425 | iptr p = 0; | |
13426 | ++p; | |
13427 | } | |
13428 | { /* AIX XL C 1.02.0.0 rejects this saying | |
13429 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
13430 | struct s { int j; const int *ap[3]; }; | |
13431 | struct s *b; b->j = 5; | |
13432 | } | |
13433 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
13434 | const int foo = 10; | |
81ecdfbb | 13435 | if (!foo) return 0; |
a9322a30 | 13436 | } |
81ecdfbb | 13437 | return !cs[0] && !zero.x; |
a9322a30 TT |
13438 | #endif |
13439 | ||
13440 | ; | |
13441 | return 0; | |
13442 | } | |
bec39cab | 13443 | _ACEOF |
81ecdfbb | 13444 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 13445 | ac_cv_c_const=yes |
5ee754fc | 13446 | else |
81ecdfbb | 13447 | ac_cv_c_const=no |
5ee754fc | 13448 | fi |
81ecdfbb | 13449 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 13450 | fi |
81ecdfbb RW |
13451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
13452 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 13453 | if test $ac_cv_c_const = no; then |
bec39cab | 13454 | |
81ecdfbb | 13455 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 13456 | |
5ee754fc | 13457 | fi |
bec39cab | 13458 | |
81ecdfbb RW |
13459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
13460 | $as_echo_n "checking for inline... " >&6; } | |
13461 | if test "${ac_cv_c_inline+set}" = set; then : | |
13462 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13463 | else |
a9322a30 TT |
13464 | ac_cv_c_inline=no |
13465 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 13466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13467 | /* end confdefs.h. */ |
a9322a30 TT |
13468 | #ifndef __cplusplus |
13469 | typedef int foo_t; | |
13470 | static $ac_kw foo_t static_foo () {return 0; } | |
13471 | $ac_kw foo_t foo () {return 0; } | |
13472 | #endif | |
13473 | ||
bec39cab | 13474 | _ACEOF |
81ecdfbb RW |
13475 | if ac_fn_c_try_compile "$LINENO"; then : |
13476 | ac_cv_c_inline=$ac_kw | |
bec39cab | 13477 | fi |
81ecdfbb RW |
13478 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13479 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 13480 | done |
bec39cab | 13481 | |
5ee754fc | 13482 | fi |
81ecdfbb RW |
13483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
13484 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 13485 | |
a9322a30 TT |
13486 | case $ac_cv_c_inline in |
13487 | inline | yes) ;; | |
13488 | *) | |
13489 | case $ac_cv_c_inline in | |
13490 | no) ac_val=;; | |
13491 | *) ac_val=$ac_cv_c_inline;; | |
13492 | esac | |
13493 | cat >>confdefs.h <<_ACEOF | |
13494 | #ifndef __cplusplus | |
13495 | #define inline $ac_val | |
13496 | #endif | |
13497 | _ACEOF | |
bec39cab AC |
13498 | ;; |
13499 | esac | |
bec39cab | 13500 | |
81ecdfbb RW |
13501 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
13502 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
13503 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
13504 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13505 | else |
81ecdfbb RW |
13506 | ac_cv_c_bigendian=unknown |
13507 | # See if we're dealing with a universal compiler. | |
13508 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13509 | /* end confdefs.h. */ | |
13510 | #ifndef __APPLE_CC__ | |
13511 | not a universal capable compiler | |
13512 | #endif | |
13513 | typedef int dummy; | |
13514 | ||
13515 | _ACEOF | |
13516 | if ac_fn_c_try_compile "$LINENO"; then : | |
13517 | ||
13518 | # Check for potential -arch flags. It is not universal unless | |
13519 | # there are at least two -arch flags with different values. | |
13520 | ac_arch= | |
13521 | ac_prev= | |
13522 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
13523 | if test -n "$ac_prev"; then | |
13524 | case $ac_word in | |
13525 | i?86 | x86_64 | ppc | ppc64) | |
13526 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
13527 | ac_arch=$ac_word | |
13528 | else | |
13529 | ac_cv_c_bigendian=universal | |
13530 | break | |
13531 | fi | |
13532 | ;; | |
13533 | esac | |
13534 | ac_prev= | |
13535 | elif test "x$ac_word" = "x-arch"; then | |
13536 | ac_prev=arch | |
13537 | fi | |
13538 | done | |
13539 | fi | |
13540 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13541 | if test $ac_cv_c_bigendian = unknown; then | |
13542 | # See if sys/param.h defines the BYTE_ORDER macro. | |
13543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 13544 | /* end confdefs.h. */ |
a9322a30 | 13545 | #include <sys/types.h> |
81ecdfbb | 13546 | #include <sys/param.h> |
a9322a30 TT |
13547 | |
13548 | int | |
13549 | main () | |
13550 | { | |
81ecdfbb RW |
13551 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
13552 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
13553 | && LITTLE_ENDIAN) | |
13554 | bogus endian macros | |
13555 | #endif | |
a9322a30 TT |
13556 | |
13557 | ; | |
13558 | return 0; | |
13559 | } | |
bec39cab | 13560 | _ACEOF |
81ecdfbb | 13561 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 13562 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 13563 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13564 | /* end confdefs.h. */ |
a9322a30 | 13565 | #include <sys/types.h> |
81ecdfbb | 13566 | #include <sys/param.h> |
a9322a30 TT |
13567 | |
13568 | int | |
13569 | main () | |
13570 | { | |
13571 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
13572 | not big endian |
13573 | #endif | |
a9322a30 TT |
13574 | |
13575 | ; | |
13576 | return 0; | |
13577 | } | |
bec39cab | 13578 | _ACEOF |
81ecdfbb | 13579 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 13580 | ac_cv_c_bigendian=yes |
5ee754fc | 13581 | else |
81ecdfbb | 13582 | ac_cv_c_bigendian=no |
5ee754fc | 13583 | fi |
81ecdfbb RW |
13584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13585 | fi | |
13586 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
13587 | fi | |
13588 | if test $ac_cv_c_bigendian = unknown; then | |
13589 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
13590 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13591 | /* end confdefs.h. */ | |
13592 | #include <limits.h> | |
bec39cab | 13593 | |
81ecdfbb RW |
13594 | int |
13595 | main () | |
13596 | { | |
13597 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
13598 | bogus endian macros | |
13599 | #endif | |
13600 | ||
13601 | ; | |
13602 | return 0; | |
13603 | } | |
7eb368b3 | 13604 | _ACEOF |
81ecdfbb RW |
13605 | if ac_fn_c_try_compile "$LINENO"; then : |
13606 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
13607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 13608 | /* end confdefs.h. */ |
81ecdfbb RW |
13609 | #include <limits.h> |
13610 | ||
7eb368b3 NR |
13611 | int |
13612 | main () | |
13613 | { | |
81ecdfbb RW |
13614 | #ifndef _BIG_ENDIAN |
13615 | not big endian | |
13616 | #endif | |
13617 | ||
7eb368b3 NR |
13618 | ; |
13619 | return 0; | |
13620 | } | |
13621 | _ACEOF | |
81ecdfbb | 13622 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 13623 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
13624 | else |
13625 | ac_cv_c_bigendian=no | |
a9322a30 | 13626 | fi |
81ecdfbb | 13627 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 13628 | fi |
81ecdfbb RW |
13629 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
13630 | fi | |
13631 | if test $ac_cv_c_bigendian = unknown; then | |
13632 | # Compile a test program. | |
13633 | if test "$cross_compiling" = yes; then : | |
13634 | # Try to guess by grepping values from an object file. | |
13635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13636 | /* end confdefs.h. */ | |
13637 | short int ascii_mm[] = | |
13638 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
13639 | short int ascii_ii[] = | |
13640 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
13641 | int use_ascii (int i) { | |
13642 | return ascii_mm[i] + ascii_ii[i]; | |
13643 | } | |
13644 | short int ebcdic_ii[] = | |
13645 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
13646 | short int ebcdic_mm[] = | |
13647 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
13648 | int use_ebcdic (int i) { | |
13649 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
13650 | } | |
13651 | extern int foo; | |
7eb368b3 | 13652 | |
81ecdfbb RW |
13653 | int |
13654 | main () | |
13655 | { | |
13656 | return use_ascii (foo) == use_ebcdic (foo); | |
13657 | ; | |
13658 | return 0; | |
13659 | } | |
13660 | _ACEOF | |
13661 | if ac_fn_c_try_compile "$LINENO"; then : | |
13662 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
13663 | ac_cv_c_bigendian=yes | |
13664 | fi | |
13665 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
13666 | if test "$ac_cv_c_bigendian" = unknown; then | |
13667 | ac_cv_c_bigendian=no | |
13668 | else | |
13669 | # finding both strings is unlikely to happen, but who knows? | |
13670 | ac_cv_c_bigendian=unknown | |
13671 | fi | |
13672 | fi | |
7eb368b3 | 13673 | fi |
81ecdfbb | 13674 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 13675 | else |
81ecdfbb | 13676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13677 | /* end confdefs.h. */ |
81ecdfbb | 13678 | $ac_includes_default |
d3ea6809 MM |
13679 | int |
13680 | main () | |
13681 | { | |
81ecdfbb RW |
13682 | |
13683 | /* Are we little or big endian? From Harbison&Steele. */ | |
13684 | union | |
13685 | { | |
13686 | long int l; | |
13687 | char c[sizeof (long int)]; | |
13688 | } u; | |
13689 | u.l = 1; | |
13690 | return u.c[sizeof (long int) - 1] == 1; | |
13691 | ||
13692 | ; | |
13693 | return 0; | |
d3ea6809 MM |
13694 | } |
13695 | _ACEOF | |
81ecdfbb | 13696 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 13697 | ac_cv_c_bigendian=no |
d3ea6809 | 13698 | else |
81ecdfbb | 13699 | ac_cv_c_bigendian=yes |
d3ea6809 | 13700 | fi |
81ecdfbb RW |
13701 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13702 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13703 | fi |
a9322a30 | 13704 | |
81ecdfbb RW |
13705 | fi |
13706 | fi | |
13707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
13708 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
13709 | case $ac_cv_c_bigendian in #( | |
13710 | yes) | |
13711 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
13712 | ;; #( | |
13713 | no) | |
13714 | ;; #( | |
13715 | universal) | |
13716 | ||
13717 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
13718 | ||
13719 | ;; #( | |
13720 | *) | |
13721 | as_fn_error "unknown endianness | |
13722 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
13723 | esac | |
d3ea6809 MM |
13724 | |
13725 | ||
a9322a30 TT |
13726 | # ------------------------------ # |
13727 | # Checks for library functions. # | |
13728 | # ------------------------------ # | |
d3ea6809 | 13729 | |
a9322a30 TT |
13730 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
13731 | # for constant arguments. Useless! | |
81ecdfbb RW |
13732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
13733 | $as_echo_n "checking for working alloca.h... " >&6; } | |
13734 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
13735 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 13736 | else |
81ecdfbb | 13737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 13738 | /* end confdefs.h. */ |
a9322a30 | 13739 | #include <alloca.h> |
bec39cab AC |
13740 | int |
13741 | main () | |
13742 | { | |
a9322a30 | 13743 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 13744 | if (p) return 0; |
bec39cab AC |
13745 | ; |
13746 | return 0; | |
13747 | } | |
13748 | _ACEOF | |
81ecdfbb | 13749 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 13750 | ac_cv_working_alloca_h=yes |
bec39cab | 13751 | else |
81ecdfbb | 13752 | ac_cv_working_alloca_h=no |
bec39cab | 13753 | fi |
81ecdfbb RW |
13754 | rm -f core conftest.err conftest.$ac_objext \ |
13755 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13756 | fi |
81ecdfbb RW |
13757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
13758 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
13759 | if test $ac_cv_working_alloca_h = yes; then |
13760 | ||
81ecdfbb | 13761 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 13762 | |
c906108c | 13763 | fi |
bec39cab | 13764 | |
81ecdfbb RW |
13765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
13766 | $as_echo_n "checking for alloca... " >&6; } | |
13767 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
13768 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13769 | else |
81ecdfbb | 13770 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13771 | /* end confdefs.h. */ |
a9322a30 TT |
13772 | #ifdef __GNUC__ |
13773 | # define alloca __builtin_alloca | |
b4e70030 | 13774 | #else |
a9322a30 TT |
13775 | # ifdef _MSC_VER |
13776 | # include <malloc.h> | |
13777 | # define alloca _alloca | |
13778 | # else | |
81ecdfbb | 13779 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
13780 | # include <alloca.h> |
13781 | # else | |
13782 | # ifdef _AIX | |
13783 | #pragma alloca | |
13784 | # else | |
13785 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
13786 | char *alloca (); | |
13787 | # endif | |
13788 | # endif | |
13789 | # endif | |
13790 | # endif | |
c906108c | 13791 | #endif |
97bf5e38 | 13792 | |
bec39cab AC |
13793 | int |
13794 | main () | |
13795 | { | |
a9322a30 | 13796 | char *p = (char *) alloca (1); |
81ecdfbb | 13797 | if (p) return 0; |
bec39cab AC |
13798 | ; |
13799 | return 0; | |
13800 | } | |
13801 | _ACEOF | |
81ecdfbb | 13802 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 13803 | ac_cv_func_alloca_works=yes |
bec39cab | 13804 | else |
81ecdfbb | 13805 | ac_cv_func_alloca_works=no |
bec39cab | 13806 | fi |
81ecdfbb RW |
13807 | rm -f core conftest.err conftest.$ac_objext \ |
13808 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13809 | fi |
81ecdfbb RW |
13810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
13811 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
13812 | |
13813 | if test $ac_cv_func_alloca_works = yes; then | |
13814 | ||
81ecdfbb | 13815 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 13816 | |
a9322a30 TT |
13817 | else |
13818 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
13819 | # that cause trouble. Some versions do not even contain alloca or | |
13820 | # contain a buggy version. If you still want to use their alloca, | |
13821 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
13822 | ||
81ecdfbb | 13823 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 13824 | |
81ecdfbb | 13825 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 13826 | |
bec39cab | 13827 | |
81ecdfbb RW |
13828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
13829 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
13830 | if test "${ac_cv_os_cray+set}" = set; then : | |
13831 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13832 | else |
81ecdfbb | 13833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 13834 | /* end confdefs.h. */ |
81ecdfbb | 13835 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
13836 | webecray |
13837 | #else | |
13838 | wenotbecray | |
13839 | #endif | |
13840 | ||
13841 | _ACEOF | |
13842 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 13843 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
13844 | ac_cv_os_cray=yes |
13845 | else | |
81ecdfbb | 13846 | ac_cv_os_cray=no |
bec39cab | 13847 | fi |
81ecdfbb RW |
13848 | rm -f conftest* |
13849 | ||
bec39cab | 13850 | fi |
81ecdfbb RW |
13851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
13852 | $as_echo "$ac_cv_os_cray" >&6; } | |
13853 | if test $ac_cv_os_cray = yes; then | |
13854 | for ac_func in _getb67 GETB67 getb67; do | |
13855 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
13856 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
13857 | eval as_val=\$$as_ac_var | |
13858 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
13859 | |
13860 | cat >>confdefs.h <<_ACEOF | |
13861 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 13862 | _ACEOF |
c906108c | 13863 | |
a9322a30 | 13864 | break |
c906108c SS |
13865 | fi |
13866 | ||
a9322a30 TT |
13867 | done |
13868 | fi | |
bec39cab | 13869 | |
81ecdfbb RW |
13870 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
13871 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
13872 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
13873 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13874 | else |
81ecdfbb | 13875 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13876 | ac_cv_c_stack_direction=0 |
bec39cab | 13877 | else |
81ecdfbb | 13878 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13879 | /* end confdefs.h. */ |
81ecdfbb | 13880 | $ac_includes_default |
a9322a30 TT |
13881 | int |
13882 | find_stack_direction () | |
b4e70030 | 13883 | { |
a9322a30 TT |
13884 | static char *addr = 0; |
13885 | auto char dummy; | |
13886 | if (addr == 0) | |
13887 | { | |
13888 | addr = &dummy; | |
13889 | return find_stack_direction (); | |
13890 | } | |
13891 | else | |
13892 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 13893 | } |
b757528f | 13894 | |
bec39cab AC |
13895 | int |
13896 | main () | |
13897 | { | |
81ecdfbb | 13898 | return find_stack_direction () < 0; |
bec39cab AC |
13899 | } |
13900 | _ACEOF | |
81ecdfbb | 13901 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
13902 | ac_cv_c_stack_direction=1 |
13903 | else | |
81ecdfbb | 13904 | ac_cv_c_stack_direction=-1 |
a9322a30 | 13905 | fi |
81ecdfbb RW |
13906 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
13907 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 13908 | fi |
a9322a30 | 13909 | |
81ecdfbb RW |
13910 | fi |
13911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
13912 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
13913 | cat >>confdefs.h <<_ACEOF |
13914 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
13915 | _ACEOF | |
13916 | ||
13917 | ||
13918 | fi | |
13919 | ||
a9322a30 | 13920 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
13921 | do : |
13922 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
13923 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
13924 | eval as_val=\$$as_ac_Header | |
13925 | if test "x$as_val" = x""yes; then : | |
bec39cab | 13926 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13927 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 13928 | _ACEOF |
b757528f | 13929 | |
b757528f | 13930 | fi |
bec39cab | 13931 | |
a9322a30 | 13932 | done |
a3828db0 | 13933 | |
a9322a30 | 13934 | for ac_func in getpagesize |
81ecdfbb RW |
13935 | do : |
13936 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
13937 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 13938 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 13939 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 13940 | _ACEOF |
bcb3dc3d | 13941 | |
bcb3dc3d MK |
13942 | fi |
13943 | done | |
13944 | ||
81ecdfbb RW |
13945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
13946 | $as_echo_n "checking for working mmap... " >&6; } | |
13947 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
13948 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 13949 | else |
81ecdfbb | 13950 | if test "$cross_compiling" = yes; then : |
a9322a30 | 13951 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 13952 | else |
81ecdfbb | 13953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13954 | /* end confdefs.h. */ |
a9322a30 TT |
13955 | $ac_includes_default |
13956 | /* malloc might have been renamed as rpl_malloc. */ | |
13957 | #undef malloc | |
bec39cab | 13958 | |
a9322a30 TT |
13959 | /* Thanks to Mike Haertel and Jim Avera for this test. |
13960 | Here is a matrix of mmap possibilities: | |
13961 | mmap private not fixed | |
13962 | mmap private fixed at somewhere currently unmapped | |
13963 | mmap private fixed at somewhere already mapped | |
13964 | mmap shared not fixed | |
13965 | mmap shared fixed at somewhere currently unmapped | |
13966 | mmap shared fixed at somewhere already mapped | |
13967 | For private mappings, we should verify that changes cannot be read() | |
13968 | back from the file, nor mmap's back from the file at a different | |
13969 | address. (There have been systems where private was not correctly | |
13970 | implemented like the infamous i386 svr4.0, and systems where the | |
13971 | VM page cache was not coherent with the file system buffer cache | |
13972 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
13973 | For shared mappings, we should conversely verify that changes get | |
13974 | propagated back to all the places they're supposed to be. | |
bec39cab | 13975 | |
a9322a30 TT |
13976 | Grep wants private fixed already mapped. |
13977 | The main things grep needs to know about mmap are: | |
13978 | * does it exist and is it safe to write into the mmap'd area | |
13979 | * how to use it (BSD variants) */ | |
8b9cf735 | 13980 | |
a9322a30 TT |
13981 | #include <fcntl.h> |
13982 | #include <sys/mman.h> | |
8b9cf735 | 13983 | |
81ecdfbb | 13984 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 13985 | char *malloc (); |
a3828db0 MK |
13986 | #endif |
13987 | ||
a9322a30 | 13988 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 13989 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 13990 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 13991 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
13992 | # define HAVE_SYS_PARAM_H 1 |
13993 | # endif | |
13994 | ||
13995 | # ifdef _SC_PAGESIZE | |
13996 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
13997 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 13998 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
13999 | # include <sys/param.h> |
14000 | # ifdef EXEC_PAGESIZE | |
14001 | # define getpagesize() EXEC_PAGESIZE | |
14002 | # else /* no EXEC_PAGESIZE */ | |
14003 | # ifdef NBPG | |
14004 | # define getpagesize() NBPG * CLSIZE | |
14005 | # ifndef CLSIZE | |
14006 | # define CLSIZE 1 | |
14007 | # endif /* no CLSIZE */ | |
14008 | # else /* no NBPG */ | |
14009 | # ifdef NBPC | |
14010 | # define getpagesize() NBPC | |
14011 | # else /* no NBPC */ | |
14012 | # ifdef PAGESIZE | |
14013 | # define getpagesize() PAGESIZE | |
14014 | # endif /* PAGESIZE */ | |
14015 | # endif /* no NBPC */ | |
14016 | # endif /* no NBPG */ | |
14017 | # endif /* no EXEC_PAGESIZE */ | |
14018 | # else /* no HAVE_SYS_PARAM_H */ | |
14019 | # define getpagesize() 8192 /* punt totally */ | |
14020 | # endif /* no HAVE_SYS_PARAM_H */ | |
14021 | # endif /* no _SC_PAGESIZE */ | |
14022 | ||
14023 | #endif /* no HAVE_GETPAGESIZE */ | |
14024 | ||
bec39cab AC |
14025 | int |
14026 | main () | |
14027 | { | |
a9322a30 TT |
14028 | char *data, *data2, *data3; |
14029 | int i, pagesize; | |
14030 | int fd; | |
14031 | ||
14032 | pagesize = getpagesize (); | |
14033 | ||
14034 | /* First, make a file with some known garbage in it. */ | |
14035 | data = (char *) malloc (pagesize); | |
14036 | if (!data) | |
81ecdfbb | 14037 | return 1; |
a9322a30 TT |
14038 | for (i = 0; i < pagesize; ++i) |
14039 | *(data + i) = rand (); | |
14040 | umask (0); | |
14041 | fd = creat ("conftest.mmap", 0600); | |
14042 | if (fd < 0) | |
81ecdfbb | 14043 | return 1; |
a9322a30 | 14044 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 14045 | return 1; |
a9322a30 TT |
14046 | close (fd); |
14047 | ||
14048 | /* Next, try to mmap the file at a fixed address which already has | |
14049 | something else allocated at it. If we can, also make sure that | |
14050 | we see the same garbage. */ | |
14051 | fd = open ("conftest.mmap", O_RDWR); | |
14052 | if (fd < 0) | |
81ecdfbb | 14053 | return 1; |
a9322a30 TT |
14054 | data2 = (char *) malloc (2 * pagesize); |
14055 | if (!data2) | |
81ecdfbb RW |
14056 | return 1; |
14057 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
14058 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
14059 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 14060 | return 1; |
a9322a30 TT |
14061 | for (i = 0; i < pagesize; ++i) |
14062 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 14063 | return 1; |
a9322a30 TT |
14064 | |
14065 | /* Finally, make sure that changes to the mapped area do not | |
14066 | percolate back to the file as seen by read(). (This is a bug on | |
14067 | some variants of i386 svr4.0.) */ | |
14068 | for (i = 0; i < pagesize; ++i) | |
14069 | *(data2 + i) = *(data2 + i) + 1; | |
14070 | data3 = (char *) malloc (pagesize); | |
14071 | if (!data3) | |
81ecdfbb | 14072 | return 1; |
a9322a30 | 14073 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 14074 | return 1; |
a9322a30 TT |
14075 | for (i = 0; i < pagesize; ++i) |
14076 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 14077 | return 1; |
a9322a30 | 14078 | close (fd); |
81ecdfbb | 14079 | return 0; |
bec39cab AC |
14080 | } |
14081 | _ACEOF | |
81ecdfbb | 14082 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 14083 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 14084 | else |
81ecdfbb | 14085 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 14086 | fi |
81ecdfbb RW |
14087 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14088 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 14089 | fi |
81ecdfbb | 14090 | |
a9322a30 | 14091 | fi |
81ecdfbb RW |
14092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
14093 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
14094 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
14095 | ||
81ecdfbb | 14096 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 14097 | |
086ec9eb | 14098 | fi |
a9322a30 | 14099 | rm -f conftest.mmap |
a3828db0 | 14100 | |
81ecdfbb RW |
14101 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
14102 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 14103 | |
a9322a30 TT |
14104 | else |
14105 | ||
14106 | cat >>confdefs.h <<_ACEOF | |
14107 | #define pid_t int | |
bec39cab | 14108 | _ACEOF |
086ec9eb MK |
14109 | |
14110 | fi | |
14111 | ||
81ecdfbb RW |
14112 | for ac_header in vfork.h |
14113 | do : | |
14114 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
14115 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 14116 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 14117 | #define HAVE_VFORK_H 1 |
bec39cab | 14118 | _ACEOF |
c906108c SS |
14119 | |
14120 | fi | |
a9322a30 | 14121 | |
a3828db0 | 14122 | done |
c906108c | 14123 | |
a9322a30 | 14124 | for ac_func in fork vfork |
81ecdfbb RW |
14125 | do : |
14126 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14127 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14128 | eval as_val=\$$as_ac_var | |
14129 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 14130 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 14131 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 14132 | _ACEOF |
b83266a0 | 14133 | |
97bf5e38 | 14134 | fi |
a3828db0 | 14135 | done |
b83266a0 | 14136 | |
a9322a30 | 14137 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
14138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
14139 | $as_echo_n "checking for working fork... " >&6; } | |
14140 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
14141 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 14142 | else |
81ecdfbb | 14143 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
14144 | ac_cv_func_fork_works=cross |
14145 | else | |
81ecdfbb RW |
14146 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
14147 | /* end confdefs.h. */ | |
14148 | $ac_includes_default | |
14149 | int | |
14150 | main () | |
14151 | { | |
14152 | ||
14153 | /* By Ruediger Kuhlmann. */ | |
14154 | return fork () < 0; | |
14155 | ||
14156 | ; | |
14157 | return 0; | |
14158 | } | |
a9322a30 | 14159 | _ACEOF |
81ecdfbb | 14160 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
14161 | ac_cv_func_fork_works=yes |
14162 | else | |
81ecdfbb | 14163 | ac_cv_func_fork_works=no |
a9322a30 | 14164 | fi |
81ecdfbb RW |
14165 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14166 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 14167 | fi |
81ecdfbb | 14168 | |
a9322a30 | 14169 | fi |
81ecdfbb RW |
14170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
14171 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
14172 | |
14173 | else | |
14174 | ac_cv_func_fork_works=$ac_cv_func_fork | |
14175 | fi | |
14176 | if test "x$ac_cv_func_fork_works" = xcross; then | |
14177 | case $host in | |
14178 | *-*-amigaos* | *-*-msdosdjgpp*) | |
14179 | # Override, as these systems have only a dummy fork() stub | |
14180 | ac_cv_func_fork_works=no | |
14181 | ;; | |
14182 | *) | |
14183 | ac_cv_func_fork_works=yes | |
14184 | ;; | |
14185 | esac | |
81ecdfbb RW |
14186 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
14187 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
14188 | fi |
14189 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
14190 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
14191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
14192 | $as_echo_n "checking for working vfork... " >&6; } | |
14193 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
14194 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 14195 | else |
81ecdfbb | 14196 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
14197 | ac_cv_func_vfork_works=cross |
14198 | else | |
81ecdfbb | 14199 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
14200 | /* end confdefs.h. */ |
14201 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 14202 | $ac_includes_default |
a9322a30 | 14203 | #include <sys/wait.h> |
81ecdfbb | 14204 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
14205 | # include <vfork.h> |
14206 | #endif | |
14207 | /* On some sparc systems, changes by the child to local and incoming | |
14208 | argument registers are propagated back to the parent. The compiler | |
14209 | is told about this with #include <vfork.h>, but some compilers | |
14210 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
14211 | static variable whose address is put into a register that is | |
14212 | clobbered by the vfork. */ | |
14213 | static void | |
14214 | #ifdef __cplusplus | |
14215 | sparc_address_test (int arg) | |
14216 | # else | |
14217 | sparc_address_test (arg) int arg; | |
14218 | #endif | |
14219 | { | |
14220 | static pid_t child; | |
14221 | if (!child) { | |
14222 | child = vfork (); | |
14223 | if (child < 0) { | |
14224 | perror ("vfork"); | |
14225 | _exit(2); | |
14226 | } | |
14227 | if (!child) { | |
14228 | arg = getpid(); | |
14229 | write(-1, "", 0); | |
14230 | _exit (arg); | |
14231 | } | |
14232 | } | |
14233 | } | |
14234 | ||
14235 | int | |
14236 | main () | |
14237 | { | |
14238 | pid_t parent = getpid (); | |
14239 | pid_t child; | |
14240 | ||
14241 | sparc_address_test (0); | |
14242 | ||
14243 | child = vfork (); | |
14244 | ||
14245 | if (child == 0) { | |
14246 | /* Here is another test for sparc vfork register problems. This | |
14247 | test uses lots of local variables, at least as many local | |
14248 | variables as main has allocated so far including compiler | |
14249 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
14250 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
14251 | reuse the register of parent for one of the local variables, | |
14252 | since it will think that parent can't possibly be used any more | |
14253 | in this routine. Assigning to the local variable will thus | |
14254 | munge parent in the parent process. */ | |
14255 | pid_t | |
14256 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
14257 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
14258 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
14259 | use the same hardware register for all 8 local variables. */ | |
14260 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
14261 | || p != p5 || p != p6 || p != p7) | |
14262 | _exit(1); | |
14263 | ||
14264 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
14265 | from child file descriptors. If the child closes a descriptor | |
14266 | before it execs or exits, this munges the parent's descriptor | |
14267 | as well. Test for this by closing stdout in the child. */ | |
14268 | _exit(close(fileno(stdout)) != 0); | |
14269 | } else { | |
14270 | int status; | |
14271 | struct stat st; | |
14272 | ||
14273 | while (wait(&status) != child) | |
14274 | ; | |
81ecdfbb | 14275 | return ( |
a9322a30 TT |
14276 | /* Was there some problem with vforking? */ |
14277 | child < 0 | |
14278 | ||
14279 | /* Did the child fail? (This shouldn't happen.) */ | |
14280 | || status | |
14281 | ||
14282 | /* Did the vfork/compiler bug occur? */ | |
14283 | || parent != getpid() | |
14284 | ||
14285 | /* Did the file descriptor bug occur? */ | |
14286 | || fstat(fileno(stdout), &st) != 0 | |
14287 | ); | |
14288 | } | |
14289 | } | |
14290 | _ACEOF | |
81ecdfbb | 14291 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
14292 | ac_cv_func_vfork_works=yes |
14293 | else | |
81ecdfbb | 14294 | ac_cv_func_vfork_works=no |
a9322a30 | 14295 | fi |
81ecdfbb RW |
14296 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14297 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 14298 | fi |
81ecdfbb | 14299 | |
a9322a30 | 14300 | fi |
81ecdfbb RW |
14301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
14302 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
14303 | |
14304 | fi; | |
14305 | if test "x$ac_cv_func_fork_works" = xcross; then | |
14306 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
14307 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
14308 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
14309 | fi |
14310 | ||
14311 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
14312 | ||
81ecdfbb | 14313 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
14314 | |
14315 | else | |
14316 | ||
81ecdfbb | 14317 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
14318 | |
14319 | fi | |
14320 | if test "x$ac_cv_func_fork_works" = xyes; then | |
14321 | ||
81ecdfbb | 14322 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
14323 | |
14324 | fi | |
14325 | ||
7313baad | 14326 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 14327 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 14328 | sbrk setpgid setpgrp setsid \ |
a9322a30 | 14329 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 14330 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
1db33378 | 14331 | setrlimit getrlimit posix_madvise waitpid lstat |
81ecdfbb RW |
14332 | do : |
14333 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
14334 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
14335 | eval as_val=\$$as_ac_var | |
14336 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 14337 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 14338 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
14339 | _ACEOF |
14340 | ||
14341 | fi | |
14342 | done | |
14343 | ||
14344 | ||
81ecdfbb RW |
14345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
14346 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
14347 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
14348 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 14349 | else |
81ecdfbb | 14350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
14351 | /* end confdefs.h. */ |
14352 | #include <langinfo.h> | |
14353 | int | |
14354 | main () | |
14355 | { | |
14356 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
14357 | ; |
14358 | return 0; | |
14359 | } | |
14360 | _ACEOF | |
81ecdfbb | 14361 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 14362 | am_cv_langinfo_codeset=yes |
a4db0f07 | 14363 | else |
81ecdfbb | 14364 | am_cv_langinfo_codeset=no |
a4db0f07 | 14365 | fi |
81ecdfbb RW |
14366 | rm -f core conftest.err conftest.$ac_objext \ |
14367 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 14368 | |
a4db0f07 | 14369 | fi |
81ecdfbb RW |
14370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
14371 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
14372 | if test $am_cv_langinfo_codeset = yes; then |
14373 | ||
81ecdfbb | 14374 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 14375 | |
6c7a06a3 | 14376 | fi |
c906108c | 14377 | |
06825bd1 | 14378 | |
a3828db0 MK |
14379 | # Check the return and argument types of ptrace. No canned test for |
14380 | # this, so roll our own. | |
14381 | gdb_ptrace_headers=' | |
14382 | #if HAVE_SYS_TYPES_H | |
14383 | # include <sys/types.h> | |
14384 | #endif | |
14385 | #if HAVE_SYS_PTRACE_H | |
14386 | # include <sys/ptrace.h> | |
14387 | #endif | |
14388 | #if HAVE_UNISTD_H | |
14389 | # include <unistd.h> | |
14390 | #endif | |
14391 | ' | |
14392 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
14393 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
14394 | " | |
14395 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
14396 | ac_have_decl=1 | |
06825bd1 | 14397 | else |
81ecdfbb | 14398 | ac_have_decl=0 |
06825bd1 | 14399 | fi |
06825bd1 | 14400 | |
a3828db0 | 14401 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 14402 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 14403 | _ACEOF |
81ecdfbb | 14404 | if test $ac_have_decl = 1; then : |
bec39cab | 14405 | |
a3828db0 | 14406 | else |
a3828db0 MK |
14407 | |
14408 | : ${gdb_cv_func_ptrace_ret='int'} | |
14409 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
14410 | ||
06825bd1 MK |
14411 | fi |
14412 | ||
064ef605 DJ |
14413 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
14414 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
14415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
14416 | $as_echo_n "checking return type of ptrace... " >&6; } | |
14417 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
14418 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14419 | else |
81ecdfbb | 14420 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14421 | /* end confdefs.h. */ |
a3828db0 | 14422 | $gdb_ptrace_headers |
bec39cab AC |
14423 | int |
14424 | main () | |
14425 | { | |
064ef605 DJ |
14426 | extern long ptrace (enum __ptrace_request, ...); |
14427 | ; | |
14428 | return 0; | |
14429 | } | |
14430 | _ACEOF | |
81ecdfbb | 14431 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
14432 | gdb_cv_func_ptrace_ret='long' |
14433 | else | |
81ecdfbb | 14434 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
14435 | /* end confdefs.h. */ |
14436 | $gdb_ptrace_headers | |
14437 | int | |
14438 | main () | |
14439 | { | |
a3828db0 | 14440 | extern int ptrace (); |
bec39cab AC |
14441 | ; |
14442 | return 0; | |
14443 | } | |
14444 | _ACEOF | |
81ecdfbb | 14445 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14446 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 14447 | else |
81ecdfbb | 14448 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 14449 | fi |
81ecdfbb | 14450 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 14451 | fi |
81ecdfbb | 14452 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 14453 | fi |
81ecdfbb RW |
14454 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
14455 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 14456 | |
a3828db0 MK |
14457 | cat >>confdefs.h <<_ACEOF |
14458 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 14459 | _ACEOF |
70f9f479 | 14460 | |
a3828db0 | 14461 | # Check argument types. |
81ecdfbb RW |
14462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
14463 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
14464 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
14465 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14466 | else |
a3828db0 | 14467 | |
81ecdfbb | 14468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
14469 | /* end confdefs.h. */ |
14470 | $gdb_ptrace_headers | |
14471 | int | |
14472 | main () | |
14473 | { | |
14474 | extern long ptrace (enum __ptrace_request, ...); | |
14475 | ; | |
14476 | return 0; | |
14477 | } | |
14478 | _ACEOF | |
81ecdfbb | 14479 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
14480 | gdb_cv_func_ptrace_args='int,int,long,long' |
14481 | else | |
064ef605 | 14482 | |
a3828db0 MK |
14483 | for gdb_arg1 in 'int' 'long'; do |
14484 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 14485 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 14486 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 14487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14488 | /* end confdefs.h. */ |
a3828db0 | 14489 | $gdb_ptrace_headers |
bec39cab AC |
14490 | int |
14491 | main () | |
14492 | { | |
a3828db0 MK |
14493 | |
14494 | extern $gdb_cv_func_ptrace_ret | |
14495 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
14496 | ||
bec39cab AC |
14497 | ; |
14498 | return 0; | |
14499 | } | |
14500 | _ACEOF | |
81ecdfbb | 14501 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
14502 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
14503 | break 4; | |
5c7f2947 | 14504 | fi |
81ecdfbb | 14505 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 14506 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 14507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14508 | /* end confdefs.h. */ |
a3828db0 | 14509 | $gdb_ptrace_headers |
bec39cab AC |
14510 | int |
14511 | main () | |
14512 | { | |
a3828db0 MK |
14513 | |
14514 | extern $gdb_cv_func_ptrace_ret | |
14515 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
14516 | ||
bec39cab AC |
14517 | ; |
14518 | return 0; | |
14519 | } | |
14520 | _ACEOF | |
81ecdfbb | 14521 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
14522 | |
14523 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
14524 | break 5; | |
78434e59 | 14525 | fi |
81ecdfbb | 14526 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
14527 | done |
14528 | done | |
14529 | done | |
14530 | done | |
14531 | done | |
14532 | # Provide a safe default value. | |
14533 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
14534 | ||
064ef605 | 14535 | fi |
81ecdfbb | 14536 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 14537 | fi |
81ecdfbb RW |
14538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
14539 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
14540 | ac_save_IFS=$IFS; IFS=',' |
14541 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
14542 | IFS=$ac_save_IFS | |
14543 | shift | |
bec39cab | 14544 | |
a3828db0 MK |
14545 | cat >>confdefs.h <<_ACEOF |
14546 | #define PTRACE_TYPE_ARG3 $3 | |
14547 | _ACEOF | |
14548 | ||
14549 | if test -n "$5"; then | |
14550 | ||
14551 | cat >>confdefs.h <<_ACEOF | |
14552 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 14553 | _ACEOF |
78434e59 MK |
14554 | |
14555 | fi | |
14556 | ||
a3828db0 | 14557 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
14558 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
14559 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
14560 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
14561 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 14562 | else |
81ecdfbb RW |
14563 | if test "$cross_compiling" = yes; then : |
14564 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 14565 | else |
81ecdfbb | 14566 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14567 | /* end confdefs.h. */ |
81ecdfbb | 14568 | $ac_includes_default |
bec39cab AC |
14569 | int |
14570 | main () | |
14571 | { | |
a3828db0 MK |
14572 | /* If this system has a BSD-style setpgrp which takes arguments, |
14573 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
14574 | exit successfully. */ | |
81ecdfbb | 14575 | return setpgrp (1,1) != -1; |
bec39cab AC |
14576 | ; |
14577 | return 0; | |
14578 | } | |
14579 | _ACEOF | |
81ecdfbb | 14580 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 14581 | ac_cv_func_setpgrp_void=no |
c906108c | 14582 | else |
81ecdfbb | 14583 | ac_cv_func_setpgrp_void=yes |
c906108c | 14584 | fi |
81ecdfbb RW |
14585 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
14586 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 14587 | fi |
81ecdfbb | 14588 | |
a3828db0 | 14589 | fi |
81ecdfbb RW |
14590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
14591 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
14592 | if test $ac_cv_func_setpgrp_void = yes; then |
14593 | ||
81ecdfbb | 14594 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
14595 | |
14596 | fi | |
a3828db0 MK |
14597 | |
14598 | else | |
81ecdfbb RW |
14599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
14600 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
14601 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
14602 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 14603 | else |
81ecdfbb | 14604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14605 | /* end confdefs.h. */ |
a3828db0 MK |
14606 | |
14607 | #include <unistd.h> | |
14608 | ||
bec39cab AC |
14609 | int |
14610 | main () | |
14611 | { | |
a3828db0 MK |
14612 | |
14613 | if (setpgrp(1,1) == -1) | |
14614 | exit (0); | |
14615 | else | |
14616 | exit (1); | |
14617 | ||
bec39cab AC |
14618 | ; |
14619 | return 0; | |
14620 | } | |
14621 | _ACEOF | |
81ecdfbb | 14622 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14623 | ac_cv_func_setpgrp_void=no |
c906108c | 14624 | else |
81ecdfbb | 14625 | ac_cv_func_setpgrp_void=yes |
c906108c | 14626 | fi |
81ecdfbb | 14627 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14628 | fi |
81ecdfbb RW |
14629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
14630 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 14631 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 14632 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 14633 | |
a3828db0 | 14634 | fi |
c906108c SS |
14635 | fi |
14636 | ||
a3828db0 MK |
14637 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
14638 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
14639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
14640 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
14641 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
14642 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14643 | else |
81ecdfbb | 14644 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14645 | /* end confdefs.h. */ |
a3828db0 MK |
14646 | |
14647 | #include <setjmp.h> | |
14648 | ||
bec39cab AC |
14649 | int |
14650 | main () | |
14651 | { | |
a3828db0 | 14652 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
14653 | ; |
14654 | return 0; | |
14655 | } | |
14656 | _ACEOF | |
81ecdfbb | 14657 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14658 | gdb_cv_func_sigsetjmp=yes |
c906108c | 14659 | else |
81ecdfbb | 14660 | gdb_cv_func_sigsetjmp=no |
c906108c | 14661 | fi |
81ecdfbb | 14662 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14663 | fi |
81ecdfbb RW |
14664 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
14665 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 14666 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 14667 | |
81ecdfbb | 14668 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 14669 | |
97bf5e38 | 14670 | fi |
c906108c | 14671 | |
a3828db0 MK |
14672 | # Assume we'll default to using the included libiberty regex. |
14673 | gdb_use_included_regex=yes | |
14674 | ||
14675 | # However, if the system regex is GNU regex, then default to *not* | |
14676 | # using the included regex. | |
81ecdfbb RW |
14677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
14678 | $as_echo_n "checking for GNU regex... " >&6; } | |
14679 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
14680 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14681 | else |
81ecdfbb | 14682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14683 | /* end confdefs.h. */ |
a3828db0 | 14684 | #include <gnu-versions.h> |
bec39cab AC |
14685 | int |
14686 | main () | |
14687 | { | |
81ecdfbb RW |
14688 | #define REGEX_INTERFACE_VERSION 1 |
14689 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
14690 | # error "Version mismatch" | |
14691 | #endif | |
5c45e068 MK |
14692 | ; |
14693 | return 0; | |
14694 | } | |
14695 | _ACEOF | |
81ecdfbb RW |
14696 | if ac_fn_c_try_compile "$LINENO"; then : |
14697 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 14698 | else |
81ecdfbb RW |
14699 | gdb_cv_have_gnu_regex=no |
14700 | fi | |
14701 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
14702 | fi | |
14703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
14704 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
14705 | if test $gdb_cv_have_gnu_regex = yes; then | |
14706 | gdb_use_included_regex=no | |
5c45e068 | 14707 | fi |
81ecdfbb RW |
14708 | |
14709 | ||
14710 | # Check whether --with-included-regex was given. | |
14711 | if test "${with_included_regex+set}" = set; then : | |
14712 | withval=$with_included_regex; gdb_with_regex=$withval | |
14713 | else | |
14714 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 14715 | fi |
81ecdfbb RW |
14716 | |
14717 | if test "$gdb_with_regex" = yes; then | |
14718 | ||
14719 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
14720 | ||
c906108c | 14721 | fi |
81ecdfbb RW |
14722 | |
14723 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
14724 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
14725 | #include <sys/proc.h> | |
14726 | ||
14727 | " | |
14728 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 14729 | |
5c45e068 | 14730 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 14731 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 14732 | _ACEOF |
c906108c | 14733 | |
5c45e068 | 14734 | |
97bf5e38 | 14735 | fi |
c906108c | 14736 | |
5c45e068 | 14737 | |
a3828db0 | 14738 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
14739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
14740 | $as_echo_n "checking for struct lwp... " >&6; } | |
14741 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
14742 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14743 | else |
81ecdfbb | 14744 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14745 | /* end confdefs.h. */ |
a3828db0 MK |
14746 | #include <sys/param.h> |
14747 | #include <sys/lwp.h> | |
bec39cab AC |
14748 | int |
14749 | main () | |
14750 | { | |
a3828db0 | 14751 | struct lwp l; |
bec39cab AC |
14752 | ; |
14753 | return 0; | |
14754 | } | |
14755 | _ACEOF | |
81ecdfbb | 14756 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14757 | gdb_cv_struct_lwp=yes |
c906108c | 14758 | else |
81ecdfbb | 14759 | gdb_cv_struct_lwp=no |
c906108c | 14760 | fi |
81ecdfbb | 14761 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 14762 | fi |
81ecdfbb RW |
14763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
14764 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 14765 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 14766 | |
81ecdfbb | 14767 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 14768 | |
97bf5e38 | 14769 | fi |
c906108c | 14770 | |
a3828db0 | 14771 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
14772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
14773 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
14774 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
14775 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14776 | else |
81ecdfbb | 14777 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14778 | /* end confdefs.h. */ |
a3828db0 MK |
14779 | #include <sys/types.h> |
14780 | #include <machine/reg.h> | |
bec39cab AC |
14781 | int |
14782 | main () | |
14783 | { | |
a3828db0 | 14784 | struct reg r; |
bec39cab AC |
14785 | ; |
14786 | return 0; | |
14787 | } | |
14788 | _ACEOF | |
81ecdfbb | 14789 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14790 | gdb_cv_struct_reg=yes |
27ca5dad | 14791 | else |
81ecdfbb | 14792 | gdb_cv_struct_reg=no |
27ca5dad | 14793 | fi |
81ecdfbb | 14794 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 14795 | fi |
81ecdfbb RW |
14796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
14797 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 14798 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 14799 | |
81ecdfbb | 14800 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
14801 | |
14802 | fi | |
97bf5e38 | 14803 | |
a3828db0 MK |
14804 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
14805 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
14806 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
14807 | " | |
14808 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
14809 | |
14810 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14811 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 14812 | _ACEOF |
3862412b | 14813 | |
5c45e068 | 14814 | |
97bf5e38 | 14815 | fi |
81ecdfbb RW |
14816 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
14817 | " | |
14818 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
14819 | |
14820 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 14821 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 14822 | _ACEOF |
3862412b | 14823 | |
5c45e068 | 14824 | |
97bf5e38 | 14825 | fi |
3862412b | 14826 | |
5c45e068 | 14827 | |
a3828db0 | 14828 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
14829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
14830 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
14831 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
14832 | $as_echo_n "(cached) " >&6 | |
451928c5 | 14833 | else |
81ecdfbb | 14834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14835 | /* end confdefs.h. */ |
a3828db0 | 14836 | #include <sys/ptrace.h> |
bec39cab AC |
14837 | int |
14838 | main () | |
14839 | { | |
a3828db0 | 14840 | PTRACE_GETREGS; |
bec39cab AC |
14841 | ; |
14842 | return 0; | |
14843 | } | |
14844 | _ACEOF | |
81ecdfbb | 14845 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14846 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 14847 | else |
81ecdfbb | 14848 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 14849 | fi |
81ecdfbb | 14850 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14851 | fi |
14852 | ||
81ecdfbb RW |
14853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
14854 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 14855 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 14856 | |
81ecdfbb | 14857 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 14858 | |
97bf5e38 | 14859 | fi |
451928c5 | 14860 | |
a3828db0 | 14861 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
14862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
14863 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
14864 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
14865 | $as_echo_n "(cached) " >&6 | |
451928c5 | 14866 | else |
81ecdfbb | 14867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14868 | /* end confdefs.h. */ |
a3828db0 | 14869 | #include <sys/ptrace.h> |
bec39cab AC |
14870 | int |
14871 | main () | |
14872 | { | |
a3828db0 | 14873 | PTRACE_GETFPXREGS; |
bec39cab AC |
14874 | ; |
14875 | return 0; | |
14876 | } | |
14877 | _ACEOF | |
81ecdfbb | 14878 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14879 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 14880 | else |
81ecdfbb | 14881 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 14882 | fi |
81ecdfbb | 14883 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
14884 | fi |
14885 | ||
81ecdfbb RW |
14886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
14887 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 14888 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 14889 | |
81ecdfbb | 14890 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 14891 | |
97bf5e38 | 14892 | fi |
451928c5 | 14893 | |
a3828db0 | 14894 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
14895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
14896 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
14897 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
14898 | $as_echo_n "(cached) " >&6 | |
3862412b | 14899 | else |
81ecdfbb | 14900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14901 | /* end confdefs.h. */ |
a3828db0 MK |
14902 | #include <sys/types.h> |
14903 | #include <sys/ptrace.h> | |
bec39cab AC |
14904 | int |
14905 | main () | |
14906 | { | |
a3828db0 | 14907 | PT_GETDBREGS; |
bec39cab AC |
14908 | ; |
14909 | return 0; | |
14910 | } | |
14911 | _ACEOF | |
81ecdfbb | 14912 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14913 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 14914 | else |
81ecdfbb | 14915 | gdb_cv_have_pt_getdbregs=no |
3862412b | 14916 | fi |
81ecdfbb | 14917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14918 | fi |
14919 | ||
81ecdfbb RW |
14920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
14921 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 14922 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 14923 | |
81ecdfbb | 14924 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 14925 | |
97bf5e38 | 14926 | fi |
3862412b | 14927 | |
a3828db0 | 14928 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
14929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
14930 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
14931 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
14932 | $as_echo_n "(cached) " >&6 | |
3862412b | 14933 | else |
81ecdfbb | 14934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14935 | /* end confdefs.h. */ |
a3828db0 MK |
14936 | #include <sys/types.h> |
14937 | #include <sys/ptrace.h> | |
bec39cab AC |
14938 | int |
14939 | main () | |
14940 | { | |
a3828db0 | 14941 | PT_GETXMMREGS; |
bec39cab AC |
14942 | ; |
14943 | return 0; | |
14944 | } | |
14945 | _ACEOF | |
81ecdfbb | 14946 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 14947 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 14948 | else |
81ecdfbb | 14949 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 14950 | fi |
81ecdfbb | 14951 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
14952 | fi |
14953 | ||
81ecdfbb RW |
14954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
14955 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 14956 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 14957 | |
81ecdfbb | 14958 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 14959 | |
97bf5e38 | 14960 | fi |
3862412b | 14961 | |
eb368090 | 14962 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
14963 | |
14964 | if test "${target}" = "${host}"; then | |
14965 | case "${host}" in | |
97bf5e38 | 14966 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 14967 | |
81ecdfbb | 14968 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
14969 | |
14970 | ;; | |
c162e8c9 | 14971 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 14972 | |
81ecdfbb | 14973 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
14974 | |
14975 | ;; | |
14976 | mips-sgi-irix5*) | |
14977 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 14978 | |
81ecdfbb | 14979 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
14980 | |
14981 | ;; | |
14982 | esac | |
14983 | fi | |
14984 | ||
14985 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
14986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
14987 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
14988 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
14989 | $as_echo_n "(cached) " >&6 | |
bec39cab | 14990 | else |
81ecdfbb | 14991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14992 | /* end confdefs.h. */ |
596c9d4b KB |
14993 | |
14994 | #define _SYSCALL32 | |
d30c5336 JK |
14995 | /* Needed for new procfs interface on sparc-solaris. */ |
14996 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 14997 | #include <sys/procfs.h> |
bec39cab AC |
14998 | int |
14999 | main () | |
15000 | { | |
97bf5e38 | 15001 | pstatus_t avar |
bec39cab AC |
15002 | ; |
15003 | return 0; | |
15004 | } | |
15005 | _ACEOF | |
81ecdfbb | 15006 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15007 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 15008 | else |
81ecdfbb | 15009 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 15010 | |
596c9d4b | 15011 | fi |
81ecdfbb | 15012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
15013 | fi |
15014 | ||
97bf5e38 | 15015 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 15016 | |
81ecdfbb | 15017 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
15018 | |
15019 | fi | |
81ecdfbb RW |
15020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
15021 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 15022 | |
81ecdfbb RW |
15023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
15024 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
15025 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
15026 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 15027 | else |
81ecdfbb | 15028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15029 | /* end confdefs.h. */ |
596c9d4b KB |
15030 | |
15031 | #define _SYSCALL32 | |
d30c5336 JK |
15032 | /* Needed for new procfs interface on sparc-solaris. */ |
15033 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 15034 | #include <sys/procfs.h> |
bec39cab AC |
15035 | int |
15036 | main () | |
15037 | { | |
97bf5e38 | 15038 | prrun_t avar |
bec39cab AC |
15039 | ; |
15040 | return 0; | |
15041 | } | |
15042 | _ACEOF | |
81ecdfbb | 15043 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15044 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 15045 | else |
81ecdfbb | 15046 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 15047 | |
596c9d4b | 15048 | fi |
81ecdfbb | 15049 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
15050 | fi |
15051 | ||
97bf5e38 | 15052 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 15053 | |
81ecdfbb | 15054 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
15055 | |
15056 | fi | |
81ecdfbb RW |
15057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
15058 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 15059 | |
81ecdfbb RW |
15060 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
15061 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
15062 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
15063 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 15064 | else |
81ecdfbb | 15065 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15066 | /* end confdefs.h. */ |
596c9d4b KB |
15067 | |
15068 | #define _SYSCALL32 | |
d30c5336 JK |
15069 | /* Needed for new procfs interface on sparc-solaris. */ |
15070 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 15071 | #include <sys/procfs.h> |
bec39cab AC |
15072 | int |
15073 | main () | |
15074 | { | |
97bf5e38 | 15075 | gregset_t avar |
bec39cab AC |
15076 | ; |
15077 | return 0; | |
15078 | } | |
15079 | _ACEOF | |
81ecdfbb | 15080 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15081 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 15082 | else |
81ecdfbb | 15083 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 15084 | |
596c9d4b | 15085 | fi |
81ecdfbb | 15086 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
15087 | fi |
15088 | ||
97bf5e38 | 15089 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 15090 | |
81ecdfbb | 15091 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
15092 | |
15093 | fi | |
81ecdfbb RW |
15094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
15095 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 15096 | |
81ecdfbb RW |
15097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
15098 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
15099 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
15100 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 15101 | else |
81ecdfbb | 15102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15103 | /* end confdefs.h. */ |
97bf5e38 MK |
15104 | |
15105 | #define _SYSCALL32 | |
d30c5336 JK |
15106 | /* Needed for new procfs interface on sparc-solaris. */ |
15107 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 15108 | #include <sys/procfs.h> |
bec39cab AC |
15109 | int |
15110 | main () | |
15111 | { | |
97bf5e38 | 15112 | fpregset_t avar |
bec39cab AC |
15113 | ; |
15114 | return 0; | |
15115 | } | |
15116 | _ACEOF | |
81ecdfbb | 15117 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15118 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 15119 | else |
81ecdfbb | 15120 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 15121 | |
d84dd0c5 | 15122 | fi |
81ecdfbb | 15123 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
15124 | fi |
15125 | ||
97bf5e38 | 15126 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 15127 | |
81ecdfbb | 15128 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 15129 | |
97bf5e38 | 15130 | fi |
81ecdfbb RW |
15131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
15132 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 15133 | |
81ecdfbb RW |
15134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
15135 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
15136 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
15137 | $as_echo_n "(cached) " >&6 | |
c906108c | 15138 | else |
81ecdfbb | 15139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15140 | /* end confdefs.h. */ |
c906108c | 15141 | |
97bf5e38 | 15142 | #define _SYSCALL32 |
d30c5336 JK |
15143 | /* Needed for new procfs interface on sparc-solaris. */ |
15144 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15145 | #include <sys/procfs.h> |
bec39cab AC |
15146 | int |
15147 | main () | |
15148 | { | |
97bf5e38 | 15149 | prgregset_t avar |
bec39cab AC |
15150 | ; |
15151 | return 0; | |
15152 | } | |
15153 | _ACEOF | |
81ecdfbb | 15154 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15155 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 15156 | else |
81ecdfbb | 15157 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 15158 | |
c906108c | 15159 | fi |
81ecdfbb | 15160 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15161 | fi |
15162 | ||
97bf5e38 | 15163 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 15164 | |
81ecdfbb | 15165 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 15166 | |
97bf5e38 | 15167 | fi |
81ecdfbb RW |
15168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
15169 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 15170 | |
81ecdfbb RW |
15171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
15172 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
15173 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
15174 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 15175 | else |
81ecdfbb | 15176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15177 | /* end confdefs.h. */ |
97bf5e38 MK |
15178 | |
15179 | #define _SYSCALL32 | |
d30c5336 JK |
15180 | /* Needed for new procfs interface on sparc-solaris. */ |
15181 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15182 | #include <sys/procfs.h> |
bec39cab AC |
15183 | int |
15184 | main () | |
15185 | { | |
97bf5e38 | 15186 | prfpregset_t avar |
bec39cab AC |
15187 | ; |
15188 | return 0; | |
15189 | } | |
15190 | _ACEOF | |
81ecdfbb | 15191 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15192 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 15193 | else |
81ecdfbb | 15194 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 15195 | |
d45fe813 | 15196 | fi |
81ecdfbb | 15197 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15198 | fi |
15199 | ||
97bf5e38 | 15200 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 15201 | |
81ecdfbb | 15202 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 15203 | |
97bf5e38 | 15204 | fi |
81ecdfbb RW |
15205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
15206 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 15207 | |
81ecdfbb RW |
15208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
15209 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
15210 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
15211 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 15212 | else |
81ecdfbb | 15213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15214 | /* end confdefs.h. */ |
97bf5e38 MK |
15215 | |
15216 | #define _SYSCALL32 | |
d30c5336 JK |
15217 | /* Needed for new procfs interface on sparc-solaris. */ |
15218 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15219 | #include <sys/procfs.h> |
bec39cab AC |
15220 | int |
15221 | main () | |
15222 | { | |
97bf5e38 | 15223 | prgregset32_t avar |
bec39cab AC |
15224 | ; |
15225 | return 0; | |
15226 | } | |
15227 | _ACEOF | |
81ecdfbb | 15228 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15229 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 15230 | else |
81ecdfbb | 15231 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 15232 | |
d45fe813 | 15233 | fi |
81ecdfbb | 15234 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15235 | fi |
15236 | ||
97bf5e38 | 15237 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 15238 | |
81ecdfbb | 15239 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 15240 | |
97bf5e38 | 15241 | fi |
81ecdfbb RW |
15242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
15243 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 15244 | |
81ecdfbb RW |
15245 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
15246 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
15247 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
15248 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 15249 | else |
81ecdfbb | 15250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15251 | /* end confdefs.h. */ |
97bf5e38 MK |
15252 | |
15253 | #define _SYSCALL32 | |
d30c5336 JK |
15254 | /* Needed for new procfs interface on sparc-solaris. */ |
15255 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15256 | #include <sys/procfs.h> |
bec39cab AC |
15257 | int |
15258 | main () | |
15259 | { | |
97bf5e38 | 15260 | prfpregset32_t avar |
bec39cab AC |
15261 | ; |
15262 | return 0; | |
15263 | } | |
15264 | _ACEOF | |
81ecdfbb | 15265 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15266 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 15267 | else |
81ecdfbb | 15268 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 15269 | |
d45fe813 | 15270 | fi |
81ecdfbb | 15271 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15272 | fi |
15273 | ||
97bf5e38 | 15274 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 15275 | |
81ecdfbb | 15276 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 15277 | |
97bf5e38 | 15278 | fi |
81ecdfbb RW |
15279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
15280 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 15281 | |
81ecdfbb RW |
15282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
15283 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
15284 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
15285 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 15286 | else |
81ecdfbb | 15287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15288 | /* end confdefs.h. */ |
97bf5e38 | 15289 | |
d45fe813 | 15290 | #define _SYSCALL32 |
d30c5336 JK |
15291 | /* Needed for new procfs interface on sparc-solaris. */ |
15292 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15293 | #include <sys/procfs.h> |
bec39cab AC |
15294 | int |
15295 | main () | |
15296 | { | |
97bf5e38 | 15297 | lwpid_t avar |
bec39cab AC |
15298 | ; |
15299 | return 0; | |
15300 | } | |
15301 | _ACEOF | |
81ecdfbb | 15302 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15303 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 15304 | else |
81ecdfbb | 15305 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 15306 | |
d45fe813 | 15307 | fi |
81ecdfbb | 15308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
15309 | fi |
15310 | ||
97bf5e38 | 15311 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 15312 | |
81ecdfbb | 15313 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 15314 | |
97bf5e38 | 15315 | fi |
81ecdfbb RW |
15316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
15317 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 15318 | |
81ecdfbb RW |
15319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
15320 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
15321 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
15322 | $as_echo_n "(cached) " >&6 | |
c906108c | 15323 | else |
81ecdfbb | 15324 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15325 | /* end confdefs.h. */ |
c906108c | 15326 | |
97bf5e38 | 15327 | #define _SYSCALL32 |
d30c5336 JK |
15328 | /* Needed for new procfs interface on sparc-solaris. */ |
15329 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15330 | #include <sys/procfs.h> |
bec39cab AC |
15331 | int |
15332 | main () | |
15333 | { | |
97bf5e38 | 15334 | psaddr_t avar |
bec39cab AC |
15335 | ; |
15336 | return 0; | |
15337 | } | |
15338 | _ACEOF | |
81ecdfbb | 15339 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15340 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 15341 | else |
81ecdfbb | 15342 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 15343 | |
c906108c | 15344 | fi |
81ecdfbb | 15345 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15346 | fi |
15347 | ||
97bf5e38 | 15348 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 15349 | |
81ecdfbb | 15350 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 15351 | |
97bf5e38 | 15352 | fi |
81ecdfbb RW |
15353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
15354 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 15355 | |
81ecdfbb RW |
15356 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
15357 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
15358 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
15359 | $as_echo_n "(cached) " >&6 | |
c906108c | 15360 | else |
81ecdfbb | 15361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15362 | /* end confdefs.h. */ |
c906108c | 15363 | |
97bf5e38 | 15364 | #define _SYSCALL32 |
d30c5336 JK |
15365 | /* Needed for new procfs interface on sparc-solaris. */ |
15366 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15367 | #include <sys/procfs.h> |
bec39cab AC |
15368 | int |
15369 | main () | |
15370 | { | |
97bf5e38 | 15371 | prsysent_t avar |
bec39cab AC |
15372 | ; |
15373 | return 0; | |
15374 | } | |
15375 | _ACEOF | |
81ecdfbb | 15376 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15377 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 15378 | else |
81ecdfbb | 15379 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 15380 | |
c906108c | 15381 | fi |
81ecdfbb | 15382 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15383 | fi |
15384 | ||
97bf5e38 | 15385 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 15386 | |
81ecdfbb | 15387 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 15388 | |
97bf5e38 | 15389 | fi |
81ecdfbb RW |
15390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
15391 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 15392 | |
81ecdfbb RW |
15393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
15394 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
15395 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
15396 | $as_echo_n "(cached) " >&6 | |
c906108c | 15397 | else |
81ecdfbb | 15398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15399 | /* end confdefs.h. */ |
c906108c | 15400 | |
97bf5e38 | 15401 | #define _SYSCALL32 |
d30c5336 JK |
15402 | /* Needed for new procfs interface on sparc-solaris. */ |
15403 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15404 | #include <sys/procfs.h> |
bec39cab AC |
15405 | int |
15406 | main () | |
15407 | { | |
97bf5e38 | 15408 | pr_sigset_t avar |
bec39cab AC |
15409 | ; |
15410 | return 0; | |
15411 | } | |
15412 | _ACEOF | |
81ecdfbb | 15413 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15414 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 15415 | else |
81ecdfbb | 15416 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 15417 | |
c906108c | 15418 | fi |
81ecdfbb | 15419 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15420 | fi |
15421 | ||
97bf5e38 | 15422 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 15423 | |
81ecdfbb | 15424 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 15425 | |
97bf5e38 | 15426 | fi |
81ecdfbb RW |
15427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
15428 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 15429 | |
81ecdfbb RW |
15430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
15431 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
15432 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
15433 | $as_echo_n "(cached) " >&6 | |
c906108c | 15434 | else |
81ecdfbb | 15435 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15436 | /* end confdefs.h. */ |
c906108c | 15437 | |
97bf5e38 | 15438 | #define _SYSCALL32 |
d30c5336 JK |
15439 | /* Needed for new procfs interface on sparc-solaris. */ |
15440 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15441 | #include <sys/procfs.h> |
bec39cab AC |
15442 | int |
15443 | main () | |
15444 | { | |
97bf5e38 | 15445 | pr_sigaction64_t avar |
bec39cab AC |
15446 | ; |
15447 | return 0; | |
15448 | } | |
15449 | _ACEOF | |
81ecdfbb | 15450 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15451 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 15452 | else |
81ecdfbb | 15453 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 15454 | |
c906108c | 15455 | fi |
81ecdfbb | 15456 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15457 | fi |
15458 | ||
97bf5e38 | 15459 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 15460 | |
81ecdfbb | 15461 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 15462 | |
97bf5e38 | 15463 | fi |
81ecdfbb RW |
15464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
15465 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 15466 | |
81ecdfbb RW |
15467 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
15468 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
15469 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
15470 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15471 | else |
81ecdfbb | 15472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15473 | /* end confdefs.h. */ |
97bf5e38 MK |
15474 | |
15475 | #define _SYSCALL32 | |
d30c5336 JK |
15476 | /* Needed for new procfs interface on sparc-solaris. */ |
15477 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 15478 | #include <sys/procfs.h> |
bec39cab AC |
15479 | int |
15480 | main () | |
15481 | { | |
97bf5e38 | 15482 | pr_siginfo64_t avar |
bec39cab AC |
15483 | ; |
15484 | return 0; | |
15485 | } | |
15486 | _ACEOF | |
81ecdfbb | 15487 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15488 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
15489 | else | |
81ecdfbb | 15490 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 15491 | |
97bf5e38 | 15492 | fi |
81ecdfbb | 15493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15494 | fi |
c906108c | 15495 | |
97bf5e38 | 15496 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 15497 | |
81ecdfbb | 15498 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 15499 | |
97bf5e38 | 15500 | fi |
81ecdfbb RW |
15501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
15502 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
15503 | |
15504 | ||
97bf5e38 MK |
15505 | |
15506 | ||
15507 | ||
97bf5e38 | 15508 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
15509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
15510 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
15511 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
15512 | $as_echo_n "(cached) " >&6 | |
c906108c | 15513 | else |
81ecdfbb | 15514 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 15515 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 15516 | else |
81ecdfbb | 15517 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15518 | /* end confdefs.h. */ |
97bf5e38 MK |
15519 | #include <sys/procfs.h> |
15520 | int main () | |
15521 | { | |
15522 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
15523 | return 1; | |
15524 | return 0; | |
15525 | } | |
bec39cab | 15526 | _ACEOF |
81ecdfbb | 15527 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 15528 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
15529 | else |
15530 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 15531 | fi |
81ecdfbb RW |
15532 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15533 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 15534 | fi |
81ecdfbb | 15535 | |
c906108c SS |
15536 | fi |
15537 | ||
81ecdfbb RW |
15538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
15539 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 15540 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 15541 | |
81ecdfbb | 15542 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 15543 | |
97bf5e38 MK |
15544 | fi |
15545 | fi | |
c906108c | 15546 | |
bec39cab | 15547 | |
81ecdfbb RW |
15548 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
15549 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
15550 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
15551 | $as_echo_n "(cached) " >&6 | |
c906108c | 15552 | else |
81ecdfbb | 15553 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15554 | /* end confdefs.h. */ |
97bf5e38 MK |
15555 | #include <unistd.h> |
15556 | #include <sys/types.h> | |
15557 | #include <sys/procfs.h> | |
15558 | ||
bec39cab AC |
15559 | int |
15560 | main () | |
15561 | { | |
97bf5e38 MK |
15562 | |
15563 | int dummy;; | |
15564 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
15565 | |
15566 | ; | |
15567 | return 0; | |
15568 | } | |
15569 | _ACEOF | |
81ecdfbb | 15570 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15571 | gdb_cv_have_procfs_piocset=yes |
c906108c | 15572 | else |
81ecdfbb | 15573 | gdb_cv_have_procfs_piocset=no |
c906108c | 15574 | fi |
81ecdfbb | 15575 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15576 | fi |
97bf5e38 | 15577 | |
81ecdfbb RW |
15578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
15579 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 15580 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 15581 | |
81ecdfbb | 15582 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
15583 | |
15584 | fi | |
c906108c | 15585 | fi |
c906108c | 15586 | |
97bf5e38 | 15587 | if test ${host} = ${target} ; then |
bec39cab | 15588 | |
81ecdfbb RW |
15589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
15590 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
15591 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
15592 | $as_echo_n "(cached) " >&6 | |
bec39cab | 15593 | else |
81ecdfbb | 15594 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15595 | /* end confdefs.h. */ |
97bf5e38 | 15596 | #include <link.h> |
bec39cab AC |
15597 | int |
15598 | main () | |
15599 | { | |
97bf5e38 | 15600 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
15601 | ; |
15602 | return 0; | |
15603 | } | |
15604 | _ACEOF | |
81ecdfbb | 15605 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 15606 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 15607 | else |
81ecdfbb | 15608 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 15609 | fi |
81ecdfbb | 15610 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
15611 | fi |
15612 | ||
81ecdfbb RW |
15613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
15614 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 15615 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 15616 | |
81ecdfbb | 15617 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
15618 | |
15619 | fi | |
15620 | ||
bec39cab | 15621 | |
81ecdfbb RW |
15622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
15623 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
15624 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
15625 | $as_echo_n "(cached) " >&6 | |
c906108c | 15626 | else |
81ecdfbb | 15627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15628 | /* end confdefs.h. */ |
97bf5e38 MK |
15629 | #include <sys/types.h> |
15630 | #include <link.h> | |
bec39cab AC |
15631 | int |
15632 | main () | |
15633 | { | |
97bf5e38 | 15634 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
15635 | ; |
15636 | return 0; | |
15637 | } | |
15638 | _ACEOF | |
81ecdfbb | 15639 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15640 | gdb_cv_have_struct_link_map_with_lm_members=yes |
15641 | else | |
81ecdfbb | 15642 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 15643 | fi |
81ecdfbb | 15644 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 15645 | fi |
c906108c | 15646 | |
81ecdfbb RW |
15647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
15648 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 15649 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 15650 | |
81ecdfbb | 15651 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
15652 | |
15653 | fi | |
15654 | ||
bec39cab | 15655 | |
81ecdfbb RW |
15656 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
15657 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
15658 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
15659 | $as_echo_n "(cached) " >&6 | |
c906108c | 15660 | else |
81ecdfbb | 15661 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15662 | /* end confdefs.h. */ |
97bf5e38 MK |
15663 | #include <sys/types.h> |
15664 | #ifdef HAVE_NLIST_H | |
15665 | #include <nlist.h> | |
15666 | #endif | |
15667 | #include <link.h> | |
bec39cab AC |
15668 | int |
15669 | main () | |
15670 | { | |
97bf5e38 | 15671 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
15672 | ; |
15673 | return 0; | |
15674 | } | |
15675 | _ACEOF | |
81ecdfbb | 15676 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15677 | gdb_cv_have_struct_so_map_with_som_members=yes |
15678 | else | |
81ecdfbb | 15679 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 15680 | fi |
81ecdfbb | 15681 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15682 | fi |
c906108c | 15683 | |
81ecdfbb RW |
15684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
15685 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 15686 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 15687 | |
81ecdfbb | 15688 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 15689 | |
97bf5e38 | 15690 | fi |
c906108c | 15691 | |
bec39cab | 15692 | |
81ecdfbb RW |
15693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
15694 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
15695 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
15696 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15697 | else |
81ecdfbb | 15698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15699 | /* end confdefs.h. */ |
97bf5e38 MK |
15700 | #define _SYSCALL32 |
15701 | #include <sys/link.h> | |
bec39cab AC |
15702 | int |
15703 | main () | |
15704 | { | |
97bf5e38 | 15705 | struct link_map32 l; |
bec39cab AC |
15706 | ; |
15707 | return 0; | |
15708 | } | |
15709 | _ACEOF | |
81ecdfbb | 15710 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15711 | gdb_cv_have_struct_link_map32=yes |
15712 | else | |
81ecdfbb | 15713 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 15714 | fi |
81ecdfbb | 15715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15716 | fi |
c906108c | 15717 | |
81ecdfbb RW |
15718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
15719 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 15720 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 15721 | |
81ecdfbb | 15722 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 15723 | |
60ca704f | 15724 | |
81ecdfbb | 15725 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 15726 | |
97bf5e38 MK |
15727 | fi |
15728 | fi | |
c906108c | 15729 | |
bc8bcb4b | 15730 | # Check if the compiler supports the `long long' type. |
c906108c | 15731 | |
81ecdfbb RW |
15732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
15733 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
15734 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
15735 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15736 | else |
81ecdfbb | 15737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15738 | /* end confdefs.h. */ |
bc8bcb4b | 15739 | extern long long foo; |
bec39cab AC |
15740 | int |
15741 | main () | |
15742 | { | |
bc8bcb4b | 15743 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
15744 | ; |
15745 | return 0; | |
15746 | } | |
15747 | _ACEOF | |
81ecdfbb | 15748 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
15749 | gdb_cv_c_long_long=yes |
15750 | else | |
81ecdfbb | 15751 | gdb_cv_c_long_long=no |
97bf5e38 | 15752 | fi |
81ecdfbb | 15753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15754 | fi |
81ecdfbb RW |
15755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
15756 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 15757 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 15758 | |
81ecdfbb | 15759 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
15760 | |
15761 | fi | |
15762 | ||
bc8bcb4b | 15763 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 15764 | |
81ecdfbb RW |
15765 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
15766 | $as_echo_n "checking for long long support in printf... " >&6; } | |
15767 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
15768 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15769 | else |
81ecdfbb | 15770 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15771 | gdb_cv_printf_has_long_long=no |
15772 | else | |
81ecdfbb | 15773 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15774 | /* end confdefs.h. */ |
bc8bcb4b MK |
15775 | $ac_includes_default |
15776 | int | |
15777 | main () | |
15778 | { | |
15779 | char buf[32]; | |
97bf5e38 MK |
15780 | long long l = 0; |
15781 | l = (l << 16) + 0x0123; | |
15782 | l = (l << 16) + 0x4567; | |
15783 | l = (l << 16) + 0x89ab; | |
15784 | l = (l << 16) + 0xcdef; | |
15785 | sprintf (buf, "0x%016llx", l); | |
15786 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
15787 | ; |
15788 | return 0; | |
c906108c | 15789 | } |
bec39cab | 15790 | _ACEOF |
81ecdfbb | 15791 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
15792 | gdb_cv_printf_has_long_long=yes |
15793 | else | |
81ecdfbb | 15794 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 15795 | fi |
81ecdfbb RW |
15796 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15797 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 15798 | fi |
81ecdfbb | 15799 | |
97bf5e38 | 15800 | fi |
81ecdfbb RW |
15801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
15802 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 15803 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 15804 | |
81ecdfbb | 15805 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
15806 | |
15807 | fi | |
97bf5e38 | 15808 | |
1a619819 LM |
15809 | # Check if the compiler and runtime support printing decfloats. |
15810 | ||
81ecdfbb RW |
15811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
15812 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
15813 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
15814 | $as_echo_n "(cached) " >&6 | |
1a619819 | 15815 | else |
81ecdfbb | 15816 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
15817 | gdb_cv_printf_has_decfloat=no |
15818 | else | |
81ecdfbb | 15819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
15820 | /* end confdefs.h. */ |
15821 | $ac_includes_default | |
15822 | int | |
15823 | main () | |
15824 | { | |
15825 | char buf[64]; | |
15826 | _Decimal32 d32 = 1.2345df; | |
15827 | _Decimal64 d64 = 1.2345dd; | |
15828 | _Decimal128 d128 = 1.2345dl; | |
15829 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
15830 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
15831 | ; | |
15832 | return 0; | |
15833 | } | |
15834 | _ACEOF | |
81ecdfbb | 15835 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
15836 | gdb_cv_printf_has_decfloat=yes |
15837 | else | |
81ecdfbb | 15838 | gdb_cv_printf_has_decfloat=no |
1a619819 | 15839 | fi |
81ecdfbb RW |
15840 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15841 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 15842 | fi |
81ecdfbb | 15843 | |
1a619819 | 15844 | fi |
81ecdfbb RW |
15845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
15846 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
15847 | if test $gdb_cv_printf_has_decfloat = yes; then |
15848 | ||
81ecdfbb | 15849 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
15850 | |
15851 | fi | |
15852 | ||
bc8bcb4b MK |
15853 | # Check if the compiler supports the `long double' type. We can't use |
15854 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
15855 | # constants defined in <float.h> that fail on some systems, | |
15856 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 15857 | |
81ecdfbb RW |
15858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
15859 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
15860 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
15861 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15862 | else |
81ecdfbb | 15863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15864 | /* end confdefs.h. */ |
97bf5e38 | 15865 | long double foo; |
bec39cab | 15866 | _ACEOF |
81ecdfbb | 15867 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 15868 | gdb_cv_c_long_double=yes |
97bf5e38 | 15869 | else |
81ecdfbb | 15870 | gdb_cv_c_long_double=no |
97bf5e38 | 15871 | fi |
81ecdfbb | 15872 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 15873 | fi |
81ecdfbb RW |
15874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
15875 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 15876 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 15877 | |
81ecdfbb | 15878 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15879 | |
15880 | fi | |
15881 | ||
bc8bcb4b | 15882 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 15883 | |
81ecdfbb RW |
15884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
15885 | $as_echo_n "checking for long double support in printf... " >&6; } | |
15886 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
15887 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15888 | else |
81ecdfbb | 15889 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15890 | gdb_cv_printf_has_long_double=no |
15891 | else | |
81ecdfbb | 15892 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15893 | /* end confdefs.h. */ |
bc8bcb4b MK |
15894 | $ac_includes_default |
15895 | int | |
15896 | main () | |
15897 | { | |
15898 | char buf[16]; | |
97bf5e38 MK |
15899 | long double f = 3.141592653; |
15900 | sprintf (buf, "%Lg", f); | |
15901 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
15902 | ; |
15903 | return 0; | |
97bf5e38 | 15904 | } |
bec39cab | 15905 | _ACEOF |
81ecdfbb | 15906 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 15907 | gdb_cv_printf_has_long_double=yes |
c906108c | 15908 | else |
81ecdfbb | 15909 | gdb_cv_printf_has_long_double=no |
c906108c | 15910 | fi |
81ecdfbb RW |
15911 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15912 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 15913 | fi |
81ecdfbb | 15914 | |
c906108c | 15915 | fi |
81ecdfbb RW |
15916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
15917 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 15918 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 15919 | |
81ecdfbb | 15920 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15921 | |
15922 | fi | |
97bf5e38 | 15923 | |
bc8bcb4b | 15924 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 15925 | |
81ecdfbb RW |
15926 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
15927 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
15928 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
15929 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 15930 | else |
81ecdfbb | 15931 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
15932 | gdb_cv_scanf_has_long_double=no |
15933 | else | |
81ecdfbb | 15934 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15935 | /* end confdefs.h. */ |
bc8bcb4b MK |
15936 | #include <stdio.h> |
15937 | int | |
15938 | main () | |
15939 | { | |
15940 | char *buf = "3.141592653"; | |
97bf5e38 MK |
15941 | long double f = 0; |
15942 | sscanf (buf, "%Lg", &f); | |
15943 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
15944 | ; |
15945 | return 0; | |
97bf5e38 | 15946 | } |
bec39cab | 15947 | _ACEOF |
81ecdfbb | 15948 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
15949 | gdb_cv_scanf_has_long_double=yes |
15950 | else | |
81ecdfbb | 15951 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 15952 | fi |
81ecdfbb RW |
15953 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
15954 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 15955 | fi |
81ecdfbb | 15956 | |
c906108c | 15957 | fi |
81ecdfbb RW |
15958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
15959 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 15960 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 15961 | |
81ecdfbb | 15962 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
15963 | |
15964 | fi | |
c906108c | 15965 | |
438013df AO |
15966 | case ${host_os} in |
15967 | aix*) | |
81ecdfbb RW |
15968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
15969 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
15970 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
15971 | $as_echo_n "(cached) " >&6 | |
438013df | 15972 | else |
bec39cab | 15973 | |
438013df AO |
15974 | SAVE_LDFLAGS=$LDFLAGS |
15975 | ||
15976 | case $GCC in | |
15977 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
15978 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
15979 | esac | |
15980 | ||
15981 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 15982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 15983 | /* end confdefs.h. */ |
438013df | 15984 | |
bec39cab AC |
15985 | int |
15986 | main () | |
15987 | { | |
438013df | 15988 | int i; |
bec39cab AC |
15989 | ; |
15990 | return 0; | |
15991 | } | |
15992 | _ACEOF | |
81ecdfbb | 15993 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 15994 | |
81ecdfbb RW |
15995 | else |
15996 | gdb_cv_bigtoc= | |
438013df | 15997 | fi |
81ecdfbb RW |
15998 | rm -f core conftest.err conftest.$ac_objext \ |
15999 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 16000 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 16001 | |
bec39cab | 16002 | fi |
81ecdfbb RW |
16003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
16004 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
16005 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
16006 | ;; | |
16007 | esac | |
16008 | ||
38f6b338 | 16009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 16010 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
16011 | dynamic_list=false |
16012 | if test "${gdb_native}" = yes; then | |
16013 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
16014 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
16015 | # may not be supported there. | |
16016 | old_LDFLAGS="$LDFLAGS" | |
16017 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
16018 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
16019 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
16020 | if test "${have_libpython}" = no; then | |
16021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
16022 | /* end confdefs.h. */ |
16023 | ||
16024 | int | |
16025 | main () | |
16026 | { | |
16027 | ||
16028 | ; | |
16029 | return 0; | |
16030 | } | |
16031 | _ACEOF | |
16032 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
16033 | dynamic_list=true |
16034 | fi | |
16035 | rm -f core conftest.err conftest.$ac_objext \ | |
16036 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
16037 | else |
16038 | # Workaround http://bugs.python.org/issue4434 where static | |
16039 | # libpythonX.Y.a would get its symbols required for | |
16040 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
16041 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
16042 | old_CFLAGS="$CFLAGS" | |
16043 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
16044 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 16045 | true |
f6528abd | 16046 | else |
3bebe2f2 JK |
16047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
16048 | /* end confdefs.h. */ | |
16049 | #include "${have_libpython}/Python.h" | |
16050 | int | |
16051 | main () | |
16052 | { | |
16053 | int err; | |
38f6b338 JK |
16054 | Py_Initialize (); |
16055 | err = PyRun_SimpleString ("import itertools\n"); | |
16056 | Py_Finalize (); | |
16057 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
16058 | ; |
16059 | return 0; | |
16060 | } | |
16061 | _ACEOF | |
16062 | if ac_fn_c_try_run "$LINENO"; then : | |
16063 | dynamic_list=true | |
16064 | fi | |
16065 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
16066 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
16067 | fi | |
16068 | ||
38f6b338 JK |
16069 | CFLAGS="$old_CFLAGS" |
16070 | fi | |
16071 | LDFLAGS="$old_LDFLAGS" | |
16072 | fi | |
16073 | if $dynamic_list; then | |
16074 | found="-Wl,--dynamic-list" | |
16075 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 16076 | else |
38f6b338 JK |
16077 | found="-rdynamic" |
16078 | RDYNAMIC="-rdynamic" | |
f6528abd | 16079 | fi |
f6528abd | 16080 | |
38f6b338 | 16081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 16082 | $as_echo "$found" >&6; } |
0407b3f1 | 16083 | |
f6528abd | 16084 | |
0407b3f1 | 16085 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 16086 | case ${host_os} in |
c906108c | 16087 | solaris*) |
d92419e5 JB |
16088 | # See if thread_db library is around for Solaris thread debugging. |
16089 | # Note that we must explicitly test for version 1 of the library | |
16090 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
16091 | # the same API. | |
81ecdfbb RW |
16092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
16093 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 16094 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
16095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
16096 | $as_echo "yes" >&6; } | |
60ca704f | 16097 | |
81ecdfbb | 16098 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 16099 | |
3483b318 | 16100 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 16101 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
16102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
16103 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
16104 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
16105 | $as_echo_n "(cached) " >&6 | |
c906108c | 16106 | else |
bec39cab | 16107 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 16108 | LIBS="-ldl $LIBS" |
81ecdfbb | 16109 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
16110 | /* end confdefs.h. */ |
16111 | ||
81ecdfbb RW |
16112 | /* Override any GCC internal prototype to avoid an error. |
16113 | Use char because int might match the return type of a GCC | |
16114 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
16115 | #ifdef __cplusplus |
16116 | extern "C" | |
16117 | #endif | |
bec39cab AC |
16118 | char dlopen (); |
16119 | int | |
16120 | main () | |
16121 | { | |
81ecdfbb | 16122 | return dlopen (); |
bec39cab AC |
16123 | ; |
16124 | return 0; | |
16125 | } | |
16126 | _ACEOF | |
81ecdfbb | 16127 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
16128 | ac_cv_lib_dl_dlopen=yes |
16129 | else | |
81ecdfbb | 16130 | ac_cv_lib_dl_dlopen=no |
bec39cab | 16131 | fi |
81ecdfbb RW |
16132 | rm -f core conftest.err conftest.$ac_objext \ |
16133 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
16134 | LIBS=$ac_check_lib_save_LIBS |
16135 | fi | |
81ecdfbb RW |
16136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
16137 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
16138 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
16139 | cat >>confdefs.h <<_ACEOF |
16140 | #define HAVE_LIBDL 1 | |
16141 | _ACEOF | |
c906108c SS |
16142 | |
16143 | LIBS="-ldl $LIBS" | |
16144 | ||
c906108c SS |
16145 | fi |
16146 | ||
f6528abd | 16147 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
16148 | # Sun randomly tweaked the prototypes in <proc_service.h> |
16149 | # at one point. | |
81ecdfbb RW |
16150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
16151 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
16152 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
16153 | $as_echo_n "(cached) " >&6 | |
c906108c | 16154 | else |
bec39cab | 16155 | |
81ecdfbb | 16156 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16157 | /* end confdefs.h. */ |
c906108c SS |
16158 | |
16159 | #include <proc_service.h> | |
16160 | ps_err_e ps_pdwrite | |
16161 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 16162 | |
bec39cab AC |
16163 | int |
16164 | main () | |
16165 | { | |
16166 | ||
16167 | ; | |
16168 | return 0; | |
16169 | } | |
16170 | _ACEOF | |
81ecdfbb | 16171 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
16172 | gdb_cv_proc_service_is_old=no |
16173 | else | |
81ecdfbb | 16174 | gdb_cv_proc_service_is_old=yes |
c906108c | 16175 | fi |
81ecdfbb | 16176 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 16177 | |
c906108c SS |
16178 | fi |
16179 | ||
81ecdfbb RW |
16180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
16181 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 16182 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 16183 | |
81ecdfbb | 16184 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
16185 | |
16186 | fi | |
16187 | else | |
81ecdfbb RW |
16188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
16189 | $as_echo "no" >&6; } | |
c906108c SS |
16190 | fi |
16191 | ;; | |
d92419e5 | 16192 | aix*) |
81ecdfbb RW |
16193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
16194 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
16195 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
16196 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16197 | else |
81ecdfbb | 16198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16199 | /* end confdefs.h. */ |
d92419e5 | 16200 | #include <sys/pthdebug.h> |
bec39cab AC |
16201 | int |
16202 | main () | |
16203 | { | |
d92419e5 JB |
16204 | #ifndef PTHDB_VERSION_3 |
16205 | #error | |
16206 | #endif | |
bec39cab AC |
16207 | ; |
16208 | return 0; | |
16209 | } | |
16210 | _ACEOF | |
81ecdfbb | 16211 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
16212 | gdb_cv_have_aix_thread_debug=yes |
16213 | else | |
81ecdfbb | 16214 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 16215 | fi |
81ecdfbb | 16216 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
16217 | fi |
16218 | ||
81ecdfbb RW |
16219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
16220 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
16221 | if test $gdb_cv_have_aix_thread_debug = yes; then |
16222 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 16223 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 | 16224 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
d645e32e JB |
16225 | |
16226 | # Older versions of AIX do not provide the declaration for | |
16227 | # the getthrds function (it appears that it was introduced | |
16228 | # with AIX 6.x). | |
16229 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
16230 | " | |
16231 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
16232 | ac_have_decl=1 | |
16233 | else | |
16234 | ac_have_decl=0 | |
16235 | fi | |
16236 | ||
16237 | cat >>confdefs.h <<_ACEOF | |
16238 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
16239 | _ACEOF | |
16240 | ||
d92419e5 JB |
16241 | fi |
16242 | ;; | |
c906108c | 16243 | esac |
bec39cab | 16244 | |
c906108c SS |
16245 | fi |
16246 | ||
3f47be5c | 16247 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
16248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
16249 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
16250 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
16251 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16252 | else |
81ecdfbb | 16253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16254 | /* end confdefs.h. */ |
3f47be5c | 16255 | #include <thread_db.h> |
bec39cab AC |
16256 | int |
16257 | main () | |
16258 | { | |
3f47be5c | 16259 | int i = TD_NOTALLOC; |
bec39cab AC |
16260 | ; |
16261 | return 0; | |
16262 | } | |
16263 | _ACEOF | |
81ecdfbb | 16264 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
16265 | gdb_cv_thread_db_h_has_td_notalloc=yes |
16266 | else | |
81ecdfbb | 16267 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 16268 | |
3f47be5c | 16269 | fi |
81ecdfbb | 16270 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 16271 | |
bec39cab | 16272 | fi |
81ecdfbb RW |
16273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
16274 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
16275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
16276 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
16277 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
16278 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 16279 | else |
81ecdfbb | 16280 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16281 | /* end confdefs.h. */ |
16282 | #include <thread_db.h> | |
16283 | int | |
16284 | main () | |
16285 | { | |
16286 | int i = TD_VERSION; | |
16287 | ; | |
16288 | return 0; | |
16289 | } | |
16290 | _ACEOF | |
81ecdfbb | 16291 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16292 | gdb_cv_thread_db_h_has_td_version=yes |
16293 | else | |
81ecdfbb | 16294 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
16295 | |
16296 | fi | |
81ecdfbb | 16297 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16298 | |
16299 | fi | |
81ecdfbb RW |
16300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
16301 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
16302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
16303 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
16304 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
16305 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 16306 | else |
81ecdfbb | 16307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
16308 | /* end confdefs.h. */ |
16309 | #include <thread_db.h> | |
16310 | int | |
16311 | main () | |
16312 | { | |
16313 | int i = TD_NOTLS; | |
16314 | ; | |
16315 | return 0; | |
16316 | } | |
16317 | _ACEOF | |
81ecdfbb | 16318 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
16319 | gdb_cv_thread_db_h_has_td_notls=yes |
16320 | else | |
81ecdfbb | 16321 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
16322 | |
16323 | fi | |
81ecdfbb | 16324 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
16325 | |
16326 | fi | |
81ecdfbb RW |
16327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
16328 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
16329 | fi |
16330 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 16331 | |
81ecdfbb | 16332 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 16333 | |
59f80f10 DJ |
16334 | fi |
16335 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
16336 | ||
81ecdfbb | 16337 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
16338 | |
16339 | fi | |
16340 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
16341 | ||
81ecdfbb | 16342 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 16343 | |
3f47be5c EZ |
16344 | fi |
16345 | ||
b757528f | 16346 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
16347 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
16348 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
16349 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
16350 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16351 | else |
81ecdfbb | 16352 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16353 | /* end confdefs.h. */ |
b757528f | 16354 | #include <sys/syscall.h> |
bec39cab AC |
16355 | int |
16356 | main () | |
16357 | { | |
b757528f | 16358 | int i = __NR_tkill; |
bec39cab AC |
16359 | ; |
16360 | return 0; | |
16361 | } | |
16362 | _ACEOF | |
81ecdfbb | 16363 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
16364 | gdb_cv_sys_syscall_h_has_tkill=yes |
16365 | else | |
81ecdfbb | 16366 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 16367 | |
b757528f | 16368 | fi |
81ecdfbb | 16369 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 16370 | |
bec39cab | 16371 | fi |
81ecdfbb RW |
16372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
16373 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
16374 | fi |
16375 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 16376 | |
81ecdfbb | 16377 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
16378 | |
16379 | fi | |
16380 | ||
81ecdfbb RW |
16381 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
16382 | " | |
16383 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
16384 | ac_have_decl=1 | |
10568435 | 16385 | else |
81ecdfbb | 16386 | ac_have_decl=0 |
10568435 | 16387 | fi |
10568435 JK |
16388 | |
16389 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 16390 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
16391 | _ACEOF |
16392 | ||
16393 | ||
81ecdfbb RW |
16394 | if test "$cross_compiling" = yes; then : |
16395 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
16396 | /* end confdefs.h. */ |
16397 | #include <sys/personality.h> | |
16398 | int | |
16399 | main () | |
16400 | { | |
16401 | ||
16402 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
16403 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
16404 | # endif | |
16405 | /* Test the flag could be set and stays set. */ | |
16406 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
16407 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
16408 | return 1 | |
16409 | ; | |
16410 | return 0; | |
16411 | } | |
16412 | _ACEOF | |
81ecdfbb | 16413 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
16414 | have_personality=true |
16415 | else | |
81ecdfbb | 16416 | have_personality=false |
10568435 | 16417 | fi |
81ecdfbb RW |
16418 | rm -f core conftest.err conftest.$ac_objext \ |
16419 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 16420 | else |
81ecdfbb | 16421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
16422 | /* end confdefs.h. */ |
16423 | #include <sys/personality.h> | |
16424 | int | |
16425 | main () | |
16426 | { | |
16427 | ||
16428 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
16429 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
16430 | # endif | |
16431 | /* Test the flag could be set and stays set. */ | |
16432 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
16433 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
16434 | return 1 | |
16435 | ; | |
16436 | return 0; | |
16437 | } | |
16438 | _ACEOF | |
81ecdfbb | 16439 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
16440 | have_personality=true |
16441 | else | |
81ecdfbb | 16442 | have_personality=false |
10568435 | 16443 | fi |
81ecdfbb RW |
16444 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
16445 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 16446 | fi |
81ecdfbb | 16447 | |
10568435 JK |
16448 | if $have_personality |
16449 | then | |
16450 | ||
81ecdfbb | 16451 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
16452 | |
16453 | fi | |
16454 | ||
fb40c209 | 16455 | |
f83d8a90 DE |
16456 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
16457 | # except that the argument to --with-sysroot is optional. | |
16458 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
16459 | if test "x$with_sysroot" = xyes; then | |
16460 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
16461 | fi | |
bec39cab | 16462 | |
81ecdfbb RW |
16463 | # Check whether --with-sysroot was given. |
16464 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
16465 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
16466 | else | |
16467 | TARGET_SYSTEM_ROOT= | |
16468 | fi | |
030292b7 | 16469 | |
030292b7 | 16470 | |
f83d8a90 DE |
16471 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
16472 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16473 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
16474 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 16475 | |
f83d8a90 DE |
16476 | cat >>confdefs.h <<_ACEOF |
16477 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
16478 | _ACEOF | |
bec39cab | 16479 | |
030292b7 | 16480 | |
b14b1491 | 16481 | |
f83d8a90 DE |
16482 | |
16483 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
16484 | if test "x$prefix" = xNONE; then | |
16485 | test_prefix=/usr/local | |
16486 | else | |
16487 | test_prefix=$prefix | |
16488 | fi | |
16489 | else | |
16490 | test_prefix=$exec_prefix | |
16491 | fi | |
16492 | value=0 | |
16493 | case ${ac_define_dir} in | |
16494 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16495 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16496 | value=1 | |
16497 | ;; | |
16498 | esac | |
16499 | ||
16500 | cat >>confdefs.h <<_ACEOF | |
16501 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
16502 | _ACEOF | |
030292b7 DJ |
16503 | |
16504 | ||
16505 | ||
16e7150e | 16506 | |
16e7150e | 16507 | |
81ecdfbb RW |
16508 | # Check whether --with-system-gdbinit was given. |
16509 | if test "${with_system_gdbinit+set}" = set; then : | |
16510 | withval=$with_system_gdbinit; | |
b14b1491 TT |
16511 | SYSTEM_GDBINIT=$withval |
16512 | else | |
16513 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
16514 | fi |
16515 | ||
16e7150e JG |
16516 | |
16517 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
16518 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 16519 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
16520 | ac_define_dir=`eval echo $ac_define_dir` |
16521 | ||
16522 | cat >>confdefs.h <<_ACEOF | |
16523 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
16524 | _ACEOF | |
16525 | ||
16526 | ||
16527 | ||
0c4a4063 | 16528 | |
b14b1491 TT |
16529 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
16530 | if test "x$prefix" = xNONE; then | |
16531 | test_prefix=/usr/local | |
16532 | else | |
16533 | test_prefix=$prefix | |
16534 | fi | |
16535 | else | |
16536 | test_prefix=$exec_prefix | |
16537 | fi | |
16538 | value=0 | |
16539 | case ${ac_define_dir} in | |
16540 | "${test_prefix}"|"${test_prefix}/"*|\ | |
16541 | '${exec_prefix}'|'${exec_prefix}/'*) | |
16542 | value=1 | |
16543 | ;; | |
16544 | esac | |
16e7150e | 16545 | |
b14b1491 TT |
16546 | cat >>confdefs.h <<_ACEOF |
16547 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
16548 | _ACEOF |
16549 | ||
b14b1491 | 16550 | |
16e7150e | 16551 | |
0c4a4063 | 16552 | |
81ecdfbb RW |
16553 | # Check whether --enable-werror was given. |
16554 | if test "${enable_werror+set}" = set; then : | |
16555 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
16556 | yes | y) ERROR_ON_WARNING="yes" ;; |
16557 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 16558 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 16559 | esac |
81ecdfbb RW |
16560 | fi |
16561 | ||
094a342e MK |
16562 | |
16563 | # Enable -Werror by default when using gcc | |
16564 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
16565 | ERROR_ON_WARNING=yes | |
16566 | fi | |
16567 | ||
16568 | WERROR_CFLAGS="" | |
16569 | if test "${ERROR_ON_WARNING}" = yes ; then | |
16570 | WERROR_CFLAGS="-Werror" | |
16571 | fi | |
16572 | ||
aa79a185 DJ |
16573 | # The entries after -Wno-pointer-sign are disabled warnings which may |
16574 | # be enabled in the future, which can not currently be used to build | |
16575 | # GDB. | |
16576 | # NOTE: If you change this list, remember to update | |
3b851bce | 16577 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
16578 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
16579 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 | 16580 | -Wno-unused -Wunused-value -Wunused-function \ |
b03a2011 | 16581 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes" |
a3b362c4 | 16582 | |
3526781e DJ |
16583 | # Enable -Wno-format by default when using gcc on mingw since many |
16584 | # GCC versions complain about %I64. | |
16585 | case "${host}" in | |
16586 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
16587 | esac | |
16588 | ||
81ecdfbb RW |
16589 | # Check whether --enable-build-warnings was given. |
16590 | if test "${enable_build_warnings+set}" = set; then : | |
16591 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
16592 | yes) ;; |
16593 | no) build_warnings="-w";; | |
16594 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16595 | build_warnings="${build_warnings} ${t}";; | |
16596 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16597 | build_warnings="${t} ${build_warnings}";; | |
16598 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16599 | esac | |
d4f3574e | 16600 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 16601 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 16602 | fi |
81ecdfbb RW |
16603 | fi |
16604 | # Check whether --enable-gdb-build-warnings was given. | |
16605 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
16606 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
16607 | yes) ;; |
16608 | no) build_warnings="-w";; | |
16609 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16610 | build_warnings="${build_warnings} ${t}";; | |
16611 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
16612 | build_warnings="${t} ${build_warnings}";; | |
16613 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
16614 | esac | |
16615 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
16616 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
16617 | fi | |
81ecdfbb RW |
16618 | fi |
16619 | WARN_CFLAGS="" | |
c906108c SS |
16620 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
16621 | then | |
81ecdfbb RW |
16622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
16623 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
16624 | # Separate out the -Werror flag as some files just cannot be |
16625 | # compiled with it enabled. | |
16626 | for w in ${build_warnings}; do | |
16627 | case $w in | |
16628 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
16629 | *) # Check that GCC accepts it | |
4536bbc6 AC |
16630 | saved_CFLAGS="$CFLAGS" |
16631 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 16632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16633 | /* end confdefs.h. */ |
4536bbc6 | 16634 | |
bec39cab AC |
16635 | int |
16636 | main () | |
16637 | { | |
4536bbc6 | 16638 | |
bec39cab AC |
16639 | ; |
16640 | return 0; | |
16641 | } | |
16642 | _ACEOF | |
81ecdfbb | 16643 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 16644 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 16645 | fi |
81ecdfbb | 16646 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 16647 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
16648 | esac |
16649 | done | |
81ecdfbb RW |
16650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
16651 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
16652 | fi |
16653 | ||
16654 | ||
104c1213 | 16655 | |
7a292a7a | 16656 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
16657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
16658 | $as_echo_n "checking for cygwin... " >&6; } | |
16659 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
16660 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16661 | else |
81ecdfbb | 16662 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 16663 | /* end confdefs.h. */ |
7a292a7a SS |
16664 | |
16665 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
16666 | lose | |
16667 | #endif | |
bec39cab | 16668 | _ACEOF |
7a292a7a | 16669 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 16670 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
16671 | gdb_cv_os_cygwin=yes |
16672 | else | |
7a292a7a SS |
16673 | gdb_cv_os_cygwin=no |
16674 | fi | |
16675 | rm -f conftest* | |
16676 | ||
16677 | fi | |
81ecdfbb RW |
16678 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
16679 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 16680 | |
aff38e61 | 16681 | |
3eb25fda | 16682 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 16683 | case ${host} in |
95cbc983 AC |
16684 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
16685 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 16686 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
16687 | esac |
16688 | ||
16689 | ||
cd0fc7c3 SS |
16690 | # libreadline needs libuser32.a in a cygwin environment |
16691 | WIN32LIBS= | |
16692 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
16693 | WIN32LIBS="-luser32" |
16694 | case "${target}" in | |
16695 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
16696 | ;; | |
16697 | esac | |
cd0fc7c3 | 16698 | fi |
c906108c | 16699 | |
b4505029 MM |
16700 | # The ser-tcp.c module requires sockets. |
16701 | case ${host} in | |
16702 | *mingw32*) | |
16703 | ||
81ecdfbb | 16704 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
16705 | |
16706 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
16707 | ;; | |
16708 | esac | |
16709 | ||
7a292a7a | 16710 | |
31d99776 DJ |
16711 | # Add ELF support to GDB, but only if BFD includes ELF support. |
16712 | OLD_CFLAGS=$CFLAGS | |
16713 | OLD_LDFLAGS=$LDFLAGS | |
16714 | OLD_LIBS=$LIBS | |
12cd34f3 PA |
16715 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
16716 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
16717 | # always want our bfd. | |
16718 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5579a92e | 16719 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" |
7b3200f9 | 16720 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
16721 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
16722 | if test "$plugins" = "yes"; then | |
16723 | LIBS="-ldl $LIBS" | |
16724 | fi | |
0f72fb1c | 16725 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
16726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
16727 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
16728 | if test "${gdb_cv_var_elf+set}" = set; then : | |
16729 | $as_echo_n "(cached) " >&6 | |
31d99776 | 16730 | else |
81ecdfbb | 16731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
16732 | /* end confdefs.h. */ |
16733 | #include <stdlib.h> | |
16734 | #include "bfd.h" | |
16735 | #include "elf-bfd.h" | |
16736 | ||
16737 | int | |
16738 | main () | |
16739 | { | |
16740 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
16741 | ; | |
16742 | return 0; | |
16743 | } | |
16744 | _ACEOF | |
81ecdfbb | 16745 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
16746 | gdb_cv_var_elf=yes |
16747 | else | |
81ecdfbb | 16748 | gdb_cv_var_elf=no |
31d99776 | 16749 | fi |
81ecdfbb RW |
16750 | rm -f core conftest.err conftest.$ac_objext \ |
16751 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 16752 | fi |
81ecdfbb RW |
16753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
16754 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 DJ |
16755 | if test $gdb_cv_var_elf = yes; then |
16756 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
16757 | ||
81ecdfbb | 16758 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 16759 | |
075ff26d JK |
16760 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
16761 | if test "$plugins" = "yes"; then | |
16762 | OLD_LIBS="-ldl $OLD_LIBS" | |
16763 | fi | |
31d99776 DJ |
16764 | fi |
16765 | CFLAGS=$OLD_CFLAGS | |
16766 | LDFLAGS=$OLD_LDFLAGS | |
16767 | LIBS=$OLD_LIBS | |
16768 | ||
121ce6e5 DJ |
16769 | # Add any host-specific objects to GDB. |
16770 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
16771 | ||
3fc11d3e JM |
16772 | LIBGUI="../libgui/src/libgui.a" |
16773 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
16774 | ||
16775 | ||
7a292a7a | 16776 | |
3fc11d3e JM |
16777 | WIN32LDAPP= |
16778 | ||
16779 | ||
16780 | ||
d91670b9 | 16781 | case "${host}" in |
686a5eed | 16782 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
16783 | configdir="win" |
16784 | ;; | |
16785 | *) | |
16786 | configdir="unix" | |
16787 | ;; | |
16788 | esac | |
3fc11d3e JM |
16789 | |
16790 | GDBTKLIBS= | |
16791 | if test "${enable_gdbtk}" = "yes"; then | |
16792 | ||
d1c3b63a KS |
16793 | # Gdbtk must have an absolute path to srcdir in order to run |
16794 | # properly when not installed. | |
16795 | here=`pwd` | |
16796 | cd ${srcdir} | |
16797 | GDBTK_SRC_DIR=`pwd` | |
16798 | cd $here | |
16799 | ||
bec39cab | 16800 | |
5062cc19 KS |
16801 | # |
16802 | # Ok, lets find the tcl configuration | |
16803 | # First, look for one uninstalled. | |
16804 | # the alternative search directory is invoked by --with-tcl | |
16805 | # | |
3fc11d3e | 16806 | |
5062cc19 KS |
16807 | if test x"${no_tcl}" = x ; then |
16808 | # we reset no_tcl in case something fails here | |
16809 | no_tcl=true | |
bec39cab | 16810 | |
81ecdfbb RW |
16811 | # Check whether --with-tcl was given. |
16812 | if test "${with_tcl+set}" = set; then : | |
16813 | withval=$with_tcl; with_tclconfig=${withval} | |
16814 | fi | |
16815 | ||
16816 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
16817 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
16818 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
16819 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 16820 | else |
bec39cab | 16821 | |
3fc11d3e | 16822 | |
5062cc19 KS |
16823 | # First check to see if --with-tcl was specified. |
16824 | case "${host}" in | |
16825 | *-*-cygwin*) platDir="win" ;; | |
16826 | *) platDir="unix" ;; | |
16827 | esac | |
16828 | if test x"${with_tclconfig}" != x ; then | |
16829 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
16830 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
16831 | else | |
81ecdfbb | 16832 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16833 | fi |
16834 | fi | |
16835 | ||
16836 | # then check for a private Tcl installation | |
16837 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16838 | for i in \ | |
16839 | ../tcl \ | |
16840 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16841 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
16842 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16843 | ../../tcl \ | |
16844 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16845 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16846 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
16847 | ../../../tcl \ | |
16848 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16849 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
16850 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16851 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16852 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16853 | break | |
16854 | fi | |
16855 | done | |
16856 | fi | |
16857 | ||
16858 | # on Darwin, check in Framework installation locations | |
16859 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
16860 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16861 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16862 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16863 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16864 | ; do | |
16865 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
16866 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
16867 | break | |
16868 | fi | |
16869 | done | |
16870 | fi | |
16871 | ||
16872 | # check in a few common install locations | |
16873 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16874 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16875 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16876 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16877 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16878 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16879 | `ls -d /usr/lib 2>/dev/null` \ | |
16880 | ; do | |
16881 | if test -f "$i/tclConfig.sh" ; then | |
16882 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
16883 | break | |
16884 | fi | |
16885 | done | |
16886 | fi | |
3fc11d3e | 16887 | |
5062cc19 KS |
16888 | # check in a few other private locations |
16889 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16890 | for i in \ | |
16891 | ${srcdir}/../tcl \ | |
16892 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16893 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
16894 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
16895 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
16896 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
16897 | break | |
16898 | fi | |
16899 | done | |
16900 | fi | |
bec39cab | 16901 | |
3fc11d3e JM |
16902 | fi |
16903 | ||
5062cc19 KS |
16904 | |
16905 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
16906 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
16907 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
16908 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
16909 | else |
16910 | no_tcl= | |
16911 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
16912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
16913 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
16914 | fi |
16915 | fi | |
3fc11d3e | 16916 | |
bec39cab | 16917 | |
85541719 DE |
16918 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
16919 | # point to doing Tcl. | |
bec39cab | 16920 | |
5062cc19 KS |
16921 | # |
16922 | # Ok, lets find the tk configuration | |
16923 | # First, look for one uninstalled. | |
16924 | # the alternative search directory is invoked by --with-tk | |
16925 | # | |
3fc11d3e | 16926 | |
5062cc19 KS |
16927 | if test x"${no_tk}" = x ; then |
16928 | # we reset no_tk in case something fails here | |
16929 | no_tk=true | |
bec39cab | 16930 | |
81ecdfbb RW |
16931 | # Check whether --with-tk was given. |
16932 | if test "${with_tk+set}" = set; then : | |
16933 | withval=$with_tk; with_tkconfig=${withval} | |
16934 | fi | |
16935 | ||
16936 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
16937 | $as_echo_n "checking for Tk configuration... " >&6; } | |
16938 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
16939 | $as_echo_n "(cached) " >&6 | |
bec39cab | 16940 | else |
3fc11d3e JM |
16941 | |
16942 | ||
5062cc19 KS |
16943 | # First check to see if --with-tkconfig was specified. |
16944 | if test x"${with_tkconfig}" != x ; then | |
16945 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
16946 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
16947 | else | |
81ecdfbb | 16948 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
16949 | fi |
16950 | fi | |
3fc11d3e | 16951 | |
5062cc19 KS |
16952 | # then check for a private Tk library |
16953 | case "${host}" in | |
16954 | *-*-cygwin*) platDir="win" ;; | |
16955 | *) platDir="unix" ;; | |
16956 | esac | |
16957 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16958 | for i in \ | |
16959 | ../tk \ | |
16960 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16961 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
16962 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
16963 | ../../tk \ | |
16964 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16965 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
16966 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
16967 | ../../../tk \ | |
16968 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
16969 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
16970 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
16971 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
16972 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
16973 | break | |
16974 | fi | |
16975 | done | |
16976 | fi | |
16977 | ||
16978 | # on Darwin, check in Framework installation locations | |
16979 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
16980 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
16981 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
16982 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
16983 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
16984 | ; do | |
16985 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
16986 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
16987 | break | |
16988 | fi | |
16989 | done | |
16990 | fi | |
16991 | ||
16992 | # check in a few common install locations | |
16993 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
16994 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
16995 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
16996 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
16997 | `ls -d /usr/local/lib 2>/dev/null` \ | |
16998 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
16999 | `ls -d /usr/lib 2>/dev/null` \ | |
17000 | ; do | |
17001 | if test -f "$i/tkConfig.sh" ; then | |
17002 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
17003 | break | |
17004 | fi | |
17005 | done | |
17006 | fi | |
17007 | # check in a few other private locations | |
17008 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
17009 | for i in \ | |
17010 | ${srcdir}/../tk \ | |
17011 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
17012 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
17013 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
17014 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
17015 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
17016 | break | |
17017 | fi | |
17018 | done | |
17019 | fi | |
3fc11d3e | 17020 | |
3fc11d3e JM |
17021 | fi |
17022 | ||
17023 | ||
5062cc19 KS |
17024 | if test x"${ac_cv_c_tkconfig}" = x ; then |
17025 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
17026 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
17027 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
17028 | else |
17029 | no_tk= | |
17030 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
17031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17032 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 17033 | fi |
3fc11d3e | 17034 | fi |
dd2504ab | 17035 | |
dd2504ab | 17036 | |
85541719 DE |
17037 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
17038 | ||
81ecdfbb RW |
17039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17040 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
17041 | |
17042 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
17043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
17044 | $as_echo "loading" >&6; } | |
85541719 DE |
17045 | . ${TCL_BIN_DIR}/tclConfig.sh |
17046 | else | |
81ecdfbb RW |
17047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
17048 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
17049 | fi |
17050 | ||
17051 | # eval is required to do the TCL_DBGX substitution | |
17052 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
17053 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
17054 | ||
17055 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
17056 | # then set the common variable name to the value of the build variables. | |
17057 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
17058 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
17059 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
17060 | # installed and uninstalled version of Tcl. | |
17061 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
17062 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
17063 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
17064 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
17065 | elif test "`uname -s`" = "Darwin"; then | |
17066 | # If Tcl was built as a framework, attempt to use the libraries | |
17067 | # from the framework at the given location so that linking works | |
17068 | # against Tcl.framework installed in an arbitary location. | |
17069 | case ${TCL_DEFS} in | |
17070 | *TCL_FRAMEWORK*) | |
17071 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
17072 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
17073 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
17074 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
17075 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
17076 | break | |
17077 | fi | |
17078 | done | |
17079 | fi | |
17080 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
17081 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
17082 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
17083 | fi | |
17084 | ;; | |
17085 | esac | |
17086 | fi | |
17087 | ||
17088 | # eval is required to do the TCL_DBGX substitution | |
17089 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
17090 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
17091 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
17092 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
17093 | ||
17094 | ||
17095 | ||
17096 | ||
17097 | ||
17098 | ||
17099 | ||
17100 | ||
17101 | ||
17102 | ||
17103 | ||
17104 | ||
17105 | ||
17106 | ||
17107 | ||
17108 | # Check for in-tree tcl | |
17109 | here=`pwd` | |
17110 | cd ${srcdir}/.. | |
17111 | topdir=`pwd` | |
17112 | cd ${here} | |
17113 | ||
17114 | intree="no" | |
17115 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
17116 | intree="yes" | |
17117 | fi | |
17118 | ||
17119 | # Find Tcl private headers | |
17120 | if test x"${intree}" = xno; then | |
17121 | ||
81ecdfbb RW |
17122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
17123 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
17124 | private_dir="" |
17125 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
17126 | if test -f ${dir}/tclInt.h ; then | |
17127 | private_dir=${dir} | |
17128 | fi | |
17129 | ||
17130 | if test x"${private_dir}" = x; then | |
81ecdfbb | 17131 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
17132 | else |
17133 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
17134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
17135 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
17136 | fi |
17137 | ||
17138 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
17139 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
17140 | TCL_DEPS="" | |
17141 | else | |
17142 | # If building tcl in the same src tree, private headers | |
17143 | # are not needed, but we need to be sure to use the right | |
17144 | # headers library | |
17145 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
17146 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
17147 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
17148 | fi | |
17149 | ||
17150 | ||
17151 | ||
17152 | ||
17153 | ||
81ecdfbb RW |
17154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17155 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 17156 | |
5062cc19 | 17157 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
17158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
17159 | $as_echo "loading" >&6; } | |
5062cc19 | 17160 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 17161 | else |
81ecdfbb RW |
17162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
17163 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 17164 | fi |
bec39cab | 17165 | |
5062cc19 KS |
17166 | # eval is required to do the TK_DBGX substitution |
17167 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
17168 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
17169 | ||
17170 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
17171 | # then set the common variable name to the value of the build variables. | |
17172 | # For example, the variable TK_LIB_SPEC will be set to the value | |
17173 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
17174 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
17175 | # installed and uninstalled version of Tcl. | |
85541719 | 17176 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
17177 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
17178 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
17179 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
17180 | elif test "`uname -s`" = "Darwin"; then | |
17181 | # If Tk was built as a framework, attempt to use the libraries | |
17182 | # from the framework at the given location so that linking works | |
17183 | # against Tk.framework installed in an arbitary location. | |
17184 | case ${TK_DEFS} in | |
17185 | *TK_FRAMEWORK*) | |
85541719 | 17186 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
17187 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
17188 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
17189 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
17190 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
17191 | break | |
17192 | fi | |
17193 | done | |
17194 | fi | |
85541719 | 17195 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
17196 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
17197 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
17198 | fi | |
17199 | ;; | |
17200 | esac | |
3fc11d3e JM |
17201 | fi |
17202 | ||
5062cc19 KS |
17203 | # eval is required to do the TK_DBGX substitution |
17204 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
17205 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
17206 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
17207 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 17208 | |
3fc11d3e JM |
17209 | |
17210 | ||
bec39cab AC |
17211 | |
17212 | ||
17213 | ||
17214 | ||
17215 | ||
17216 | ||
17217 | ||
3fc11d3e | 17218 | |
3fc11d3e | 17219 | |
bec39cab | 17220 | |
bec39cab | 17221 | |
85541719 DE |
17222 | # Check for in-tree Tk |
17223 | intree="no" | |
17224 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
17225 | intree="yes" | |
17226 | fi | |
3fc11d3e | 17227 | |
85541719 DE |
17228 | # Find Tk private headers |
17229 | if test x"${intree}" = xno; then | |
3fc11d3e | 17230 | |
81ecdfbb RW |
17231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
17232 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
17233 | private_dir="" |
17234 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
17235 | if test -f ${dir}/tkInt.h; then | |
17236 | private_dir=${dir} | |
3fc11d3e | 17237 | fi |
bec39cab | 17238 | |
5062cc19 | 17239 | if test x"${private_dir}" = x; then |
81ecdfbb | 17240 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 17241 | else |
5062cc19 | 17242 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
17243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
17244 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 17245 | fi |
3fc11d3e | 17246 | |
85541719 DE |
17247 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
17248 | TK_LIBRARY=${TK_LIB_SPEC} | |
17249 | TK_DEPS="" | |
17250 | else | |
17251 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
17252 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
17253 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
17254 | fi | |
3fc11d3e JM |
17255 | |
17256 | ||
3fc11d3e JM |
17257 | |
17258 | ||
3fc11d3e | 17259 | |
85541719 | 17260 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 17261 | |
85541719 DE |
17262 | # Include some libraries that Tcl and Tk want. |
17263 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
17264 | # Yes, the ordering seems wrong here. But it isn't. | |
17265 | # TK_LIBS is the list of libraries that need to be linked | |
17266 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
17267 | # were in LIBS then any link tests after this point would | |
17268 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
17269 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 17270 | |
85541719 DE |
17271 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
17272 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
17273 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
17274 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
17275 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
17276 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
17277 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 17278 | |
85541719 DE |
17279 | if test x$gdb_cv_os_cygwin = xyes; then |
17280 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
17281 | WIN32LDAPP="-Wl,--subsystem,console" | |
17282 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 17283 | fi |
ffc6a242 | 17284 | |
81ecdfbb | 17285 | subdirs="$subdirs gdbtk" |
3ace7edb | 17286 | |
85541719 | 17287 | fi |
3fc11d3e JM |
17288 | fi |
17289 | ||
17290 | ||
17291 | ||
17292 | ||
17293 | ||
17294 | ||
17295 | ||
17296 | ||
81ecdfbb RW |
17297 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
17298 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 17299 | |
c906108c | 17300 | |
81ecdfbb RW |
17301 | # Check whether --with-x was given. |
17302 | if test "${with_x+set}" = set; then : | |
17303 | withval=$with_x; | |
17304 | fi | |
c906108c SS |
17305 | |
17306 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
17307 | if test "x$with_x" = xno; then | |
17308 | # The user explicitly disabled X. | |
17309 | have_x=disabled | |
17310 | else | |
81ecdfbb RW |
17311 | case $x_includes,$x_libraries in #( |
17312 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
17313 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
17314 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
17315 | else |
17316 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 17317 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 17318 | rm -f -r conftest.dir |
bec39cab AC |
17319 | if mkdir conftest.dir; then |
17320 | cd conftest.dir | |
bec39cab | 17321 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
17322 | incroot: |
17323 | @echo incroot='${INCROOT}' | |
17324 | usrlibdir: | |
17325 | @echo usrlibdir='${USRLIBDIR}' | |
17326 | libdir: | |
17327 | @echo libdir='${LIBDIR}' | |
17328 | _ACEOF | |
17329 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 17330 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
17331 | for ac_var in incroot usrlibdir libdir; do |
17332 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
17333 | done | |
c906108c | 17334 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
17335 | for ac_extension in a so sl dylib la dll; do |
17336 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
17337 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 17338 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
17339 | fi |
17340 | done | |
17341 | # Screen out bogus values from the imake configuration. They are | |
17342 | # bogus both because they are the default anyway, and because | |
17343 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 17344 | case $ac_im_incroot in |
81ecdfbb | 17345 | /usr/include) ac_x_includes= ;; |
bec39cab | 17346 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 17347 | esac |
bec39cab | 17348 | case $ac_im_usrlibdir in |
81ecdfbb | 17349 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 17350 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
17351 | esac |
17352 | fi | |
17353 | cd .. | |
81ecdfbb | 17354 | rm -f -r conftest.dir |
c906108c SS |
17355 | fi |
17356 | ||
bec39cab AC |
17357 | # Standard set of common directories for X headers. |
17358 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
17359 | ac_x_header_dirs=' | |
17360 | /usr/X11/include | |
81ecdfbb | 17361 | /usr/X11R7/include |
bec39cab AC |
17362 | /usr/X11R6/include |
17363 | /usr/X11R5/include | |
17364 | /usr/X11R4/include | |
17365 | ||
17366 | /usr/include/X11 | |
81ecdfbb | 17367 | /usr/include/X11R7 |
bec39cab AC |
17368 | /usr/include/X11R6 |
17369 | /usr/include/X11R5 | |
17370 | /usr/include/X11R4 | |
17371 | ||
17372 | /usr/local/X11/include | |
81ecdfbb | 17373 | /usr/local/X11R7/include |
bec39cab AC |
17374 | /usr/local/X11R6/include |
17375 | /usr/local/X11R5/include | |
17376 | /usr/local/X11R4/include | |
17377 | ||
17378 | /usr/local/include/X11 | |
81ecdfbb | 17379 | /usr/local/include/X11R7 |
bec39cab AC |
17380 | /usr/local/include/X11R6 |
17381 | /usr/local/include/X11R5 | |
17382 | /usr/local/include/X11R4 | |
17383 | ||
17384 | /usr/X386/include | |
17385 | /usr/x386/include | |
17386 | /usr/XFree86/include/X11 | |
17387 | ||
17388 | /usr/include | |
17389 | /usr/local/include | |
17390 | /usr/unsupported/include | |
17391 | /usr/athena/include | |
17392 | /usr/local/x11r5/include | |
17393 | /usr/lpp/Xamples/include | |
17394 | ||
17395 | /usr/openwin/include | |
17396 | /usr/openwin/share/include' | |
17397 | ||
17398 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 17399 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 17400 | # First, try using that file with no special directory specified. |
81ecdfbb | 17401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 17402 | /* end confdefs.h. */ |
81ecdfbb | 17403 | #include <X11/Xlib.h> |
bec39cab | 17404 | _ACEOF |
81ecdfbb | 17405 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
17406 | # We can compile using X headers with no special include directory. |
17407 | ac_x_includes= | |
17408 | else | |
bec39cab | 17409 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 17410 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
17411 | ac_x_includes=$ac_dir |
17412 | break | |
17413 | fi | |
17414 | done | |
c906108c | 17415 | fi |
bec39cab AC |
17416 | rm -f conftest.err conftest.$ac_ext |
17417 | fi # $ac_x_includes = no | |
c906108c | 17418 | |
bec39cab | 17419 | if test "$ac_x_libraries" = no; then |
c906108c | 17420 | # Check for the libraries. |
c906108c SS |
17421 | # See if we find them without any special options. |
17422 | # Don't add to $LIBS permanently. | |
bec39cab | 17423 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
17424 | LIBS="-lX11 $LIBS" |
17425 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 17426 | /* end confdefs.h. */ |
81ecdfbb | 17427 | #include <X11/Xlib.h> |
bec39cab AC |
17428 | int |
17429 | main () | |
17430 | { | |
81ecdfbb | 17431 | XrmInitialize () |
bec39cab AC |
17432 | ; |
17433 | return 0; | |
17434 | } | |
17435 | _ACEOF | |
81ecdfbb | 17436 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 17437 | LIBS=$ac_save_LIBS |
c906108c SS |
17438 | # We can link X programs with no special library path. |
17439 | ac_x_libraries= | |
17440 | else | |
81ecdfbb RW |
17441 | LIBS=$ac_save_LIBS |
17442 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 17443 | do |
bec39cab | 17444 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
17445 | for ac_extension in a so sl dylib la dll; do |
17446 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
17447 | ac_x_libraries=$ac_dir |
17448 | break 2 | |
17449 | fi | |
17450 | done | |
17451 | done | |
17452 | fi | |
81ecdfbb RW |
17453 | rm -f core conftest.err conftest.$ac_objext \ |
17454 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 17455 | fi # $ac_x_libraries = no |
c906108c | 17456 | |
81ecdfbb RW |
17457 | case $ac_x_includes,$ac_x_libraries in #( |
17458 | no,* | *,no | *\'*) | |
17459 | # Didn't find X, or a directory has "'" in its name. | |
17460 | ac_cv_have_x="have_x=no";; #( | |
17461 | *) | |
17462 | # Record where we found X for the cache. | |
17463 | ac_cv_have_x="have_x=yes\ | |
17464 | ac_x_includes='$ac_x_includes'\ | |
17465 | ac_x_libraries='$ac_x_libraries'" | |
17466 | esac | |
c906108c | 17467 | fi |
81ecdfbb RW |
17468 | ;; #( |
17469 | *) have_x=yes;; | |
17470 | esac | |
c906108c SS |
17471 | eval "$ac_cv_have_x" |
17472 | fi # $with_x != no | |
17473 | ||
17474 | if test "$have_x" != yes; then | |
81ecdfbb RW |
17475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
17476 | $as_echo "$have_x" >&6; } | |
c906108c SS |
17477 | no_x=yes |
17478 | else | |
17479 | # If each of the values was on the command line, it overrides each guess. | |
17480 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
17481 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
17482 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
17483 | ac_cv_have_x="have_x=yes\ |
17484 | ac_x_includes='$x_includes'\ | |
17485 | ac_x_libraries='$x_libraries'" | |
17486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
17487 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
17488 | fi |
17489 | ||
17490 | ||
bec39cab | 17491 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 17492 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
17493 | # This code just checks for a few cases where we'd like to ignore those |
17494 | # definitions, even when they're present in the '.mt' file. These cases | |
17495 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 17496 | # not part of the source tree. |
7a292a7a | 17497 | # |
81ecdfbb RW |
17498 | # Check whether --enable-sim was given. |
17499 | if test "${enable_sim+set}" = set; then : | |
17500 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
17501 | echo "enableval = ${enableval}"; |
17502 | case "${enableval}" in | |
17503 | yes) ignore_sim=false ;; | |
17504 | no) ignore_sim=true ;; | |
17505 | *) ignore_sim=false ;; | |
17506 | esac | |
17507 | else | |
17508 | ignore_sim=false | |
81ecdfbb RW |
17509 | fi |
17510 | ||
7a292a7a SS |
17511 | |
17512 | if test ! -d "${srcdir}/../sim"; then | |
17513 | ignore_sim=true | |
17514 | fi | |
17515 | ||
9b624dbe UW |
17516 | SIM= |
17517 | SIM_OBS= | |
17518 | if test "${ignore_sim}" = "false"; then | |
17519 | if test x"${gdb_sim}" != x ; then | |
17520 | SIM="${gdb_sim}" | |
17521 | SIM_OBS="remote-sim.o" | |
60ca704f | 17522 | |
81ecdfbb | 17523 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 17524 | |
9b624dbe | 17525 | fi |
7a292a7a SS |
17526 | fi |
17527 | ||
17528 | ||
17529 | ||
c906108c SS |
17530 | |
17531 | ||
17532 | ||
17533 | ||
17534 | ||
17535 | ||
dfcd3bfb | 17536 | |
e56ac5c3 AC |
17537 | |
17538 | ||
b3a90332 AC |
17539 | |
17540 | ||
c35f4ffc | 17541 | # List of host floatformats. |
bec39cab AC |
17542 | |
17543 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17544 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 17545 | _ACEOF |
c35f4ffc | 17546 | |
bec39cab AC |
17547 | |
17548 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 17549 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
17550 | _ACEOF |
17551 | ||
c35f4ffc | 17552 | |
bec39cab | 17553 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 17554 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 17555 | _ACEOF |
c35f4ffc AC |
17556 | |
17557 | ||
c906108c SS |
17558 | # target_subdir is used by the testsuite to find the target libraries. |
17559 | target_subdir= | |
17560 | if test "${host}" != "${target}"; then | |
17561 | target_subdir="${target_alias}/" | |
17562 | fi | |
17563 | ||
17564 | ||
17565 | frags= | |
771b4502 | 17566 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
17567 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
17568 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 17569 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
17570 | fi |
17571 | frags="$frags $host_makefile_frag" | |
17572 | else | |
17573 | host_makefile_frag=/dev/null | |
c906108c | 17574 | fi |
c906108c | 17575 | |
c906108c SS |
17576 | |
17577 | ||
17578 | ||
771b4502 | 17579 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
17580 | # We pick this up from the host configuration file (.mh) because we |
17581 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
17582 | nativefile=`sed -n ' |
17583 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
17584 | ' ${host_makefile_frag}` | |
c906108c SS |
17585 | fi |
17586 | ||
17587 | ||
b00a8037 | 17588 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
17589 | |
17590 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 17591 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 17592 | _ACEOF |
b00a8037 DJ |
17593 | |
17594 | fi | |
17595 | ||
8dcde887 | 17596 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
17597 | # Check whether --enable-multi-ice was given. |
17598 | if test "${enable_multi_ice+set}" = set; then : | |
17599 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
17600 | yes | no) |
17601 | ;; | |
81ecdfbb | 17602 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 17603 | esac |
81ecdfbb | 17604 | fi |
b4e70030 | 17605 | |
81ecdfbb RW |
17606 | if test "x$enable_multi_ice" = xyes; then |
17607 | subdirs="$subdirs multi-ice" | |
3ace7edb | 17608 | |
a85f51e7 DJ |
17609 | fi |
17610 | ||
496c0e1b JB |
17611 | # Check whether --enable-gdbserver was given. |
17612 | if test "${enable_gdbserver+set}" = set; then : | |
17613 | enableval=$enable_gdbserver; case "${enableval}" in | |
17614 | yes| no|auto) ;; | |
17615 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
17616 | esac | |
17617 | else | |
17618 | enable_gdbserver=auto | |
17619 | fi | |
17620 | ||
17621 | ||
17622 | # We only build gdbserver automatically in a native configuration, and | |
17623 | # only if the user did not explicitly disable its build. | |
17624 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
17625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
17626 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 17627 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
17628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
17629 | $as_echo "yes" >&6; } | |
17630 | subdirs="$subdirs gdbserver" | |
3ace7edb | 17631 | |
496c0e1b | 17632 | gdbserver_build_enabled=yes |
8dcde887 | 17633 | else |
81ecdfbb RW |
17634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
17635 | $as_echo "no" >&6; } | |
8dcde887 MK |
17636 | fi |
17637 | fi | |
17638 | ||
496c0e1b JB |
17639 | # If the user explicitly request the gdbserver to be built, verify that |
17640 | # we were in fact able to enable it. | |
17641 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
17642 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
17643 | fi | |
17644 | ||
db985757 | 17645 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 17646 | # to an empty version. |
c906108c SS |
17647 | |
17648 | files= | |
17649 | links= | |
5a2402b8 | 17650 | |
c906108c SS |
17651 | rm -f nm.h |
17652 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
17653 | case "${nativefile}" in |
17654 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
17655 | * ) GDB_NM_FILE="${nativefile}" | |
17656 | esac | |
5a2402b8 AC |
17657 | files="${files} ${GDB_NM_FILE}" |
17658 | links="${links} nm.h" | |
60ca704f SE |
17659 | |
17660 | cat >>confdefs.h <<_ACEOF | |
b78960be | 17661 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 17662 | _ACEOF |
5a2402b8 | 17663 | |
c906108c | 17664 | fi |
5a2402b8 AC |
17665 | |
17666 | ||
bec39cab AC |
17667 | ac_sources="$files" |
17668 | ac_dests="$links" | |
17669 | while test -n "$ac_sources"; do | |
17670 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
17671 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
17672 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
17673 | done | |
81ecdfbb | 17674 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
17675 | |
17676 | ||
c906108c SS |
17677 | |
17678 | ||
c906108c | 17679 | |
81ecdfbb | 17680 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 17681 | |
bec39cab | 17682 | |
e2207b9a | 17683 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile gnulib/Makefile data-directory/Makefile" |
81ecdfbb RW |
17684 | |
17685 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 17686 | |
bec39cab AC |
17687 | cat >confcache <<\_ACEOF |
17688 | # This file is a shell script that caches the results of configure | |
17689 | # tests run on this system so they can be shared between configure | |
17690 | # scripts and configure runs, see configure's option --config-cache. | |
17691 | # It is not useful on other systems. If it contains results you don't | |
17692 | # want to keep, you may remove or edit it. | |
17693 | # | |
17694 | # config.status only pays attention to the cache file if you give it | |
17695 | # the --recheck option to rerun configure. | |
17696 | # | |
17697 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
17698 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17699 | # following values. | |
17700 | ||
17701 | _ACEOF | |
17702 | ||
17703 | # The following way of writing the cache mishandles newlines in values, | |
17704 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 17705 | # So, we kill variables containing newlines. |
bec39cab AC |
17706 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17707 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
17708 | ( |
17709 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
17710 | eval ac_val=\$$ac_var | |
17711 | case $ac_val in #( | |
17712 | *${as_nl}*) | |
17713 | case $ac_var in #( | |
17714 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
17715 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
17716 | esac | |
17717 | case $ac_var in #( | |
17718 | _ | IFS | as_nl) ;; #( | |
17719 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
17720 | *) { eval $ac_var=; unset $ac_var;} ;; | |
17721 | esac ;; | |
17722 | esac | |
17723 | done | |
17724 | ||
bec39cab | 17725 | (set) 2>&1 | |
81ecdfbb RW |
17726 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
17727 | *${as_nl}ac_space=\ *) | |
17728 | # `set' does not quote correctly, so add quotes: double-quote | |
17729 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
17730 | sed -n \ |
17731 | "s/'/'\\\\''/g; | |
17732 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 17733 | ;; #( |
bec39cab AC |
17734 | *) |
17735 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 17736 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 17737 | ;; |
81ecdfbb RW |
17738 | esac | |
17739 | sort | |
17740 | ) | | |
bec39cab | 17741 | sed ' |
81ecdfbb | 17742 | /^ac_cv_env_/b end |
bec39cab | 17743 | t clear |
81ecdfbb | 17744 | :clear |
bec39cab AC |
17745 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17746 | t end | |
81ecdfbb RW |
17747 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17748 | :end' >>confcache | |
17749 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
17750 | if test -w "$cache_file"; then | |
17751 | test "x$cache_file" != "x/dev/null" && | |
17752 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
17753 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
17754 | cat confcache >$cache_file |
17755 | else | |
81ecdfbb RW |
17756 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
17757 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
17758 | fi |
17759 | fi | |
17760 | rm -f confcache | |
17761 | ||
17762 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17763 | # Let make expand exec_prefix. | |
17764 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17765 | ||
bec39cab AC |
17766 | DEFS=-DHAVE_CONFIG_H |
17767 | ||
17768 | ac_libobjs= | |
17769 | ac_ltlibobjs= | |
17770 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17771 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
17772 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
17773 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
17774 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
17775 | # will be set to the directory where LIBOBJS objects are built. | |
17776 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
17777 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
17778 | done |
17779 | LIBOBJS=$ac_libobjs | |
17780 | ||
17781 | LTLIBOBJS=$ac_ltlibobjs | |
17782 | ||
17783 | ||
85981d60 | 17784 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
17785 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
17786 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 17787 | fi |
a417dc56 | 17788 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
17789 | as_fn_error "conditional \"GMAKE\" was never defined. |
17790 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 17791 | fi |
783e057b | 17792 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
81ecdfbb RW |
17793 | as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. |
17794 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
783e057b DJ |
17795 | fi |
17796 | ||
17797 | gl_libobjs= | |
17798 | gl_ltlibobjs= | |
17799 | if test -n "$gl_LIBOBJS"; then | |
17800 | # Remove the extension. | |
17801 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 17802 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
17803 | gl_libobjs="$gl_libobjs $i.$ac_objext" |
17804 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
17805 | done | |
17806 | fi | |
17807 | gl_LIBOBJS=$gl_libobjs | |
17808 | ||
17809 | gl_LTLIBOBJS=$gl_ltlibobjs | |
17810 | ||
17811 | ||
17812 | ||
17813 | gltests_libobjs= | |
17814 | gltests_ltlibobjs= | |
17815 | if test -n "$gltests_LIBOBJS"; then | |
17816 | # Remove the extension. | |
17817 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
f434ba03 | 17818 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do |
783e057b DJ |
17819 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" |
17820 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
17821 | done | |
17822 | fi | |
17823 | gltests_LIBOBJS=$gltests_libobjs | |
17824 | ||
17825 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
17826 | ||
17827 | ||
e28b3332 | 17828 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
81ecdfbb RW |
17829 | as_fn_error "conditional \"AMDEP\" was never defined. |
17830 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
e28b3332 DJ |
17831 | fi |
17832 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
81ecdfbb RW |
17833 | as_fn_error "conditional \"am__fastdepCC\" was never defined. |
17834 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
17835 | fi | |
17836 | if test -n "$EXEEXT"; then | |
17837 | am__EXEEXT_TRUE= | |
17838 | am__EXEEXT_FALSE='#' | |
17839 | else | |
17840 | am__EXEEXT_TRUE='#' | |
17841 | am__EXEEXT_FALSE= | |
e28b3332 | 17842 | fi |
bec39cab | 17843 | |
81ecdfbb RW |
17844 | |
17845 | ||
bec39cab | 17846 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 17847 | ac_write_fail=0 |
bec39cab AC |
17848 | ac_clean_files_save=$ac_clean_files |
17849 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
17850 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
17851 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17852 | as_write_fail=0 | |
17853 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
17854 | #! $SHELL |
17855 | # Generated by $as_me. | |
17856 | # Run this file to recreate the current configuration. | |
17857 | # Compiler output produced by configure, useful for debugging | |
17858 | # configure, is in config.log if it exists. | |
17859 | ||
17860 | debug=false | |
17861 | ac_cs_recheck=false | |
17862 | ac_cs_silent=false | |
bec39cab | 17863 | |
81ecdfbb RW |
17864 | SHELL=\${CONFIG_SHELL-$SHELL} |
17865 | export SHELL | |
17866 | _ASEOF | |
17867 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
17868 | ## -------------------- ## | |
17869 | ## M4sh Initialization. ## | |
17870 | ## -------------------- ## | |
17871 | ||
17872 | # Be more Bourne compatible | |
17873 | DUALCASE=1; export DUALCASE # for MKS sh | |
17874 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
17875 | emulate sh |
17876 | NULLCMD=: | |
81ecdfbb | 17877 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
17878 | # is contrary to our usage. Disable this feature. |
17879 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
17880 | setopt NO_GLOB_SUBST |
17881 | else | |
17882 | case `(set -o) 2>/dev/null` in #( | |
17883 | *posix*) : | |
17884 | set -o posix ;; #( | |
17885 | *) : | |
17886 | ;; | |
17887 | esac | |
bec39cab | 17888 | fi |
bec39cab | 17889 | |
81ecdfbb RW |
17890 | |
17891 | as_nl=' | |
17892 | ' | |
17893 | export as_nl | |
17894 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
17895 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
17896 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
17897 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
17898 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
17899 | # but without wasting forks for bash or zsh. | |
17900 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
17901 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17902 | as_echo='print -r --' | |
17903 | as_echo_n='print -rn --' | |
17904 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
17905 | as_echo='printf %s\n' | |
17906 | as_echo_n='printf %s' | |
17907 | else | |
17908 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
17909 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
17910 | as_echo_n='/usr/ucb/echo -n' | |
17911 | else | |
17912 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
17913 | as_echo_n_body='eval | |
17914 | arg=$1; | |
17915 | case $arg in #( | |
17916 | *"$as_nl"*) | |
17917 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
17918 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
17919 | esac; | |
17920 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
17921 | ' | |
17922 | export as_echo_n_body | |
17923 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
17924 | fi | |
17925 | export as_echo_body | |
17926 | as_echo='sh -c $as_echo_body as_echo' | |
17927 | fi | |
17928 | ||
17929 | # The user is always right. | |
17930 | if test "${PATH_SEPARATOR+set}" != set; then | |
17931 | PATH_SEPARATOR=: | |
17932 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
17933 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
17934 | PATH_SEPARATOR=';' | |
17935 | } | |
bec39cab AC |
17936 | fi |
17937 | ||
17938 | ||
81ecdfbb RW |
17939 | # IFS |
17940 | # We need space, tab and new line, in precisely that order. Quoting is | |
17941 | # there to prevent editors from complaining about space-tab. | |
17942 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
17943 | # splitting by setting IFS to empty value.) | |
17944 | IFS=" "" $as_nl" | |
17945 | ||
17946 | # Find who we are. Look in the path if we contain no directory separator. | |
17947 | case $0 in #(( | |
17948 | *[\\/]* ) as_myself=$0 ;; | |
17949 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17950 | for as_dir in $PATH | |
17951 | do | |
17952 | IFS=$as_save_IFS | |
17953 | test -z "$as_dir" && as_dir=. | |
17954 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17955 | done | |
17956 | IFS=$as_save_IFS | |
17957 | ||
17958 | ;; | |
17959 | esac | |
17960 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17961 | # in which case we are not to be found in the path. | |
17962 | if test "x$as_myself" = x; then | |
17963 | as_myself=$0 | |
17964 | fi | |
17965 | if test ! -f "$as_myself"; then | |
17966 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
17967 | exit 1 | |
17968 | fi | |
17969 | ||
17970 | # Unset variables that we do not need and which cause bugs (e.g. in | |
17971 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
17972 | # suppresses any "Segmentation fault" message there. '((' could | |
17973 | # trigger a bug in pdksh 5.2.14. | |
17974 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
17975 | do eval test x\${$as_var+set} = xset \ | |
17976 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
17977 | done | |
bec39cab AC |
17978 | PS1='$ ' |
17979 | PS2='> ' | |
17980 | PS4='+ ' | |
17981 | ||
17982 | # NLS nuisances. | |
81ecdfbb RW |
17983 | LC_ALL=C |
17984 | export LC_ALL | |
17985 | LANGUAGE=C | |
17986 | export LANGUAGE | |
17987 | ||
17988 | # CDPATH. | |
17989 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
17990 | ||
17991 | ||
17992 | # as_fn_error ERROR [LINENO LOG_FD] | |
17993 | # --------------------------------- | |
17994 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
17995 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
17996 | # script with status $?, using 1 if that was 0. | |
17997 | as_fn_error () | |
17998 | { | |
17999 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
18000 | if test "$3"; then | |
18001 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
18002 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
18003 | fi | |
18004 | $as_echo "$as_me: error: $1" >&2 | |
18005 | as_fn_exit $as_status | |
18006 | } # as_fn_error | |
18007 | ||
18008 | ||
18009 | # as_fn_set_status STATUS | |
18010 | # ----------------------- | |
18011 | # Set $? to STATUS, without forking. | |
18012 | as_fn_set_status () | |
18013 | { | |
18014 | return $1 | |
18015 | } # as_fn_set_status | |
18016 | ||
18017 | # as_fn_exit STATUS | |
18018 | # ----------------- | |
18019 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
18020 | as_fn_exit () | |
18021 | { | |
18022 | set +e | |
18023 | as_fn_set_status $1 | |
18024 | exit $1 | |
18025 | } # as_fn_exit | |
18026 | ||
18027 | # as_fn_unset VAR | |
18028 | # --------------- | |
18029 | # Portably unset VAR. | |
18030 | as_fn_unset () | |
18031 | { | |
18032 | { eval $1=; unset $1;} | |
18033 | } | |
18034 | as_unset=as_fn_unset | |
18035 | # as_fn_append VAR VALUE | |
18036 | # ---------------------- | |
18037 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
18038 | # advantage of any shell optimizations that allow amortized linear growth over | |
18039 | # repeated appends, instead of the typical quadratic growth present in naive | |
18040 | # implementations. | |
18041 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
18042 | eval 'as_fn_append () | |
18043 | { | |
18044 | eval $1+=\$2 | |
18045 | }' | |
18046 | else | |
18047 | as_fn_append () | |
18048 | { | |
18049 | eval $1=\$$1\$2 | |
18050 | } | |
18051 | fi # as_fn_append | |
18052 | ||
18053 | # as_fn_arith ARG... | |
18054 | # ------------------ | |
18055 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
18056 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
18057 | # must be portable across $(()) and expr. | |
18058 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
18059 | eval 'as_fn_arith () | |
18060 | { | |
18061 | as_val=$(( $* )) | |
18062 | }' | |
18063 | else | |
18064 | as_fn_arith () | |
18065 | { | |
18066 | as_val=`expr "$@" || test $? -eq 1` | |
18067 | } | |
18068 | fi # as_fn_arith | |
bec39cab | 18069 | |
81ecdfbb RW |
18070 | |
18071 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
18072 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
18073 | as_expr=expr |
18074 | else | |
18075 | as_expr=false | |
18076 | fi | |
18077 | ||
81ecdfbb | 18078 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
18079 | as_basename=basename |
18080 | else | |
18081 | as_basename=false | |
18082 | fi | |
18083 | ||
81ecdfbb RW |
18084 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
18085 | as_dirname=dirname | |
18086 | else | |
18087 | as_dirname=false | |
18088 | fi | |
bec39cab | 18089 | |
81ecdfbb | 18090 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
18091 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
18092 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18093 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
18094 | $as_echo X/"$0" | | |
18095 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
18096 | s//\1/ | |
18097 | q | |
18098 | } | |
18099 | /^X\/\(\/\/\)$/{ | |
18100 | s//\1/ | |
18101 | q | |
18102 | } | |
18103 | /^X\/\(\/\).*/{ | |
18104 | s//\1/ | |
18105 | q | |
18106 | } | |
18107 | s/.*/./; q'` | |
b4e70030 | 18108 | |
b4e70030 JB |
18109 | # Avoid depending upon Character Ranges. |
18110 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
18111 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
18112 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
18113 | as_cr_digits='0123456789' | |
18114 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
18115 | ||
81ecdfbb RW |
18116 | ECHO_C= ECHO_N= ECHO_T= |
18117 | case `echo -n x` in #((((( | |
18118 | -n*) | |
18119 | case `echo 'xy\c'` in | |
18120 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
18121 | xy) ECHO_C='\c';; | |
18122 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
18123 | ECHO_T=' ';; | |
18124 | esac;; | |
18125 | *) | |
18126 | ECHO_N='-n';; | |
bec39cab AC |
18127 | esac |
18128 | ||
81ecdfbb RW |
18129 | rm -f conf$$ conf$$.exe conf$$.file |
18130 | if test -d conf$$.dir; then | |
18131 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 18132 | else |
81ecdfbb RW |
18133 | rm -f conf$$.dir |
18134 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 18135 | fi |
81ecdfbb RW |
18136 | if (echo >conf$$.file) 2>/dev/null; then |
18137 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 18138 | as_ln_s='ln -s' |
81ecdfbb RW |
18139 | # ... but there are two gotchas: |
18140 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
18141 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
18142 | # In both cases, we have to default to `cp -p'. | |
18143 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
18144 | as_ln_s='cp -p' | |
18145 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
18146 | as_ln_s=ln | |
18147 | else | |
18148 | as_ln_s='cp -p' | |
b4e70030 | 18149 | fi |
bec39cab AC |
18150 | else |
18151 | as_ln_s='cp -p' | |
18152 | fi | |
81ecdfbb RW |
18153 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
18154 | rmdir conf$$.dir 2>/dev/null | |
18155 | ||
18156 | ||
18157 | # as_fn_mkdir_p | |
18158 | # ------------- | |
18159 | # Create "$as_dir" as a directory, including parents if necessary. | |
18160 | as_fn_mkdir_p () | |
18161 | { | |
18162 | ||
18163 | case $as_dir in #( | |
18164 | -*) as_dir=./$as_dir;; | |
18165 | esac | |
18166 | test -d "$as_dir" || eval $as_mkdir_p || { | |
18167 | as_dirs= | |
18168 | while :; do | |
18169 | case $as_dir in #( | |
18170 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
18171 | *) as_qdir=$as_dir;; | |
18172 | esac | |
18173 | as_dirs="'$as_qdir' $as_dirs" | |
18174 | as_dir=`$as_dirname -- "$as_dir" || | |
18175 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18176 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18177 | X"$as_dir" : 'X\(//\)$' \| \ | |
18178 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
18179 | $as_echo X"$as_dir" | | |
18180 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18181 | s//\1/ | |
18182 | q | |
18183 | } | |
18184 | /^X\(\/\/\)[^/].*/{ | |
18185 | s//\1/ | |
18186 | q | |
18187 | } | |
18188 | /^X\(\/\/\)$/{ | |
18189 | s//\1/ | |
18190 | q | |
18191 | } | |
18192 | /^X\(\/\).*/{ | |
18193 | s//\1/ | |
18194 | q | |
18195 | } | |
18196 | s/.*/./; q'` | |
18197 | test -d "$as_dir" && break | |
18198 | done | |
18199 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
18200 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
18201 | ||
bec39cab | 18202 | |
81ecdfbb | 18203 | } # as_fn_mkdir_p |
bec39cab | 18204 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 18205 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
18206 | else |
18207 | test -d ./-p && rmdir ./-p | |
18208 | as_mkdir_p=false | |
18209 | fi | |
18210 | ||
81ecdfbb RW |
18211 | if test -x / >/dev/null 2>&1; then |
18212 | as_test_x='test -x' | |
18213 | else | |
18214 | if ls -dL / >/dev/null 2>&1; then | |
18215 | as_ls_L_option=L | |
18216 | else | |
18217 | as_ls_L_option= | |
18218 | fi | |
18219 | as_test_x=' | |
18220 | eval sh -c '\'' | |
18221 | if test -d "$1"; then | |
18222 | test -d "$1/."; | |
18223 | else | |
18224 | case $1 in #( | |
18225 | -*)set "./$1";; | |
18226 | esac; | |
18227 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
18228 | ???[sx]*):;;*)false;;esac;fi | |
18229 | '\'' sh | |
18230 | ' | |
18231 | fi | |
18232 | as_executable_p=$as_test_x | |
bec39cab AC |
18233 | |
18234 | # Sed expression to map a string onto a valid CPP name. | |
18235 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
18236 | ||
18237 | # Sed expression to map a string onto a valid variable name. | |
18238 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
18239 | ||
18240 | ||
bec39cab | 18241 | exec 6>&1 |
81ecdfbb RW |
18242 | ## ----------------------------------- ## |
18243 | ## Main body of $CONFIG_STATUS script. ## | |
18244 | ## ----------------------------------- ## | |
18245 | _ASEOF | |
18246 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
18247 | ||
18248 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18249 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 18250 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
18251 | # values after options handling. |
18252 | ac_log=" | |
bec39cab | 18253 | This file was extended by $as_me, which was |
81ecdfbb | 18254 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
18255 | |
18256 | CONFIG_FILES = $CONFIG_FILES | |
18257 | CONFIG_HEADERS = $CONFIG_HEADERS | |
18258 | CONFIG_LINKS = $CONFIG_LINKS | |
18259 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
18260 | $ $0 $@ | |
18261 | ||
81ecdfbb RW |
18262 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
18263 | " | |
18264 | ||
bec39cab AC |
18265 | _ACEOF |
18266 | ||
81ecdfbb RW |
18267 | case $ac_config_files in *" |
18268 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
18269 | esac | |
234b45d4 | 18270 | |
81ecdfbb RW |
18271 | case $ac_config_headers in *" |
18272 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
18273 | esac | |
b4e70030 | 18274 | |
b4e70030 | 18275 | |
81ecdfbb RW |
18276 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
18277 | # Files that config.status was made for. | |
18278 | config_files="$ac_config_files" | |
18279 | config_headers="$ac_config_headers" | |
18280 | config_links="$ac_config_links" | |
18281 | config_commands="$ac_config_commands" | |
234b45d4 | 18282 | |
81ecdfbb | 18283 | _ACEOF |
b4e70030 | 18284 | |
81ecdfbb | 18285 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 18286 | ac_cs_usage="\ |
81ecdfbb RW |
18287 | \`$as_me' instantiates files and other configuration actions |
18288 | from templates according to the current configuration. Unless the files | |
18289 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 18290 | |
81ecdfbb | 18291 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 18292 | |
bec39cab | 18293 | -h, --help print this help, then exit |
81ecdfbb RW |
18294 | -V, --version print version number and configuration settings, then exit |
18295 | -q, --quiet, --silent | |
18296 | do not print progress messages | |
bec39cab AC |
18297 | -d, --debug don't remove temporary files |
18298 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
18299 | --file=FILE[:TEMPLATE] |
18300 | instantiate the configuration file FILE | |
18301 | --header=FILE[:TEMPLATE] | |
18302 | instantiate the configuration header FILE | |
234b45d4 | 18303 | |
bec39cab AC |
18304 | Configuration files: |
18305 | $config_files | |
234b45d4 | 18306 | |
bec39cab AC |
18307 | Configuration headers: |
18308 | $config_headers | |
234b45d4 | 18309 | |
bec39cab AC |
18310 | Configuration links: |
18311 | $config_links | |
234b45d4 | 18312 | |
bec39cab AC |
18313 | Configuration commands: |
18314 | $config_commands | |
18315 | ||
81ecdfbb | 18316 | Report bugs to the package provider." |
b4e70030 | 18317 | |
81ecdfbb RW |
18318 | _ACEOF |
18319 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
18320 | ac_cs_version="\\ |
18321 | config.status | |
81ecdfbb RW |
18322 | configured by $0, generated by GNU Autoconf 2.64, |
18323 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 18324 | |
81ecdfbb | 18325 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
18326 | This config.status script is free software; the Free Software Foundation |
18327 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
18328 | |
18329 | ac_pwd='$ac_pwd' | |
18330 | srcdir='$srcdir' | |
18331 | INSTALL='$INSTALL' | |
18332 | MKDIR_P='$MKDIR_P' | |
18333 | AWK='$AWK' | |
18334 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
18335 | _ACEOF |
18336 | ||
81ecdfbb RW |
18337 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18338 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
18339 | ac_need_defaults=: |
18340 | while test $# != 0 | |
18341 | do | |
18342 | case $1 in | |
18343 | --*=*) | |
81ecdfbb RW |
18344 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
18345 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 18346 | ac_shift=: |
c906108c | 18347 | ;; |
81ecdfbb | 18348 | *) |
bec39cab AC |
18349 | ac_option=$1 |
18350 | ac_optarg=$2 | |
18351 | ac_shift=shift | |
c906108c | 18352 | ;; |
bec39cab | 18353 | esac |
c906108c | 18354 | |
bec39cab AC |
18355 | case $ac_option in |
18356 | # Handling of the options. | |
bec39cab AC |
18357 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
18358 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
18359 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
18360 | $as_echo "$ac_cs_version"; exit ;; | |
18361 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
18362 | debug=: ;; |
18363 | --file | --fil | --fi | --f ) | |
18364 | $ac_shift | |
81ecdfbb RW |
18365 | case $ac_optarg in |
18366 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18367 | esac | |
18368 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
18369 | ac_need_defaults=false;; |
18370 | --header | --heade | --head | --hea ) | |
18371 | $ac_shift | |
81ecdfbb RW |
18372 | case $ac_optarg in |
18373 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
18374 | esac | |
18375 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 18376 | ac_need_defaults=false;; |
81ecdfbb RW |
18377 | --he | --h) |
18378 | # Conflict between --help and --header | |
18379 | as_fn_error "ambiguous option: \`$1' | |
18380 | Try \`$0 --help' for more information.";; | |
18381 | --help | --hel | -h ) | |
18382 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
18383 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
18384 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
18385 | ac_cs_silent=: ;; | |
c906108c | 18386 | |
bec39cab | 18387 | # This is an error. |
81ecdfbb RW |
18388 | -*) as_fn_error "unrecognized option: \`$1' |
18389 | Try \`$0 --help' for more information." ;; | |
c906108c | 18390 | |
81ecdfbb RW |
18391 | *) as_fn_append ac_config_targets " $1" |
18392 | ac_need_defaults=false ;; | |
c906108c | 18393 | |
bec39cab AC |
18394 | esac |
18395 | shift | |
18396 | done | |
c906108c | 18397 | |
bec39cab | 18398 | ac_configure_extra_args= |
c906108c | 18399 | |
bec39cab AC |
18400 | if $ac_cs_silent; then |
18401 | exec 6>/dev/null | |
18402 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
18403 | fi | |
c906108c | 18404 | |
bec39cab | 18405 | _ACEOF |
81ecdfbb | 18406 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 18407 | if \$ac_cs_recheck; then |
81ecdfbb RW |
18408 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
18409 | shift | |
18410 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
18411 | CONFIG_SHELL='$SHELL' | |
18412 | export CONFIG_SHELL | |
18413 | exec "\$@" | |
bec39cab AC |
18414 | fi |
18415 | ||
18416 | _ACEOF | |
81ecdfbb RW |
18417 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18418 | exec 5>>config.log | |
18419 | { | |
18420 | echo | |
18421 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
18422 | ## Running $as_me. ## | |
18423 | _ASBOX | |
18424 | $as_echo "$ac_log" | |
18425 | } >&5 | |
bec39cab | 18426 | |
81ecdfbb RW |
18427 | _ACEOF |
18428 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 18429 | # |
81ecdfbb | 18430 | # INIT-COMMANDS |
c906108c | 18431 | # |
a417dc56 | 18432 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 18433 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 18434 | |
bec39cab AC |
18435 | _ACEOF |
18436 | ||
81ecdfbb | 18437 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 18438 | |
81ecdfbb | 18439 | # Handling of arguments. |
bec39cab | 18440 | for ac_config_target in $ac_config_targets |
c906108c | 18441 | do |
81ecdfbb RW |
18442 | case $ac_config_target in |
18443 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
18444 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
18445 | "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | |
f997c383 | 18446 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb RW |
18447 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
18448 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
e2207b9a | 18449 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 18450 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
81ecdfbb | 18451 | "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; |
aa2e2d8d | 18452 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
18453 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
18454 | ||
18455 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
18456 | esac |
18457 | done | |
18458 | ||
81ecdfbb | 18459 | |
bec39cab AC |
18460 | # If the user did not use the arguments to specify the items to instantiate, |
18461 | # then the envvar interface is used. Set only those that are not. | |
18462 | # We use the long form for the default assignment because of an extremely | |
18463 | # bizarre bug on SunOS 4.1.3. | |
18464 | if $ac_need_defaults; then | |
18465 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
18466 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
18467 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
18468 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
18469 | fi | |
18470 | ||
b4e70030 | 18471 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 18472 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 18473 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
18474 | # Hook for its removal unless debugging. |
18475 | # Note that there is a small window in which the directory will not be cleaned: | |
18476 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
18477 | $debug || |
18478 | { | |
81ecdfbb RW |
18479 | tmp= |
18480 | trap 'exit_status=$? | |
18481 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
18482 | ' 0 | |
18483 | trap 'as_fn_exit 1' 1 2 13 15 | |
18484 | } | |
18485 | # Create a (secure) tmp directory for tmp files. | |
18486 | ||
18487 | { | |
18488 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
18489 | test -n "$tmp" && test -d "$tmp" | |
18490 | } || | |
18491 | { | |
18492 | tmp=./conf$$-$RANDOM | |
18493 | (umask 077 && mkdir "$tmp") | |
18494 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
18495 | ||
18496 | # Set up the scripts for CONFIG_FILES section. | |
18497 | # No need to generate them if there are no CONFIG_FILES. | |
18498 | # This happens for instance with `./config.status config.h'. | |
18499 | if test -n "$CONFIG_FILES"; then | |
18500 | ||
18501 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
18502 | ac_cs_awk_getline=: | |
18503 | ac_cs_awk_pipe_init= | |
18504 | ac_cs_awk_read_file=' | |
18505 | while ((getline aline < (F[key])) > 0) | |
18506 | print(aline) | |
18507 | close(F[key])' | |
18508 | ac_cs_awk_pipe_fini= | |
18509 | else | |
18510 | ac_cs_awk_getline=false | |
18511 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
18512 | ac_cs_awk_read_file=' | |
18513 | print "|#_!!_#|" | |
18514 | print "cat " F[key] " &&" | |
18515 | '$ac_cs_awk_pipe_init | |
18516 | # The final `:' finishes the AND list. | |
18517 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
18518 | fi | |
18519 | ac_cr=`echo X | tr X '\015'` | |
18520 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
18521 | # But we know of no other shell where ac_cr would be empty at this | |
18522 | # point, so we can use a bashism as a fallback. | |
18523 | if test "x$ac_cr" = x; then | |
18524 | eval ac_cr=\$\'\\r\' | |
18525 | fi | |
18526 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
18527 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
18528 | ac_cs_awk_cr='\r' | |
18529 | else | |
18530 | ac_cs_awk_cr=$ac_cr | |
18531 | fi | |
18532 | ||
18533 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
18534 | _ACEOF | |
18535 | ||
18536 | # Create commands to substitute file output variables. | |
18537 | { | |
18538 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
18539 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
18540 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
18541 | echo "_ACAWK" && | |
18542 | echo "_ACEOF" | |
18543 | } >conf$$files.sh && | |
18544 | . ./conf$$files.sh || | |
18545 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18546 | rm -f conf$$files.sh | |
18547 | ||
18548 | { | |
18549 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
18550 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
18551 | echo "_ACEOF" | |
18552 | } >conf$$subs.sh || | |
18553 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18554 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
18555 | ac_delim='%!_!# ' | |
18556 | for ac_last_try in false false false false false :; do | |
18557 | . ./conf$$subs.sh || | |
18558 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18559 | ||
18560 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
18561 | if test $ac_delim_n = $ac_delim_num; then | |
18562 | break | |
18563 | elif $ac_last_try; then | |
18564 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
18565 | else | |
18566 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18567 | fi | |
18568 | done | |
18569 | rm -f conf$$subs.sh | |
18570 | ||
18571 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18572 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
18573 | _ACEOF | |
18574 | sed -n ' | |
18575 | h | |
18576 | s/^/S["/; s/!.*/"]=/ | |
18577 | p | |
18578 | g | |
18579 | s/^[^!]*!// | |
18580 | :repl | |
18581 | t repl | |
18582 | s/'"$ac_delim"'$// | |
18583 | t delim | |
18584 | :nl | |
18585 | h | |
18586 | s/\(.\{148\}\).*/\1/ | |
18587 | t more1 | |
18588 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
18589 | p | |
18590 | n | |
18591 | b repl | |
18592 | :more1 | |
18593 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18594 | p | |
18595 | g | |
18596 | s/.\{148\}// | |
18597 | t nl | |
18598 | :delim | |
18599 | h | |
18600 | s/\(.\{148\}\).*/\1/ | |
18601 | t more2 | |
18602 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
18603 | p | |
18604 | b | |
18605 | :more2 | |
18606 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
18607 | p | |
18608 | g | |
18609 | s/.\{148\}// | |
18610 | t delim | |
18611 | ' <conf$$subs.awk | sed ' | |
18612 | /^[^""]/{ | |
18613 | N | |
18614 | s/\n// | |
18615 | } | |
18616 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
18617 | rm -f conf$$subs.awk | |
18618 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18619 | _ACAWK | |
18620 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
18621 | for (key in S) S_is_set[key] = 1 | |
18622 | FS = "\a" | |
18623 | \$ac_cs_awk_pipe_init | |
18624 | } | |
18625 | { | |
18626 | line = $ 0 | |
18627 | nfields = split(line, field, "@") | |
18628 | substed = 0 | |
18629 | len = length(field[1]) | |
18630 | for (i = 2; i < nfields; i++) { | |
18631 | key = field[i] | |
18632 | keylen = length(key) | |
18633 | if (S_is_set[key]) { | |
18634 | value = S[key] | |
18635 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
18636 | len += length(value) + length(field[++i]) | |
18637 | substed = 1 | |
18638 | } else | |
18639 | len += 1 + keylen | |
18640 | } | |
18641 | if (nfields == 3 && !substed) { | |
18642 | key = field[2] | |
18643 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
18644 | \$ac_cs_awk_read_file | |
18645 | next | |
18646 | } | |
18647 | } | |
18648 | print line | |
b4e70030 | 18649 | } |
81ecdfbb RW |
18650 | \$ac_cs_awk_pipe_fini |
18651 | _ACAWK | |
18652 | _ACEOF | |
18653 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18654 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
18655 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
18656 | else | |
18657 | cat | |
18658 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
18659 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
18660 | _ACEOF | |
18661 | ||
18662 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
18663 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
18664 | # trailing colons and then remove the whole line if VPATH becomes empty | |
18665 | # (actually we leave an empty line to preserve line numbers). | |
18666 | if test "x$srcdir" = x.; then | |
18667 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
18668 | s/:*\$(srcdir):*/:/ | |
18669 | s/:*\${srcdir}:*/:/ | |
18670 | s/:*@srcdir@:*/:/ | |
18671 | s/^\([^=]*=[ ]*\):*/\1/ | |
18672 | s/:*$// | |
18673 | s/^[^=]*=[ ]*$// | |
18674 | }' | |
18675 | fi | |
18676 | ||
18677 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
18678 | fi # test -n "$CONFIG_FILES" | |
18679 | ||
18680 | # Set up the scripts for CONFIG_HEADERS section. | |
18681 | # No need to generate them if there are no CONFIG_HEADERS. | |
18682 | # This happens for instance with `./config.status Makefile'. | |
18683 | if test -n "$CONFIG_HEADERS"; then | |
18684 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
18685 | BEGIN { | |
18686 | _ACEOF | |
18687 | ||
18688 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
18689 | # here-document in config.status, that substitutes the proper values into | |
18690 | # config.h.in to produce config.h. | |
4e8d927d | 18691 | |
81ecdfbb RW |
18692 | # Create a delimiter string that does not exist in confdefs.h, to ease |
18693 | # handling of long lines. | |
18694 | ac_delim='%!_!# ' | |
18695 | for ac_last_try in false false :; do | |
18696 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
18697 | if test -z "$ac_t"; then | |
18698 | break | |
18699 | elif $ac_last_try; then | |
18700 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
18701 | else | |
18702 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
18703 | fi | |
18704 | done | |
4e8d927d | 18705 | |
81ecdfbb RW |
18706 | # For the awk script, D is an array of macro values keyed by name, |
18707 | # likewise P contains macro parameters if any. Preserve backslash | |
18708 | # newline sequences. | |
18709 | ||
18710 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
18711 | sed -n ' | |
18712 | s/.\{148\}/&'"$ac_delim"'/g | |
18713 | t rset | |
18714 | :rset | |
18715 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
18716 | t def | |
18717 | d | |
18718 | :def | |
18719 | s/\\$// | |
18720 | t bsnl | |
18721 | s/["\\]/\\&/g | |
18722 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18723 | D["\1"]=" \3"/p | |
18724 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
18725 | d | |
18726 | :bsnl | |
18727 | s/["\\]/\\&/g | |
18728 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
18729 | D["\1"]=" \3\\\\\\n"\\/p | |
18730 | t cont | |
18731 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
18732 | t cont | |
18733 | d | |
18734 | :cont | |
18735 | n | |
18736 | s/.\{148\}/&'"$ac_delim"'/g | |
18737 | t clear | |
18738 | :clear | |
18739 | s/\\$// | |
18740 | t bsnlc | |
18741 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
18742 | d | |
18743 | :bsnlc | |
18744 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
18745 | b cont | |
18746 | ' <confdefs.h | sed ' | |
18747 | s/'"$ac_delim"'/"\\\ | |
18748 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
18749 | ||
18750 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18751 | for (key in D) D_is_set[key] = 1 | |
18752 | FS = "\a" | |
18753 | } | |
18754 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
18755 | line = \$ 0 | |
18756 | split(line, arg, " ") | |
18757 | if (arg[1] == "#") { | |
18758 | defundef = arg[2] | |
18759 | mac1 = arg[3] | |
18760 | } else { | |
18761 | defundef = substr(arg[1], 2) | |
18762 | mac1 = arg[2] | |
18763 | } | |
18764 | split(mac1, mac2, "(") #) | |
18765 | macro = mac2[1] | |
18766 | prefix = substr(line, 1, index(line, defundef) - 1) | |
18767 | if (D_is_set[macro]) { | |
18768 | # Preserve the white space surrounding the "#". | |
18769 | print prefix "define", macro P[macro] D[macro] | |
18770 | next | |
18771 | } else { | |
18772 | # Replace #undef with comments. This is necessary, for example, | |
18773 | # in the case of _POSIX_SOURCE, which is predefined and required | |
18774 | # on some systems where configure will not decide to define it. | |
18775 | if (defundef == "undef") { | |
18776 | print "/*", prefix defundef, macro, "*/" | |
18777 | next | |
18778 | } | |
18779 | } | |
b4e70030 | 18780 | } |
81ecdfbb RW |
18781 | { print } |
18782 | _ACAWK | |
b4e70030 | 18783 | _ACEOF |
81ecdfbb RW |
18784 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18785 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
18786 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 18787 | |
4e8d927d | 18788 | |
81ecdfbb RW |
18789 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
18790 | shift | |
18791 | for ac_tag | |
18792 | do | |
18793 | case $ac_tag in | |
18794 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
18795 | esac | |
18796 | case $ac_mode$ac_tag in | |
18797 | :[FHL]*:*);; | |
18798 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
18799 | :[FH]-) ac_tag=-:-;; | |
18800 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
18801 | esac | |
18802 | ac_save_IFS=$IFS | |
18803 | IFS=: | |
18804 | set x $ac_tag | |
18805 | IFS=$ac_save_IFS | |
18806 | shift | |
18807 | ac_file=$1 | |
18808 | shift | |
4e8d927d | 18809 | |
81ecdfbb RW |
18810 | case $ac_mode in |
18811 | :L) ac_source=$1;; | |
18812 | :[FH]) | |
18813 | ac_file_inputs= | |
18814 | for ac_f | |
18815 | do | |
18816 | case $ac_f in | |
18817 | -) ac_f="$tmp/stdin";; | |
18818 | *) # Look for the file first in the build tree, then in the source tree | |
18819 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
18820 | # because $ac_f cannot contain `:'. | |
18821 | test -f "$ac_f" || | |
18822 | case $ac_f in | |
18823 | [\\/$]*) false;; | |
18824 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
18825 | esac || | |
18826 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
18827 | esac | |
18828 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
18829 | as_fn_append ac_file_inputs " '$ac_f'" | |
18830 | done | |
18831 | ||
18832 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18833 | # use $as_me), people would be surprised to read: | |
18834 | # /* config.h. Generated by config.status. */ | |
18835 | configure_input='Generated from '` | |
18836 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
18837 | `' by configure.' | |
18838 | if test x"$ac_file" != x-; then | |
18839 | configure_input="$ac_file. $configure_input" | |
18840 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
18841 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 18842 | fi |
81ecdfbb RW |
18843 | # Neutralize special characters interpreted by sed in replacement strings. |
18844 | case $configure_input in #( | |
18845 | *\&* | *\|* | *\\* ) | |
18846 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
18847 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
18848 | *) ac_sed_conf_input=$configure_input;; | |
18849 | esac | |
4e8d927d | 18850 | |
81ecdfbb RW |
18851 | case $ac_tag in |
18852 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
18853 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
18854 | esac | |
18855 | ;; | |
c906108c SS |
18856 | esac |
18857 | ||
81ecdfbb | 18858 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
18859 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
18860 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18861 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
18862 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
18863 | $as_echo X"$ac_file" | | |
18864 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
18865 | s//\1/ | |
18866 | q | |
18867 | } | |
18868 | /^X\(\/\/\)[^/].*/{ | |
18869 | s//\1/ | |
18870 | q | |
18871 | } | |
18872 | /^X\(\/\/\)$/{ | |
18873 | s//\1/ | |
18874 | q | |
18875 | } | |
18876 | /^X\(\/\).*/{ | |
18877 | s//\1/ | |
18878 | q | |
18879 | } | |
18880 | s/.*/./; q'` | |
18881 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
18882 | ac_builddir=. |
18883 | ||
81ecdfbb RW |
18884 | case "$ac_dir" in |
18885 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18886 | *) | |
18887 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
18888 | # A ".." for each directory in $ac_dir_suffix. | |
18889 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
18890 | case $ac_top_builddir_sub in | |
18891 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
18892 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
18893 | esac ;; | |
18894 | esac | |
18895 | ac_abs_top_builddir=$ac_pwd | |
18896 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
18897 | # for backward compatibility: | |
18898 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
18899 | |
18900 | case $srcdir in | |
81ecdfbb | 18901 | .) # We are building in place. |
bec39cab | 18902 | ac_srcdir=. |
81ecdfbb RW |
18903 | ac_top_srcdir=$ac_top_builddir_sub |
18904 | ac_abs_top_srcdir=$ac_pwd ;; | |
18905 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 18906 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
18907 | ac_top_srcdir=$srcdir |
18908 | ac_abs_top_srcdir=$srcdir ;; | |
18909 | *) # Relative name. | |
18910 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
18911 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
18912 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 18913 | esac |
81ecdfbb | 18914 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 18915 | |
c906108c | 18916 | |
81ecdfbb RW |
18917 | case $ac_mode in |
18918 | :F) | |
18919 | # | |
18920 | # CONFIG_FILE | |
18921 | # | |
c906108c | 18922 | |
bec39cab AC |
18923 | case $INSTALL in |
18924 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 18925 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 18926 | esac |
81ecdfbb RW |
18927 | ac_MKDIR_P=$MKDIR_P |
18928 | case $MKDIR_P in | |
18929 | [\\/$]* | ?:[\\/]* ) ;; | |
18930 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
18931 | esac | |
18932 | _ACEOF | |
121ce6e5 | 18933 | |
81ecdfbb RW |
18934 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
18935 | # If the template does not know about datarootdir, expand it. | |
18936 | # FIXME: This hack should be removed a few years after 2.60. | |
18937 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
18938 | ac_sed_dataroot=' | |
18939 | /datarootdir/ { | |
18940 | p | |
18941 | q | |
18942 | } | |
18943 | /@datadir@/p | |
18944 | /@docdir@/p | |
18945 | /@infodir@/p | |
18946 | /@localedir@/p | |
18947 | /@mandir@/p' | |
18948 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
18949 | *datarootdir*) ac_datarootdir_seen=yes;; | |
18950 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
18951 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
18952 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
18953 | _ACEOF | |
18954 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18955 | ac_datarootdir_hack=' | |
18956 | s&@datadir@&$datadir&g | |
18957 | s&@docdir@&$docdir&g | |
18958 | s&@infodir@&$infodir&g | |
18959 | s&@localedir@&$localedir&g | |
18960 | s&@mandir@&$mandir&g | |
18961 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
18962 | esac | |
4e8d927d | 18963 | _ACEOF |
81ecdfbb RW |
18964 | |
18965 | # Neutralize VPATH when `$srcdir' = `.'. | |
18966 | # Shell code in configure.ac might set extrasub. | |
18967 | # FIXME: do we really want to maintain this feature? | |
18968 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
18969 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
18970 | $extrasub |
18971 | _ACEOF | |
81ecdfbb | 18972 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
18973 | :t |
18974 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
18975 | s|@configure_input@|$ac_sed_conf_input|;t t |
18976 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
18977 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
18978 | s&@srcdir@&$ac_srcdir&;t t | |
18979 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
18980 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
18981 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
18982 | s&@builddir@&$ac_builddir&;t t | |
18983 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
18984 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
18985 | s&@INSTALL@&$ac_INSTALL&;t t | |
18986 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
18987 | $ac_datarootdir_hack | |
18988 | " | |
18989 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
18990 | if $ac_cs_awk_getline; then | |
18991 | $AWK -f "$tmp/subs.awk" | |
18992 | else | |
18993 | $AWK -f "$tmp/subs.awk" | $SHELL | |
18994 | fi >$tmp/out \ | |
18995 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
18996 | ||
18997 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
18998 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
18999 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
19000 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
19001 | which seems to be undefined. Please make sure it is defined." >&5 | |
19002 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
19003 | which seems to be undefined. Please make sure it is defined." >&2;} | |
19004 | ||
19005 | rm -f "$tmp/stdin" | |
bec39cab | 19006 | case $ac_file in |
81ecdfbb RW |
19007 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
19008 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
19009 | esac \ | |
19010 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
19011 | ;; | |
19012 | :H) | |
19013 | # | |
19014 | # CONFIG_HEADER | |
19015 | # | |
bec39cab | 19016 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
19017 | { |
19018 | $as_echo "/* $configure_input */" \ | |
19019 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
19020 | } >"$tmp/config.h" \ | |
19021 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
19022 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
19023 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
19024 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 19025 | else |
81ecdfbb RW |
19026 | rm -f "$ac_file" |
19027 | mv "$tmp/config.h" "$ac_file" \ | |
19028 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
19029 | fi |
19030 | else | |
81ecdfbb RW |
19031 | $as_echo "/* $configure_input */" \ |
19032 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
19033 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 19034 | fi |
81ecdfbb RW |
19035 | # Compute "$ac_file"'s index in $config_headers. |
19036 | _am_arg="$ac_file" | |
e28b3332 DJ |
19037 | _am_stamp_count=1 |
19038 | for _am_header in $config_headers :; do | |
19039 | case $_am_header in | |
81ecdfbb | 19040 | $_am_arg | $_am_arg:* ) |
e28b3332 DJ |
19041 | break ;; |
19042 | * ) | |
19043 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
19044 | esac | |
19045 | done | |
81ecdfbb RW |
19046 | echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || |
19047 | $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
19048 | X"$_am_arg" : 'X\(//\)[^/]' \| \ | |
19049 | X"$_am_arg" : 'X\(//\)$' \| \ | |
19050 | X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || | |
19051 | $as_echo X"$_am_arg" | | |
19052 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
19053 | s//\1/ | |
19054 | q | |
19055 | } | |
19056 | /^X\(\/\/\)[^/].*/{ | |
19057 | s//\1/ | |
19058 | q | |
19059 | } | |
19060 | /^X\(\/\/\)$/{ | |
19061 | s//\1/ | |
19062 | q | |
19063 | } | |
19064 | /^X\(\/\).*/{ | |
19065 | s//\1/ | |
19066 | q | |
19067 | } | |
19068 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
19069 | ;; | |
19070 | :L) | |
19071 | # | |
19072 | # CONFIG_LINK | |
19073 | # | |
c906108c | 19074 | |
81ecdfbb RW |
19075 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
19076 | : | |
b4e70030 | 19077 | else |
81ecdfbb RW |
19078 | # Prefer the file from the source tree if names are identical. |
19079 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
19080 | ac_source=$srcdir/$ac_source | |
19081 | fi | |
b4e70030 | 19082 | |
81ecdfbb RW |
19083 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
19084 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 19085 | |
81ecdfbb RW |
19086 | if test ! -r "$ac_source"; then |
19087 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
19088 | fi | |
19089 | rm -f "$ac_file" | |
bec39cab | 19090 | |
81ecdfbb RW |
19091 | # Try a relative symlink, then a hard link, then a copy. |
19092 | case $srcdir in | |
19093 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
19094 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
19095 | esac | |
19096 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
19097 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
19098 | cp -p "$ac_source" "$ac_file" || | |
19099 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
19100 | fi | |
19101 | ;; | |
19102 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
19103 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
19104 | ;; | |
c906108c | 19105 | esac |
b4e70030 | 19106 | |
bec39cab | 19107 | |
81ecdfbb RW |
19108 | case $ac_file$ac_mode in |
19109 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
19110 | "depfiles":C) test x"$AMDEP_TRUE" != x"" || { | |
19111 | # Autoconf 2.62 quotes --file arguments for eval, but not when files | |
19112 | # are listed without --file. Let's play safe and only enable the eval | |
19113 | # if we detect the quoting. | |
19114 | case $CONFIG_FILES in | |
19115 | *\'*) eval set x "$CONFIG_FILES" ;; | |
19116 | *) set x $CONFIG_FILES ;; | |
19117 | esac | |
19118 | shift | |
19119 | for mf | |
19120 | do | |
19121 | # Strip MF so we end up with the name of the file. | |
19122 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
19123 | # Check whether this is an Automake generated Makefile or not. | |
19124 | # We used to match only the files named `Makefile.in', but | |
19125 | # some people rename them; so instead we look at the file content. | |
19126 | # Grep'ing the first line is not enough: some people post-process | |
19127 | # each Makefile.in and add a new line on top of each file to say so. | |
19128 | # Grep'ing the whole file is not good either: AIX grep has a line | |
19129 | # limit of 2048, but all sed's we know have understand at least 4000. | |
19130 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
19131 | dirpart=`$as_dirname -- "$mf" || | |
e28b3332 DJ |
19132 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
19133 | X"$mf" : 'X\(//\)[^/]' \| \ | |
19134 | X"$mf" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
19135 | X"$mf" : 'X\(/\)' \| . 2>/dev/null || |
19136 | $as_echo X"$mf" | | |
19137 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
19138 | s//\1/ | |
19139 | q | |
19140 | } | |
19141 | /^X\(\/\/\)[^/].*/{ | |
19142 | s//\1/ | |
19143 | q | |
19144 | } | |
19145 | /^X\(\/\/\)$/{ | |
19146 | s//\1/ | |
19147 | q | |
19148 | } | |
19149 | /^X\(\/\).*/{ | |
19150 | s//\1/ | |
19151 | q | |
19152 | } | |
19153 | s/.*/./; q'` | |
19154 | else | |
19155 | continue | |
19156 | fi | |
19157 | # Extract the definition of DEPDIR, am__include, and am__quote | |
19158 | # from the Makefile without running `make'. | |
19159 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
19160 | test -z "$DEPDIR" && continue | |
19161 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
19162 | test -z "am__include" && continue | |
19163 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
19164 | # When using ansi2knr, U may be empty or an underscore; expand it | |
19165 | U=`sed -n 's/^U = //p' < "$mf"` | |
19166 | # Find all dependency output files, they are included files with | |
19167 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
19168 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
19169 | # expansion. | |
19170 | for file in `sed -n " | |
19171 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
19172 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
19173 | # Make sure the directory exists. | |
19174 | test -f "$dirpart/$file" && continue | |
19175 | fdir=`$as_dirname -- "$file" || | |
e28b3332 DJ |
19176 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
19177 | X"$file" : 'X\(//\)[^/]' \| \ | |
19178 | X"$file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
19179 | X"$file" : 'X\(/\)' \| . 2>/dev/null || |
19180 | $as_echo X"$file" | | |
19181 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
19182 | s//\1/ | |
19183 | q | |
19184 | } | |
19185 | /^X\(\/\/\)[^/].*/{ | |
19186 | s//\1/ | |
19187 | q | |
19188 | } | |
19189 | /^X\(\/\/\)$/{ | |
19190 | s//\1/ | |
19191 | q | |
19192 | } | |
19193 | /^X\(\/\).*/{ | |
19194 | s//\1/ | |
19195 | q | |
19196 | } | |
19197 | s/.*/./; q'` | |
19198 | as_dir=$dirpart/$fdir; as_fn_mkdir_p | |
19199 | # echo "creating $dirpart/$file" | |
19200 | echo '# dummy' > "$dirpart/$file" | |
e28b3332 | 19201 | done |
e28b3332 | 19202 | done |
81ecdfbb | 19203 | } |
4e8d927d | 19204 | ;; |
81ecdfbb | 19205 | "default":C) |
c906108c SS |
19206 | case x$CONFIG_HEADERS in |
19207 | xconfig.h:config.in) | |
19208 | echo > stamp-h ;; | |
19209 | esac | |
bec39cab | 19210 | ;; |
81ecdfbb | 19211 | |
bec39cab | 19212 | esac |
81ecdfbb | 19213 | done # for ac_tag |
c906108c | 19214 | |
bec39cab | 19215 | |
81ecdfbb | 19216 | as_fn_exit 0 |
bec39cab | 19217 | _ACEOF |
bec39cab AC |
19218 | ac_clean_files=$ac_clean_files_save |
19219 | ||
81ecdfbb RW |
19220 | test $ac_write_fail = 0 || |
19221 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
19222 | ||
bec39cab AC |
19223 | |
19224 | # configure is writing to config.log, and then calls config.status. | |
19225 | # config.status does its own redirection, appending to config.log. | |
19226 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
19227 | # by configure, so config.status won't be able to write to it; its | |
19228 | # output is simply discarded. So we exec the FD to /dev/null, | |
19229 | # effectively closing config.log, so it can be properly (re)opened and | |
19230 | # appended to by config.status. When coming back to configure, we | |
19231 | # need to make the FD available again. | |
19232 | if test "$no_create" != yes; then | |
19233 | ac_cs_success=: | |
19234 | ac_config_status_args= | |
19235 | test "$silent" = yes && | |
19236 | ac_config_status_args="$ac_config_status_args --quiet" | |
19237 | exec 5>/dev/null | |
19238 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
19239 | exec 5>>config.log | |
19240 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
19241 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 19242 | $ac_cs_success || as_fn_exit $? |
bec39cab | 19243 | fi |
c906108c | 19244 | |
bec39cab | 19245 | # |
81ecdfbb | 19246 | # CONFIG_SUBDIRS section. |
bec39cab | 19247 | # |
c906108c SS |
19248 | if test "$no_recursion" != yes; then |
19249 | ||
81ecdfbb RW |
19250 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
19251 | # so they do not pile up. | |
c906108c SS |
19252 | ac_sub_configure_args= |
19253 | ac_prev= | |
fdc59709 PB |
19254 | eval "set x $ac_configure_args" |
19255 | shift | |
19256 | for ac_arg | |
19257 | do | |
c906108c SS |
19258 | if test -n "$ac_prev"; then |
19259 | ac_prev= | |
19260 | continue | |
19261 | fi | |
bec39cab | 19262 | case $ac_arg in |
c906108c SS |
19263 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
19264 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
19265 | ac_prev=cache_file ;; | |
19266 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
19267 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
19268 | | --c=*) | |
19269 | ;; | |
19270 | --config-cache | -C) | |
c906108c SS |
19271 | ;; |
19272 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
19273 | ac_prev=srcdir ;; | |
19274 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
19275 | ;; | |
bec39cab AC |
19276 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
19277 | ac_prev=prefix ;; | |
19278 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
19279 | ;; | |
81ecdfbb RW |
19280 | --disable-option-checking) |
19281 | ;; | |
fdc59709 PB |
19282 | *) |
19283 | case $ac_arg in | |
81ecdfbb | 19284 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19285 | esac |
81ecdfbb | 19286 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
19287 | esac |
19288 | done | |
19289 | ||
bec39cab AC |
19290 | # Always prepend --prefix to ensure using the same prefix |
19291 | # in subdir configurations. | |
fdc59709 PB |
19292 | ac_arg="--prefix=$prefix" |
19293 | case $ac_arg in | |
81ecdfbb | 19294 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 19295 | esac |
81ecdfbb RW |
19296 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
19297 | ||
19298 | # Pass --silent | |
19299 | if test "$silent" = yes; then | |
19300 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
19301 | fi | |
19302 | ||
19303 | # Always prepend --disable-option-checking to silence warnings, since | |
19304 | # different subdirs can have different --enable and --with options. | |
19305 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 19306 | |
b4e70030 | 19307 | ac_popdir=`pwd` |
bec39cab | 19308 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
19309 | |
19310 | # Do not complain, so a configure script can configure whichever | |
19311 | # parts of a large source tree are present. | |
fdc59709 | 19312 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 19313 | |
81ecdfbb RW |
19314 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
19315 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
19316 | $as_echo "$ac_msg" >&6 | |
19317 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
19318 | ac_builddir=. |
19319 | ||
81ecdfbb RW |
19320 | case "$ac_dir" in |
19321 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19322 | *) | |
19323 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
19324 | # A ".." for each directory in $ac_dir_suffix. | |
19325 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
19326 | case $ac_top_builddir_sub in | |
19327 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
19328 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
19329 | esac ;; | |
19330 | esac | |
19331 | ac_abs_top_builddir=$ac_pwd | |
19332 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
19333 | # for backward compatibility: | |
19334 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
19335 | |
19336 | case $srcdir in | |
81ecdfbb | 19337 | .) # We are building in place. |
bec39cab | 19338 | ac_srcdir=. |
81ecdfbb RW |
19339 | ac_top_srcdir=$ac_top_builddir_sub |
19340 | ac_abs_top_srcdir=$ac_pwd ;; | |
19341 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 19342 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
19343 | ac_top_srcdir=$srcdir |
19344 | ac_abs_top_srcdir=$srcdir ;; | |
19345 | *) # Relative name. | |
19346 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
19347 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
19348 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 19349 | esac |
81ecdfbb | 19350 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 19351 | |
c906108c | 19352 | |
fdc59709 | 19353 | cd "$ac_dir" |
c906108c SS |
19354 | |
19355 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
19356 | if test -f "$ac_srcdir/configure.gnu"; then |
19357 | ac_sub_configure=$ac_srcdir/configure.gnu | |
19358 | elif test -f "$ac_srcdir/configure"; then | |
19359 | ac_sub_configure=$ac_srcdir/configure | |
19360 | elif test -f "$ac_srcdir/configure.in"; then | |
19361 | # This should be Cygnus configure. | |
19362 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 19363 | else |
81ecdfbb RW |
19364 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
19365 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
19366 | ac_sub_configure= |
19367 | fi | |
19368 | ||
19369 | # The recursion is here. | |
19370 | if test -n "$ac_sub_configure"; then | |
c906108c | 19371 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
19372 | case $cache_file in |
19373 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
19374 | *) # Relative name. |
19375 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 19376 | esac |
c906108c | 19377 | |
81ecdfbb RW |
19378 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
19379 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 19380 | # The eval makes quoting arguments work. |
fdc59709 PB |
19381 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
19382 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 19383 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
19384 | fi |
19385 | ||
fdc59709 | 19386 | cd "$ac_popdir" |
c906108c SS |
19387 | done |
19388 | fi | |
81ecdfbb RW |
19389 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
19390 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
19391 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
19392 | fi | |
c906108c SS |
19393 | |
19394 | ||
19395 | exit 0 |