]>
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 [email protected] 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 | ||
81ecdfbb | 591 | enable_option_checking=no |
c971b7fa | 592 | ac_subst_vars='LTLIBOBJS |
81ecdfbb RW |
593 | LIBOBJS |
594 | GDB_NM_FILE | |
595 | frags | |
596 | target_subdir | |
597 | CONFIG_UNINSTALL | |
598 | CONFIG_INSTALL | |
599 | CONFIG_CLEAN | |
600 | CONFIG_ALL | |
601 | CONFIG_SRCS | |
602 | CONFIG_DEPS | |
603 | CONFIG_OBS | |
604 | PROFILE_CFLAGS | |
605 | ENABLE_CFLAGS | |
606 | SIM_OBS | |
607 | SIM | |
608 | XMKMF | |
609 | GDBTK_SRC_DIR | |
610 | GDBTK_CFLAGS | |
611 | GDBTKLIBS | |
612 | X_LIBS | |
613 | X_LDFLAGS | |
614 | X_CFLAGS | |
615 | TK_XINCLUDES | |
616 | TK_DEPS | |
617 | TK_LIBRARY | |
618 | TK_INCLUDE | |
619 | TK_STUB_LIB_SPEC | |
620 | TK_STUB_LIB_FLAG | |
621 | TK_STUB_LIB_FILE | |
622 | TK_LIB_SPEC | |
623 | TK_LIB_FLAG | |
624 | TK_LIB_FILE | |
625 | TK_SRC_DIR | |
626 | TK_BIN_DIR | |
627 | TK_VERSION | |
628 | TCL_DEPS | |
629 | TCL_LIBRARY | |
630 | TCL_INCLUDE | |
631 | TCL_STUB_LIB_SPEC | |
632 | TCL_STUB_LIB_FLAG | |
633 | TCL_STUB_LIB_FILE | |
634 | TCL_LIB_SPEC | |
635 | TCL_LIB_FLAG | |
636 | TCL_LIB_FILE | |
637 | TCL_SRC_DIR | |
638 | TCL_BIN_DIR | |
639 | TCL_PATCH_LEVEL | |
640 | TCL_VERSION | |
641 | WIN32LDAPP | |
642 | GUI_CFLAGS_X | |
643 | LIBGUI | |
644 | WIN32LIBS | |
645 | SER_HARDWIRE | |
646 | WERROR_CFLAGS | |
647 | WARN_CFLAGS | |
648 | SYSTEM_GDBINIT | |
81ecdfbb RW |
649 | TARGET_SYSTEM_ROOT |
650 | CONFIG_LDFLAGS | |
f6528abd | 651 | RDYNAMIC |
81ecdfbb | 652 | ALLOCA |
ac534cba JB |
653 | PYTHON_LIBS |
654 | PYTHON_CPPFLAGS | |
81ecdfbb | 655 | PYTHON_CFLAGS |
ec685c5e | 656 | python_prog_path |
81ecdfbb RW |
657 | LTLIBEXPAT |
658 | LIBEXPAT | |
659 | HAVE_LIBEXPAT | |
b8e0a31c | 660 | JIT_READER_DIR |
f997c383 | 661 | TARGET_PTR |
39037522 | 662 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
663 | READLINE_CFLAGS |
664 | READLINE_DEPS | |
665 | READLINE | |
666 | MIG | |
667 | WINDRES | |
668 | DLLTOOL | |
c971b7fa | 669 | AR |
81ecdfbb RW |
670 | YFLAGS |
671 | YACC | |
c971b7fa | 672 | RANLIB |
81ecdfbb | 673 | LN_S |
c971b7fa PA |
674 | INSTALL_DATA |
675 | INSTALL_SCRIPT | |
676 | INSTALL_PROGRAM | |
677 | AWK | |
81ecdfbb RW |
678 | REPORT_BUGS_TEXI |
679 | REPORT_BUGS_TO | |
680 | PKGVERSION | |
681 | TARGET_OBS | |
682 | subdirs | |
683 | GDB_DATADIR | |
684 | DEBUGDIR | |
5048e516 JK |
685 | MAKEINFO_EXTRA_FLAGS |
686 | MAKEINFOFLAGS | |
687 | MAKEINFO | |
81ecdfbb RW |
688 | PACKAGE |
689 | GNULIB_STDINT_H | |
81ecdfbb RW |
690 | CATOBJEXT |
691 | GENCAT | |
692 | INSTOBJEXT | |
693 | DATADIRNAME | |
694 | CATALOGS | |
695 | POSUB | |
696 | GMSGFMT | |
697 | XGETTEXT | |
698 | INCINTL | |
699 | LIBINTL_DEP | |
700 | LIBINTL | |
701 | USE_NLS | |
702 | SET_MAKE | |
703 | GMAKE_FALSE | |
704 | GMAKE_TRUE | |
705 | MAKE | |
706 | CCDEPMODE | |
707 | DEPDIR | |
708 | am__leading_dot | |
709 | target_os | |
710 | target_vendor | |
711 | target_cpu | |
712 | target | |
713 | host_os | |
714 | host_vendor | |
715 | host_cpu | |
716 | host | |
717 | build_os | |
718 | build_vendor | |
719 | build_cpu | |
720 | build | |
c971b7fa PA |
721 | EGREP |
722 | GREP | |
723 | CPP | |
81ecdfbb RW |
724 | OBJEXT |
725 | EXEEXT | |
726 | ac_ct_CC | |
727 | CPPFLAGS | |
728 | LDFLAGS | |
729 | CFLAGS | |
730 | CC | |
731 | MAINT | |
732 | MAINTAINER_MODE_FALSE | |
733 | MAINTAINER_MODE_TRUE | |
734 | target_alias | |
735 | host_alias | |
736 | build_alias | |
737 | LIBS | |
738 | ECHO_T | |
739 | ECHO_N | |
740 | ECHO_C | |
741 | DEFS | |
742 | mandir | |
743 | localedir | |
744 | libdir | |
745 | psdir | |
746 | pdfdir | |
747 | dvidir | |
748 | htmldir | |
749 | infodir | |
750 | docdir | |
751 | oldincludedir | |
752 | includedir | |
753 | localstatedir | |
754 | sharedstatedir | |
755 | sysconfdir | |
756 | datadir | |
757 | datarootdir | |
758 | libexecdir | |
759 | sbindir | |
760 | bindir | |
761 | program_transform_name | |
762 | prefix | |
763 | exec_prefix | |
764 | PACKAGE_URL | |
765 | PACKAGE_BUGREPORT | |
766 | PACKAGE_STRING | |
767 | PACKAGE_VERSION | |
768 | PACKAGE_TARNAME | |
769 | PACKAGE_NAME | |
770 | PATH_SEPARATOR | |
771 | SHELL' | |
a4ce5b0d | 772 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
773 | ac_user_opts=' |
774 | enable_option_checking | |
775 | enable_maintainer_mode | |
da2f07f1 JK |
776 | enable_plugins |
777 | enable_largefile | |
81ecdfbb RW |
778 | with_separate_debug_dir |
779 | with_gdb_datadir | |
780 | with_relocated_sources | |
7349ff92 | 781 | with_auto_load_dir |
bccbefd2 | 782 | with_auto_load_safe_path |
81ecdfbb RW |
783 | enable_targets |
784 | enable_64_bit_bfd | |
785 | enable_gdbcli | |
786 | enable_gdbmi | |
787 | enable_tui | |
788 | enable_gdbtk | |
05e7c244 | 789 | with_libunwind_ia64 |
81ecdfbb RW |
790 | with_curses |
791 | enable_profiling | |
792 | with_pkgversion | |
793 | with_bugurl | |
b040ad30 | 794 | with_zlib |
81ecdfbb | 795 | with_libiconv_prefix |
478aac75 | 796 | with_iconv_bin |
81ecdfbb | 797 | with_system_readline |
b8e0a31c | 798 | with_jit_reader_dir |
81ecdfbb RW |
799 | with_expat |
800 | with_gnu_ld | |
801 | enable_rpath | |
802 | with_libexpat_prefix | |
803 | with_python | |
804 | with_included_regex | |
805 | with_sysroot | |
806 | with_system_gdbinit | |
807 | enable_werror | |
808 | enable_build_warnings | |
809 | enable_gdb_build_warnings | |
810 | with_tcl | |
811 | with_tk | |
812 | with_x | |
813 | enable_sim | |
814 | enable_multi_ice | |
496c0e1b | 815 | enable_gdbserver |
81ecdfbb RW |
816 | ' |
817 | ac_precious_vars='build_alias | |
818 | host_alias | |
819 | target_alias | |
820 | CC | |
821 | CFLAGS | |
822 | LDFLAGS | |
823 | LIBS | |
824 | CPPFLAGS | |
825 | CPP | |
f06e05e0 JK |
826 | MAKEINFO |
827 | MAKEINFOFLAGS | |
81ecdfbb RW |
828 | YACC |
829 | YFLAGS | |
830 | XMKMF' | |
5ae98d25 | 831 | ac_subdirs_all='testsuite |
81ecdfbb RW |
832 | gdbtk |
833 | multi-ice | |
834 | gdbserver' | |
c906108c SS |
835 | |
836 | # Initialize some variables set by options. | |
bec39cab AC |
837 | ac_init_help= |
838 | ac_init_version=false | |
81ecdfbb RW |
839 | ac_unrecognized_opts= |
840 | ac_unrecognized_sep= | |
c906108c SS |
841 | # The variables have the same names as the options, with |
842 | # dashes changed to underlines. | |
bec39cab | 843 | cache_file=/dev/null |
c906108c | 844 | exec_prefix=NONE |
c906108c | 845 | no_create= |
c906108c SS |
846 | no_recursion= |
847 | prefix=NONE | |
848 | program_prefix=NONE | |
849 | program_suffix=NONE | |
850 | program_transform_name=s,x,x, | |
851 | silent= | |
852 | site= | |
853 | srcdir= | |
c906108c SS |
854 | verbose= |
855 | x_includes=NONE | |
856 | x_libraries=NONE | |
bec39cab AC |
857 | |
858 | # Installation directory options. | |
859 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
860 | # and all the variables that are supposed to be based on exec_prefix | |
861 | # by default will actually change. | |
862 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 863 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
864 | bindir='${exec_prefix}/bin' |
865 | sbindir='${exec_prefix}/sbin' | |
866 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
867 | datarootdir='${prefix}/share' |
868 | datadir='${datarootdir}' | |
c906108c SS |
869 | sysconfdir='${prefix}/etc' |
870 | sharedstatedir='${prefix}/com' | |
871 | localstatedir='${prefix}/var' | |
c906108c SS |
872 | includedir='${prefix}/include' |
873 | oldincludedir='/usr/include' | |
81ecdfbb RW |
874 | docdir='${datarootdir}/doc/${PACKAGE}' |
875 | infodir='${datarootdir}/info' | |
876 | htmldir='${docdir}' | |
877 | dvidir='${docdir}' | |
878 | pdfdir='${docdir}' | |
879 | psdir='${docdir}' | |
880 | libdir='${exec_prefix}/lib' | |
881 | localedir='${datarootdir}/locale' | |
882 | mandir='${datarootdir}/man' | |
c906108c | 883 | |
c906108c | 884 | ac_prev= |
81ecdfbb | 885 | ac_dashdash= |
c906108c SS |
886 | for ac_option |
887 | do | |
c906108c SS |
888 | # If the previous option needs an argument, assign it. |
889 | if test -n "$ac_prev"; then | |
81ecdfbb | 890 | eval $ac_prev=\$ac_option |
c906108c SS |
891 | ac_prev= |
892 | continue | |
893 | fi | |
894 | ||
81ecdfbb RW |
895 | case $ac_option in |
896 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
897 | *) ac_optarg=yes ;; | |
898 | esac | |
c906108c SS |
899 | |
900 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
901 | ||
81ecdfbb RW |
902 | case $ac_dashdash$ac_option in |
903 | --) | |
904 | ac_dashdash=yes ;; | |
c906108c SS |
905 | |
906 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
907 | ac_prev=bindir ;; | |
908 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 909 | bindir=$ac_optarg ;; |
c906108c SS |
910 | |
911 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 912 | ac_prev=build_alias ;; |
c906108c | 913 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 914 | build_alias=$ac_optarg ;; |
c906108c SS |
915 | |
916 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
917 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
918 | ac_prev=cache_file ;; | |
919 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
920 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
921 | cache_file=$ac_optarg ;; |
922 | ||
923 | --config-cache | -C) | |
924 | cache_file=config.cache ;; | |
c906108c | 925 | |
81ecdfbb | 926 | -datadir | --datadir | --datadi | --datad) |
c906108c | 927 | ac_prev=datadir ;; |
81ecdfbb | 928 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 929 | datadir=$ac_optarg ;; |
c906108c | 930 | |
81ecdfbb RW |
931 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
932 | | --dataroo | --dataro | --datar) | |
933 | ac_prev=datarootdir ;; | |
934 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
935 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
936 | datarootdir=$ac_optarg ;; | |
937 | ||
c906108c | 938 | -disable-* | --disable-*) |
81ecdfbb | 939 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 940 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
941 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
942 | as_fn_error "invalid feature name: $ac_useropt" | |
943 | ac_useropt_orig=$ac_useropt | |
944 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
945 | case $ac_user_opts in | |
946 | *" | |
947 | "enable_$ac_useropt" | |
948 | "*) ;; | |
949 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
950 | ac_unrecognized_sep=', ';; | |
951 | esac | |
952 | eval enable_$ac_useropt=no ;; | |
953 | ||
954 | -docdir | --docdir | --docdi | --doc | --do) | |
955 | ac_prev=docdir ;; | |
956 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
957 | docdir=$ac_optarg ;; | |
958 | ||
959 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
960 | ac_prev=dvidir ;; | |
961 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
962 | dvidir=$ac_optarg ;; | |
c906108c SS |
963 | |
964 | -enable-* | --enable-*) | |
81ecdfbb | 965 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 966 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
967 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
968 | as_fn_error "invalid feature name: $ac_useropt" | |
969 | ac_useropt_orig=$ac_useropt | |
970 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
971 | case $ac_user_opts in | |
972 | *" | |
973 | "enable_$ac_useropt" | |
974 | "*) ;; | |
975 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
976 | ac_unrecognized_sep=', ';; | |
b4e70030 | 977 | esac |
81ecdfbb | 978 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
979 | |
980 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
981 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
982 | | --exec | --exe | --ex) | |
983 | ac_prev=exec_prefix ;; | |
984 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
985 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
986 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 987 | exec_prefix=$ac_optarg ;; |
c906108c SS |
988 | |
989 | -gas | --gas | --ga | --g) | |
990 | # Obsolete; use --with-gas. | |
991 | with_gas=yes ;; | |
992 | ||
bec39cab AC |
993 | -help | --help | --hel | --he | -h) |
994 | ac_init_help=long ;; | |
995 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
996 | ac_init_help=recursive ;; | |
997 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
998 | ac_init_help=short ;; | |
c906108c SS |
999 | |
1000 | -host | --host | --hos | --ho) | |
bec39cab | 1001 | ac_prev=host_alias ;; |
c906108c | 1002 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1003 | host_alias=$ac_optarg ;; |
c906108c | 1004 | |
81ecdfbb RW |
1005 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1006 | ac_prev=htmldir ;; | |
1007 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1008 | | --ht=*) | |
1009 | htmldir=$ac_optarg ;; | |
1010 | ||
c906108c SS |
1011 | -includedir | --includedir | --includedi | --included | --include \ |
1012 | | --includ | --inclu | --incl | --inc) | |
1013 | ac_prev=includedir ;; | |
1014 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1015 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1016 | includedir=$ac_optarg ;; |
c906108c SS |
1017 | |
1018 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1019 | ac_prev=infodir ;; | |
1020 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1021 | infodir=$ac_optarg ;; |
c906108c SS |
1022 | |
1023 | -libdir | --libdir | --libdi | --libd) | |
1024 | ac_prev=libdir ;; | |
1025 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1026 | libdir=$ac_optarg ;; |
c906108c SS |
1027 | |
1028 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1029 | | --libexe | --libex | --libe) | |
1030 | ac_prev=libexecdir ;; | |
1031 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1032 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1033 | libexecdir=$ac_optarg ;; |
c906108c | 1034 | |
81ecdfbb RW |
1035 | -localedir | --localedir | --localedi | --localed | --locale) |
1036 | ac_prev=localedir ;; | |
1037 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1038 | localedir=$ac_optarg ;; | |
1039 | ||
c906108c | 1040 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1041 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1042 | ac_prev=localstatedir ;; |
1043 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1044 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1045 | localstatedir=$ac_optarg ;; |
c906108c SS |
1046 | |
1047 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1048 | ac_prev=mandir ;; | |
1049 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1050 | mandir=$ac_optarg ;; |
c906108c SS |
1051 | |
1052 | -nfp | --nfp | --nf) | |
1053 | # Obsolete; use --without-fp. | |
1054 | with_fp=no ;; | |
1055 | ||
1056 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1057 | | --no-cr | --no-c | -n) |
c906108c SS |
1058 | no_create=yes ;; |
1059 | ||
1060 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1061 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1062 | no_recursion=yes ;; | |
1063 | ||
1064 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1065 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1066 | | --oldin | --oldi | --old | --ol | --o) | |
1067 | ac_prev=oldincludedir ;; | |
1068 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1069 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1070 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1071 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1072 | |
1073 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1074 | ac_prev=prefix ;; | |
1075 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1076 | prefix=$ac_optarg ;; |
c906108c SS |
1077 | |
1078 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1079 | | --program-pre | --program-pr | --program-p) | |
1080 | ac_prev=program_prefix ;; | |
1081 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1082 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1083 | program_prefix=$ac_optarg ;; |
c906108c SS |
1084 | |
1085 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1086 | | --program-suf | --program-su | --program-s) | |
1087 | ac_prev=program_suffix ;; | |
1088 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1089 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1090 | program_suffix=$ac_optarg ;; |
c906108c SS |
1091 | |
1092 | -program-transform-name | --program-transform-name \ | |
1093 | | --program-transform-nam | --program-transform-na \ | |
1094 | | --program-transform-n | --program-transform- \ | |
1095 | | --program-transform | --program-transfor \ | |
1096 | | --program-transfo | --program-transf \ | |
1097 | | --program-trans | --program-tran \ | |
1098 | | --progr-tra | --program-tr | --program-t) | |
1099 | ac_prev=program_transform_name ;; | |
1100 | -program-transform-name=* | --program-transform-name=* \ | |
1101 | | --program-transform-nam=* | --program-transform-na=* \ | |
1102 | | --program-transform-n=* | --program-transform-=* \ | |
1103 | | --program-transform=* | --program-transfor=* \ | |
1104 | | --program-transfo=* | --program-transf=* \ | |
1105 | | --program-trans=* | --program-tran=* \ | |
1106 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1107 | program_transform_name=$ac_optarg ;; |
c906108c | 1108 | |
81ecdfbb RW |
1109 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1110 | ac_prev=pdfdir ;; | |
1111 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1112 | pdfdir=$ac_optarg ;; | |
1113 | ||
1114 | -psdir | --psdir | --psdi | --psd | --ps) | |
1115 | ac_prev=psdir ;; | |
1116 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1117 | psdir=$ac_optarg ;; | |
1118 | ||
c906108c SS |
1119 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1120 | | -silent | --silent | --silen | --sile | --sil) | |
1121 | silent=yes ;; | |
1122 | ||
1123 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1124 | ac_prev=sbindir ;; | |
1125 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1126 | | --sbi=* | --sb=*) | |
bec39cab | 1127 | sbindir=$ac_optarg ;; |
c906108c SS |
1128 | |
1129 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1130 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1131 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1132 | | --sha | --sh) | |
1133 | ac_prev=sharedstatedir ;; | |
1134 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1135 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1136 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1137 | | --sha=* | --sh=*) | |
bec39cab | 1138 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1139 | |
1140 | -site | --site | --sit) | |
1141 | ac_prev=site ;; | |
1142 | -site=* | --site=* | --sit=*) | |
bec39cab | 1143 | site=$ac_optarg ;; |
3ace7edb | 1144 | |
c906108c SS |
1145 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1146 | ac_prev=srcdir ;; | |
1147 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1148 | srcdir=$ac_optarg ;; |
c906108c SS |
1149 | |
1150 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1151 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1152 | ac_prev=sysconfdir ;; | |
1153 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1154 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1155 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1156 | |
1157 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1158 | ac_prev=target_alias ;; |
c906108c | 1159 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1160 | target_alias=$ac_optarg ;; |
c906108c SS |
1161 | |
1162 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1163 | verbose=yes ;; | |
1164 | ||
bec39cab AC |
1165 | -version | --version | --versio | --versi | --vers | -V) |
1166 | ac_init_version=: ;; | |
c906108c SS |
1167 | |
1168 | -with-* | --with-*) | |
81ecdfbb | 1169 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1170 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1171 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1172 | as_fn_error "invalid package name: $ac_useropt" | |
1173 | ac_useropt_orig=$ac_useropt | |
1174 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1175 | case $ac_user_opts in | |
1176 | *" | |
1177 | "with_$ac_useropt" | |
1178 | "*) ;; | |
1179 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1180 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1181 | esac |
81ecdfbb | 1182 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1183 | |
1184 | -without-* | --without-*) | |
81ecdfbb | 1185 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1186 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1187 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1188 | as_fn_error "invalid package name: $ac_useropt" | |
1189 | ac_useropt_orig=$ac_useropt | |
1190 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1191 | case $ac_user_opts in | |
1192 | *" | |
1193 | "with_$ac_useropt" | |
1194 | "*) ;; | |
1195 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1196 | ac_unrecognized_sep=', ';; | |
1197 | esac | |
1198 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1199 | |
1200 | --x) | |
1201 | # Obsolete; use --with-x. | |
1202 | with_x=yes ;; | |
1203 | ||
1204 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1205 | | --x-incl | --x-inc | --x-in | --x-i) | |
1206 | ac_prev=x_includes ;; | |
1207 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1208 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1209 | x_includes=$ac_optarg ;; |
c906108c SS |
1210 | |
1211 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1212 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1213 | ac_prev=x_libraries ;; | |
1214 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1215 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1216 | x_libraries=$ac_optarg ;; |
c906108c | 1217 | |
81ecdfbb RW |
1218 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1219 | Try \`$0 --help' for more information." | |
c906108c SS |
1220 | ;; |
1221 | ||
bec39cab AC |
1222 | *=*) |
1223 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1224 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1225 | case $ac_envvar in #( |
1226 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1227 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1228 | esac | |
1229 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1230 | export $ac_envvar ;; |
1231 | ||
c906108c | 1232 | *) |
bec39cab | 1233 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1234 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1235 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1236 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1237 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1238 | ;; |
1239 | ||
1240 | esac | |
1241 | done | |
1242 | ||
1243 | if test -n "$ac_prev"; then | |
bec39cab | 1244 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1245 | as_fn_error "missing argument to $ac_option" |
c906108c | 1246 | fi |
c906108c | 1247 | |
81ecdfbb RW |
1248 | if test -n "$ac_unrecognized_opts"; then |
1249 | case $enable_option_checking in | |
1250 | no) ;; | |
1251 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1252 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1253 | esac |
81ecdfbb | 1254 | fi |
b4e70030 | 1255 | |
81ecdfbb RW |
1256 | # Check all directory arguments for consistency. |
1257 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1258 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1259 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1260 | libdir localedir mandir | |
b4e70030 | 1261 | do |
81ecdfbb RW |
1262 | eval ac_val=\$$ac_var |
1263 | # Remove trailing slashes. | |
1264 | case $ac_val in | |
1265 | */ ) | |
1266 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1267 | eval $ac_var=\$ac_val;; | |
1268 | esac | |
1269 | # Be sure to have absolute directory names. | |
b4e70030 | 1270 | case $ac_val in |
81ecdfbb RW |
1271 | [\\/$]* | ?:[\\/]* ) continue;; |
1272 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1273 | esac |
81ecdfbb | 1274 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1275 | done |
1276 | ||
bec39cab AC |
1277 | # There might be people who depend on the old broken behavior: `$host' |
1278 | # used to hold the argument of --host etc. | |
1279 | # FIXME: To remove some day. | |
1280 | build=$build_alias | |
1281 | host=$host_alias | |
1282 | target=$target_alias | |
1283 | ||
1284 | # FIXME: To remove some day. | |
1285 | if test "x$host_alias" != x; then | |
1286 | if test "x$build_alias" = x; then | |
1287 | cross_compiling=maybe | |
81ecdfbb | 1288 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1289 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1290 | elif test "x$build_alias" != "x$host_alias"; then | |
1291 | cross_compiling=yes | |
1292 | fi | |
1293 | fi | |
c906108c | 1294 | |
bec39cab AC |
1295 | ac_tool_prefix= |
1296 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1297 | ||
1298 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1299 | |
c906108c | 1300 | |
81ecdfbb RW |
1301 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1302 | ac_ls_di=`ls -di .` && | |
1303 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1304 | as_fn_error "working directory cannot be determined" | |
1305 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1306 | as_fn_error "pwd does not report name of working directory" | |
1307 | ||
1308 | ||
c906108c SS |
1309 | # Find the source files, if location was not specified. |
1310 | if test -z "$srcdir"; then | |
1311 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1312 | # Try the directory containing this script, then the parent directory. |
1313 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1314 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1315 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1316 | X"$as_myself" : 'X\(//\)$' \| \ | |
1317 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1318 | $as_echo X"$as_myself" | | |
1319 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1320 | s//\1/ | |
1321 | q | |
1322 | } | |
1323 | /^X\(\/\/\)[^/].*/{ | |
1324 | s//\1/ | |
1325 | q | |
1326 | } | |
1327 | /^X\(\/\/\)$/{ | |
1328 | s//\1/ | |
1329 | q | |
1330 | } | |
1331 | /^X\(\/\).*/{ | |
1332 | s//\1/ | |
1333 | q | |
1334 | } | |
1335 | s/.*/./; q'` | |
c906108c | 1336 | srcdir=$ac_confdir |
81ecdfbb | 1337 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1338 | srcdir=.. |
1339 | fi | |
1340 | else | |
1341 | ac_srcdir_defaulted=no | |
1342 | fi | |
81ecdfbb RW |
1343 | if test ! -r "$srcdir/$ac_unique_file"; then |
1344 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1345 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1346 | fi | |
1347 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1348 | ac_abs_confdir=`( | |
1349 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1350 | pwd)` | |
1351 | # When building in place, set srcdir=. | |
1352 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1353 | srcdir=. | |
1354 | fi | |
1355 | # Remove unnecessary trailing slashes from srcdir. | |
1356 | # Double slashes in file names in object file debugging info | |
1357 | # mess up M-x gdb in Emacs. | |
1358 | case $srcdir in | |
1359 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1360 | esac | |
1361 | for ac_var in $ac_precious_vars; do | |
1362 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1363 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1364 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1365 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1366 | done | |
c906108c | 1367 | |
bec39cab AC |
1368 | # |
1369 | # Report the --help message. | |
1370 | # | |
1371 | if test "$ac_init_help" = "long"; then | |
1372 | # Omit some internal or obsolete options to make the list less imposing. | |
1373 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1374 | cat <<_ACEOF | |
1375 | \`configure' configures this package to adapt to many kinds of systems. | |
1376 | ||
1377 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1378 | ||
1379 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1380 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1381 | ||
1382 | Defaults for the options are specified in brackets. | |
1383 | ||
1384 | Configuration: | |
1385 | -h, --help display this help and exit | |
1386 | --help=short display options specific to this package | |
1387 | --help=recursive display the short help of all the included packages | |
1388 | -V, --version display version information and exit | |
1389 | -q, --quiet, --silent do not print \`checking...' messages | |
1390 | --cache-file=FILE cache test results in FILE [disabled] | |
1391 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1392 | -n, --no-create do not create output files | |
1393 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1394 | ||
bec39cab AC |
1395 | Installation directories: |
1396 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1397 | [$ac_default_prefix] |
bec39cab | 1398 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1399 | [PREFIX] |
bec39cab AC |
1400 | |
1401 | By default, \`make install' will install all the files in | |
1402 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1403 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1404 | for instance \`--prefix=\$HOME'. | |
1405 | ||
1406 | For better control, use the options below. | |
1407 | ||
1408 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1409 | --bindir=DIR user executables [EPREFIX/bin] |
1410 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1411 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1412 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1413 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1414 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1415 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1416 | --includedir=DIR C header files [PREFIX/include] | |
1417 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1418 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1419 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1420 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1421 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1422 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1423 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1424 | --htmldir=DIR html documentation [DOCDIR] | |
1425 | --dvidir=DIR dvi documentation [DOCDIR] | |
1426 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1427 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1428 | _ACEOF |
1429 | ||
1430 | cat <<\_ACEOF | |
1431 | ||
9009e1ae MR |
1432 | Program names: |
1433 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1434 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1435 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1436 | ||
bec39cab AC |
1437 | X features: |
1438 | --x-includes=DIR X include files are in DIR | |
1439 | --x-libraries=DIR X library files are in DIR | |
1440 | ||
1441 | System types: | |
1442 | --build=BUILD configure for building on BUILD [guessed] | |
1443 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1444 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1445 | _ACEOF | |
1446 | fi | |
1447 | ||
1448 | if test -n "$ac_init_help"; then | |
1449 | ||
1450 | cat <<\_ACEOF | |
1451 | ||
1452 | Optional Features: | |
81ecdfbb | 1453 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1454 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1455 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1456 | --enable-maintainer-mode enable make rules and dependencies not useful |
1457 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1458 | --enable-plugins Enable support for plugins (defaults no) |
1459 | --disable-largefile omit support for large files | |
a1220294 TT |
1460 | --enable-targets=TARGETS |
1461 | alternative target configurations | |
c0993dbe | 1462 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1463 | --disable-gdbcli disable command-line interface (CLI) |
1464 | --disable-gdbmi disable machine-interface (MI) | |
1465 | --enable-tui enable full-screen terminal user interface (TUI) | |
1466 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1467 | --enable-profiling enable profiling of GDB | |
3841debe | 1468 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1469 | --enable-werror treat compile warnings as errors |
32c1c914 | 1470 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1471 | --enable-gdb-build-warnings |
32c1c914 | 1472 | enable GDB specific build-time compiler warnings if |
a1220294 | 1473 | gcc is used |
32c1c914 | 1474 | --enable-sim link gdb with simulator |
bec39cab | 1475 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1476 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1477 | is auto) | |
bec39cab AC |
1478 | |
1479 | Optional Packages: | |
1480 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1481 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1482 | --with-separate-debug-dir=PATH |
32c1c914 | 1483 | look for global separate debug info in this path |
62e4f60c | 1484 | [LIBDIR/debug] |
b14b1491 TT |
1485 | --with-gdb-datadir=PATH look for global separate data files in this path |
1486 | [DATADIR/gdb] | |
29b0e8a2 | 1487 | --with-relocated-sources=PATH |
32c1c914 | 1488 | automatically relocate this path for source files |
7349ff92 | 1489 | --with-auto-load-dir=PATH |
aff139ff | 1490 | directories from which to load auto-loaded scripts |
1564a261 | 1491 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1492 | --with-auto-load-safe-path=PATH |
aff139ff | 1493 | directories safe to hold auto-loaded files |
7349ff92 | 1494 | [--with-auto-load-dir] |
bccbefd2 JK |
1495 | --without-auto-load-safe-path |
1496 | do not restrict auto-loaded files locations | |
05e7c244 | 1497 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1498 | --with-curses use the curses library instead of the termcap |
1499 | library | |
c16158bc JM |
1500 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1501 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1502 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1503 | --with-libiconv-prefix=DIR |
1504 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1505 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1506 | --with-system-readline use installed readline library |
b8e0a31c SD |
1507 | --with-jit-reader-dir=PATH |
1508 | directory to load the JIT readers from | |
5c39566f | 1509 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1510 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1511 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1512 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1513 | --with-python[=PYTHON] include python support |
1514 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1515 | --without-included-regex |
1516 | don't use included regex; this is the default on | |
1517 | systems with version 2 of the GNU C library (use | |
1518 | with caution on other system) | |
81ecdfbb | 1519 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1520 | --with-system-gdbinit=PATH |
32c1c914 | 1521 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1522 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1523 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1524 | --with-x use the X Window System |
bec39cab AC |
1525 | |
1526 | Some influential environment variables: | |
1527 | CC C compiler command | |
1528 | CFLAGS C compiler flags | |
1529 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1530 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1531 | LIBS libraries to pass to the linker, e.g. -l<library> |
1532 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1533 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1534 | CPP C preprocessor |
f06e05e0 JK |
1535 | MAKEINFO Parent configure detects if it is of sufficient version. |
1536 | MAKEINFOFLAGS | |
1537 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1538 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1539 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1540 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1541 | This script will default YFLAGS to the empty string to avoid a | |
1542 | default value of `-d' given by some make applications. | |
1543 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1544 | |
1545 | Use these variables to override the choices made by `configure' or to help | |
1546 | it to find libraries and programs with nonstandard names/locations. | |
1547 | ||
81ecdfbb | 1548 | Report bugs to the package provider. |
bec39cab | 1549 | _ACEOF |
81ecdfbb | 1550 | ac_status=$? |
bec39cab AC |
1551 | fi |
1552 | ||
1553 | if test "$ac_init_help" = "recursive"; then | |
1554 | # If there are subdirs, report their specific --help. | |
bec39cab | 1555 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1556 | test -d "$ac_dir" || |
1557 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1558 | continue | |
bec39cab AC |
1559 | ac_builddir=. |
1560 | ||
81ecdfbb RW |
1561 | case "$ac_dir" in |
1562 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1563 | *) | |
1564 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1565 | # A ".." for each directory in $ac_dir_suffix. | |
1566 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1567 | case $ac_top_builddir_sub in | |
1568 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1569 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1570 | esac ;; | |
1571 | esac | |
1572 | ac_abs_top_builddir=$ac_pwd | |
1573 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1574 | # for backward compatibility: | |
1575 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1576 | |
1577 | case $srcdir in | |
81ecdfbb | 1578 | .) # We are building in place. |
bec39cab | 1579 | ac_srcdir=. |
81ecdfbb RW |
1580 | ac_top_srcdir=$ac_top_builddir_sub |
1581 | ac_abs_top_srcdir=$ac_pwd ;; | |
1582 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1583 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1584 | ac_top_srcdir=$srcdir |
1585 | ac_abs_top_srcdir=$srcdir ;; | |
1586 | *) # Relative name. | |
1587 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1588 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1589 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1590 | esac |
81ecdfbb | 1591 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1592 | |
81ecdfbb RW |
1593 | cd "$ac_dir" || { ac_status=$?; continue; } |
1594 | # Check for guested configure. | |
1595 | if test -f "$ac_srcdir/configure.gnu"; then | |
1596 | echo && | |
1597 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1598 | elif test -f "$ac_srcdir/configure"; then | |
1599 | echo && | |
1600 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1601 | else |
81ecdfbb RW |
1602 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1603 | fi || ac_status=$? | |
1604 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1605 | done |
1606 | fi | |
1607 | ||
81ecdfbb | 1608 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1609 | if $ac_init_version; then |
1610 | cat <<\_ACEOF | |
81ecdfbb RW |
1611 | configure |
1612 | generated by GNU Autoconf 2.64 | |
bec39cab | 1613 | |
81ecdfbb | 1614 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1615 | This configure script is free software; the Free Software Foundation |
1616 | gives unlimited permission to copy, distribute and modify it. | |
1617 | _ACEOF | |
81ecdfbb | 1618 | exit |
bec39cab | 1619 | fi |
bec39cab | 1620 | |
81ecdfbb RW |
1621 | ## ------------------------ ## |
1622 | ## Autoconf initialization. ## | |
1623 | ## ------------------------ ## | |
bec39cab | 1624 | |
81ecdfbb RW |
1625 | # ac_fn_c_try_compile LINENO |
1626 | # -------------------------- | |
1627 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1628 | ac_fn_c_try_compile () | |
1629 | { | |
1630 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1631 | rm -f conftest.$ac_objext | |
1632 | if { { ac_try="$ac_compile" | |
1633 | case "(($ac_try" in | |
1634 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1635 | *) ac_try_echo=$ac_try;; | |
1636 | esac | |
1637 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1638 | $as_echo "$ac_try_echo"; } >&5 | |
1639 | (eval "$ac_compile") 2>conftest.err | |
1640 | ac_status=$? | |
1641 | if test -s conftest.err; then | |
1642 | grep -v '^ *+' conftest.err >conftest.er1 | |
1643 | cat conftest.er1 >&5 | |
1644 | mv -f conftest.er1 conftest.err | |
1645 | fi | |
1646 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1647 | test $ac_status = 0; } && { | |
1648 | test -z "$ac_c_werror_flag" || | |
1649 | test ! -s conftest.err | |
1650 | } && test -s conftest.$ac_objext; then : | |
1651 | ac_retval=0 | |
1652 | else | |
1653 | $as_echo "$as_me: failed program was:" >&5 | |
1654 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1655 | |
81ecdfbb RW |
1656 | ac_retval=1 |
1657 | fi | |
1658 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1659 | return $ac_retval | |
1660 | ||
1661 | } # ac_fn_c_try_compile | |
1662 | ||
1663 | # ac_fn_c_try_cpp LINENO | |
1664 | # ---------------------- | |
1665 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1666 | ac_fn_c_try_cpp () | |
bec39cab | 1667 | { |
81ecdfbb RW |
1668 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1669 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1670 | case "(($ac_try" in | |
1671 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1672 | *) ac_try_echo=$ac_try;; | |
1673 | esac | |
1674 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1675 | $as_echo "$ac_try_echo"; } >&5 | |
1676 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1677 | ac_status=$? | |
1678 | if test -s conftest.err; then | |
1679 | grep -v '^ *+' conftest.err >conftest.er1 | |
1680 | cat conftest.er1 >&5 | |
1681 | mv -f conftest.er1 conftest.err | |
1682 | fi | |
1683 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1684 | test $ac_status = 0; } >/dev/null && { | |
1685 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1686 | test ! -s conftest.err | |
1687 | }; then : | |
1688 | ac_retval=0 | |
1689 | else | |
1690 | $as_echo "$as_me: failed program was:" >&5 | |
1691 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1692 | |
81ecdfbb RW |
1693 | ac_retval=1 |
1694 | fi | |
1695 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1696 | return $ac_retval | |
bec39cab | 1697 | |
81ecdfbb | 1698 | } # ac_fn_c_try_cpp |
bec39cab | 1699 | |
81ecdfbb RW |
1700 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1701 | # ------------------------------------------------------- | |
1702 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1703 | # the include files in INCLUDES and setting the cache variable VAR | |
1704 | # accordingly. | |
1705 | ac_fn_c_check_header_mongrel () | |
1706 | { | |
1707 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1708 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1710 | $as_echo_n "checking for $2... " >&6; } | |
1711 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1712 | $as_echo_n "(cached) " >&6 | |
1713 | fi | |
1714 | eval ac_res=\$$3 | |
1715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1716 | $as_echo "$ac_res" >&6; } | |
1717 | else | |
1718 | # Is the header compilable? | |
1719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1720 | $as_echo_n "checking $2 usability... " >&6; } | |
1721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1722 | /* end confdefs.h. */ | |
1723 | $4 | |
1724 | #include <$2> | |
1725 | _ACEOF | |
1726 | if ac_fn_c_try_compile "$LINENO"; then : | |
1727 | ac_header_compiler=yes | |
1728 | else | |
1729 | ac_header_compiler=no | |
1730 | fi | |
1731 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1733 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1734 | |
81ecdfbb RW |
1735 | # Is the header present? |
1736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1737 | $as_echo_n "checking $2 presence... " >&6; } | |
1738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1739 | /* end confdefs.h. */ | |
1740 | #include <$2> | |
1741 | _ACEOF | |
1742 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1743 | ac_header_preproc=yes | |
1744 | else | |
1745 | ac_header_preproc=no | |
1746 | fi | |
1747 | rm -f conftest.err conftest.$ac_ext | |
1748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1749 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1750 | |
81ecdfbb RW |
1751 | # So? What about this header? |
1752 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1753 | yes:no: ) | |
1754 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1755 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1756 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1757 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1758 | ;; | |
1759 | no:yes:* ) | |
1760 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1761 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1762 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1763 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1764 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1765 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1766 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1767 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1768 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1769 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1770 | ;; | |
1771 | esac | |
1772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1773 | $as_echo_n "checking for $2... " >&6; } | |
1774 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1775 | $as_echo_n "(cached) " >&6 | |
1776 | else | |
1777 | eval "$3=\$ac_header_compiler" | |
1778 | fi | |
1779 | eval ac_res=\$$3 | |
1780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1781 | $as_echo "$ac_res" >&6; } | |
1782 | fi | |
1783 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1784 | |
81ecdfbb | 1785 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1786 | |
81ecdfbb RW |
1787 | # ac_fn_c_try_run LINENO |
1788 | # ---------------------- | |
1789 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1790 | # that executables *can* be run. | |
1791 | ac_fn_c_try_run () | |
1792 | { | |
1793 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1794 | if { { ac_try="$ac_link" | |
1795 | case "(($ac_try" in | |
1796 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1797 | *) ac_try_echo=$ac_try;; | |
1798 | esac | |
1799 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1800 | $as_echo "$ac_try_echo"; } >&5 | |
1801 | (eval "$ac_link") 2>&5 | |
1802 | ac_status=$? | |
1803 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1804 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1805 | { { case "(($ac_try" in | |
1806 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1807 | *) ac_try_echo=$ac_try;; | |
1808 | esac | |
1809 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1810 | $as_echo "$ac_try_echo"; } >&5 | |
1811 | (eval "$ac_try") 2>&5 | |
1812 | ac_status=$? | |
1813 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1814 | test $ac_status = 0; }; }; then : | |
1815 | ac_retval=0 | |
1816 | else | |
1817 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1818 | $as_echo "$as_me: failed program was:" >&5 | |
1819 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1820 | |
81ecdfbb RW |
1821 | ac_retval=$ac_status |
1822 | fi | |
1823 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1824 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1825 | return $ac_retval | |
bec39cab | 1826 | |
81ecdfbb | 1827 | } # ac_fn_c_try_run |
bec39cab | 1828 | |
81ecdfbb RW |
1829 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1830 | # ------------------------------------------------------- | |
1831 | # Tests whether HEADER exists and can be compiled using the include files in | |
1832 | # INCLUDES, setting the cache variable VAR accordingly. | |
1833 | ac_fn_c_check_header_compile () | |
1834 | { | |
1835 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1837 | $as_echo_n "checking for $2... " >&6; } | |
1838 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1839 | $as_echo_n "(cached) " >&6 | |
1840 | else | |
1841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1842 | /* end confdefs.h. */ | |
1843 | $4 | |
1844 | #include <$2> | |
bec39cab | 1845 | _ACEOF |
81ecdfbb RW |
1846 | if ac_fn_c_try_compile "$LINENO"; then : |
1847 | eval "$3=yes" | |
1848 | else | |
1849 | eval "$3=no" | |
1850 | fi | |
1851 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1852 | fi | |
1853 | eval ac_res=\$$3 | |
1854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1855 | $as_echo "$ac_res" >&6; } | |
1856 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1857 | |
81ecdfbb | 1858 | } # ac_fn_c_check_header_compile |
bec39cab | 1859 | |
81ecdfbb RW |
1860 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1861 | # -------------------------------------------- | |
1862 | # Tries to find the compile-time value of EXPR in a program that includes | |
1863 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1864 | # computed | |
1865 | ac_fn_c_compute_int () | |
1866 | { | |
1867 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1868 | if test "$cross_compiling" = yes; then | |
1869 | # Depending upon the size, compute the lo and hi bounds. | |
1870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1871 | /* end confdefs.h. */ | |
1872 | $4 | |
1873 | int | |
1874 | main () | |
1875 | { | |
1876 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1877 | test_array [0] = 0 | |
bec39cab | 1878 | |
81ecdfbb RW |
1879 | ; |
1880 | return 0; | |
1881 | } | |
1882 | _ACEOF | |
1883 | if ac_fn_c_try_compile "$LINENO"; then : | |
1884 | ac_lo=0 ac_mid=0 | |
1885 | while :; do | |
1886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1887 | /* end confdefs.h. */ | |
1888 | $4 | |
1889 | int | |
1890 | main () | |
1891 | { | |
1892 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1893 | test_array [0] = 0 | |
bec39cab | 1894 | |
81ecdfbb RW |
1895 | ; |
1896 | return 0; | |
1897 | } | |
1898 | _ACEOF | |
1899 | if ac_fn_c_try_compile "$LINENO"; then : | |
1900 | ac_hi=$ac_mid; break | |
1901 | else | |
1902 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1903 | if test $ac_lo -le $ac_mid; then | |
1904 | ac_lo= ac_hi= | |
1905 | break | |
1906 | fi | |
1907 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1908 | fi |
81ecdfbb RW |
1909 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1910 | done | |
c906108c | 1911 | else |
81ecdfbb RW |
1912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1913 | /* end confdefs.h. */ | |
1914 | $4 | |
1915 | int | |
1916 | main () | |
1917 | { | |
1918 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1919 | test_array [0] = 0 | |
bec39cab | 1920 | |
81ecdfbb RW |
1921 | ; |
1922 | return 0; | |
1923 | } | |
1924 | _ACEOF | |
1925 | if ac_fn_c_try_compile "$LINENO"; then : | |
1926 | ac_hi=-1 ac_mid=-1 | |
1927 | while :; do | |
1928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1929 | /* end confdefs.h. */ | |
1930 | $4 | |
1931 | int | |
1932 | main () | |
1933 | { | |
1934 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1935 | test_array [0] = 0 | |
bec39cab | 1936 | |
81ecdfbb RW |
1937 | ; |
1938 | return 0; | |
1939 | } | |
1940 | _ACEOF | |
1941 | if ac_fn_c_try_compile "$LINENO"; then : | |
1942 | ac_lo=$ac_mid; break | |
1943 | else | |
1944 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1945 | if test $ac_mid -le $ac_hi; then | |
1946 | ac_lo= ac_hi= | |
1947 | break | |
1948 | fi | |
1949 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1950 | fi | |
1951 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1952 | done | |
1953 | else | |
1954 | ac_lo= ac_hi= | |
1955 | fi | |
1956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1957 | fi | |
1958 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1959 | # Binary search between lo and hi bounds. | |
1960 | while test "x$ac_lo" != "x$ac_hi"; do | |
1961 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1963 | /* end confdefs.h. */ | |
1964 | $4 | |
1965 | int | |
1966 | main () | |
1967 | { | |
1968 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1969 | test_array [0] = 0 | |
bec39cab | 1970 | |
81ecdfbb RW |
1971 | ; |
1972 | return 0; | |
1973 | } | |
1974 | _ACEOF | |
1975 | if ac_fn_c_try_compile "$LINENO"; then : | |
1976 | ac_hi=$ac_mid | |
1977 | else | |
1978 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
1979 | fi | |
1980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1981 | done | |
1982 | case $ac_lo in #(( | |
1983 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
1984 | '') ac_retval=1 ;; | |
1985 | esac | |
1986 | else | |
1987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1988 | /* end confdefs.h. */ | |
1989 | $4 | |
1990 | static long int longval () { return $2; } | |
1991 | static unsigned long int ulongval () { return $2; } | |
1992 | #include <stdio.h> | |
1993 | #include <stdlib.h> | |
1994 | int | |
1995 | main () | |
1996 | { | |
bec39cab | 1997 | |
81ecdfbb RW |
1998 | FILE *f = fopen ("conftest.val", "w"); |
1999 | if (! f) | |
2000 | return 1; | |
2001 | if (($2) < 0) | |
2002 | { | |
2003 | long int i = longval (); | |
2004 | if (i != ($2)) | |
2005 | return 1; | |
2006 | fprintf (f, "%ld", i); | |
2007 | } | |
2008 | else | |
2009 | { | |
2010 | unsigned long int i = ulongval (); | |
2011 | if (i != ($2)) | |
2012 | return 1; | |
2013 | fprintf (f, "%lu", i); | |
2014 | } | |
2015 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2016 | on some platforms. */ | |
2017 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2018 | |
81ecdfbb RW |
2019 | ; |
2020 | return 0; | |
2021 | } | |
2022 | _ACEOF | |
2023 | if ac_fn_c_try_run "$LINENO"; then : | |
2024 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2025 | else | |
2026 | ac_retval=1 | |
2027 | fi | |
2028 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2029 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2030 | rm -f conftest.val | |
bec39cab | 2031 | |
81ecdfbb RW |
2032 | fi |
2033 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2034 | return $ac_retval | |
bec39cab | 2035 | |
81ecdfbb | 2036 | } # ac_fn_c_compute_int |
bec39cab | 2037 | |
c971b7fa PA |
2038 | # ac_fn_c_try_link LINENO |
2039 | # ----------------------- | |
2040 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2041 | ac_fn_c_try_link () | |
2042 | { | |
2043 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2044 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2045 | if { { ac_try="$ac_link" | |
2046 | case "(($ac_try" in | |
2047 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2048 | *) ac_try_echo=$ac_try;; | |
2049 | esac | |
2050 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2051 | $as_echo "$ac_try_echo"; } >&5 | |
2052 | (eval "$ac_link") 2>conftest.err | |
2053 | ac_status=$? | |
2054 | if test -s conftest.err; then | |
2055 | grep -v '^ *+' conftest.err >conftest.er1 | |
2056 | cat conftest.er1 >&5 | |
2057 | mv -f conftest.er1 conftest.err | |
2058 | fi | |
2059 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2060 | test $ac_status = 0; } && { | |
2061 | test -z "$ac_c_werror_flag" || | |
2062 | test ! -s conftest.err | |
2063 | } && test -s conftest$ac_exeext && { | |
2064 | test "$cross_compiling" = yes || | |
2065 | $as_test_x conftest$ac_exeext | |
2066 | }; then : | |
2067 | ac_retval=0 | |
2068 | else | |
2069 | $as_echo "$as_me: failed program was:" >&5 | |
2070 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2071 | ||
2072 | ac_retval=1 | |
2073 | fi | |
2074 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2075 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2076 | # interfere with the next link command; also delete a directory that is | |
2077 | # left behind by Apple's compiler. We do this before executing the actions. | |
2078 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2079 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2080 | return $ac_retval | |
2081 | ||
2082 | } # ac_fn_c_try_link | |
2083 | ||
55a8c076 YQ |
2084 | # ac_fn_c_check_func LINENO FUNC VAR |
2085 | # ---------------------------------- | |
2086 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2087 | ac_fn_c_check_func () | |
81ecdfbb RW |
2088 | { |
2089 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2091 | $as_echo_n "checking for $2... " >&6; } | |
2092 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2093 | $as_echo_n "(cached) " >&6 | |
2094 | else | |
81ecdfbb RW |
2095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2096 | /* end confdefs.h. */ | |
55a8c076 YQ |
2097 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2098 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2099 | #define $2 innocuous_$2 | |
2100 | ||
2101 | /* System header to define __stub macros and hopefully few prototypes, | |
2102 | which can conflict with char $2 (); below. | |
2103 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2104 | <limits.h> exists even on freestanding compilers. */ | |
2105 | ||
2106 | #ifdef __STDC__ | |
2107 | # include <limits.h> | |
2108 | #else | |
2109 | # include <assert.h> | |
2110 | #endif | |
2111 | ||
2112 | #undef $2 | |
2113 | ||
2114 | /* Override any GCC internal prototype to avoid an error. | |
2115 | Use char because int might match the return type of a GCC | |
2116 | builtin and then its argument prototype would still apply. */ | |
2117 | #ifdef __cplusplus | |
2118 | extern "C" | |
2119 | #endif | |
2120 | char $2 (); | |
2121 | /* The GNU C library defines this for functions which it implements | |
2122 | to always fail with ENOSYS. Some functions are actually named | |
2123 | something starting with __ and the normal name is an alias. */ | |
2124 | #if defined __stub_$2 || defined __stub___$2 | |
2125 | choke me | |
2126 | #endif | |
2127 | ||
2128 | int | |
2129 | main () | |
2130 | { | |
2131 | return $2 (); | |
2132 | ; | |
2133 | return 0; | |
2134 | } | |
2135 | _ACEOF | |
2136 | if ac_fn_c_try_link "$LINENO"; then : | |
2137 | eval "$3=yes" | |
2138 | else | |
2139 | eval "$3=no" | |
2140 | fi | |
2141 | rm -f core conftest.err conftest.$ac_objext \ | |
2142 | conftest$ac_exeext conftest.$ac_ext | |
2143 | fi | |
2144 | eval ac_res=\$$3 | |
2145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2146 | $as_echo "$ac_res" >&6; } | |
2147 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2148 | ||
2149 | } # ac_fn_c_check_func | |
2150 | ||
770d76d7 PA |
2151 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2152 | # ------------------------------------ | |
2153 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2154 | ac_fn_c_check_decl () | |
2155 | { | |
2156 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2157 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2158 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2160 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2161 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2162 | $as_echo_n "(cached) " >&6 | |
2163 | else | |
2164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2165 | /* end confdefs.h. */ | |
2166 | $4 | |
2167 | int | |
2168 | main () | |
2169 | { | |
2170 | #ifndef $as_decl_name | |
2171 | #ifdef __cplusplus | |
2172 | (void) $as_decl_use; | |
2173 | #else | |
2174 | (void) $as_decl_name; | |
2175 | #endif | |
2176 | #endif | |
2177 | ||
2178 | ; | |
2179 | return 0; | |
2180 | } | |
2181 | _ACEOF | |
2182 | if ac_fn_c_try_compile "$LINENO"; then : | |
2183 | eval "$3=yes" | |
2184 | else | |
2185 | eval "$3=no" | |
2186 | fi | |
2187 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2188 | fi | |
2189 | eval ac_res=\$$3 | |
2190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2191 | $as_echo "$ac_res" >&6; } | |
2192 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2193 | ||
2194 | } # ac_fn_c_check_decl | |
2195 | ||
55a8c076 YQ |
2196 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2197 | # ---------------------------------------------------- | |
2198 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2199 | # INCLUDES, setting cache variable VAR accordingly. | |
2200 | ac_fn_c_check_member () | |
2201 | { | |
2202 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2204 | $as_echo_n "checking for $2.$3... " >&6; } | |
2205 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2206 | $as_echo_n "(cached) " >&6 | |
2207 | else | |
2208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2209 | /* end confdefs.h. */ | |
2210 | $5 | |
2211 | int | |
2212 | main () | |
2213 | { | |
2214 | static $2 ac_aggr; | |
2215 | if (ac_aggr.$3) | |
2216 | return 0; | |
2217 | ; | |
2218 | return 0; | |
2219 | } | |
2220 | _ACEOF | |
2221 | if ac_fn_c_try_compile "$LINENO"; then : | |
2222 | eval "$4=yes" | |
2223 | else | |
2224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2225 | /* end confdefs.h. */ | |
2226 | $5 | |
2227 | int | |
2228 | main () | |
2229 | { | |
2230 | static $2 ac_aggr; | |
2231 | if (sizeof ac_aggr.$3) | |
2232 | return 0; | |
2233 | ; | |
2234 | return 0; | |
2235 | } | |
2236 | _ACEOF | |
2237 | if ac_fn_c_try_compile "$LINENO"; then : | |
2238 | eval "$4=yes" | |
2239 | else | |
2240 | eval "$4=no" | |
2241 | fi | |
2242 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2243 | fi | |
2244 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2245 | fi | |
2246 | eval ac_res=\$$4 | |
2247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2248 | $as_echo "$ac_res" >&6; } | |
2249 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2250 | ||
2251 | } # ac_fn_c_check_member | |
2252 | ||
2253 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2254 | # ------------------------------------------- | |
2255 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2256 | # variable VAR accordingly. | |
2257 | ac_fn_c_check_type () | |
2258 | { | |
2259 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2260 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2261 | $as_echo_n "checking for $2... " >&6; } | |
2262 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2263 | $as_echo_n "(cached) " >&6 | |
2264 | else | |
2265 | eval "$3=no" | |
2266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2267 | /* end confdefs.h. */ | |
2268 | $4 | |
2269 | int | |
2270 | main () | |
2271 | { | |
2272 | if (sizeof ($2)) | |
2273 | return 0; | |
2274 | ; | |
2275 | return 0; | |
2276 | } | |
2277 | _ACEOF | |
2278 | if ac_fn_c_try_compile "$LINENO"; then : | |
2279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2280 | /* end confdefs.h. */ | |
2281 | $4 | |
2282 | int | |
2283 | main () | |
2284 | { | |
2285 | if (sizeof (($2))) | |
2286 | return 0; | |
2287 | ; | |
2288 | return 0; | |
2289 | } | |
2290 | _ACEOF | |
2291 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2292 | |
81ecdfbb RW |
2293 | else |
2294 | eval "$3=yes" | |
2295 | fi | |
2296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2297 | fi | |
2298 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2299 | fi | |
2300 | eval ac_res=\$$3 | |
2301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2302 | $as_echo "$ac_res" >&6; } | |
2303 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2304 | |
81ecdfbb RW |
2305 | } # ac_fn_c_check_type |
2306 | cat >config.log <<_ACEOF | |
2307 | This file contains any messages produced by compilers while | |
2308 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2309 | |
81ecdfbb RW |
2310 | It was created by $as_me, which was |
2311 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2312 | |
81ecdfbb | 2313 | $ $0 $@ |
413ccac7 | 2314 | |
81ecdfbb RW |
2315 | _ACEOF |
2316 | exec 5>>config.log | |
2317 | { | |
2318 | cat <<_ASUNAME | |
2319 | ## --------- ## | |
2320 | ## Platform. ## | |
2321 | ## --------- ## | |
413ccac7 | 2322 | |
81ecdfbb RW |
2323 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2324 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2325 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2326 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2327 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2328 | |
81ecdfbb RW |
2329 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2330 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2331 | |
81ecdfbb RW |
2332 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2333 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2334 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2335 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2336 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2337 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2338 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2339 | |
81ecdfbb | 2340 | _ASUNAME |
bec39cab | 2341 | |
bec39cab AC |
2342 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2343 | for as_dir in $PATH | |
2344 | do | |
2345 | IFS=$as_save_IFS | |
2346 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2347 | $as_echo "PATH: $as_dir" |
2348 | done | |
2349 | IFS=$as_save_IFS | |
bec39cab | 2350 | |
81ecdfbb | 2351 | } >&5 |
bec39cab | 2352 | |
81ecdfbb | 2353 | cat >&5 <<_ACEOF |
bec39cab | 2354 | |
bec39cab | 2355 | |
81ecdfbb RW |
2356 | ## ----------- ## |
2357 | ## Core tests. ## | |
2358 | ## ----------- ## | |
2359 | ||
2360 | _ACEOF | |
2361 | ||
2362 | ||
2363 | # Keep a trace of the command line. | |
2364 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2365 | # Strip out --silent because we don't want to record it for future runs. | |
2366 | # Also quote any args containing shell meta-characters. | |
2367 | # Make two passes to allow for proper duplicate-argument suppression. | |
2368 | ac_configure_args= | |
2369 | ac_configure_args0= | |
2370 | ac_configure_args1= | |
2371 | ac_must_keep_next=false | |
2372 | for ac_pass in 1 2 | |
2373 | do | |
2374 | for ac_arg | |
2375 | do | |
2376 | case $ac_arg in | |
2377 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2378 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2379 | | -silent | --silent | --silen | --sile | --sil) | |
2380 | continue ;; | |
2381 | *\'*) | |
2382 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2383 | esac | |
2384 | case $ac_pass in | |
2385 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2386 | 2) | |
2387 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2388 | if test $ac_must_keep_next = true; then | |
2389 | ac_must_keep_next=false # Got value, back to normal. | |
2390 | else | |
2391 | case $ac_arg in | |
2392 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2393 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2394 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2395 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2396 | case "$ac_configure_args0 " in | |
2397 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2398 | esac | |
2399 | ;; | |
2400 | -* ) ac_must_keep_next=true ;; | |
2401 | esac | |
2402 | fi | |
2403 | as_fn_append ac_configure_args " '$ac_arg'" | |
2404 | ;; | |
2405 | esac | |
2406 | done | |
2407 | done | |
2408 | { ac_configure_args0=; unset ac_configure_args0;} | |
2409 | { ac_configure_args1=; unset ac_configure_args1;} | |
2410 | ||
2411 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2412 | # config.log. We remove comments because anyway the quotes in there | |
2413 | # would cause problems or look ugly. | |
2414 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2415 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2416 | trap 'exit_status=$? | |
2417 | # Save into config.log some information that might help in debugging. | |
2418 | { | |
2419 | echo | |
2420 | ||
2421 | cat <<\_ASBOX | |
2422 | ## ---------------- ## | |
2423 | ## Cache variables. ## | |
2424 | ## ---------------- ## | |
2425 | _ASBOX | |
2426 | echo | |
2427 | # The following way of writing the cache mishandles newlines in values, | |
2428 | ( | |
2429 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2430 | eval ac_val=\$$ac_var | |
2431 | case $ac_val in #( | |
2432 | *${as_nl}*) | |
2433 | case $ac_var in #( | |
2434 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2435 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2436 | esac | |
2437 | case $ac_var in #( | |
2438 | _ | IFS | as_nl) ;; #( | |
2439 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2440 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2441 | esac ;; | |
2442 | esac | |
2443 | done | |
2444 | (set) 2>&1 | | |
2445 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2446 | *${as_nl}ac_space=\ *) | |
2447 | sed -n \ | |
2448 | "s/'\''/'\''\\\\'\'''\''/g; | |
2449 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2450 | ;; #( | |
2451 | *) | |
2452 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2453 | ;; | |
2454 | esac | | |
2455 | sort | |
2456 | ) | |
2457 | echo | |
2458 | ||
2459 | cat <<\_ASBOX | |
2460 | ## ----------------- ## | |
2461 | ## Output variables. ## | |
2462 | ## ----------------- ## | |
2463 | _ASBOX | |
2464 | echo | |
2465 | for ac_var in $ac_subst_vars | |
2466 | do | |
2467 | eval ac_val=\$$ac_var | |
2468 | case $ac_val in | |
2469 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2470 | esac | |
2471 | $as_echo "$ac_var='\''$ac_val'\''" | |
2472 | done | sort | |
2473 | echo | |
2474 | ||
2475 | if test -n "$ac_subst_files"; then | |
2476 | cat <<\_ASBOX | |
2477 | ## ------------------- ## | |
2478 | ## File substitutions. ## | |
2479 | ## ------------------- ## | |
2480 | _ASBOX | |
2481 | echo | |
2482 | for ac_var in $ac_subst_files | |
2483 | do | |
2484 | eval ac_val=\$$ac_var | |
2485 | case $ac_val in | |
2486 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2487 | esac | |
2488 | $as_echo "$ac_var='\''$ac_val'\''" | |
2489 | done | sort | |
2490 | echo | |
2491 | fi | |
2492 | ||
2493 | if test -s confdefs.h; then | |
2494 | cat <<\_ASBOX | |
2495 | ## ----------- ## | |
2496 | ## confdefs.h. ## | |
2497 | ## ----------- ## | |
2498 | _ASBOX | |
2499 | echo | |
2500 | cat confdefs.h | |
2501 | echo | |
2502 | fi | |
2503 | test "$ac_signal" != 0 && | |
2504 | $as_echo "$as_me: caught signal $ac_signal" | |
2505 | $as_echo "$as_me: exit $exit_status" | |
2506 | } >&5 | |
2507 | rm -f core *.core core.conftest.* && | |
2508 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2509 | exit $exit_status | |
2510 | ' 0 | |
2511 | for ac_signal in 1 2 13 15; do | |
2512 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2513 | done | |
2514 | ac_signal=0 | |
2515 | ||
2516 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2517 | rm -f -r conftest* confdefs.h | |
2518 | ||
2519 | $as_echo "/* confdefs.h */" > confdefs.h | |
2520 | ||
2521 | # Predefined preprocessor variables. | |
2522 | ||
2523 | cat >>confdefs.h <<_ACEOF | |
2524 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2525 | _ACEOF | |
2526 | ||
2527 | cat >>confdefs.h <<_ACEOF | |
2528 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2529 | _ACEOF | |
2530 | ||
2531 | cat >>confdefs.h <<_ACEOF | |
2532 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2533 | _ACEOF | |
2534 | ||
2535 | cat >>confdefs.h <<_ACEOF | |
2536 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2537 | _ACEOF | |
2538 | ||
2539 | cat >>confdefs.h <<_ACEOF | |
2540 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2541 | _ACEOF | |
2542 | ||
2543 | cat >>confdefs.h <<_ACEOF | |
2544 | #define PACKAGE_URL "$PACKAGE_URL" | |
2545 | _ACEOF | |
2546 | ||
2547 | ||
2548 | # Let the site file select an alternate cache file if it wants to. | |
2549 | # Prefer an explicitly selected file to automatically selected ones. | |
2550 | ac_site_file1=NONE | |
2551 | ac_site_file2=NONE | |
2552 | if test -n "$CONFIG_SITE"; then | |
2553 | ac_site_file1=$CONFIG_SITE | |
2554 | elif test "x$prefix" != xNONE; then | |
2555 | ac_site_file1=$prefix/share/config.site | |
2556 | ac_site_file2=$prefix/etc/config.site | |
2557 | else | |
2558 | ac_site_file1=$ac_default_prefix/share/config.site | |
2559 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2560 | fi | |
2561 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2562 | do | |
2563 | test "x$ac_site_file" = xNONE && continue | |
2564 | if test -r "$ac_site_file"; then | |
2565 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2566 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2567 | sed 's/^/| /' "$ac_site_file" >&5 | |
2568 | . "$ac_site_file" | |
2569 | fi | |
2570 | done | |
2571 | ||
2572 | if test -r "$cache_file"; then | |
2573 | # Some versions of bash will fail to source /dev/null (special | |
2574 | # files actually), so we avoid doing that. | |
2575 | if test -f "$cache_file"; then | |
2576 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2577 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2578 | case $cache_file in | |
2579 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2580 | *) . "./$cache_file";; | |
2581 | esac | |
2582 | fi | |
2583 | else | |
2584 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2585 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2586 | >$cache_file | |
bec39cab AC |
2587 | fi |
2588 | ||
81ecdfbb RW |
2589 | # Check that the precious variables saved in the cache have kept the same |
2590 | # value. | |
2591 | ac_cache_corrupted=false | |
2592 | for ac_var in $ac_precious_vars; do | |
2593 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2594 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2595 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2596 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2597 | case $ac_old_set,$ac_new_set in | |
2598 | set,) | |
2599 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2600 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2601 | ac_cache_corrupted=: ;; | |
2602 | ,set) | |
2603 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2604 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2605 | ac_cache_corrupted=: ;; | |
2606 | ,);; | |
2607 | *) | |
2608 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2609 | # differences in whitespace do not lead to failure. | |
2610 | ac_old_val_w=`echo x $ac_old_val` | |
2611 | ac_new_val_w=`echo x $ac_new_val` | |
2612 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2613 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2614 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2615 | ac_cache_corrupted=: | |
2616 | else | |
2617 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2618 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2619 | eval $ac_var=\$ac_old_val | |
2620 | fi | |
2621 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2622 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2623 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2624 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2625 | fi;; | |
2626 | esac | |
2627 | # Pass precious variables to config.status. | |
2628 | if test "$ac_new_set" = set; then | |
2629 | case $ac_new_val in | |
2630 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2631 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2632 | esac | |
2633 | case " $ac_configure_args " in | |
2634 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2635 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2636 | esac | |
2637 | fi | |
2638 | done | |
2639 | if $ac_cache_corrupted; then | |
2640 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2641 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2643 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2644 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2645 | fi | |
2646 | ## -------------------- ## | |
2647 | ## Main body of script. ## | |
2648 | ## -------------------- ## | |
2649 | ||
2650 | ac_ext=c | |
2651 | ac_cpp='$CPP $CPPFLAGS' | |
2652 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2653 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2654 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2655 | ||
2656 | ||
2657 | ||
2658 | ||
2659 | ||
2660 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2661 | ||
2662 | ||
2663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2664 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2665 | # Check whether --enable-maintainer-mode was given. | |
2666 | if test "${enable_maintainer_mode+set}" = set; then : | |
2667 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2668 | else | |
2669 | USE_MAINTAINER_MODE=no | |
2670 | fi | |
2671 | ||
2672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2673 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2674 | if test $USE_MAINTAINER_MODE = yes; then | |
2675 | MAINTAINER_MODE_TRUE= | |
2676 | MAINTAINER_MODE_FALSE='#' | |
2677 | else | |
2678 | MAINTAINER_MODE_TRUE='#' | |
2679 | MAINTAINER_MODE_FALSE= | |
2680 | fi | |
2681 | ||
2682 | MAINT=$MAINTAINER_MODE_TRUE | |
2683 | ||
2684 | ||
2685 | ||
2686 | ac_ext=c | |
2687 | ac_cpp='$CPP $CPPFLAGS' | |
2688 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2689 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2690 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2691 | if test -n "$ac_tool_prefix"; then | |
2692 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2693 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2695 | $as_echo_n "checking for $ac_word... " >&6; } | |
2696 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2697 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2698 | else |
2699 | if test -n "$CC"; then | |
2700 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2701 | else | |
bec39cab AC |
2702 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2703 | for as_dir in $PATH | |
2704 | do | |
2705 | IFS=$as_save_IFS | |
2706 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2707 | for ac_exec_ext in '' $ac_executable_extensions; do |
2708 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2709 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2710 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2711 | break 2 |
2712 | fi | |
2713 | done | |
81ecdfbb RW |
2714 | done |
2715 | IFS=$as_save_IFS | |
bec39cab | 2716 | |
c906108c SS |
2717 | fi |
2718 | fi | |
bec39cab | 2719 | CC=$ac_cv_prog_CC |
c906108c | 2720 | if test -n "$CC"; then |
81ecdfbb RW |
2721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2722 | $as_echo "$CC" >&6; } | |
c906108c | 2723 | else |
81ecdfbb RW |
2724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2725 | $as_echo "no" >&6; } | |
c906108c SS |
2726 | fi |
2727 | ||
81ecdfbb | 2728 | |
b4e70030 JB |
2729 | fi |
2730 | if test -z "$ac_cv_prog_CC"; then | |
2731 | ac_ct_CC=$CC | |
81ecdfbb RW |
2732 | # Extract the first word of "gcc", so it can be a program name with args. |
2733 | set dummy gcc; ac_word=$2 | |
2734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2735 | $as_echo_n "checking for $ac_word... " >&6; } | |
2736 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2737 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2738 | else |
2739 | if test -n "$ac_ct_CC"; then | |
2740 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2741 | else | |
2742 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2743 | for as_dir in $PATH | |
2744 | do | |
2745 | IFS=$as_save_IFS | |
2746 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2747 | for ac_exec_ext in '' $ac_executable_extensions; do |
2748 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2749 | ac_cv_prog_ac_ct_CC="gcc" | |
2750 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2751 | break 2 |
4e8d927d | 2752 | fi |
b4e70030 | 2753 | done |
81ecdfbb RW |
2754 | done |
2755 | IFS=$as_save_IFS | |
b4e70030 JB |
2756 | |
2757 | fi | |
2758 | fi | |
2759 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2760 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2762 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2763 | else |
81ecdfbb RW |
2764 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2765 | $as_echo "no" >&6; } | |
b4e70030 JB |
2766 | fi |
2767 | ||
81ecdfbb RW |
2768 | if test "x$ac_ct_CC" = x; then |
2769 | CC="" | |
2770 | else | |
2771 | case $cross_compiling:$ac_tool_warned in | |
2772 | yes:) | |
2773 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2774 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2775 | ac_tool_warned=yes ;; | |
2776 | esac | |
2777 | CC=$ac_ct_CC | |
2778 | fi | |
b4e70030 JB |
2779 | else |
2780 | CC="$ac_cv_prog_CC" | |
2781 | fi | |
2782 | ||
c906108c | 2783 | if test -z "$CC"; then |
81ecdfbb RW |
2784 | if test -n "$ac_tool_prefix"; then |
2785 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2786 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2788 | $as_echo_n "checking for $ac_word... " >&6; } | |
2789 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2790 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2791 | else |
2792 | if test -n "$CC"; then | |
2793 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2794 | else | |
bec39cab AC |
2795 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2796 | for as_dir in $PATH | |
2797 | do | |
2798 | IFS=$as_save_IFS | |
2799 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2800 | for ac_exec_ext in '' $ac_executable_extensions; do |
2801 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2802 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2803 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2804 | break 2 |
2805 | fi | |
2806 | done | |
81ecdfbb RW |
2807 | done |
2808 | IFS=$as_save_IFS | |
2809 | ||
2810 | fi | |
2811 | fi | |
2812 | CC=$ac_cv_prog_CC | |
2813 | if test -n "$CC"; then | |
2814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2815 | $as_echo "$CC" >&6; } | |
2816 | else | |
2817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2818 | $as_echo "no" >&6; } | |
2819 | fi | |
2820 | ||
2821 | ||
2822 | fi | |
2823 | fi | |
2824 | if test -z "$CC"; then | |
2825 | # Extract the first word of "cc", so it can be a program name with args. | |
2826 | set dummy cc; ac_word=$2 | |
2827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2828 | $as_echo_n "checking for $ac_word... " >&6; } | |
2829 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2830 | $as_echo_n "(cached) " >&6 | |
2831 | else | |
2832 | if test -n "$CC"; then | |
2833 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2834 | else | |
2835 | ac_prog_rejected=no | |
2836 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2837 | for as_dir in $PATH | |
2838 | do | |
2839 | IFS=$as_save_IFS | |
2840 | test -z "$as_dir" && as_dir=. | |
2841 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2842 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2843 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2844 | ac_prog_rejected=yes | |
2845 | continue | |
2846 | fi | |
2847 | ac_cv_prog_CC="cc" | |
2848 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2849 | break 2 | |
2850 | fi | |
2851 | done | |
2852 | done | |
2853 | IFS=$as_save_IFS | |
bec39cab | 2854 | |
c906108c SS |
2855 | if test $ac_prog_rejected = yes; then |
2856 | # We found a bogon in the path, so make sure we never use it. | |
2857 | set dummy $ac_cv_prog_CC | |
2858 | shift | |
bec39cab | 2859 | if test $# != 0; then |
c906108c SS |
2860 | # We chose a different compiler from the bogus one. |
2861 | # However, it has the same basename, so the bogon will be chosen | |
2862 | # first if we set CC to just the basename; use the full file name. | |
2863 | shift | |
bec39cab | 2864 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2865 | fi |
2866 | fi | |
2867 | fi | |
2868 | fi | |
bec39cab | 2869 | CC=$ac_cv_prog_CC |
c906108c | 2870 | if test -n "$CC"; then |
81ecdfbb RW |
2871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2872 | $as_echo "$CC" >&6; } | |
c906108c | 2873 | else |
81ecdfbb RW |
2874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2875 | $as_echo "no" >&6; } | |
c906108c SS |
2876 | fi |
2877 | ||
81ecdfbb | 2878 | |
bec39cab AC |
2879 | fi |
2880 | if test -z "$CC"; then | |
2881 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2882 | for ac_prog in cl.exe |
bec39cab AC |
2883 | do |
2884 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2885 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2887 | $as_echo_n "checking for $ac_word... " >&6; } | |
2888 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2889 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2890 | else |
2891 | if test -n "$CC"; then | |
2892 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2893 | else | |
bec39cab AC |
2894 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2895 | for as_dir in $PATH | |
2896 | do | |
2897 | IFS=$as_save_IFS | |
2898 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2899 | for ac_exec_ext in '' $ac_executable_extensions; do |
2900 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2901 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2902 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2903 | break 2 |
2904 | fi | |
2905 | done | |
81ecdfbb RW |
2906 | done |
2907 | IFS=$as_save_IFS | |
bec39cab | 2908 | |
c906108c SS |
2909 | fi |
2910 | fi | |
bec39cab | 2911 | CC=$ac_cv_prog_CC |
c906108c | 2912 | if test -n "$CC"; then |
81ecdfbb RW |
2913 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2914 | $as_echo "$CC" >&6; } | |
c906108c | 2915 | else |
81ecdfbb RW |
2916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2917 | $as_echo "no" >&6; } | |
c906108c | 2918 | fi |
bec39cab | 2919 | |
81ecdfbb | 2920 | |
bec39cab AC |
2921 | test -n "$CC" && break |
2922 | done | |
2923 | fi | |
2924 | if test -z "$CC"; then | |
2925 | ac_ct_CC=$CC | |
81ecdfbb | 2926 | for ac_prog in cl.exe |
bec39cab AC |
2927 | do |
2928 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2929 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2931 | $as_echo_n "checking for $ac_word... " >&6; } | |
2932 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2933 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2934 | else |
2935 | if test -n "$ac_ct_CC"; then | |
2936 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2937 | else | |
2938 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2939 | for as_dir in $PATH | |
2940 | do | |
2941 | IFS=$as_save_IFS | |
2942 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2943 | for ac_exec_ext in '' $ac_executable_extensions; do |
2944 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2945 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2946 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2947 | break 2 |
c906108c | 2948 | fi |
bec39cab | 2949 | done |
81ecdfbb RW |
2950 | done |
2951 | IFS=$as_save_IFS | |
bec39cab AC |
2952 | |
2953 | fi | |
2954 | fi | |
2955 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2956 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2958 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2959 | else |
81ecdfbb RW |
2960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2961 | $as_echo "no" >&6; } | |
c906108c SS |
2962 | fi |
2963 | ||
81ecdfbb | 2964 | |
bec39cab AC |
2965 | test -n "$ac_ct_CC" && break |
2966 | done | |
c906108c | 2967 | |
81ecdfbb RW |
2968 | if test "x$ac_ct_CC" = x; then |
2969 | CC="" | |
2970 | else | |
2971 | case $cross_compiling:$ac_tool_warned in | |
2972 | yes:) | |
2973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2974 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2975 | ac_tool_warned=yes ;; | |
2976 | esac | |
2977 | CC=$ac_ct_CC | |
2978 | fi | |
bec39cab AC |
2979 | fi |
2980 | ||
2981 | fi | |
2982 | ||
2983 | ||
81ecdfbb RW |
2984 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
2985 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2986 | as_fn_error "no acceptable C compiler found in \$PATH | |
2987 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
2988 | |
2989 | # Provide some information about the compiler. | |
81ecdfbb RW |
2990 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
2991 | set X $ac_compile | |
2992 | ac_compiler=$2 | |
2993 | for ac_option in --version -v -V -qversion; do | |
2994 | { { ac_try="$ac_compiler $ac_option >&5" | |
2995 | case "(($ac_try" in | |
2996 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2997 | *) ac_try_echo=$ac_try;; | |
2998 | esac | |
2999 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3000 | $as_echo "$ac_try_echo"; } >&5 | |
3001 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3002 | ac_status=$? |
81ecdfbb RW |
3003 | if test -s conftest.err; then |
3004 | sed '10a\ | |
3005 | ... rest of stderr output deleted ... | |
3006 | 10q' conftest.err >conftest.er1 | |
3007 | cat conftest.er1 >&5 | |
3008 | rm -f conftest.er1 conftest.err | |
3009 | fi | |
3010 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3011 | test $ac_status = 0; } | |
3012 | done | |
bec39cab | 3013 | |
81ecdfbb | 3014 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3015 | /* end confdefs.h. */ |
3016 | ||
3017 | int | |
3018 | main () | |
3019 | { | |
3020 | ||
3021 | ; | |
3022 | return 0; | |
3023 | } | |
3024 | _ACEOF | |
3025 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3026 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3027 | # Try to create an executable without -o first, disregard a.out. |
3028 | # It will help us diagnose broken compilers, and finding out an intuition | |
3029 | # of exeext. | |
81ecdfbb RW |
3030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3031 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3032 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3033 | ||
3034 | # The possible output files: | |
3035 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3036 | ||
3037 | ac_rmfiles= | |
3038 | for ac_file in $ac_files | |
3039 | do | |
3040 | case $ac_file in | |
3041 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3042 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3043 | esac | |
3044 | done | |
3045 | rm -f $ac_rmfiles | |
3046 | ||
3047 | if { { ac_try="$ac_link_default" | |
3048 | case "(($ac_try" in | |
3049 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3050 | *) ac_try_echo=$ac_try;; | |
3051 | esac | |
3052 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3053 | $as_echo "$ac_try_echo"; } >&5 | |
3054 | (eval "$ac_link_default") 2>&5 | |
3055 | ac_status=$? | |
3056 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3057 | test $ac_status = 0; }; then : | |
3058 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3059 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3060 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3061 | # so that the user can short-circuit this test for compilers unknown to | |
3062 | # Autoconf. | |
3063 | for ac_file in $ac_files '' | |
bec39cab AC |
3064 | do |
3065 | test -f "$ac_file" || continue | |
3066 | case $ac_file in | |
81ecdfbb | 3067 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3068 | ;; |
3069 | [ab].out ) | |
3070 | # We found the default executable, but exeext='' is most | |
3071 | # certainly right. | |
3072 | break;; | |
3073 | *.* ) | |
81ecdfbb RW |
3074 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3075 | then :; else | |
3076 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3077 | fi | |
3078 | # We set ac_cv_exeext here because the later test for it is not | |
3079 | # safe: cross compilers may not add the suffix if given an `-o' | |
3080 | # argument, so we may need to know it at that point already. | |
3081 | # Even if this section looks crufty: it has the advantage of | |
3082 | # actually working. | |
b4e70030 JB |
3083 | break;; |
3084 | * ) | |
3085 | break;; | |
bec39cab AC |
3086 | esac |
3087 | done | |
81ecdfbb RW |
3088 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3089 | ||
bec39cab | 3090 | else |
81ecdfbb RW |
3091 | ac_file='' |
3092 | fi | |
3093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3094 | $as_echo "$ac_file" >&6; } | |
3095 | if test -z "$ac_file"; then : | |
3096 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3097 | sed 's/^/| /' conftest.$ac_ext >&5 |
3098 | ||
81ecdfbb RW |
3099 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3100 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3101 | { as_fn_set_status 77 | |
3102 | as_fn_error "C compiler cannot create executables | |
3103 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3104 | fi |
b4e70030 | 3105 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3106 | |
81ecdfbb | 3107 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3108 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3110 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3111 | # If not cross compiling, check that we can run a simple program. |
3112 | if test "$cross_compiling" != yes; then | |
3113 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3114 | { { case "(($ac_try" in |
3115 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3116 | *) ac_try_echo=$ac_try;; | |
3117 | esac | |
3118 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3119 | $as_echo "$ac_try_echo"; } >&5 | |
3120 | (eval "$ac_try") 2>&5 | |
bec39cab | 3121 | ac_status=$? |
81ecdfbb RW |
3122 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3123 | test $ac_status = 0; }; }; then | |
bec39cab | 3124 | cross_compiling=no |
c906108c | 3125 | else |
bec39cab AC |
3126 | if test "$cross_compiling" = maybe; then |
3127 | cross_compiling=yes | |
3128 | else | |
81ecdfbb RW |
3129 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3130 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3131 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3132 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3133 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3134 | fi |
c906108c | 3135 | fi |
bec39cab | 3136 | fi |
81ecdfbb RW |
3137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3138 | $as_echo "yes" >&6; } | |
bec39cab | 3139 | |
81ecdfbb | 3140 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3141 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3142 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3143 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3145 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3147 | $as_echo "$cross_compiling" >&6; } | |
3148 | ||
3149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3150 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3151 | if { { ac_try="$ac_link" | |
3152 | case "(($ac_try" in | |
3153 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3154 | *) ac_try_echo=$ac_try;; | |
3155 | esac | |
3156 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3157 | $as_echo "$ac_try_echo"; } >&5 | |
3158 | (eval "$ac_link") 2>&5 | |
bec39cab | 3159 | ac_status=$? |
81ecdfbb RW |
3160 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3161 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3162 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3163 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3164 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3165 | # `rm'. | |
3166 | for ac_file in conftest.exe conftest conftest.*; do | |
3167 | test -f "$ac_file" || continue | |
3168 | case $ac_file in | |
81ecdfbb | 3169 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3170 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3171 | break;; |
3172 | * ) break;; | |
3173 | esac | |
3174 | done | |
c906108c | 3175 | else |
81ecdfbb RW |
3176 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3177 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3178 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3179 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3180 | fi |
b4e70030 | 3181 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3182 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3183 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3184 | |
b4e70030 | 3185 | rm -f conftest.$ac_ext |
bec39cab AC |
3186 | EXEEXT=$ac_cv_exeext |
3187 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3188 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3189 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3190 | if test "${ac_cv_objext+set}" = set; then : | |
3191 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3192 | else |
81ecdfbb | 3193 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3194 | /* end confdefs.h. */ |
3195 | ||
3196 | int | |
3197 | main () | |
3198 | { | |
3199 | ||
3200 | ; | |
3201 | return 0; | |
3202 | } | |
3203 | _ACEOF | |
3204 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3205 | if { { ac_try="$ac_compile" |
3206 | case "(($ac_try" in | |
3207 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3208 | *) ac_try_echo=$ac_try;; | |
3209 | esac | |
3210 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3211 | $as_echo "$ac_try_echo"; } >&5 | |
3212 | (eval "$ac_compile") 2>&5 | |
3213 | ac_status=$? | |
3214 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3215 | test $ac_status = 0; }; then : | |
3216 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3217 | test -f "$ac_file" || continue; | |
bec39cab | 3218 | case $ac_file in |
81ecdfbb | 3219 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3220 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3221 | break;; | |
3222 | esac | |
3223 | done | |
c906108c | 3224 | else |
81ecdfbb | 3225 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3226 | sed 's/^/| /' conftest.$ac_ext >&5 |
3227 | ||
81ecdfbb RW |
3228 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3229 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3230 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3231 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3232 | fi |
b4e70030 | 3233 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3234 | fi |
81ecdfbb RW |
3235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3236 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3237 | OBJEXT=$ac_cv_objext |
3238 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3240 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3241 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3242 | $as_echo_n "(cached) " >&6 | |
c906108c | 3243 | else |
81ecdfbb | 3244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3245 | /* end confdefs.h. */ |
3246 | ||
3247 | int | |
3248 | main () | |
3249 | { | |
3250 | #ifndef __GNUC__ | |
3251 | choke me | |
3252 | #endif | |
3253 | ||
3254 | ; | |
3255 | return 0; | |
3256 | } | |
3257 | _ACEOF | |
81ecdfbb | 3258 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3259 | ac_compiler_gnu=yes |
3260 | else | |
81ecdfbb | 3261 | ac_compiler_gnu=no |
bec39cab | 3262 | fi |
81ecdfbb | 3263 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3264 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3265 | ||
3266 | fi | |
81ecdfbb RW |
3267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3268 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3269 | if test $ac_compiler_gnu = yes; then | |
3270 | GCC=yes | |
3271 | else | |
3272 | GCC= | |
3273 | fi | |
bec39cab AC |
3274 | ac_test_CFLAGS=${CFLAGS+set} |
3275 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3277 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3278 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3279 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3280 | else |
81ecdfbb RW |
3281 | ac_save_c_werror_flag=$ac_c_werror_flag |
3282 | ac_c_werror_flag=yes | |
3283 | ac_cv_prog_cc_g=no | |
3284 | CFLAGS="-g" | |
3285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3286 | /* end confdefs.h. */ |
3287 | ||
3288 | int | |
3289 | main () | |
3290 | { | |
3291 | ||
3292 | ; | |
3293 | return 0; | |
3294 | } | |
3295 | _ACEOF | |
81ecdfbb | 3296 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3297 | ac_cv_prog_cc_g=yes |
3298 | else | |
81ecdfbb RW |
3299 | CFLAGS="" |
3300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3301 | /* end confdefs.h. */ | |
3302 | ||
3303 | int | |
3304 | main () | |
3305 | { | |
3306 | ||
3307 | ; | |
3308 | return 0; | |
3309 | } | |
3310 | _ACEOF | |
3311 | if ac_fn_c_try_compile "$LINENO"; then : | |
3312 | ||
3313 | else | |
3314 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3315 | CFLAGS="-g" | |
3316 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3317 | /* end confdefs.h. */ | |
3318 | ||
3319 | int | |
3320 | main () | |
3321 | { | |
c906108c | 3322 | |
81ecdfbb RW |
3323 | ; |
3324 | return 0; | |
3325 | } | |
3326 | _ACEOF | |
3327 | if ac_fn_c_try_compile "$LINENO"; then : | |
3328 | ac_cv_prog_cc_g=yes | |
3329 | fi | |
3330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3331 | fi | |
3332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3333 | fi |
81ecdfbb RW |
3334 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3335 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3336 | fi |
81ecdfbb RW |
3337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3338 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3339 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3340 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3341 | elif test $ac_cv_prog_cc_g = yes; then |
3342 | if test "$GCC" = yes; then | |
3343 | CFLAGS="-g -O2" | |
3344 | else | |
3345 | CFLAGS="-g" | |
3346 | fi | |
3347 | else | |
3348 | if test "$GCC" = yes; then | |
3349 | CFLAGS="-O2" | |
3350 | else | |
3351 | CFLAGS= | |
3352 | fi | |
3353 | fi | |
81ecdfbb RW |
3354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3355 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3356 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3357 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3358 | else |
81ecdfbb | 3359 | ac_cv_prog_cc_c89=no |
bec39cab | 3360 | ac_save_CC=$CC |
81ecdfbb | 3361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3362 | /* end confdefs.h. */ |
c906108c SS |
3363 | #include <stdarg.h> |
3364 | #include <stdio.h> | |
3365 | #include <sys/types.h> | |
3366 | #include <sys/stat.h> | |
3367 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3368 | struct buf { int x; }; | |
3369 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3370 | static char *e (p, i) | |
3371 | char **p; | |
3372 | int i; | |
3373 | { | |
3374 | return p[i]; | |
3375 | } | |
3376 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3377 | { | |
3378 | char *s; | |
3379 | va_list v; | |
3380 | va_start (v,p); | |
3381 | s = g (p, va_arg (v,int)); | |
3382 | va_end (v); | |
3383 | return s; | |
3384 | } | |
bec39cab AC |
3385 | |
3386 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3387 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3388 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3389 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3390 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3391 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3392 | that's true only with -std. */ |
bec39cab AC |
3393 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3394 | ||
81ecdfbb RW |
3395 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3396 | inside strings and character constants. */ | |
3397 | #define FOO(x) 'x' | |
3398 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3399 | ||
c906108c SS |
3400 | int test (int i, double x); |
3401 | struct s1 {int (*f) (int a);}; | |
3402 | struct s2 {int (*f) (double a);}; | |
3403 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3404 | int argc; | |
3405 | char **argv; | |
bec39cab AC |
3406 | int |
3407 | main () | |
3408 | { | |
c906108c | 3409 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3410 | ; |
3411 | return 0; | |
3412 | } | |
3413 | _ACEOF | |
81ecdfbb RW |
3414 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3415 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3416 | do |
3417 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3418 | if ac_fn_c_try_compile "$LINENO"; then : |
3419 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3420 | fi |
81ecdfbb RW |
3421 | rm -f core conftest.err conftest.$ac_objext |
3422 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3423 | done |
81ecdfbb | 3424 | rm -f conftest.$ac_ext |
bec39cab | 3425 | CC=$ac_save_CC |
c906108c SS |
3426 | |
3427 | fi | |
81ecdfbb RW |
3428 | # AC_CACHE_VAL |
3429 | case "x$ac_cv_prog_cc_c89" in | |
3430 | x) | |
3431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3432 | $as_echo "none needed" >&6; } ;; | |
3433 | xno) | |
3434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3435 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3436 | *) |
81ecdfbb RW |
3437 | CC="$CC $ac_cv_prog_cc_c89" |
3438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3439 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3440 | esac |
81ecdfbb | 3441 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3442 | |
b4e70030 JB |
3443 | fi |
3444 | ||
bec39cab AC |
3445 | ac_ext=c |
3446 | ac_cpp='$CPP $CPPFLAGS' | |
3447 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3448 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3449 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3450 | |
60ca704f | 3451 | |
bec39cab AC |
3452 | ac_ext=c |
3453 | ac_cpp='$CPP $CPPFLAGS' | |
3454 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3455 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3456 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3458 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3459 | # On Suns, sometimes $CPP names a directory. |
3460 | if test -n "$CPP" && test -d "$CPP"; then | |
3461 | CPP= | |
8bb2c122 | 3462 | fi |
bec39cab | 3463 | if test -z "$CPP"; then |
81ecdfbb RW |
3464 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3465 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3466 | else |
3467 | # Double quotes because CPP needs to be expanded | |
3468 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3469 | do | |
3470 | ac_preproc_ok=false | |
3471 | for ac_c_preproc_warn_flag in '' yes | |
3472 | do | |
3473 | # Use a header file that comes with gcc, so configuring glibc | |
3474 | # with a fresh cross-compiler works. | |
3475 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3476 | # <limits.h> exists even on freestanding compilers. | |
3477 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3478 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3479 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3480 | /* end confdefs.h. */ |
3481 | #ifdef __STDC__ | |
3482 | # include <limits.h> | |
3483 | #else | |
3484 | # include <assert.h> | |
3485 | #endif | |
3486 | Syntax error | |
3487 | _ACEOF | |
81ecdfbb | 3488 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3489 | |
81ecdfbb | 3490 | else |
bec39cab AC |
3491 | # Broken: fails on valid input. |
3492 | continue | |
3493 | fi | |
3494 | rm -f conftest.err conftest.$ac_ext | |
3495 | ||
81ecdfbb | 3496 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3497 | # can be detected and how. |
81ecdfbb | 3498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3499 | /* end confdefs.h. */ |
3500 | #include <ac_nonexistent.h> | |
3501 | _ACEOF | |
81ecdfbb | 3502 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3503 | # Broken: success on invalid input. |
3504 | continue | |
8bb2c122 | 3505 | else |
bec39cab AC |
3506 | # Passes both tests. |
3507 | ac_preproc_ok=: | |
3508 | break | |
8bb2c122 | 3509 | fi |
bec39cab | 3510 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3511 | |
bec39cab AC |
3512 | done |
3513 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3514 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3515 | if $ac_preproc_ok; then : |
bec39cab AC |
3516 | break |
3517 | fi | |
8bb2c122 | 3518 | |
bec39cab AC |
3519 | done |
3520 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3521 | |
c906108c | 3522 | fi |
bec39cab AC |
3523 | CPP=$ac_cv_prog_CPP |
3524 | else | |
3525 | ac_cv_prog_CPP=$CPP | |
c906108c | 3526 | fi |
81ecdfbb RW |
3527 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3528 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3529 | ac_preproc_ok=false |
3530 | for ac_c_preproc_warn_flag in '' yes | |
3531 | do | |
3532 | # Use a header file that comes with gcc, so configuring glibc | |
3533 | # with a fresh cross-compiler works. | |
3534 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3535 | # <limits.h> exists even on freestanding compilers. | |
3536 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3537 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3538 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3539 | /* end confdefs.h. */ |
3540 | #ifdef __STDC__ | |
3541 | # include <limits.h> | |
3542 | #else | |
3543 | # include <assert.h> | |
3544 | #endif | |
3545 | Syntax error | |
3546 | _ACEOF | |
81ecdfbb | 3547 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3548 | |
81ecdfbb | 3549 | else |
bec39cab AC |
3550 | # Broken: fails on valid input. |
3551 | continue | |
3552 | fi | |
3553 | rm -f conftest.err conftest.$ac_ext | |
3554 | ||
81ecdfbb | 3555 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3556 | # can be detected and how. |
81ecdfbb | 3557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3558 | /* end confdefs.h. */ |
3559 | #include <ac_nonexistent.h> | |
3560 | _ACEOF | |
81ecdfbb | 3561 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3562 | # Broken: success on invalid input. |
3563 | continue | |
c906108c | 3564 | else |
bec39cab AC |
3565 | # Passes both tests. |
3566 | ac_preproc_ok=: | |
3567 | break | |
c906108c | 3568 | fi |
bec39cab | 3569 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3570 | |
bec39cab AC |
3571 | done |
3572 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3573 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3574 | if $ac_preproc_ok; then : |
3575 | ||
c906108c | 3576 | else |
81ecdfbb RW |
3577 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3578 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3579 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3580 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3581 | fi |
c906108c | 3582 | |
bec39cab AC |
3583 | ac_ext=c |
3584 | ac_cpp='$CPP $CPPFLAGS' | |
3585 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3586 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3587 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3588 | ||
3589 | ||
81ecdfbb RW |
3590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3591 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3592 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3593 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3594 | else |
81ecdfbb RW |
3595 | if test -z "$GREP"; then |
3596 | ac_path_GREP_found=false | |
3597 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3598 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3599 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3600 | do | |
3601 | IFS=$as_save_IFS | |
3602 | test -z "$as_dir" && as_dir=. | |
3603 | for ac_prog in grep ggrep; do | |
3604 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3605 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3606 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3607 | # Check for GNU ac_path_GREP and select it if it is found. | |
3608 | # Check for GNU $ac_path_GREP | |
3609 | case `"$ac_path_GREP" --version 2>&1` in | |
3610 | *GNU*) | |
3611 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3612 | *) | |
3613 | ac_count=0 | |
3614 | $as_echo_n 0123456789 >"conftest.in" | |
3615 | while : | |
3616 | do | |
3617 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3618 | mv "conftest.tmp" "conftest.in" | |
3619 | cp "conftest.in" "conftest.nl" | |
3620 | $as_echo 'GREP' >> "conftest.nl" | |
3621 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3622 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3623 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3624 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3625 | # Best one so far, save it but keep looking for a better one | |
3626 | ac_cv_path_GREP="$ac_path_GREP" | |
3627 | ac_path_GREP_max=$ac_count | |
bec39cab | 3628 | fi |
81ecdfbb RW |
3629 | # 10*(2^10) chars as input seems more than enough |
3630 | test $ac_count -gt 10 && break | |
3631 | done | |
3632 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3633 | esac | |
bec39cab | 3634 | |
81ecdfbb RW |
3635 | $ac_path_GREP_found && break 3 |
3636 | done | |
3637 | done | |
3638 | done | |
3639 | IFS=$as_save_IFS | |
3640 | if test -z "$ac_cv_path_GREP"; then | |
3641 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3642 | fi | |
c906108c | 3643 | else |
81ecdfbb | 3644 | ac_cv_path_GREP=$GREP |
c906108c | 3645 | fi |
c906108c | 3646 | |
81ecdfbb RW |
3647 | fi |
3648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3649 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3650 | GREP="$ac_cv_path_GREP" | |
c906108c | 3651 | |
c906108c | 3652 | |
81ecdfbb RW |
3653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3654 | $as_echo_n "checking for egrep... " >&6; } | |
3655 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3656 | $as_echo_n "(cached) " >&6 | |
783e057b | 3657 | else |
81ecdfbb RW |
3658 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3659 | then ac_cv_path_EGREP="$GREP -E" | |
3660 | else | |
3661 | if test -z "$EGREP"; then | |
3662 | ac_path_EGREP_found=false | |
3663 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3664 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3665 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3666 | do |
3667 | IFS=$as_save_IFS | |
3668 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3669 | for ac_prog in egrep; do |
3670 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3671 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3672 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3673 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3674 | # Check for GNU $ac_path_EGREP | |
3675 | case `"$ac_path_EGREP" --version 2>&1` in | |
3676 | *GNU*) | |
3677 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3678 | *) | |
3679 | ac_count=0 | |
3680 | $as_echo_n 0123456789 >"conftest.in" | |
3681 | while : | |
3682 | do | |
3683 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3684 | mv "conftest.tmp" "conftest.in" | |
3685 | cp "conftest.in" "conftest.nl" | |
3686 | $as_echo 'EGREP' >> "conftest.nl" | |
3687 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3688 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3689 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3690 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3691 | # Best one so far, save it but keep looking for a better one | |
3692 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3693 | ac_path_EGREP_max=$ac_count | |
3694 | fi | |
3695 | # 10*(2^10) chars as input seems more than enough | |
3696 | test $ac_count -gt 10 && break | |
3697 | done | |
3698 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3699 | esac | |
bec39cab | 3700 | |
81ecdfbb RW |
3701 | $ac_path_EGREP_found && break 3 |
3702 | done | |
3703 | done | |
3704 | done | |
3705 | IFS=$as_save_IFS | |
3706 | if test -z "$ac_cv_path_EGREP"; then | |
3707 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3708 | fi |
783e057b | 3709 | else |
81ecdfbb | 3710 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3711 | fi |
3712 | ||
81ecdfbb | 3713 | fi |
783e057b | 3714 | fi |
81ecdfbb RW |
3715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3716 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3717 | EGREP="$ac_cv_path_EGREP" | |
3718 | ||
783e057b | 3719 | |
81ecdfbb RW |
3720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3721 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3722 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3723 | $as_echo_n "(cached) " >&6 | |
783e057b | 3724 | else |
81ecdfbb | 3725 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3726 | /* end confdefs.h. */ |
783e057b | 3727 | #include <stdlib.h> |
bec39cab | 3728 | #include <stdarg.h> |
783e057b DJ |
3729 | #include <string.h> |
3730 | #include <float.h> | |
c906108c | 3731 | |
bec39cab AC |
3732 | int |
3733 | main () | |
3734 | { | |
c906108c | 3735 | |
bec39cab AC |
3736 | ; |
3737 | return 0; | |
3738 | } | |
3739 | _ACEOF | |
81ecdfbb | 3740 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3741 | ac_cv_header_stdc=yes |
c906108c | 3742 | else |
81ecdfbb | 3743 | ac_cv_header_stdc=no |
c906108c | 3744 | fi |
81ecdfbb | 3745 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3746 | |
783e057b DJ |
3747 | if test $ac_cv_header_stdc = yes; then |
3748 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3749 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3750 | /* end confdefs.h. */ |
3751 | #include <string.h> | |
c906108c | 3752 | |
783e057b DJ |
3753 | _ACEOF |
3754 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3755 | $EGREP "memchr" >/dev/null 2>&1; then : |
3756 | ||
c906108c | 3757 | else |
783e057b | 3758 | ac_cv_header_stdc=no |
c906108c | 3759 | fi |
783e057b | 3760 | rm -f conftest* |
c906108c SS |
3761 | |
3762 | fi | |
3763 | ||
783e057b DJ |
3764 | if test $ac_cv_header_stdc = yes; then |
3765 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3767 | /* end confdefs.h. */ |
3768 | #include <stdlib.h> | |
bec39cab | 3769 | |
783e057b DJ |
3770 | _ACEOF |
3771 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3772 | $EGREP "free" >/dev/null 2>&1; then : |
3773 | ||
bec39cab | 3774 | else |
783e057b | 3775 | ac_cv_header_stdc=no |
bec39cab | 3776 | fi |
783e057b | 3777 | rm -f conftest* |
bec39cab AC |
3778 | |
3779 | fi | |
bec39cab | 3780 | |
783e057b DJ |
3781 | if test $ac_cv_header_stdc = yes; then |
3782 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3783 | if test "$cross_compiling" = yes; then : |
783e057b | 3784 | : |
bec39cab | 3785 | else |
81ecdfbb | 3786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3787 | /* end confdefs.h. */ |
3788 | #include <ctype.h> | |
81ecdfbb | 3789 | #include <stdlib.h> |
783e057b DJ |
3790 | #if ((' ' & 0x0FF) == 0x020) |
3791 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3792 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3793 | #else | |
3794 | # define ISLOWER(c) \ | |
3795 | (('a' <= (c) && (c) <= 'i') \ | |
3796 | || ('j' <= (c) && (c) <= 'r') \ | |
3797 | || ('s' <= (c) && (c) <= 'z')) | |
3798 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3799 | #endif | |
3800 | ||
3801 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3802 | int | |
3803 | main () | |
3804 | { | |
3805 | int i; | |
3806 | for (i = 0; i < 256; i++) | |
3807 | if (XOR (islower (i), ISLOWER (i)) | |
3808 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3809 | return 2; |
3810 | return 0; | |
783e057b DJ |
3811 | } |
3812 | _ACEOF | |
81ecdfbb | 3813 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3814 | |
81ecdfbb RW |
3815 | else |
3816 | ac_cv_header_stdc=no | |
783e057b | 3817 | fi |
81ecdfbb RW |
3818 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3819 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3820 | fi |
81ecdfbb | 3821 | |
783e057b DJ |
3822 | fi |
3823 | fi | |
81ecdfbb RW |
3824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3825 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3826 | if test $ac_cv_header_stdc = yes; then |
3827 | ||
81ecdfbb | 3828 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3829 | |
3830 | fi | |
3831 | ||
3832 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3833 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3834 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3835 | do : |
3836 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3837 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3838 | " | |
3839 | eval as_val=\$$as_ac_Header | |
3840 | if test "x$as_val" = x""yes; then : | |
783e057b | 3841 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3842 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3843 | _ACEOF |
3844 | ||
3845 | fi | |
3846 | ||
3847 | done | |
3848 | ||
3849 | ||
3850 | ||
81ecdfbb RW |
3851 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3852 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3853 | MINIX=yes |
3854 | else | |
3855 | MINIX= | |
3856 | fi | |
3857 | ||
3858 | ||
3859 | if test "$MINIX" = yes; then | |
3860 | ||
81ecdfbb | 3861 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3862 | |
3863 | ||
81ecdfbb | 3864 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3865 | |
3866 | ||
81ecdfbb | 3867 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3868 | |
3869 | fi | |
3870 | ||
3871 | ||
81ecdfbb RW |
3872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3873 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3874 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3875 | $as_echo_n "(cached) " >&6 | |
783e057b | 3876 | else |
81ecdfbb | 3877 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3878 | /* end confdefs.h. */ |
3879 | ||
c971b7fa PA |
3880 | # define __EXTENSIONS__ 1 |
3881 | $ac_includes_default | |
783e057b DJ |
3882 | int |
3883 | main () | |
3884 | { | |
3885 | ||
3886 | ; | |
3887 | return 0; | |
3888 | } | |
3889 | _ACEOF | |
81ecdfbb | 3890 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3891 | ac_cv_safe_to_define___extensions__=yes |
3892 | else | |
81ecdfbb | 3893 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3894 | fi |
81ecdfbb | 3895 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3896 | fi |
81ecdfbb RW |
3897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3898 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3899 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3900 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3901 | |
81ecdfbb | 3902 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3903 | |
81ecdfbb | 3904 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3905 | |
81ecdfbb | 3906 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3907 | |
81ecdfbb | 3908 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3909 | |
3910 | ||
c971b7fa PA |
3911 | ac_aux_dir= |
3912 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3913 | for ac_t in install-sh install.sh shtool; do | |
3914 | if test -f "$ac_dir/$ac_t"; then | |
3915 | ac_aux_dir=$ac_dir | |
3916 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3917 | break 2 | |
3918 | fi | |
3919 | done | |
3920 | done | |
3921 | if test -z "$ac_aux_dir"; then | |
3922 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3923 | fi | |
770d76d7 | 3924 | |
c971b7fa PA |
3925 | # These three variables are undocumented and unsupported, |
3926 | # and are intended to be withdrawn in a future Autoconf release. | |
3927 | # They can cause serious problems if a builder's source tree is in a directory | |
3928 | # whose full name contains unusual characters. | |
3929 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3930 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3931 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3932 | |
770d76d7 | 3933 | |
c971b7fa PA |
3934 | # Make sure we can run config.sub. |
3935 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3936 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3937 | |
c971b7fa PA |
3938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3939 | $as_echo_n "checking build system type... " >&6; } | |
3940 | if test "${ac_cv_build+set}" = set; then : | |
3941 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3942 | else |
c971b7fa PA |
3943 | ac_build_alias=$build_alias |
3944 | test "x$ac_build_alias" = x && | |
3945 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3946 | test "x$ac_build_alias" = x && | |
3947 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3948 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3949 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3950 | ||
770d76d7 | 3951 | fi |
c971b7fa PA |
3952 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3953 | $as_echo "$ac_cv_build" >&6; } | |
3954 | case $ac_cv_build in | |
3955 | *-*-*) ;; | |
3956 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3957 | esac |
c971b7fa PA |
3958 | build=$ac_cv_build |
3959 | ac_save_IFS=$IFS; IFS='-' | |
3960 | set x $ac_cv_build | |
3961 | shift | |
3962 | build_cpu=$1 | |
3963 | build_vendor=$2 | |
3964 | shift; shift | |
3965 | # Remember, the first character of IFS is used to create $*, | |
3966 | # except with old shells: | |
3967 | build_os=$* | |
3968 | IFS=$ac_save_IFS | |
3969 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
3970 | |
3971 | ||
c971b7fa PA |
3972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
3973 | $as_echo_n "checking host system type... " >&6; } | |
3974 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
3975 | $as_echo_n "(cached) " >&6 |
3976 | else | |
c971b7fa PA |
3977 | if test "x$host_alias" = x; then |
3978 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 3979 | else |
c971b7fa PA |
3980 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
3981 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 3982 | fi |
81ecdfbb RW |
3983 | |
3984 | fi | |
c971b7fa PA |
3985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
3986 | $as_echo "$ac_cv_host" >&6; } | |
3987 | case $ac_cv_host in | |
3988 | *-*-*) ;; | |
3989 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 3990 | esac |
c971b7fa PA |
3991 | host=$ac_cv_host |
3992 | ac_save_IFS=$IFS; IFS='-' | |
3993 | set x $ac_cv_host | |
3994 | shift | |
3995 | host_cpu=$1 | |
3996 | host_vendor=$2 | |
3997 | shift; shift | |
3998 | # Remember, the first character of IFS is used to create $*, | |
3999 | # except with old shells: | |
4000 | host_os=$* | |
4001 | IFS=$ac_save_IFS | |
4002 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4003 | |
4004 | ||
4005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4006 | $as_echo_n "checking target system type... " >&6; } | |
4007 | if test "${ac_cv_target+set}" = set; then : | |
4008 | $as_echo_n "(cached) " >&6 | |
4009 | else | |
4010 | if test "x$target_alias" = x; then | |
4011 | ac_cv_target=$ac_cv_host | |
4012 | else | |
4013 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4014 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4015 | fi | |
4016 | ||
4017 | fi | |
4018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4019 | $as_echo "$ac_cv_target" >&6; } | |
4020 | case $ac_cv_target in | |
4021 | *-*-*) ;; | |
4022 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4023 | esac | |
4024 | target=$ac_cv_target | |
4025 | ac_save_IFS=$IFS; IFS='-' | |
4026 | set x $ac_cv_target | |
4027 | shift | |
4028 | target_cpu=$1 | |
4029 | target_vendor=$2 | |
4030 | shift; shift | |
4031 | # Remember, the first character of IFS is used to create $*, | |
4032 | # except with old shells: | |
4033 | target_os=$* | |
4034 | IFS=$ac_save_IFS | |
4035 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4036 | ||
4037 | ||
4038 | # The aliases save the names the user supplied, while $host etc. | |
4039 | # will get canonicalized. | |
4040 | test -n "$target_alias" && | |
4041 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4042 | NONENONEs,x,x, && | |
4043 | program_prefix=${target_alias}- | |
4044 | ||
4045 | # The tests for host and target for $enable_largefile require | |
4046 | # canonical names. | |
4047 | ||
4048 | ||
81ecdfbb | 4049 | |
da2f07f1 JK |
4050 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4051 | # even in directories otherwise not depending on the $plugins option. | |
4052 | ||
4053 | ||
4054 | # Check whether --enable-plugins was given. | |
4055 | if test "${enable_plugins+set}" = set; then : | |
4056 | enableval=$enable_plugins; case "${enableval}" in | |
4057 | yes | "") plugins=yes ;; | |
4058 | no) plugins=no ;; | |
4059 | *) plugins=yes ;; | |
4060 | esac | |
4061 | else | |
4062 | plugins=no | |
4063 | fi | |
4064 | ||
4065 | ||
4066 | ||
4067 | case "${host}" in | |
4068 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4069 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4070 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4071 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4072 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4073 | # large-file support through the --enable-largefile switch, disable | |
4074 | # large-file support in favor of procfs support. | |
4075 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4076 | && : ${enable_largefile="no"} | |
4077 | ;; | |
4078 | esac | |
4079 | ||
4080 | # Check whether --enable-largefile was given. | |
4081 | if test "${enable_largefile+set}" = set; then : | |
4082 | enableval=$enable_largefile; | |
4083 | fi | |
4084 | ||
4085 | if test "$enable_largefile" != no; then | |
4086 | ||
4087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4088 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4089 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4090 | $as_echo_n "(cached) " >&6 | |
4091 | else | |
4092 | ac_cv_sys_largefile_CC=no | |
4093 | if test "$GCC" != yes; then | |
4094 | ac_save_CC=$CC | |
4095 | while :; do | |
4096 | # IRIX 6.2 and later do not support large files by default, | |
4097 | # so use the C compiler's -n32 option if that helps. | |
4098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4099 | /* end confdefs.h. */ | |
4100 | #include <sys/types.h> | |
4101 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4102 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4103 | since some C++ compilers masquerading as C compilers | |
4104 | incorrectly reject 9223372036854775807. */ | |
4105 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4106 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4107 | && LARGE_OFF_T % 2147483647 == 1) | |
4108 | ? 1 : -1]; | |
4109 | int | |
4110 | main () | |
4111 | { | |
4112 | ||
4113 | ; | |
4114 | return 0; | |
4115 | } | |
4116 | _ACEOF | |
4117 | if ac_fn_c_try_compile "$LINENO"; then : | |
4118 | break | |
4119 | fi | |
4120 | rm -f core conftest.err conftest.$ac_objext | |
4121 | CC="$CC -n32" | |
4122 | if ac_fn_c_try_compile "$LINENO"; then : | |
4123 | ac_cv_sys_largefile_CC=' -n32'; break | |
4124 | fi | |
4125 | rm -f core conftest.err conftest.$ac_objext | |
4126 | break | |
4127 | done | |
4128 | CC=$ac_save_CC | |
4129 | rm -f conftest.$ac_ext | |
4130 | fi | |
4131 | fi | |
4132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4133 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4134 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4135 | CC=$CC$ac_cv_sys_largefile_CC | |
4136 | fi | |
4137 | ||
4138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4139 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4140 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4141 | $as_echo_n "(cached) " >&6 | |
4142 | else | |
4143 | while :; do | |
4144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4145 | /* end confdefs.h. */ | |
4146 | #include <sys/types.h> | |
4147 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4148 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4149 | since some C++ compilers masquerading as C compilers | |
4150 | incorrectly reject 9223372036854775807. */ | |
4151 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4152 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4153 | && LARGE_OFF_T % 2147483647 == 1) | |
4154 | ? 1 : -1]; | |
4155 | int | |
4156 | main () | |
4157 | { | |
4158 | ||
4159 | ; | |
4160 | return 0; | |
4161 | } | |
4162 | _ACEOF | |
4163 | if ac_fn_c_try_compile "$LINENO"; then : | |
4164 | ac_cv_sys_file_offset_bits=no; break | |
4165 | fi | |
4166 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4167 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4168 | /* end confdefs.h. */ | |
4169 | #define _FILE_OFFSET_BITS 64 | |
4170 | #include <sys/types.h> | |
4171 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4172 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4173 | since some C++ compilers masquerading as C compilers | |
4174 | incorrectly reject 9223372036854775807. */ | |
4175 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4176 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4177 | && LARGE_OFF_T % 2147483647 == 1) | |
4178 | ? 1 : -1]; | |
4179 | int | |
4180 | main () | |
4181 | { | |
4182 | ||
4183 | ; | |
4184 | return 0; | |
4185 | } | |
4186 | _ACEOF | |
4187 | if ac_fn_c_try_compile "$LINENO"; then : | |
4188 | ac_cv_sys_file_offset_bits=64; break | |
4189 | fi | |
4190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4191 | ac_cv_sys_file_offset_bits=unknown | |
4192 | break | |
4193 | done | |
4194 | fi | |
4195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4196 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4197 | case $ac_cv_sys_file_offset_bits in #( | |
4198 | no | unknown) ;; | |
4199 | *) | |
4200 | cat >>confdefs.h <<_ACEOF | |
4201 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4202 | _ACEOF | |
4203 | ;; | |
4204 | esac | |
4205 | rm -rf conftest* | |
4206 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4208 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4209 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4210 | $as_echo_n "(cached) " >&6 | |
4211 | else | |
4212 | while :; do | |
4213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4214 | /* end confdefs.h. */ | |
4215 | #include <sys/types.h> | |
4216 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4217 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4218 | since some C++ compilers masquerading as C compilers | |
4219 | incorrectly reject 9223372036854775807. */ | |
4220 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4221 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4222 | && LARGE_OFF_T % 2147483647 == 1) | |
4223 | ? 1 : -1]; | |
4224 | int | |
4225 | main () | |
4226 | { | |
4227 | ||
4228 | ; | |
4229 | return 0; | |
4230 | } | |
4231 | _ACEOF | |
4232 | if ac_fn_c_try_compile "$LINENO"; then : | |
4233 | ac_cv_sys_large_files=no; break | |
4234 | fi | |
4235 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4237 | /* end confdefs.h. */ | |
4238 | #define _LARGE_FILES 1 | |
4239 | #include <sys/types.h> | |
4240 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4241 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4242 | since some C++ compilers masquerading as C compilers | |
4243 | incorrectly reject 9223372036854775807. */ | |
4244 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4245 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4246 | && LARGE_OFF_T % 2147483647 == 1) | |
4247 | ? 1 : -1]; | |
4248 | int | |
4249 | main () | |
4250 | { | |
4251 | ||
4252 | ; | |
4253 | return 0; | |
4254 | } | |
4255 | _ACEOF | |
4256 | if ac_fn_c_try_compile "$LINENO"; then : | |
4257 | ac_cv_sys_large_files=1; break | |
4258 | fi | |
4259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4260 | ac_cv_sys_large_files=unknown | |
4261 | break | |
4262 | done | |
4263 | fi | |
4264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4265 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4266 | case $ac_cv_sys_large_files in #( | |
4267 | no | unknown) ;; | |
4268 | *) | |
4269 | cat >>confdefs.h <<_ACEOF | |
4270 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4271 | _ACEOF | |
4272 | ;; | |
4273 | esac | |
4274 | rm -rf conftest* | |
4275 | fi | |
4276 | fi | |
4277 | ||
4278 | ||
4279 | ||
81ecdfbb RW |
4280 | |
4281 | ||
4282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4283 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4284 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4285 | $as_echo_n "(cached) " >&6 | |
4286 | else | |
4287 | am_cv_prog_cc_stdc=no | |
4288 | ac_save_CC="$CC" | |
4289 | # Don't try gcc -ansi; that turns off useful extensions and | |
4290 | # breaks some systems' header files. | |
4291 | # AIX -qlanglvl=ansi | |
4292 | # Ultrix and OSF/1 -std1 | |
4293 | # HP-UX 10.20 and later -Ae | |
4294 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4295 | # SVR4 -Xc -D__EXTENSIONS__ | |
4296 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4297 | do | |
783e057b | 4298 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4299 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4300 | /* end confdefs.h. */ |
4301 | #include <stdarg.h> | |
4302 | #include <stdio.h> | |
4303 | #include <sys/types.h> | |
4304 | #include <sys/stat.h> | |
4305 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4306 | struct buf { int x; }; | |
4307 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4308 | static char *e (p, i) | |
4309 | char **p; | |
4310 | int i; | |
4311 | { | |
4312 | return p[i]; | |
4313 | } | |
4314 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4315 | { | |
4316 | char *s; | |
4317 | va_list v; | |
4318 | va_start (v,p); | |
4319 | s = g (p, va_arg (v,int)); | |
4320 | va_end (v); | |
4321 | return s; | |
4322 | } | |
4323 | int test (int i, double x); | |
4324 | struct s1 {int (*f) (int a);}; | |
4325 | struct s2 {int (*f) (double a);}; | |
4326 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4327 | int argc; | |
4328 | char **argv; | |
4329 | ||
4330 | int | |
4331 | main () | |
4332 | { | |
4333 | ||
4334 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4335 | ||
4336 | ; | |
4337 | return 0; | |
4338 | } | |
4339 | _ACEOF | |
81ecdfbb | 4340 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4341 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4342 | fi |
81ecdfbb | 4343 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4344 | done |
4345 | CC="$ac_save_CC" | |
4346 | ||
4347 | fi | |
4348 | ||
4349 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4351 | $as_echo "none needed" >&6; } | |
783e057b | 4352 | else |
81ecdfbb RW |
4353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4354 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4355 | fi |
4356 | case "x$am_cv_prog_cc_stdc" in | |
4357 | x|xno) ;; | |
4358 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4359 | esac | |
4360 | ||
4361 | ||
4362 | ac_aux_dir= | |
81ecdfbb RW |
4363 | for ac_dir in .. "$srcdir"/..; do |
4364 | for ac_t in install-sh install.sh shtool; do | |
4365 | if test -f "$ac_dir/$ac_t"; then | |
4366 | ac_aux_dir=$ac_dir | |
4367 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4368 | break 2 | |
4369 | fi | |
4370 | done | |
783e057b DJ |
4371 | done |
4372 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4373 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4374 | fi |
81ecdfbb RW |
4375 | |
4376 | # These three variables are undocumented and unsupported, | |
4377 | # and are intended to be withdrawn in a future Autoconf release. | |
4378 | # They can cause serious problems if a builder's source tree is in a directory | |
4379 | # whose full name contains unusual characters. | |
4380 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4381 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4382 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4383 | ||
783e057b | 4384 | |
783e057b | 4385 | |
9009e1ae MR |
4386 | test "$program_prefix" != NONE && |
4387 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4388 | # Use a double $ so make ignores it. | |
4389 | test "$program_suffix" != NONE && | |
4390 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4391 | # Double any \ or $. | |
4392 | # By default was `s,x,x', remove it if useless. | |
4393 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4394 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4395 | ||
81ecdfbb | 4396 | |
a417dc56 RW |
4397 | # Dependency checking. |
4398 | rm -rf .tst 2>/dev/null | |
4399 | mkdir .tst 2>/dev/null | |
4400 | if test -d .tst; then | |
4401 | am__leading_dot=. | |
4402 | else | |
4403 | am__leading_dot=_ | |
4404 | fi | |
4405 | rmdir .tst 2>/dev/null | |
4406 | ||
4407 | DEPDIR="${am__leading_dot}deps" | |
4408 | ||
81ecdfbb | 4409 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4410 | |
4411 | ||
4412 | depcc="$CC" am_compiler_list= | |
4413 | ||
4414 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4415 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4416 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4417 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4418 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4419 | else |
4420 | if test -f "$am_depcomp"; then | |
4421 | # We make a subdir and do the tests there. Otherwise we can end up | |
4422 | # making bogus files that we don't know about and never remove. For | |
4423 | # instance it was reported that on HP-UX the gcc test will end up | |
4424 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4425 | # in D'. | |
4426 | mkdir conftest.dir | |
4427 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4428 | # using a relative directory. | |
4429 | cp "$am_depcomp" conftest.dir | |
4430 | cd conftest.dir | |
4431 | # We will build objects and dependencies in a subdirectory because | |
4432 | # it helps to detect inapplicable dependency modes. For instance | |
4433 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4434 | # side effect of compilation, but ICC will put the dependencies in | |
4435 | # the current directory while Tru64 will put them in the object | |
4436 | # directory. | |
4437 | mkdir sub | |
4438 | ||
4439 | am_cv_CC_dependencies_compiler_type=none | |
4440 | if test "$am_compiler_list" = ""; then | |
4441 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4442 | fi | |
4443 | for depmode in $am_compiler_list; do | |
4444 | if test $depmode = none; then break; fi | |
4445 | ||
81ecdfbb | 4446 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4447 | # Setup a source with many dependencies, because some compilers |
4448 | # like to wrap large dependency lists on column 80 (with \), and | |
4449 | # we should not choose a depcomp mode which is confused by this. | |
4450 | # | |
4451 | # We need to recreate these files for each test, as the compiler may | |
4452 | # overwrite some of them when testing with obscure command lines. | |
4453 | # This happens at least with the AIX C compiler. | |
4454 | : > sub/conftest.c | |
4455 | for i in 1 2 3 4 5 6; do | |
4456 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4457 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4458 | # Solaris 8's {/usr,}/bin/sh. | |
4459 | touch sub/conftst$i.h | |
4460 | done | |
4461 | echo "include sub/conftest.Po" > confmf | |
4462 | ||
4463 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4464 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4465 | # handle `-M -o', and we need to detect this. | |
4466 | depcmd="depmode=$depmode \ | |
4467 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4468 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4469 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4470 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4471 | if env $depcmd > conftest.err 2>&1 && | |
4472 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4473 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4474 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4475 | # icc doesn't choke on unknown options, it will just issue warnings | |
4476 | # or remarks (even with -Werror). So we grep stderr for any message | |
4477 | # that says an option was ignored or not supported. | |
4478 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4479 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4480 | # The diagnosis changed in icc 8.0: | |
4481 | # icc: Command line remark: option '-MP' not supported | |
4482 | if (grep 'ignoring option' conftest.err || | |
4483 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4484 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4485 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4486 | break |
4487 | fi | |
4488 | fi | |
81ecdfbb | 4489 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4490 | sed -e 's/^/| /' < conftest.err >&5 |
4491 | done | |
4492 | ||
4493 | cd .. | |
4494 | rm -rf conftest.dir | |
4495 | else | |
4496 | am_cv_CC_dependencies_compiler_type=none | |
4497 | fi | |
4498 | ||
4499 | fi | |
81ecdfbb RW |
4500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4501 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4502 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4503 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4504 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4505 | ||
4506 | fi | |
4507 | ||
4508 | ||
4509 | # Check for the 'make' the user wants to use. | |
4510 | for ac_prog in make | |
4511 | do | |
4512 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4513 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4515 | $as_echo_n "checking for $ac_word... " >&6; } | |
4516 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4517 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4518 | else |
4519 | if test -n "$MAKE"; then | |
4520 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4521 | else | |
4522 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4523 | for as_dir in $PATH | |
4524 | do | |
4525 | IFS=$as_save_IFS | |
4526 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4527 | for ac_exec_ext in '' $ac_executable_extensions; do |
4528 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4529 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4530 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4531 | break 2 |
4532 | fi | |
4533 | done | |
81ecdfbb RW |
4534 | done |
4535 | IFS=$as_save_IFS | |
a417dc56 RW |
4536 | |
4537 | fi | |
4538 | fi | |
4539 | MAKE=$ac_cv_prog_MAKE | |
4540 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4542 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4543 | else |
81ecdfbb RW |
4544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4545 | $as_echo "no" >&6; } | |
a417dc56 RW |
4546 | fi |
4547 | ||
81ecdfbb | 4548 | |
a417dc56 RW |
4549 | test -n "$MAKE" && break |
4550 | done | |
4551 | ||
4552 | MAKE_IS_GNU= | |
4553 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4554 | *GNU*) | |
4555 | MAKE_IS_GNU=yes | |
4556 | ;; | |
4557 | esac | |
81ecdfbb | 4558 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4559 | GMAKE_TRUE= |
4560 | GMAKE_FALSE='#' | |
4561 | else | |
4562 | GMAKE_TRUE='#' | |
4563 | GMAKE_FALSE= | |
4564 | fi | |
4565 | ||
81ecdfbb RW |
4566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4567 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4568 | set x ${MAKE-make} | |
4569 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4570 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4571 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4572 | else |
4573 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4574 | SHELL = /bin/sh |
a417dc56 | 4575 | all: |
81ecdfbb | 4576 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4577 | _ACEOF |
4578 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4579 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4580 | *@@@%%%=?*=@@@%%%*) | |
4581 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4582 | *) | |
4583 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4584 | esac | |
a417dc56 RW |
4585 | rm -f conftest.make |
4586 | fi | |
81ecdfbb RW |
4587 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4589 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4590 | SET_MAKE= |
4591 | else | |
81ecdfbb RW |
4592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4593 | $as_echo "no" >&6; } | |
a417dc56 RW |
4594 | SET_MAKE="MAKE=${MAKE-make}" |
4595 | fi | |
4596 | ||
4597 | ||
c971b7fa PA |
4598 | # Configure gnulib. We need to build gnulib under some other |
4599 | # directory not "gnulib", to avoid the problem of both GDB and | |
4600 | # GDBserver wanting to build it in the same directory, when building | |
4601 | # in the source dir. | |
783e057b | 4602 | |
c971b7fa PA |
4603 | in_src="gnulib" |
4604 | in_build="build-gnulib" | |
4605 | ||
4606 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4607 | # so they do not pile up. | |
4608 | ac_sub_configure_args= | |
4609 | ac_prev= | |
4610 | eval "set x $ac_configure_args" | |
4611 | shift | |
4612 | for ac_arg | |
4613 | do | |
4614 | if test -n "$ac_prev"; then | |
4615 | ac_prev= | |
4616 | continue | |
4617 | fi | |
4618 | case $ac_arg in | |
4619 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4620 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4621 | ac_prev=cache_file ;; | |
4622 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4623 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4624 | | --c=*) | |
4625 | ;; | |
4626 | --config-cache | -C) | |
4627 | ;; | |
4628 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4629 | ac_prev=srcdir ;; | |
4630 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4631 | ;; | |
4632 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4633 | ac_prev=prefix ;; | |
4634 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4635 | ;; | |
4636 | --disable-option-checking) | |
4637 | ;; | |
4638 | *) | |
4639 | case $ac_arg in | |
4640 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4641 | esac | |
4642 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4643 | esac | |
4644 | done | |
4645 | ||
4646 | # Always prepend --prefix to ensure using the same prefix | |
4647 | # in subdir configurations. | |
4648 | ac_arg="--prefix=$prefix" | |
4649 | case $ac_arg in | |
4650 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4651 | esac | |
4652 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4653 | ||
4654 | # Pass --silent | |
4655 | if test "$silent" = yes; then | |
4656 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4657 | fi | |
4658 | ||
4659 | # Always prepend --disable-option-checking to silence warnings, since | |
4660 | # different subdirs can have different --enable and --with options. | |
4661 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4662 | ||
4663 | ac_popdir=`pwd` | |
4664 | ac_dir=$in_build | |
4665 | ||
4666 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4667 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4668 | $as_echo "$ac_msg" >&6 | |
4669 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4670 | ||
38ea300a PA |
4671 | case $srcdir in |
4672 | [\\/]* | ?:[\\/]* ) | |
4673 | ac_srcdir=$srcdir/$in_src ;; | |
4674 | *) # Relative name. | |
4675 | ac_srcdir=../$srcdir/$in_src ;; | |
4676 | esac | |
c971b7fa PA |
4677 | |
4678 | cd "$ac_dir" | |
4679 | ||
4680 | ac_sub_configure=$ac_srcdir/configure | |
4681 | ||
4682 | # Make the cache file name correct relative to the subdirectory. | |
4683 | case $cache_file in | |
4684 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4685 | *) # Relative name. | |
4686 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4687 | esac | |
4688 | ||
4689 | { $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 | |
4690 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4691 | # The eval makes quoting arguments work. | |
4692 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4693 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4694 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4695 | ||
4696 | cd "$ac_popdir" | |
783e057b | 4697 | |
c971b7fa PA |
4698 | |
4699 | ||
4700 | CONFIG_OBS= | |
4701 | CONFIG_DEPS= | |
4702 | CONFIG_SRCS= | |
4703 | ENABLE_CFLAGS= | |
4704 | ||
4705 | CONFIG_ALL= | |
4706 | CONFIG_CLEAN= | |
4707 | CONFIG_INSTALL= | |
4708 | CONFIG_UNINSTALL= | |
4709 | ||
4710 | # If we haven't got the data from the intl directory, | |
4711 | # assume NLS is disabled. | |
4712 | USE_NLS=no | |
4713 | LIBINTL= | |
4714 | LIBINTL_DEP= | |
4715 | INCINTL= | |
4716 | XGETTEXT= | |
4717 | GMSGFMT= | |
4718 | POSUB= | |
783e057b DJ |
4719 | |
4720 | if test -f ../intl/config.intl; then | |
4721 | . ../intl/config.intl | |
4722 | fi | |
81ecdfbb RW |
4723 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4724 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4725 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4727 | $as_echo "no" >&6; } | |
783e057b | 4728 | else |
81ecdfbb RW |
4729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4730 | $as_echo "yes" >&6; } | |
783e057b | 4731 | |
81ecdfbb | 4732 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4733 | |
4734 | ||
81ecdfbb RW |
4735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4736 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4737 | # Look for .po and .gmo files in the source directory. |
4738 | CATALOGS= | |
4739 | XLINGUAS= | |
4740 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4741 | # If there aren't any .gmo files the shell will give us the | |
4742 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4743 | # weeded out. | |
4744 | case "$cat" in *\**) | |
4745 | continue;; | |
4746 | esac | |
4747 | # The quadruple backslash is collapsed to a double backslash | |
4748 | # by the backticks, then collapsed again by the double quotes, | |
4749 | # leaving us with one backslash in the sed expression (right | |
4750 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4751 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4752 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4753 | # The user is allowed to set LINGUAS to a list of languages to | |
4754 | # install catalogs for. If it's empty that means "all of them." | |
4755 | if test "x$LINGUAS" = x; then | |
4756 | CATALOGS="$CATALOGS $cat" | |
4757 | XLINGUAS="$XLINGUAS $lang" | |
4758 | else | |
4759 | case "$LINGUAS" in *$lang*) | |
4760 | CATALOGS="$CATALOGS $cat" | |
4761 | XLINGUAS="$XLINGUAS $lang" | |
4762 | ;; | |
4763 | esac | |
e28b3332 DJ |
4764 | fi |
4765 | done | |
c971b7fa PA |
4766 | LINGUAS="$XLINGUAS" |
4767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
4768 | $as_echo "$LINGUAS" >&6; } | |
4769 | ||
4770 | ||
4771 | DATADIRNAME=share | |
4772 | ||
4773 | INSTOBJEXT=.mo | |
4774 | ||
4775 | GENCAT=gencat | |
4776 | ||
4777 | CATOBJEXT=.gmo | |
e28b3332 | 4778 | |
e28b3332 DJ |
4779 | fi |
4780 | ||
c971b7fa PA |
4781 | localedir='${datadir}/locale' |
4782 | ||
4783 | ||
4784 | if test x"$USE_NLS" = xyes; then | |
4785 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4786 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4787 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4788 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 4789 | fi |
e28b3332 | 4790 | |
c971b7fa PA |
4791 | GNULIB=build-gnulib/import |
4792 | ||
4793 | # For Makefile dependencies. | |
4794 | GNULIB_STDINT_H= | |
4795 | if test x"$STDINT_H" != x; then | |
4796 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
4797 | fi |
4798 | ||
4799 | ||
c971b7fa PA |
4800 | PACKAGE=gdb |
4801 | ||
4802 | cat >>confdefs.h <<_ACEOF | |
4803 | #define PACKAGE "$PACKAGE" | |
4804 | _ACEOF | |
4805 | ||
4806 | ||
4807 | ||
4808 | # We never need to detect it in this sub-configure. | |
4809 | # But preserve it for config.status --recheck. | |
4810 | ||
4811 | ||
4812 | ||
4813 | MAKEINFO_EXTRA_FLAGS="" | |
4814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
4815 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
4816 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
4817 | $as_echo_n "(cached) " >&6 | |
4818 | else | |
4819 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
4820 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
4821 | gdb_cv_have_makeinfo_click=yes | |
4822 | else | |
4823 | gdb_cv_have_makeinfo_click=no | |
4824 | fi | |
4825 | fi | |
4826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
4827 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
4828 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
4829 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
4830 | fi | |
e28b3332 DJ |
4831 | |
4832 | ||
bec39cab AC |
4833 | |
4834 | ||
81ecdfbb RW |
4835 | # Check whether --with-separate-debug-dir was given. |
4836 | if test "${with_separate_debug_dir+set}" = set; then : | |
4837 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
4838 | DEBUGDIR=$withval |
4839 | else | |
4840 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
4841 | fi |
4842 | ||
20e95c23 | 4843 | |
783e057b DJ |
4844 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4845 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 4846 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 4847 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 4848 | |
783e057b DJ |
4849 | cat >>confdefs.h <<_ACEOF |
4850 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 4851 | _ACEOF |
20e95c23 | 4852 | |
20e95c23 | 4853 | |
20e95c23 | 4854 | |
0c4a4063 | 4855 | |
b14b1491 TT |
4856 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4857 | if test "x$prefix" = xNONE; then | |
4858 | test_prefix=/usr/local | |
4859 | else | |
4860 | test_prefix=$prefix | |
4861 | fi | |
783e057b | 4862 | else |
b14b1491 | 4863 | test_prefix=$exec_prefix |
783e057b | 4864 | fi |
b14b1491 TT |
4865 | value=0 |
4866 | case ${ac_define_dir} in | |
4867 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4868 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4869 | value=1 | |
4870 | ;; | |
4871 | esac | |
4872 | ||
4873 | cat >>confdefs.h <<_ACEOF | |
4874 | #define DEBUGDIR_RELOCATABLE $value | |
4875 | _ACEOF | |
4876 | ||
4877 | ||
4878 | ||
0c4a4063 | 4879 | |
f83d8a90 DE |
4880 | # We can't pass paths as command line arguments. |
4881 | # Mingw32 tries to be clever and will convert the paths for us. | |
4882 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
4883 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
4884 | # This breaks GDB's relocatable path conversions since paths passed in | |
4885 | # config.h would not get so translated, the path prefixes no longer match. | |
4886 | ||
4887 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4888 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4889 | ac_define_dir=`eval echo $bindir` | |
4890 | ac_define_dir=`eval echo $ac_define_dir` | |
4891 | ||
4892 | cat >>confdefs.h <<_ACEOF | |
4893 | #define BINDIR "$ac_define_dir" | |
4894 | _ACEOF | |
4895 | ||
4896 | ||
4897 | ||
b14b1491 TT |
4898 | # GDB's datadir relocation |
4899 | ||
4900 | ||
4901 | ||
81ecdfbb RW |
4902 | # Check whether --with-gdb-datadir was given. |
4903 | if test "${with_gdb_datadir+set}" = set; then : | |
4904 | withval=$with_gdb_datadir; | |
b14b1491 | 4905 | GDB_DATADIR=$withval |
20e95c23 | 4906 | else |
b14b1491 | 4907 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
4908 | fi |
4909 | ||
20e95c23 | 4910 | |
b14b1491 TT |
4911 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4912 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4913 | ac_define_dir=`eval echo $GDB_DATADIR` | |
4914 | ac_define_dir=`eval echo $ac_define_dir` | |
4915 | ||
4916 | cat >>confdefs.h <<_ACEOF | |
4917 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
4918 | _ACEOF |
4919 | ||
b14b1491 TT |
4920 | |
4921 | ||
0c4a4063 | 4922 | |
b14b1491 TT |
4923 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4924 | if test "x$prefix" = xNONE; then | |
4925 | test_prefix=/usr/local | |
4926 | else | |
4927 | test_prefix=$prefix | |
4928 | fi | |
4929 | else | |
4930 | test_prefix=$exec_prefix | |
4931 | fi | |
4932 | value=0 | |
4933 | case ${ac_define_dir} in | |
4934 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4935 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4936 | value=1 | |
4937 | ;; | |
4938 | esac | |
4939 | ||
4940 | cat >>confdefs.h <<_ACEOF | |
4941 | #define GDB_DATADIR_RELOCATABLE $value | |
4942 | _ACEOF | |
4943 | ||
4944 | ||
783e057b | 4945 | |
20e95c23 | 4946 | |
0c4a4063 | 4947 | |
81ecdfbb RW |
4948 | # Check whether --with-relocated-sources was given. |
4949 | if test "${with_relocated_sources+set}" = set; then : | |
4950 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
4951 | |
4952 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4953 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4954 | ac_define_dir=`eval echo $reloc_srcdir` | |
4955 | ac_define_dir=`eval echo $ac_define_dir` | |
4956 | ||
4957 | cat >>confdefs.h <<_ACEOF | |
4958 | #define RELOC_SRCDIR "$ac_define_dir" | |
4959 | _ACEOF | |
4960 | ||
4961 | ||
4962 | ||
81ecdfbb RW |
4963 | fi |
4964 | ||
29b0e8a2 | 4965 | |
7349ff92 JK |
4966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
4967 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
4968 | ||
4969 | # Check whether --with-auto-load-dir was given. | |
4970 | if test "${with_auto_load_dir+set}" = set; then : | |
4971 | withval=$with_auto_load_dir; | |
4972 | else | |
1564a261 | 4973 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
4974 | fi |
4975 | ||
1564a261 | 4976 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
4977 | |
4978 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4979 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4980 | ac_define_dir=`eval echo $escape_dir` | |
4981 | ac_define_dir=`eval echo $ac_define_dir` | |
4982 | ||
4983 | cat >>confdefs.h <<_ACEOF | |
4984 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
4985 | _ACEOF | |
4986 | ||
4987 | ||
4988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
4989 | $as_echo "$with_auto_load_dir" >&6; } | |
4990 | ||
bccbefd2 JK |
4991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
4992 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
4993 | ||
4994 | # Check whether --with-auto-load-safe-path was given. | |
4995 | if test "${with_auto_load_safe_path+set}" = set; then : | |
4996 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
4997 | with_auto_load_safe_path="/" |
4998 | fi | |
bccbefd2 | 4999 | else |
7349ff92 | 5000 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5001 | fi |
5002 | ||
1564a261 | 5003 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5004 | |
5005 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5006 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5007 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5008 | ac_define_dir=`eval echo $ac_define_dir` |
5009 | ||
5010 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5011 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5012 | _ACEOF |
5013 | ||
5014 | ||
5015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5016 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5017 | ||
29b0e8a2 | 5018 | |
20e95c23 | 5019 | |
5ae98d25 | 5020 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5021 | |
5022 | ||
783e057b | 5023 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5024 | # Check whether --enable-targets was given. |
5025 | if test "${enable_targets+set}" = set; then : | |
5026 | enableval=$enable_targets; case "${enableval}" in | |
5027 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5028 | ;; |
5029 | no) enable_targets= ;; | |
5030 | *) enable_targets=$enableval ;; | |
5031 | esac | |
81ecdfbb RW |
5032 | fi |
5033 | ||
20e95c23 | 5034 | |
783e057b | 5035 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5036 | # Check whether --enable-64-bit-bfd was given. |
5037 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5038 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5039 | yes) want64=true ;; |
5040 | no) want64=false ;; | |
81ecdfbb | 5041 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5042 | esac |
5043 | else | |
5044 | want64=false | |
81ecdfbb RW |
5045 | fi |
5046 | ||
783e057b DJ |
5047 | # Provide defaults for some variables set by the per-host and per-target |
5048 | # configuration. | |
5049 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5050 | |
783e057b DJ |
5051 | if test "${target}" = "${host}"; then |
5052 | gdb_native=yes | |
5053 | else | |
5054 | gdb_native=no | |
5055 | fi | |
20e95c23 | 5056 | |
783e057b | 5057 | . $srcdir/configure.host |
20e95c23 | 5058 | |
783e057b | 5059 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5060 | |
783e057b DJ |
5061 | TARGET_OBS= |
5062 | all_targets= | |
20e95c23 | 5063 | |
783e057b | 5064 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5065 | do |
783e057b DJ |
5066 | if test "$targ_alias" = "all"; then |
5067 | all_targets=true | |
5068 | else | |
5069 | # Canonicalize the secondary target names. | |
5070 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5071 | if test -n "$result"; then | |
5072 | targ=$result | |
5073 | else | |
5074 | targ=$targ_alias | |
5075 | fi | |
20e95c23 | 5076 | |
783e057b | 5077 | . ${srcdir}/configure.tgt |
20e95c23 | 5078 | |
bf307134 JB |
5079 | if test -z "${gdb_target_obs}"; then : |
5080 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5081 | fi | |
5082 | ||
783e057b DJ |
5083 | # Target-specific object files |
5084 | for i in ${gdb_target_obs}; do | |
5085 | case " $TARGET_OBS " in | |
5086 | *" ${i} "*) ;; | |
5087 | *) | |
5088 | TARGET_OBS="$TARGET_OBS ${i}" | |
5089 | ;; | |
5090 | esac | |
5091 | done | |
20e95c23 | 5092 | |
783e057b DJ |
5093 | # Check whether this target needs 64-bit CORE_ADDR |
5094 | if test x${want64} = xfalse; then | |
5095 | . ${srcdir}/../bfd/config.bfd | |
5096 | fi | |
5097 | fi | |
20e95c23 DJ |
5098 | done |
5099 | ||
783e057b DJ |
5100 | if test x${all_targets} = xtrue; then |
5101 | ||
5102 | # We want all 64-bit targets if we either: | |
5103 | # - run on a 64-bit host or | |
5104 | # - already require 64-bit support for some other target or | |
5105 | # - the --enable-64-bit-bfd option was supplied | |
5106 | # Otherwise we only support all 32-bit targets. | |
5107 | # | |
5108 | # NOTE: This test must be in sync with the corresponding | |
5109 | # tests in BFD! | |
20e95c23 | 5110 | |
783e057b | 5111 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5112 | # The cast to long int works around a bug in the HP C Compiler |
5113 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5114 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5115 | # This bug is HP SR number 8606223364. | |
5116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5117 | $as_echo_n "checking size of long... " >&6; } | |
5118 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5119 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5120 | else |
81ecdfbb | 5121 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5122 | |
81ecdfbb RW |
5123 | else |
5124 | if test "$ac_cv_type_long" = yes; then | |
5125 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5126 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5127 | { as_fn_set_status 77 | |
5128 | as_fn_error "cannot compute sizeof (long) | |
5129 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5130 | else | |
5131 | ac_cv_sizeof_long=0 | |
5132 | fi | |
c0993dbe | 5133 | fi |
81ecdfbb | 5134 | |
c0993dbe | 5135 | fi |
81ecdfbb RW |
5136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5137 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5138 | |
c0993dbe | 5139 | |
c0993dbe | 5140 | |
c0993dbe UW |
5141 | cat >>confdefs.h <<_ACEOF |
5142 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5143 | _ACEOF | |
5144 | ||
5145 | ||
5146 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5147 | want64=true | |
5148 | fi | |
5149 | fi | |
5150 | if test x${want64} = xtrue; then | |
5151 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5152 | else | |
5153 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5154 | fi | |
5155 | fi | |
5156 | ||
5157 | ||
5158 | ||
5159 | # For other settings, only the main target counts. | |
5160 | gdb_sim= | |
5161 | gdb_osabi= | |
5162 | build_gdbserver= | |
5163 | targ=$target; . ${srcdir}/configure.tgt | |
5164 | ||
5165 | # Fetch the default architecture and default target vector from BFD. | |
5166 | targ=$target; . $srcdir/../bfd/config.bfd | |
5167 | ||
5168 | # We only want the first architecture, so strip off the others if | |
5169 | # there is more than one. | |
5170 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5171 | ||
5172 | if test "x$targ_archs" != x; then | |
5173 | ||
5174 | cat >>confdefs.h <<_ACEOF | |
5175 | #define DEFAULT_BFD_ARCH $targ_archs | |
5176 | _ACEOF | |
5177 | ||
5178 | fi | |
5179 | if test "x$targ_defvec" != x; then | |
5180 | ||
5181 | cat >>confdefs.h <<_ACEOF | |
5182 | #define DEFAULT_BFD_VEC $targ_defvec | |
5183 | _ACEOF | |
5184 | ||
5185 | fi | |
5186 | ||
c0993dbe UW |
5187 | # The CLI cannot be disabled yet, but may be in the future. |
5188 | ||
5189 | # Enable CLI. | |
81ecdfbb RW |
5190 | # Check whether --enable-gdbcli was given. |
5191 | if test "${enable_gdbcli+set}" = set; then : | |
5192 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5193 | yes) |
5194 | ;; | |
5195 | no) | |
81ecdfbb | 5196 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5197 | *) |
81ecdfbb | 5198 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5199 | esac |
5200 | else | |
5201 | enable_gdbcli=yes | |
81ecdfbb RW |
5202 | fi |
5203 | ||
c0993dbe UW |
5204 | if test x"$enable_gdbcli" = xyes; then |
5205 | if test -d $srcdir/cli; then | |
5206 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5207 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5208 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5209 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5210 | fi | |
5211 | fi | |
5212 | ||
5213 | # Enable MI. | |
81ecdfbb RW |
5214 | # Check whether --enable-gdbmi was given. |
5215 | if test "${enable_gdbmi+set}" = set; then : | |
5216 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5217 | yes | no) |
5218 | ;; | |
5219 | *) | |
81ecdfbb | 5220 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5221 | esac |
5222 | else | |
5223 | enable_gdbmi=yes | |
81ecdfbb RW |
5224 | fi |
5225 | ||
c0993dbe UW |
5226 | if test x"$enable_gdbmi" = xyes; then |
5227 | if test -d $srcdir/mi; then | |
5228 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5229 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5230 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5231 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5232 | fi | |
5233 | fi | |
5234 | ||
5235 | # Enable TUI. | |
81ecdfbb RW |
5236 | # Check whether --enable-tui was given. |
5237 | if test "${enable_tui+set}" = set; then : | |
5238 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5239 | yes | no | auto) |
c0993dbe UW |
5240 | ;; |
5241 | *) | |
81ecdfbb | 5242 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5243 | esac |
5244 | else | |
3ca64bd3 | 5245 | enable_tui=auto |
81ecdfbb RW |
5246 | fi |
5247 | ||
c0993dbe UW |
5248 | |
5249 | # Enable gdbtk. | |
81ecdfbb RW |
5250 | # Check whether --enable-gdbtk was given. |
5251 | if test "${enable_gdbtk+set}" = set; then : | |
5252 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5253 | yes | no) |
5254 | ;; | |
5255 | *) | |
81ecdfbb | 5256 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5257 | esac |
5258 | else | |
5062cc19 | 5259 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5260 | enable_gdbtk=yes |
5261 | else | |
5262 | enable_gdbtk=no | |
5263 | fi | |
81ecdfbb RW |
5264 | fi |
5265 | ||
c0993dbe UW |
5266 | # We unconditionally disable gdbtk tests on selected platforms. |
5267 | case $host_os in | |
5268 | go32* | windows*) | |
81ecdfbb RW |
5269 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5270 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5271 | enable_gdbtk=no ;; |
5272 | esac | |
5273 | ||
05e7c244 | 5274 | # Libunwind support for ia64. |
bec39cab | 5275 | |
05e7c244 JK |
5276 | |
5277 | # Check whether --with-libunwind-ia64 was given. | |
5278 | if test "${with_libunwind_ia64+set}" = set; then : | |
5279 | withval=$with_libunwind_ia64; | |
bec39cab | 5280 | else |
05e7c244 JK |
5281 | with_libunwind_ia64=auto |
5282 | fi | |
bec39cab | 5283 | |
05e7c244 JK |
5284 | |
5285 | # Backward compatibility option. | |
5286 | if test "${with_libunwind+set}" = set; then | |
5287 | if test x"$with_libunwind_ia64" != xauto; then | |
5288 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5289 | fi | |
5290 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5291 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5292 | with_libunwind_ia64="$with_libunwind" | |
5293 | fi | |
5294 | ||
5295 | case "$with_libunwind_ia64" in | |
5296 | yes | no) | |
5297 | ;; | |
5298 | auto) | |
5299 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5300 | do : |
b54a8fd7 PA |
5301 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5302 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5303 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5304 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5305 | _ACEOF |
5306 | ||
5307 | fi | |
5308 | ||
5309 | done | |
5310 | ||
05e7c244 JK |
5311 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5312 | ;; | |
5313 | *) | |
5314 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5315 | ;; | |
5316 | esac | |
bec39cab | 5317 | |
05e7c244 | 5318 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5319 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5320 | do : |
b54a8fd7 PA |
5321 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5322 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5323 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5324 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5325 | _ACEOF |
5326 | ||
5327 | fi | |
5328 | ||
5329 | done | |
5330 | ||
05e7c244 JK |
5331 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5332 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5333 | fi | |
5334 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5335 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5336 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5337 | fi |
5338 | ||
cb01cfba JB |
5339 | opt_curses=no |
5340 | ||
81ecdfbb RW |
5341 | # Check whether --with-curses was given. |
5342 | if test "${with_curses+set}" = set; then : | |
5343 | withval=$with_curses; opt_curses=$withval | |
5344 | fi | |
5345 | ||
cb01cfba | 5346 | |
76a39ba7 | 5347 | prefer_curses=no |
cb01cfba | 5348 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5349 | prefer_curses=yes |
cb01cfba JB |
5350 | fi |
5351 | ||
a9322a30 | 5352 | # Profiling support. |
81ecdfbb RW |
5353 | # Check whether --enable-profiling was given. |
5354 | if test "${enable_profiling+set}" = set; then : | |
5355 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5356 | yes | no) |
5357 | ;; | |
5358 | *) | |
81ecdfbb | 5359 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5360 | esac |
5361 | else | |
5362 | enable_profiling=no | |
81ecdfbb | 5363 | fi |
bec39cab | 5364 | |
a9322a30 TT |
5365 | |
5366 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5367 | do : |
5368 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5369 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5370 | eval as_val=\$$as_ac_var | |
5371 | if test "x$as_val" = x""yes; then : | |
5372 | cat >>confdefs.h <<_ACEOF | |
5373 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5374 | _ACEOF |
a9322a30 | 5375 | |
81ecdfbb RW |
5376 | fi |
5377 | done | |
a9322a30 | 5378 | |
81ecdfbb RW |
5379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5380 | $as_echo_n "checking for _etext... " >&6; } | |
5381 | if test "${ac_cv_var__etext+set}" = set; then : | |
5382 | $as_echo_n "(cached) " >&6 | |
5383 | else | |
5384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5385 | /* end confdefs.h. */ | |
5386 | #include <stdlib.h> | |
5387 | extern char _etext; | |
a9322a30 TT |
5388 | |
5389 | int | |
5390 | main () | |
5391 | { | |
5392 | free (&_etext); | |
5393 | ; | |
5394 | return 0; | |
5395 | } | |
bec39cab | 5396 | _ACEOF |
81ecdfbb | 5397 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5398 | ac_cv_var__etext=yes |
bec39cab | 5399 | else |
81ecdfbb | 5400 | ac_cv_var__etext=no |
bec39cab | 5401 | fi |
81ecdfbb RW |
5402 | rm -f core conftest.err conftest.$ac_objext \ |
5403 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5404 | fi |
81ecdfbb RW |
5405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5406 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5407 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5408 | |
81ecdfbb | 5409 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5410 | |
bec39cab | 5411 | fi |
81ecdfbb RW |
5412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5413 | $as_echo_n "checking for etext... " >&6; } | |
5414 | if test "${ac_cv_var_etext+set}" = set; then : | |
5415 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5416 | else |
81ecdfbb | 5417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5418 | /* end confdefs.h. */ |
a9322a30 TT |
5419 | #include <stdlib.h> |
5420 | extern char etext; | |
bec39cab AC |
5421 | |
5422 | int | |
5423 | main () | |
5424 | { | |
a9322a30 | 5425 | free (&etext); |
bec39cab AC |
5426 | ; |
5427 | return 0; | |
5428 | } | |
5429 | _ACEOF | |
81ecdfbb | 5430 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5431 | ac_cv_var_etext=yes |
bec39cab | 5432 | else |
81ecdfbb | 5433 | ac_cv_var_etext=no |
bec39cab | 5434 | fi |
81ecdfbb RW |
5435 | rm -f core conftest.err conftest.$ac_objext \ |
5436 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5437 | fi |
81ecdfbb RW |
5438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5439 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5440 | if test $ac_cv_var_etext = yes; then |
5441 | ||
81ecdfbb | 5442 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5443 | |
5444 | fi | |
a9322a30 TT |
5445 | if test "$enable_profiling" = yes ; then |
5446 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5447 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5448 | fi |
5449 | PROFILE_CFLAGS=-pg | |
5450 | OLD_CFLAGS="$CFLAGS" | |
5451 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5452 | |
81ecdfbb RW |
5453 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5454 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5455 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5456 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5457 | else |
81ecdfbb | 5458 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5459 | /* end confdefs.h. */ |
bec39cab AC |
5460 | |
5461 | int | |
5462 | main () | |
5463 | { | |
a9322a30 | 5464 | int x; |
bec39cab AC |
5465 | ; |
5466 | return 0; | |
5467 | } | |
5468 | _ACEOF | |
81ecdfbb | 5469 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5470 | ac_cv_cc_supports_pg=yes |
bec39cab | 5471 | else |
81ecdfbb | 5472 | ac_cv_cc_supports_pg=no |
bec39cab | 5473 | fi |
81ecdfbb | 5474 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5475 | fi |
81ecdfbb RW |
5476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5477 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5478 | |
a9322a30 | 5479 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5480 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5481 | fi |
bec39cab | 5482 | |
a9322a30 | 5483 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5484 | fi |
5485 | ||
c16158bc JM |
5486 | |
5487 | ||
81ecdfbb RW |
5488 | # Check whether --with-pkgversion was given. |
5489 | if test "${with_pkgversion+set}" = set; then : | |
5490 | withval=$with_pkgversion; case "$withval" in | |
5491 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5492 | no) PKGVERSION= ;; |
5493 | *) PKGVERSION="($withval) " ;; | |
5494 | esac | |
5495 | else | |
5496 | PKGVERSION="(GDB) " | |
5497 | ||
81ecdfbb | 5498 | fi |
c16158bc JM |
5499 | |
5500 | ||
5501 | ||
5502 | ||
81ecdfbb RW |
5503 | |
5504 | # Check whether --with-bugurl was given. | |
5505 | if test "${with_bugurl+set}" = set; then : | |
5506 | withval=$with_bugurl; case "$withval" in | |
5507 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5508 | no) BUGURL= |
5509 | ;; | |
5510 | *) BUGURL="$withval" | |
5511 | ;; | |
5512 | esac | |
5513 | else | |
5514 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5515 | ||
81ecdfbb RW |
5516 | fi |
5517 | ||
c16158bc JM |
5518 | case ${BUGURL} in |
5519 | "") | |
5520 | REPORT_BUGS_TO= | |
5521 | REPORT_BUGS_TEXI= | |
5522 | ;; | |
5523 | *) | |
5524 | REPORT_BUGS_TO="<$BUGURL>" | |
5525 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5526 | ;; | |
5527 | esac; | |
5528 | ||
5529 | ||
5530 | ||
5531 | ||
5532 | cat >>confdefs.h <<_ACEOF | |
5533 | #define PKGVERSION "$PKGVERSION" | |
5534 | _ACEOF | |
5535 | ||
5536 | ||
5537 | cat >>confdefs.h <<_ACEOF | |
5538 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5539 | _ACEOF | |
5540 | ||
5541 | ||
bec39cab AC |
5542 | # --------------------- # |
5543 | # Checks for programs. # | |
5544 | # --------------------- # | |
5545 | ||
5546 | for ac_prog in gawk mawk nawk awk | |
5547 | do | |
5548 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5549 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5551 | $as_echo_n "checking for $ac_word... " >&6; } | |
5552 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5553 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5554 | else |
5555 | if test -n "$AWK"; then | |
5556 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5557 | else | |
5558 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5559 | for as_dir in $PATH | |
5560 | do | |
5561 | IFS=$as_save_IFS | |
5562 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5563 | for ac_exec_ext in '' $ac_executable_extensions; do |
5564 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5565 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5566 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5567 | break 2 |
5568 | fi | |
5569 | done | |
81ecdfbb RW |
5570 | done |
5571 | IFS=$as_save_IFS | |
bec39cab AC |
5572 | |
5573 | fi | |
5574 | fi | |
5575 | AWK=$ac_cv_prog_AWK | |
5576 | if test -n "$AWK"; then | |
81ecdfbb RW |
5577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5578 | $as_echo "$AWK" >&6; } | |
bec39cab | 5579 | else |
81ecdfbb RW |
5580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5581 | $as_echo "no" >&6; } | |
bec39cab AC |
5582 | fi |
5583 | ||
bec39cab | 5584 | |
81ecdfbb | 5585 | test -n "$AWK" && break |
bec39cab AC |
5586 | done |
5587 | ||
c971b7fa PA |
5588 | # Find a good install program. We prefer a C program (faster), |
5589 | # so one script is as good as another. But avoid the broken or | |
5590 | # incompatible versions: | |
5591 | # SysV /etc/install, /usr/sbin/install | |
5592 | # SunOS /usr/etc/install | |
5593 | # IRIX /sbin/install | |
5594 | # AIX /bin/install | |
5595 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5596 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5597 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5598 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5599 | # OS/2's system install, which has a completely different semantic | |
5600 | # ./install, which can be erroneously created by make from ./install.sh. | |
5601 | # Reject install programs that cannot install multiple files. | |
5602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5603 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5604 | if test -z "$INSTALL"; then | |
5605 | if test "${ac_cv_path_install+set}" = set; then : | |
5606 | $as_echo_n "(cached) " >&6 | |
5607 | else | |
5608 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5609 | for as_dir in $PATH | |
5610 | do | |
5611 | IFS=$as_save_IFS | |
5612 | test -z "$as_dir" && as_dir=. | |
5613 | # Account for people who put trailing slashes in PATH elements. | |
5614 | case $as_dir/ in #(( | |
5615 | ./ | .// | /[cC]/* | \ | |
5616 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5617 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5618 | /usr/ucb/* ) ;; | |
5619 | *) | |
5620 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5621 | # Don't use installbsd from OSF since it installs stuff as root | |
5622 | # by default. | |
5623 | for ac_prog in ginstall scoinst install; do | |
5624 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5625 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5626 | if test $ac_prog = install && | |
5627 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5628 | # AIX install. It has an incompatible calling convention. | |
5629 | : | |
5630 | elif test $ac_prog = install && | |
5631 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5632 | # program-specific install script used by HP pwplus--don't use. | |
5633 | : | |
5634 | else | |
5635 | rm -rf conftest.one conftest.two conftest.dir | |
5636 | echo one > conftest.one | |
5637 | echo two > conftest.two | |
5638 | mkdir conftest.dir | |
5639 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5640 | test -s conftest.one && test -s conftest.two && | |
5641 | test -s conftest.dir/conftest.one && | |
5642 | test -s conftest.dir/conftest.two | |
5643 | then | |
5644 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5645 | break 3 | |
5646 | fi | |
5647 | fi | |
5648 | fi | |
5649 | done | |
5650 | done | |
5651 | ;; | |
5652 | esac | |
5653 | ||
5654 | done | |
5655 | IFS=$as_save_IFS | |
5656 | ||
5657 | rm -rf conftest.one conftest.two conftest.dir | |
5658 | ||
5659 | fi | |
5660 | if test "${ac_cv_path_install+set}" = set; then | |
5661 | INSTALL=$ac_cv_path_install | |
5662 | else | |
5663 | # As a last resort, use the slow shell script. Don't cache a | |
5664 | # value for INSTALL within a source directory, because that will | |
5665 | # break other packages using the cache if that directory is | |
5666 | # removed, or if the value is a relative name. | |
5667 | INSTALL=$ac_install_sh | |
5668 | fi | |
5669 | fi | |
5670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5671 | $as_echo "$INSTALL" >&6; } | |
5672 | ||
5673 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5674 | # It thinks the first close brace ends the variable substitution. | |
5675 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5676 | ||
5677 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5678 | ||
5679 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5680 | |
81ecdfbb RW |
5681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5682 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5683 | LN_S=$as_ln_s |
5684 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5686 | $as_echo "yes" >&6; } | |
bec39cab | 5687 | else |
81ecdfbb RW |
5688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5689 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5690 | fi |
5691 | ||
5692 | if test -n "$ac_tool_prefix"; then | |
5693 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5694 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5696 | $as_echo_n "checking for $ac_word... " >&6; } | |
5697 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5698 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5699 | else |
5700 | if test -n "$RANLIB"; then | |
5701 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5702 | else | |
5703 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5704 | for as_dir in $PATH | |
5705 | do | |
5706 | IFS=$as_save_IFS | |
5707 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5708 | for ac_exec_ext in '' $ac_executable_extensions; do |
5709 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5710 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5711 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5712 | break 2 |
5713 | fi | |
5714 | done | |
81ecdfbb RW |
5715 | done |
5716 | IFS=$as_save_IFS | |
bec39cab AC |
5717 | |
5718 | fi | |
5719 | fi | |
5720 | RANLIB=$ac_cv_prog_RANLIB | |
5721 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5723 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5724 | else |
81ecdfbb RW |
5725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5726 | $as_echo "no" >&6; } | |
bec39cab AC |
5727 | fi |
5728 | ||
81ecdfbb | 5729 | |
bec39cab AC |
5730 | fi |
5731 | if test -z "$ac_cv_prog_RANLIB"; then | |
5732 | ac_ct_RANLIB=$RANLIB | |
5733 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5734 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5736 | $as_echo_n "checking for $ac_word... " >&6; } | |
5737 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5738 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5739 | else |
5740 | if test -n "$ac_ct_RANLIB"; then | |
5741 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5742 | else | |
5743 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5744 | for as_dir in $PATH | |
5745 | do | |
5746 | IFS=$as_save_IFS | |
5747 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5748 | for ac_exec_ext in '' $ac_executable_extensions; do |
5749 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5750 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5751 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5752 | break 2 |
5753 | fi | |
5754 | done | |
81ecdfbb RW |
5755 | done |
5756 | IFS=$as_save_IFS | |
bec39cab | 5757 | |
bec39cab AC |
5758 | fi |
5759 | fi | |
5760 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5761 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
5762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
5763 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 5764 | else |
81ecdfbb RW |
5765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5766 | $as_echo "no" >&6; } | |
bec39cab AC |
5767 | fi |
5768 | ||
81ecdfbb RW |
5769 | if test "x$ac_ct_RANLIB" = x; then |
5770 | RANLIB=":" | |
5771 | else | |
5772 | case $cross_compiling:$ac_tool_warned in | |
5773 | yes:) | |
5774 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5775 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5776 | ac_tool_warned=yes ;; | |
5777 | esac | |
5778 | RANLIB=$ac_ct_RANLIB | |
5779 | fi | |
bec39cab AC |
5780 | else |
5781 | RANLIB="$ac_cv_prog_RANLIB" | |
5782 | fi | |
5783 | ||
5784 | for ac_prog in 'bison -y' byacc | |
5785 | do | |
5786 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5787 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5789 | $as_echo_n "checking for $ac_word... " >&6; } | |
5790 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
5791 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5792 | else |
5793 | if test -n "$YACC"; then | |
5794 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5795 | else | |
5796 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5797 | for as_dir in $PATH | |
5798 | do | |
5799 | IFS=$as_save_IFS | |
5800 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5801 | for ac_exec_ext in '' $ac_executable_extensions; do |
5802 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5803 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 5804 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5805 | break 2 |
5806 | fi | |
5807 | done | |
81ecdfbb RW |
5808 | done |
5809 | IFS=$as_save_IFS | |
bec39cab AC |
5810 | |
5811 | fi | |
5812 | fi | |
5813 | YACC=$ac_cv_prog_YACC | |
5814 | if test -n "$YACC"; then | |
81ecdfbb RW |
5815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
5816 | $as_echo "$YACC" >&6; } | |
bec39cab | 5817 | else |
81ecdfbb RW |
5818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5819 | $as_echo "no" >&6; } | |
bec39cab AC |
5820 | fi |
5821 | ||
81ecdfbb | 5822 | |
bec39cab AC |
5823 | test -n "$YACC" && break |
5824 | done | |
5825 | test -n "$YACC" || YACC="yacc" | |
5826 | ||
5827 | ||
5828 | if test -n "$ac_tool_prefix"; then | |
5829 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5830 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
5831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5832 | $as_echo_n "checking for $ac_word... " >&6; } | |
5833 | if test "${ac_cv_prog_AR+set}" = set; then : | |
5834 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5835 | else |
5836 | if test -n "$AR"; then | |
5837 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5838 | else | |
5839 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5840 | for as_dir in $PATH | |
5841 | do | |
5842 | IFS=$as_save_IFS | |
5843 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5844 | for ac_exec_ext in '' $ac_executable_extensions; do |
5845 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5846 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 5847 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5848 | break 2 |
5849 | fi | |
5850 | done | |
81ecdfbb RW |
5851 | done |
5852 | IFS=$as_save_IFS | |
bec39cab AC |
5853 | |
5854 | fi | |
5855 | fi | |
5856 | AR=$ac_cv_prog_AR | |
5857 | if test -n "$AR"; then | |
81ecdfbb RW |
5858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
5859 | $as_echo "$AR" >&6; } | |
bec39cab | 5860 | else |
81ecdfbb RW |
5861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5862 | $as_echo "no" >&6; } | |
bec39cab AC |
5863 | fi |
5864 | ||
81ecdfbb | 5865 | |
bec39cab AC |
5866 | fi |
5867 | if test -z "$ac_cv_prog_AR"; then | |
5868 | ac_ct_AR=$AR | |
5869 | # Extract the first word of "ar", so it can be a program name with args. | |
5870 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
5871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5872 | $as_echo_n "checking for $ac_word... " >&6; } | |
5873 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
5874 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5875 | else |
5876 | if test -n "$ac_ct_AR"; then | |
5877 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5878 | else | |
5879 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5880 | for as_dir in $PATH | |
5881 | do | |
5882 | IFS=$as_save_IFS | |
5883 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5884 | for ac_exec_ext in '' $ac_executable_extensions; do |
5885 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5886 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 5887 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5888 | break 2 |
5889 | fi | |
5890 | done | |
81ecdfbb RW |
5891 | done |
5892 | IFS=$as_save_IFS | |
bec39cab AC |
5893 | |
5894 | fi | |
5895 | fi | |
5896 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
5897 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
5898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
5899 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 5900 | else |
81ecdfbb RW |
5901 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5902 | $as_echo "no" >&6; } | |
bec39cab AC |
5903 | fi |
5904 | ||
81ecdfbb RW |
5905 | if test "x$ac_ct_AR" = x; then |
5906 | AR="" | |
5907 | else | |
5908 | case $cross_compiling:$ac_tool_warned in | |
5909 | yes:) | |
5910 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5911 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5912 | ac_tool_warned=yes ;; | |
5913 | esac | |
5914 | AR=$ac_ct_AR | |
5915 | fi | |
bec39cab AC |
5916 | else |
5917 | AR="$ac_cv_prog_AR" | |
5918 | fi | |
5919 | ||
5920 | if test -n "$ac_tool_prefix"; then | |
5921 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
5922 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
5923 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5924 | $as_echo_n "checking for $ac_word... " >&6; } | |
5925 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
5926 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5927 | else |
5928 | if test -n "$DLLTOOL"; then | |
5929 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
5930 | else | |
5931 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5932 | for as_dir in $PATH | |
5933 | do | |
5934 | IFS=$as_save_IFS | |
5935 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5936 | for ac_exec_ext in '' $ac_executable_extensions; do |
5937 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5938 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 5939 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5940 | break 2 |
5941 | fi | |
5942 | done | |
81ecdfbb RW |
5943 | done |
5944 | IFS=$as_save_IFS | |
bec39cab AC |
5945 | |
5946 | fi | |
5947 | fi | |
5948 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
5949 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
5950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
5951 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 5952 | else |
81ecdfbb RW |
5953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5954 | $as_echo "no" >&6; } | |
bec39cab AC |
5955 | fi |
5956 | ||
81ecdfbb | 5957 | |
bec39cab AC |
5958 | fi |
5959 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
5960 | ac_ct_DLLTOOL=$DLLTOOL | |
5961 | # Extract the first word of "dlltool", so it can be a program name with args. | |
5962 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
5963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5964 | $as_echo_n "checking for $ac_word... " >&6; } | |
5965 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
5966 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5967 | else |
5968 | if test -n "$ac_ct_DLLTOOL"; then | |
5969 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
5970 | else | |
5971 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5972 | for as_dir in $PATH | |
5973 | do | |
5974 | IFS=$as_save_IFS | |
5975 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5976 | for ac_exec_ext in '' $ac_executable_extensions; do |
5977 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5978 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 5979 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5980 | break 2 |
5981 | fi | |
5982 | done | |
81ecdfbb RW |
5983 | done |
5984 | IFS=$as_save_IFS | |
bec39cab AC |
5985 | |
5986 | fi | |
5987 | fi | |
5988 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
5989 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
5990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
5991 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 5992 | else |
81ecdfbb RW |
5993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5994 | $as_echo "no" >&6; } | |
bec39cab AC |
5995 | fi |
5996 | ||
81ecdfbb RW |
5997 | if test "x$ac_ct_DLLTOOL" = x; then |
5998 | DLLTOOL="" | |
5999 | else | |
6000 | case $cross_compiling:$ac_tool_warned in | |
6001 | yes:) | |
6002 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6003 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6004 | ac_tool_warned=yes ;; | |
6005 | esac | |
6006 | DLLTOOL=$ac_ct_DLLTOOL | |
6007 | fi | |
bec39cab AC |
6008 | else |
6009 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6010 | fi | |
6011 | ||
6012 | if test -n "$ac_tool_prefix"; then | |
6013 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6014 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6016 | $as_echo_n "checking for $ac_word... " >&6; } | |
6017 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6018 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6019 | else |
6020 | if test -n "$WINDRES"; then | |
6021 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6022 | else | |
6023 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6024 | for as_dir in $PATH | |
6025 | do | |
6026 | IFS=$as_save_IFS | |
6027 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6028 | for ac_exec_ext in '' $ac_executable_extensions; do |
6029 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6030 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6031 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6032 | break 2 |
6033 | fi | |
6034 | done | |
81ecdfbb RW |
6035 | done |
6036 | IFS=$as_save_IFS | |
bec39cab AC |
6037 | |
6038 | fi | |
6039 | fi | |
6040 | WINDRES=$ac_cv_prog_WINDRES | |
6041 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6043 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6044 | else |
81ecdfbb RW |
6045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6046 | $as_echo "no" >&6; } | |
bec39cab AC |
6047 | fi |
6048 | ||
81ecdfbb | 6049 | |
bec39cab AC |
6050 | fi |
6051 | if test -z "$ac_cv_prog_WINDRES"; then | |
6052 | ac_ct_WINDRES=$WINDRES | |
6053 | # Extract the first word of "windres", so it can be a program name with args. | |
6054 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6056 | $as_echo_n "checking for $ac_word... " >&6; } | |
6057 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6058 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6059 | else |
6060 | if test -n "$ac_ct_WINDRES"; then | |
6061 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6062 | else | |
6063 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6064 | for as_dir in $PATH | |
6065 | do | |
6066 | IFS=$as_save_IFS | |
6067 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6068 | for ac_exec_ext in '' $ac_executable_extensions; do |
6069 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6070 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6071 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6072 | break 2 |
6073 | fi | |
6074 | done | |
81ecdfbb RW |
6075 | done |
6076 | IFS=$as_save_IFS | |
bec39cab AC |
6077 | |
6078 | fi | |
6079 | fi | |
6080 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6081 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6083 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6084 | else |
81ecdfbb RW |
6085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6086 | $as_echo "no" >&6; } | |
c906108c | 6087 | fi |
bec39cab | 6088 | |
81ecdfbb RW |
6089 | if test "x$ac_ct_WINDRES" = x; then |
6090 | WINDRES="" | |
6091 | else | |
6092 | case $cross_compiling:$ac_tool_warned in | |
6093 | yes:) | |
6094 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6095 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6096 | ac_tool_warned=yes ;; | |
6097 | esac | |
6098 | WINDRES=$ac_ct_WINDRES | |
6099 | fi | |
c906108c | 6100 | else |
bec39cab | 6101 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6102 | fi |
6103 | ||
bec39cab AC |
6104 | |
6105 | # Needed for GNU/Hurd. | |
6106 | if test -n "$ac_tool_prefix"; then | |
6107 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
6108 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6110 | $as_echo_n "checking for $ac_word... " >&6; } | |
6111 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6112 | $as_echo_n "(cached) " >&6 | |
c906108c | 6113 | else |
bec39cab AC |
6114 | if test -n "$MIG"; then |
6115 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6116 | else | |
6117 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6118 | for as_dir in $PATH | |
6119 | do | |
6120 | IFS=$as_save_IFS | |
6121 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6122 | for ac_exec_ext in '' $ac_executable_extensions; do |
6123 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6124 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6125 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6126 | break 2 |
6127 | fi | |
6128 | done | |
81ecdfbb RW |
6129 | done |
6130 | IFS=$as_save_IFS | |
bec39cab | 6131 | |
c906108c | 6132 | fi |
bec39cab AC |
6133 | fi |
6134 | MIG=$ac_cv_prog_MIG | |
6135 | if test -n "$MIG"; then | |
81ecdfbb RW |
6136 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6137 | $as_echo "$MIG" >&6; } | |
c906108c | 6138 | else |
81ecdfbb RW |
6139 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6140 | $as_echo "no" >&6; } | |
c906108c SS |
6141 | fi |
6142 | ||
81ecdfbb | 6143 | |
bec39cab AC |
6144 | fi |
6145 | if test -z "$ac_cv_prog_MIG"; then | |
6146 | ac_ct_MIG=$MIG | |
6147 | # Extract the first word of "mig", so it can be a program name with args. | |
6148 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6150 | $as_echo_n "checking for $ac_word... " >&6; } | |
6151 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6152 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6153 | else |
6154 | if test -n "$ac_ct_MIG"; then | |
6155 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6156 | else | |
6157 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6158 | for as_dir in $PATH | |
6159 | do | |
6160 | IFS=$as_save_IFS | |
6161 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6162 | for ac_exec_ext in '' $ac_executable_extensions; do |
6163 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6164 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6165 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6166 | break 2 |
6167 | fi | |
6168 | done | |
81ecdfbb RW |
6169 | done |
6170 | IFS=$as_save_IFS | |
c906108c | 6171 | |
bec39cab AC |
6172 | fi |
6173 | fi | |
6174 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6175 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6177 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6178 | else |
81ecdfbb RW |
6179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6180 | $as_echo "no" >&6; } | |
bec39cab | 6181 | fi |
c906108c | 6182 | |
81ecdfbb RW |
6183 | if test "x$ac_ct_MIG" = x; then |
6184 | MIG="" | |
6185 | else | |
6186 | case $cross_compiling:$ac_tool_warned in | |
6187 | yes:) | |
6188 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6189 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6190 | ac_tool_warned=yes ;; | |
6191 | esac | |
6192 | MIG=$ac_ct_MIG | |
6193 | fi | |
bec39cab AC |
6194 | else |
6195 | MIG="$ac_cv_prog_MIG" | |
6196 | fi | |
c906108c | 6197 | |
c906108c | 6198 | |
bec39cab AC |
6199 | # ---------------------- # |
6200 | # Checks for libraries. # | |
6201 | # ---------------------- # | |
c906108c | 6202 | |
bec39cab | 6203 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6205 | $as_echo_n "checking for main in -lm... " >&6; } | |
6206 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6207 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6208 | else |
6209 | ac_check_lib_save_LIBS=$LIBS | |
6210 | LIBS="-lm $LIBS" | |
81ecdfbb | 6211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6212 | /* end confdefs.h. */ |
c906108c | 6213 | |
c906108c | 6214 | |
bec39cab AC |
6215 | int |
6216 | main () | |
6217 | { | |
81ecdfbb | 6218 | return main (); |
bec39cab AC |
6219 | ; |
6220 | return 0; | |
6221 | } | |
6222 | _ACEOF | |
81ecdfbb | 6223 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6224 | ac_cv_lib_m_main=yes |
6225 | else | |
81ecdfbb | 6226 | ac_cv_lib_m_main=no |
bec39cab | 6227 | fi |
81ecdfbb RW |
6228 | rm -f core conftest.err conftest.$ac_objext \ |
6229 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6230 | LIBS=$ac_check_lib_save_LIBS |
6231 | fi | |
81ecdfbb RW |
6232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6233 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6234 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6235 | cat >>confdefs.h <<_ACEOF |
6236 | #define HAVE_LIBM 1 | |
6237 | _ACEOF | |
6238 | ||
6239 | LIBS="-lm $LIBS" | |
c906108c | 6240 | |
c906108c | 6241 | fi |
bec39cab AC |
6242 | |
6243 | ||
6244 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6245 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6246 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6247 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6248 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6249 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6250 | |
c906108c | 6251 | else |
81ecdfbb RW |
6252 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6253 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6254 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6255 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6256 | else |
6257 | ac_check_lib_save_LIBS=$LIBS | |
6258 | LIBS="-lw $LIBS" | |
81ecdfbb | 6259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6260 | /* end confdefs.h. */ |
c906108c | 6261 | |
81ecdfbb RW |
6262 | /* Override any GCC internal prototype to avoid an error. |
6263 | Use char because int might match the return type of a GCC | |
6264 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6265 | #ifdef __cplusplus |
6266 | extern "C" | |
6267 | #endif | |
bec39cab AC |
6268 | char wctype (); |
6269 | int | |
6270 | main () | |
6271 | { | |
81ecdfbb | 6272 | return wctype (); |
bec39cab AC |
6273 | ; |
6274 | return 0; | |
6275 | } | |
6276 | _ACEOF | |
81ecdfbb | 6277 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6278 | ac_cv_lib_w_wctype=yes |
6279 | else | |
81ecdfbb | 6280 | ac_cv_lib_w_wctype=no |
bec39cab | 6281 | fi |
81ecdfbb RW |
6282 | rm -f core conftest.err conftest.$ac_objext \ |
6283 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6284 | LIBS=$ac_check_lib_save_LIBS |
6285 | fi | |
81ecdfbb RW |
6286 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6287 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6288 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6289 | cat >>confdefs.h <<_ACEOF |
6290 | #define HAVE_LIBW 1 | |
6291 | _ACEOF | |
c906108c | 6292 | |
bec39cab | 6293 | LIBS="-lw $LIBS" |
c906108c | 6294 | |
bec39cab | 6295 | fi |
c906108c | 6296 | |
bec39cab | 6297 | fi |
c906108c | 6298 | |
ddc9cd0f | 6299 | |
bec39cab | 6300 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6301 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6302 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6303 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6304 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6305 | else |
6306 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6308 | /* end confdefs.h. */ |
ddc9cd0f | 6309 | |
81ecdfbb RW |
6310 | /* Override any GCC internal prototype to avoid an error. |
6311 | Use char because int might match the return type of a GCC | |
6312 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6313 | #ifdef __cplusplus |
6314 | extern "C" | |
6315 | #endif | |
bec39cab AC |
6316 | char gethostbyname (); |
6317 | int | |
6318 | main () | |
6319 | { | |
81ecdfbb | 6320 | return gethostbyname (); |
bec39cab AC |
6321 | ; |
6322 | return 0; | |
6323 | } | |
6324 | _ACEOF | |
81ecdfbb RW |
6325 | for ac_lib in '' nsl; do |
6326 | if test -z "$ac_lib"; then | |
6327 | ac_res="none required" | |
6328 | else | |
6329 | ac_res=-l$ac_lib | |
b4e70030 | 6330 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6331 | fi |
6332 | if ac_fn_c_try_link "$LINENO"; then : | |
6333 | ac_cv_search_gethostbyname=$ac_res | |
6334 | fi | |
6335 | rm -f core conftest.err conftest.$ac_objext \ | |
6336 | conftest$ac_exeext | |
6337 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6338 | break | |
6339 | fi | |
6340 | done | |
6341 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6342 | |
bec39cab | 6343 | else |
81ecdfbb | 6344 | ac_cv_search_gethostbyname=no |
bec39cab | 6345 | fi |
81ecdfbb | 6346 | rm conftest.$ac_ext |
bec39cab AC |
6347 | LIBS=$ac_func_search_save_LIBS |
6348 | fi | |
81ecdfbb RW |
6349 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6350 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6351 | ac_res=$ac_cv_search_gethostbyname | |
6352 | if test "$ac_res" != no; then : | |
6353 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6354 | |
bec39cab | 6355 | fi |
96baa820 | 6356 | |
c906108c | 6357 | |
b4e70030 | 6358 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6360 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6361 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6362 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6363 | else |
6364 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6366 | /* end confdefs.h. */ |
6367 | ||
81ecdfbb RW |
6368 | /* Override any GCC internal prototype to avoid an error. |
6369 | Use char because int might match the return type of a GCC | |
6370 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6371 | #ifdef __cplusplus |
6372 | extern "C" | |
6373 | #endif | |
b4e70030 JB |
6374 | char socketpair (); |
6375 | int | |
6376 | main () | |
6377 | { | |
81ecdfbb | 6378 | return socketpair (); |
b4e70030 JB |
6379 | ; |
6380 | return 0; | |
6381 | } | |
6382 | _ACEOF | |
81ecdfbb RW |
6383 | for ac_lib in '' socket; do |
6384 | if test -z "$ac_lib"; then | |
6385 | ac_res="none required" | |
6386 | else | |
6387 | ac_res=-l$ac_lib | |
b4e70030 | 6388 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6389 | fi |
6390 | if ac_fn_c_try_link "$LINENO"; then : | |
6391 | ac_cv_search_socketpair=$ac_res | |
6392 | fi | |
6393 | rm -f core conftest.err conftest.$ac_objext \ | |
6394 | conftest$ac_exeext | |
6395 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6396 | break | |
6397 | fi | |
6398 | done | |
6399 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6400 | |
b4e70030 | 6401 | else |
81ecdfbb | 6402 | ac_cv_search_socketpair=no |
b4e70030 | 6403 | fi |
81ecdfbb | 6404 | rm conftest.$ac_ext |
b4e70030 JB |
6405 | LIBS=$ac_func_search_save_LIBS |
6406 | fi | |
81ecdfbb RW |
6407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6408 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6409 | ac_res=$ac_cv_search_socketpair | |
6410 | if test "$ac_res" != no; then : | |
6411 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6412 | |
6413 | fi | |
6414 | ||
6415 | ||
233a11ab | 6416 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6417 | |
6418 | # See if the user specified whether he wants zlib support or not. | |
6419 | ||
6420 | # Check whether --with-zlib was given. | |
6421 | if test "${with_zlib+set}" = set; then : | |
6422 | withval=$with_zlib; | |
6423 | else | |
6424 | with_zlib=auto | |
6425 | fi | |
6426 | ||
6427 | ||
6428 | if test "$with_zlib" != "no"; then | |
6429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6430 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6431 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6432 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6433 | else |
6434 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6435 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6436 | /* end confdefs.h. */ |
6437 | ||
81ecdfbb RW |
6438 | /* Override any GCC internal prototype to avoid an error. |
6439 | Use char because int might match the return type of a GCC | |
233a11ab | 6440 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6441 | #ifdef __cplusplus |
6442 | extern "C" | |
6443 | #endif | |
233a11ab CS |
6444 | char zlibVersion (); |
6445 | int | |
6446 | main () | |
6447 | { | |
81ecdfbb | 6448 | return zlibVersion (); |
233a11ab CS |
6449 | ; |
6450 | return 0; | |
6451 | } | |
6452 | _ACEOF | |
81ecdfbb RW |
6453 | for ac_lib in '' z; do |
6454 | if test -z "$ac_lib"; then | |
6455 | ac_res="none required" | |
233a11ab | 6456 | else |
81ecdfbb RW |
6457 | ac_res=-l$ac_lib |
6458 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6459 | fi |
81ecdfbb RW |
6460 | if ac_fn_c_try_link "$LINENO"; then : |
6461 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6462 | fi |
81ecdfbb RW |
6463 | rm -f core conftest.err conftest.$ac_objext \ |
6464 | conftest$ac_exeext | |
6465 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6466 | break | |
233a11ab | 6467 | fi |
81ecdfbb RW |
6468 | done |
6469 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6470 | |
233a11ab | 6471 | else |
81ecdfbb | 6472 | ac_cv_search_zlibVersion=no |
233a11ab | 6473 | fi |
81ecdfbb RW |
6474 | rm conftest.$ac_ext |
6475 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6476 | fi |
81ecdfbb RW |
6477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6478 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6479 | ac_res=$ac_cv_search_zlibVersion | |
6480 | if test "$ac_res" != no; then : | |
6481 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6482 | for ac_header in zlib.h | |
6483 | do : | |
6484 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6485 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6486 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6487 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6488 | _ACEOF |
6489 | ||
6490 | fi | |
6491 | ||
6492 | done | |
6493 | ||
6494 | fi | |
6495 | ||
b040ad30 JB |
6496 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6497 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6498 | fi | |
6499 | fi | |
6500 | ||
233a11ab | 6501 | |
77f120bf | 6502 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6504 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6505 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6506 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6507 | else |
6508 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6510 | /* end confdefs.h. */ |
c906108c | 6511 | |
81ecdfbb RW |
6512 | /* Override any GCC internal prototype to avoid an error. |
6513 | Use char because int might match the return type of a GCC | |
6514 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6515 | #ifdef __cplusplus |
6516 | extern "C" | |
6517 | #endif | |
77f120bf | 6518 | char dlgetmodinfo (); |
bec39cab AC |
6519 | int |
6520 | main () | |
6521 | { | |
81ecdfbb | 6522 | return dlgetmodinfo (); |
bec39cab AC |
6523 | ; |
6524 | return 0; | |
6525 | } | |
6526 | _ACEOF | |
81ecdfbb RW |
6527 | for ac_lib in '' dl xpdl; do |
6528 | if test -z "$ac_lib"; then | |
6529 | ac_res="none required" | |
6530 | else | |
6531 | ac_res=-l$ac_lib | |
b4e70030 | 6532 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6533 | fi |
6534 | if ac_fn_c_try_link "$LINENO"; then : | |
6535 | ac_cv_search_dlgetmodinfo=$ac_res | |
6536 | fi | |
6537 | rm -f core conftest.err conftest.$ac_objext \ | |
6538 | conftest$ac_exeext | |
6539 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6540 | break | |
6541 | fi | |
6542 | done | |
6543 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6544 | |
4e8d927d | 6545 | else |
81ecdfbb | 6546 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6547 | fi |
81ecdfbb | 6548 | rm conftest.$ac_ext |
bec39cab AC |
6549 | LIBS=$ac_func_search_save_LIBS |
6550 | fi | |
81ecdfbb RW |
6551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6552 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6553 | ac_res=$ac_cv_search_dlgetmodinfo | |
6554 | if test "$ac_res" != no; then : | |
6555 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6556 | |
8bb2c122 | 6557 | fi |
8bb2c122 | 6558 | |
8bb2c122 | 6559 | |
77f120bf | 6560 | |
77f120bf | 6561 | |
6c7a06a3 | 6562 | |
81ecdfbb RW |
6563 | # Check whether --with-libiconv-prefix was given. |
6564 | if test "${with_libiconv_prefix+set}" = set; then : | |
6565 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6566 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6567 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6568 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6569 | done |
6570 | ||
81ecdfbb RW |
6571 | fi |
6572 | ||
6c7a06a3 | 6573 | |
f18c4681 | 6574 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6575 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6576 | ||
81ecdfbb RW |
6577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6578 | $as_echo_n "checking for iconv... " >&6; } | |
6579 | if test "${am_cv_func_iconv+set}" = set; then : | |
6580 | $as_echo_n "(cached) " >&6 | |
d542061a | 6581 | else |
6c7a06a3 TT |
6582 | |
6583 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6584 | am_cv_lib_iconv=no | |
6585 | am_cv_use_build_libiconv=no | |
f0f20949 | 6586 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6587 | |
6588 | # If libiconv is part of the build tree, then try using it over | |
6589 | # any system iconv. | |
6590 | if test -d ../libiconv; then | |
f18c4681 JB |
6591 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6592 | am_save_LIBS="$LIBS" | |
6593 | am_save_CPPFLAGS="$CPPFLAGS" | |
6594 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6595 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6597 | /* end confdefs.h. */ |
6c7a06a3 TT |
6598 | #include <stdlib.h> |
6599 | #include <iconv.h> | |
d542061a UW |
6600 | int |
6601 | main () | |
6602 | { | |
6c7a06a3 | 6603 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6604 | iconv(cd,NULL,NULL,NULL,NULL); |
6605 | iconv_close(cd); | |
d542061a UW |
6606 | ; |
6607 | return 0; | |
6608 | } | |
6609 | _ACEOF | |
81ecdfbb | 6610 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6611 | am_cv_use_build_libiconv=yes |
f0f20949 | 6612 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6613 | am_cv_lib_iconv=yes |
6614 | am_cv_func_iconv=yes | |
d542061a | 6615 | fi |
81ecdfbb RW |
6616 | rm -f core conftest.err conftest.$ac_objext \ |
6617 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6618 | LIBS="$am_save_LIBS" |
6619 | CPPFLAGS="$am_save_CPPFLAGS" | |
6620 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6621 | break |
6622 | fi | |
6623 | done | |
4edb1e84 | 6624 | fi |
94ae1714 | 6625 | |
4edb1e84 | 6626 | # Next, try to find iconv in libc. |
6c7a06a3 | 6627 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6628 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6629 | /* end confdefs.h. */ |
6c7a06a3 TT |
6630 | #include <stdlib.h> |
6631 | #include <iconv.h> | |
d542061a UW |
6632 | int |
6633 | main () | |
6634 | { | |
6c7a06a3 TT |
6635 | iconv_t cd = iconv_open("",""); |
6636 | iconv(cd,NULL,NULL,NULL,NULL); | |
6637 | iconv_close(cd); | |
d542061a UW |
6638 | ; |
6639 | return 0; | |
6640 | } | |
6641 | _ACEOF | |
81ecdfbb | 6642 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6643 | am_cv_func_iconv=yes |
d542061a | 6644 | fi |
81ecdfbb RW |
6645 | rm -f core conftest.err conftest.$ac_objext \ |
6646 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6647 | fi |
94ae1714 | 6648 | |
4edb1e84 JB |
6649 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6650 | # look in the libiconv prefix, if it was specified by the user. | |
6651 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6652 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6653 | am_save_LIBS="$LIBS" |
6654 | if test -n "$LIBICONV_INCLUDE"; then | |
6655 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6656 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6657 | fi | |
6658 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6659 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6660 | /* end confdefs.h. */ |
6c7a06a3 TT |
6661 | #include <stdlib.h> |
6662 | #include <iconv.h> | |
bec39cab AC |
6663 | int |
6664 | main () | |
6665 | { | |
6c7a06a3 TT |
6666 | iconv_t cd = iconv_open("",""); |
6667 | iconv(cd,NULL,NULL,NULL,NULL); | |
6668 | iconv_close(cd); | |
bec39cab AC |
6669 | ; |
6670 | return 0; | |
6671 | } | |
6672 | _ACEOF | |
81ecdfbb | 6673 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6674 | am_cv_lib_iconv=yes |
6c7a06a3 | 6675 | am_cv_func_iconv=yes |
627af7ea | 6676 | fi |
81ecdfbb RW |
6677 | rm -f core conftest.err conftest.$ac_objext \ |
6678 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6679 | LIBS="$am_save_LIBS" |
fc3b640d | 6680 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6681 | fi |
6682 | ||
6683 | fi | |
81ecdfbb RW |
6684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6685 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6686 | |
6687 | # Set the various flags based on the cache variables. We can't rely | |
6688 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6689 | LIBICONV= |
6690 | if test "$am_cv_lib_iconv" = yes; then | |
6691 | LIBICONV="-liconv" | |
94ae1714 TT |
6692 | else |
6693 | LIBICONV_LIBDIR= | |
6694 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6695 | fi |
6696 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6697 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6698 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6699 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6700 | fi | |
6701 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6702 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6703 | |
6c7a06a3 TT |
6704 | if test "$am_cv_func_iconv" = yes; then |
6705 | ||
81ecdfbb | 6706 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6707 | |
81ecdfbb RW |
6708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6709 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6710 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6711 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6712 | else |
6713 | ||
81ecdfbb | 6714 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6715 | /* end confdefs.h. */ |
6716 | ||
6c7a06a3 TT |
6717 | #include <stdlib.h> |
6718 | #include <iconv.h> | |
6719 | extern | |
b4e70030 | 6720 | #ifdef __cplusplus |
6c7a06a3 | 6721 | "C" |
b4e70030 | 6722 | #endif |
6c7a06a3 TT |
6723 | #if defined(__STDC__) || defined(__cplusplus) |
6724 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6725 | #else | |
6726 | size_t iconv(); | |
6727 | #endif | |
6728 | ||
b4e70030 JB |
6729 | int |
6730 | main () | |
6731 | { | |
6c7a06a3 | 6732 | |
b4e70030 JB |
6733 | ; |
6734 | return 0; | |
6735 | } | |
6736 | _ACEOF | |
81ecdfbb | 6737 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6738 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6739 | else |
81ecdfbb | 6740 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6741 | fi |
81ecdfbb | 6742 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6743 | 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);" |
6744 | fi | |
6745 | ||
6746 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 6747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 6748 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
6749 | $as_echo "${ac_t:- |
6750 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
6751 | |
6752 | cat >>confdefs.h <<_ACEOF | |
6753 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6754 | _ACEOF | |
6755 | ||
6756 | fi | |
6c7a06a3 TT |
6757 | |
6758 | ||
478aac75 DE |
6759 | # GDB may fork/exec the iconv program to get the list of supported character |
6760 | # sets. Allow the user to specify where to find it. | |
6761 | # There are several factors affecting the choice of option name: | |
6762 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
6763 | # the build-time location of libiconv files. | |
6764 | # - The program we need to find is iconv, which comes with glibc. The user | |
6765 | # doesn't necessarily have libiconv installed. Therefore naming this | |
6766 | # --with-libiconv-foo feels wrong. | |
6767 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
6768 | # defined to work on directories not files (though it really doesn't know | |
6769 | # the difference). | |
6770 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
6771 | # with --with-libiconv-prefix. | |
6772 | # Putting these together is why the option name is --with-iconv-bin. | |
6773 | ||
6774 | ||
6775 | # Check whether --with-iconv-bin was given. | |
6776 | if test "${with_iconv_bin+set}" = set; then : | |
6777 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
6778 | ||
6779 | cat >>confdefs.h <<_ACEOF | |
6780 | #define ICONV_BIN "${iconv_bin}" | |
6781 | _ACEOF | |
6782 | ||
6783 | ||
6784 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6785 | if test "x$prefix" = xNONE; then | |
6786 | test_prefix=/usr/local | |
6787 | else | |
6788 | test_prefix=$prefix | |
6789 | fi | |
6790 | else | |
6791 | test_prefix=$exec_prefix | |
6792 | fi | |
6793 | value=0 | |
6794 | case ${iconv_bin} in | |
6795 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6796 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6797 | value=1 | |
6798 | ;; | |
6799 | esac | |
6800 | ||
6801 | cat >>confdefs.h <<_ACEOF | |
6802 | #define ICONV_BIN_RELOCATABLE $value | |
6803 | _ACEOF | |
6804 | ||
6805 | ||
6806 | ||
6807 | fi | |
6808 | ||
6809 | ||
6c7a06a3 TT |
6810 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
6811 | # There is a very specific comment in /usr/include/curses.h explaining that | |
6812 | # termcap routines built into libcurses must not be used. | |
6813 | # | |
6814 | # The symptoms we observed so far is GDB unexpectedly changing | |
6815 | # the terminal settings when tgetent is called - this is particularly | |
6816 | # visible as the output is missing carriage returns, and so rapidly | |
6817 | # becomes very hard to read. | |
6818 | # | |
6819 | # The readline configure script has already decided that libtermcap | |
6820 | # was enough for its purposes, and so decided to build readline using | |
6821 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
6822 | # TUI enabled results in both libraries to be used at the same time, | |
6823 | # which is not allowed. This basically means that GDB with TUI is | |
6824 | # broken on alpha-osf. | |
6825 | ||
6826 | case $host_os in | |
6bcc772d RO |
6827 | osf* ) |
6828 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6829 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 6830 | fi |
6bcc772d | 6831 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
6832 | enable_tui=no |
6833 | fi | |
6834 | ;; | |
6835 | esac | |
6836 | ||
cb01cfba | 6837 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 6838 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
6839 | prefer_curses=yes |
6840 | fi | |
6841 | ||
6842 | curses_found=no | |
6843 | if test x"$prefer_curses" = xyes; then | |
6844 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
6845 | # curses library because the latter might not provide all the | |
6846 | # functionality we need. However, this leads to problems on systems | |
6847 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
6848 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
6849 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
6850 | # a situation. | |
81ecdfbb RW |
6851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
6852 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
6853 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6854 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6855 | else |
6856 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6858 | /* end confdefs.h. */ |
6859 | ||
81ecdfbb RW |
6860 | /* Override any GCC internal prototype to avoid an error. |
6861 | Use char because int might match the return type of a GCC | |
6862 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6863 | #ifdef __cplusplus |
6864 | extern "C" | |
6865 | #endif | |
6c7a06a3 TT |
6866 | char waddstr (); |
6867 | int | |
6868 | main () | |
6869 | { | |
81ecdfbb | 6870 | return waddstr (); |
6c7a06a3 TT |
6871 | ; |
6872 | return 0; | |
6873 | } | |
6874 | _ACEOF | |
81ecdfbb RW |
6875 | for ac_lib in '' ncurses cursesX curses; do |
6876 | if test -z "$ac_lib"; then | |
6877 | ac_res="none required" | |
6878 | else | |
6879 | ac_res=-l$ac_lib | |
6880 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6881 | fi | |
6882 | if ac_fn_c_try_link "$LINENO"; then : | |
6883 | ac_cv_search_waddstr=$ac_res | |
6884 | fi | |
6885 | rm -f core conftest.err conftest.$ac_objext \ | |
6886 | conftest$ac_exeext | |
6887 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6888 | break | |
6889 | fi | |
6890 | done | |
6891 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6892 | ||
6c7a06a3 | 6893 | else |
81ecdfbb RW |
6894 | ac_cv_search_waddstr=no |
6895 | fi | |
6896 | rm conftest.$ac_ext | |
6897 | LIBS=$ac_func_search_save_LIBS | |
6898 | fi | |
6899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
6900 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
6901 | ac_res=$ac_cv_search_waddstr | |
6902 | if test "$ac_res" != no; then : | |
6903 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
6904 | |
6905 | fi | |
6906 | ||
6907 | ||
cb01cfba JB |
6908 | if test "$ac_cv_search_waddstr" != no; then |
6909 | curses_found=yes | |
6910 | fi | |
6911 | fi | |
6912 | ||
6913 | # Check whether we should enable the TUI, but only do so if we really | |
6914 | # can. | |
6915 | if test x"$enable_tui" != xno; then | |
6916 | if test -d $srcdir/tui; then | |
6917 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
6918 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
6919 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
6920 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
6921 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
6922 | else |
6923 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6924 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 6925 | else |
81ecdfbb RW |
6926 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
6927 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
6928 | fi |
6929 | fi | |
6930 | fi | |
6931 | fi | |
6932 | ||
6933 | # Since GDB uses Readline, we need termcap functionality. In many | |
6934 | # cases this will be provided by the curses library, but some systems | |
6935 | # have a seperate termcap library, or no curses library at all. | |
6936 | ||
6937 | case $host_os in | |
6938 | cygwin*) | |
6939 | if test -d $srcdir/libtermcap; then | |
6940 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
6941 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
6942 | fi ;; | |
6943 | go32* | *djgpp*) | |
6944 | ac_cv_search_tgetent="none required" | |
6945 | ;; | |
6946 | *mingw32*) | |
6947 | ac_cv_search_tgetent="none required" | |
6948 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
6949 | ;; | |
6950 | esac | |
6951 | ||
6952 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
6953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
6954 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
6955 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6956 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6957 | else |
6958 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6959 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6960 | /* end confdefs.h. */ |
6961 | ||
81ecdfbb RW |
6962 | /* Override any GCC internal prototype to avoid an error. |
6963 | Use char because int might match the return type of a GCC | |
6964 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6965 | #ifdef __cplusplus |
6966 | extern "C" | |
6967 | #endif | |
6c7a06a3 TT |
6968 | char tgetent (); |
6969 | int | |
6970 | main () | |
6971 | { | |
81ecdfbb | 6972 | return tgetent (); |
6c7a06a3 TT |
6973 | ; |
6974 | return 0; | |
6975 | } | |
6976 | _ACEOF | |
81ecdfbb RW |
6977 | for ac_lib in '' termcap tinfo curses ncurses; do |
6978 | if test -z "$ac_lib"; then | |
6979 | ac_res="none required" | |
6980 | else | |
6981 | ac_res=-l$ac_lib | |
6c7a06a3 | 6982 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6983 | fi |
6984 | if ac_fn_c_try_link "$LINENO"; then : | |
6985 | ac_cv_search_tgetent=$ac_res | |
6986 | fi | |
6987 | rm -f core conftest.err conftest.$ac_objext \ | |
6988 | conftest$ac_exeext | |
6989 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6990 | break | |
6991 | fi | |
6992 | done | |
6993 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 6994 | |
6c7a06a3 | 6995 | else |
81ecdfbb | 6996 | ac_cv_search_tgetent=no |
6c7a06a3 | 6997 | fi |
81ecdfbb | 6998 | rm conftest.$ac_ext |
6c7a06a3 TT |
6999 | LIBS=$ac_func_search_save_LIBS |
7000 | fi | |
81ecdfbb RW |
7001 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7002 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7003 | ac_res=$ac_cv_search_tgetent | |
7004 | if test "$ac_res" != no; then : | |
7005 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7006 | |
06825bd1 MK |
7007 | fi |
7008 | ||
06825bd1 | 7009 | |
bec39cab | 7010 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7011 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7012 | fi |
7013 | ||
3841debe | 7014 | |
81ecdfbb RW |
7015 | # Check whether --with-system-readline was given. |
7016 | if test "${with_system_readline+set}" = set; then : | |
7017 | withval=$with_system_readline; | |
7018 | fi | |
6a30b0a5 | 7019 | |
6a30b0a5 AS |
7020 | |
7021 | if test "$with_system_readline" = yes; then | |
7022 | READLINE=-lreadline | |
7023 | READLINE_DEPS= | |
7024 | READLINE_CFLAGS= | |
39037522 | 7025 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7026 | else |
7027 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7028 | READLINE_DEPS='$(READLINE)' | |
7029 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7030 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7031 | fi |
7032 | ||
7033 | ||
7034 | ||
7035 | ||
7036 | ||
f997c383 SD |
7037 | # Generate jit-reader.h |
7038 | ||
7039 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7040 | TARGET_PTR= | |
7041 | ||
7042 | # The cast to long int works around a bug in the HP C Compiler | |
7043 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7044 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7045 | # This bug is HP SR number 8606223364. | |
7046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7047 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7048 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7049 | $as_echo_n "(cached) " >&6 | |
7050 | else | |
7051 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7052 | ||
7053 | else | |
7054 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7055 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7056 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7057 | { as_fn_set_status 77 | |
7058 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7059 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7060 | else | |
7061 | ac_cv_sizeof_unsigned_long_long=0 | |
7062 | fi | |
7063 | fi | |
7064 | ||
7065 | fi | |
7066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7067 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7068 | ||
7069 | ||
7070 | ||
7071 | cat >>confdefs.h <<_ACEOF | |
7072 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7073 | _ACEOF | |
7074 | ||
7075 | ||
7076 | # The cast to long int works around a bug in the HP C Compiler | |
7077 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7078 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7079 | # This bug is HP SR number 8606223364. | |
7080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7081 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7082 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7083 | $as_echo_n "(cached) " >&6 | |
7084 | else | |
7085 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7086 | ||
7087 | else | |
7088 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7089 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7090 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7091 | { as_fn_set_status 77 | |
7092 | as_fn_error "cannot compute sizeof (unsigned long) | |
7093 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7094 | else | |
7095 | ac_cv_sizeof_unsigned_long=0 | |
7096 | fi | |
7097 | fi | |
7098 | ||
7099 | fi | |
7100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7101 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7102 | ||
7103 | ||
7104 | ||
7105 | cat >>confdefs.h <<_ACEOF | |
7106 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7107 | _ACEOF | |
7108 | ||
7109 | ||
7110 | # The cast to long int works around a bug in the HP C Compiler | |
7111 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7112 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7113 | # This bug is HP SR number 8606223364. | |
7114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7115 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7116 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7117 | $as_echo_n "(cached) " >&6 | |
7118 | else | |
7119 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7120 | ||
7121 | else | |
7122 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7123 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7124 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7125 | { as_fn_set_status 77 | |
7126 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7127 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7128 | else | |
7129 | ac_cv_sizeof_unsigned___int128=0 | |
7130 | fi | |
7131 | fi | |
7132 | ||
7133 | fi | |
7134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7135 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7136 | ||
7137 | ||
7138 | ||
7139 | cat >>confdefs.h <<_ACEOF | |
7140 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7141 | _ACEOF | |
7142 | ||
7143 | ||
7144 | ||
7145 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7146 | TARGET_PTR="unsigned long" | |
7147 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7148 | TARGET_PTR="unsigned long long" | |
7149 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7150 | TARGET_PTR="unsigned __int128" | |
7151 | else | |
7152 | TARGET_PTR="unsigned long" | |
7153 | fi | |
7154 | ||
7155 | ||
7156 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7157 | ||
7158 | ||
a2d08b9e SD |
7159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7160 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7161 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7162 | $as_echo_n "(cached) " >&6 | |
7163 | else | |
7164 | ac_func_search_save_LIBS=$LIBS | |
7165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7166 | /* end confdefs.h. */ | |
7167 | ||
7168 | /* Override any GCC internal prototype to avoid an error. | |
7169 | Use char because int might match the return type of a GCC | |
7170 | builtin and then its argument prototype would still apply. */ | |
7171 | #ifdef __cplusplus | |
7172 | extern "C" | |
7173 | #endif | |
7174 | char dlopen (); | |
7175 | int | |
7176 | main () | |
7177 | { | |
7178 | return dlopen (); | |
7179 | ; | |
7180 | return 0; | |
7181 | } | |
7182 | _ACEOF | |
7183 | for ac_lib in '' dl; do | |
7184 | if test -z "$ac_lib"; then | |
7185 | ac_res="none required" | |
7186 | else | |
7187 | ac_res=-l$ac_lib | |
7188 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7189 | fi | |
7190 | if ac_fn_c_try_link "$LINENO"; then : | |
7191 | ac_cv_search_dlopen=$ac_res | |
7192 | fi | |
7193 | rm -f core conftest.err conftest.$ac_objext \ | |
7194 | conftest$ac_exeext | |
7195 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7196 | break | |
7197 | fi | |
7198 | done | |
7199 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7200 | ||
7201 | else | |
7202 | ac_cv_search_dlopen=no | |
7203 | fi | |
7204 | rm conftest.$ac_ext | |
7205 | LIBS=$ac_func_search_save_LIBS | |
7206 | fi | |
7207 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7208 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7209 | ac_res=$ac_cv_search_dlopen | |
7210 | if test "$ac_res" != no; then : | |
7211 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7212 | ||
7213 | fi | |
7214 | ||
7215 | ||
39037522 | 7216 | |
b8e0a31c SD |
7217 | |
7218 | # Check whether --with-jit-reader-dir was given. | |
7219 | if test "${with_jit_reader_dir+set}" = set; then : | |
7220 | withval=$with_jit_reader_dir; | |
7221 | JIT_READER_DIR=$withval | |
7222 | else | |
7223 | JIT_READER_DIR=${libdir}/gdb | |
7224 | fi | |
7225 | ||
7226 | ||
7227 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7228 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7229 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7230 | ac_define_dir=`eval echo $ac_define_dir` | |
7231 | ||
7232 | cat >>confdefs.h <<_ACEOF | |
7233 | #define JIT_READER_DIR "$ac_define_dir" | |
7234 | _ACEOF | |
7235 | ||
7236 | ||
7237 | ||
7238 | ||
7239 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7240 | if test "x$prefix" = xNONE; then | |
7241 | test_prefix=/usr/local | |
7242 | else | |
7243 | test_prefix=$prefix | |
7244 | fi | |
7245 | else | |
7246 | test_prefix=$exec_prefix | |
7247 | fi | |
7248 | value=0 | |
7249 | case ${ac_define_dir} in | |
7250 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7251 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7252 | value=1 | |
7253 | ;; | |
7254 | esac | |
7255 | ||
7256 | cat >>confdefs.h <<_ACEOF | |
7257 | #define JIT_READER_DIR_RELOCATABLE $value | |
7258 | _ACEOF | |
7259 | ||
7260 | ||
7261 | ||
7262 | ||
7263 | ||
81ecdfbb RW |
7264 | # Check whether --with-expat was given. |
7265 | if test "${with_expat+set}" = set; then : | |
7266 | withval=$with_expat; | |
5c39566f DJ |
7267 | else |
7268 | with_expat=auto | |
81ecdfbb RW |
7269 | fi |
7270 | ||
7271 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7272 | $as_echo_n "checking whether to use expat... " >&6; } | |
7273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7274 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7275 | |
7276 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7277 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7278 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7279 | HAVE_LIBEXPAT=no |
7280 | else | |
7281 | ||
3841debe DJ |
7282 | if test "X$prefix" = "XNONE"; then |
7283 | acl_final_prefix="$ac_default_prefix" | |
7284 | else | |
7285 | acl_final_prefix="$prefix" | |
7286 | fi | |
7287 | if test "X$exec_prefix" = "XNONE"; then | |
7288 | acl_final_exec_prefix='${prefix}' | |
7289 | else | |
7290 | acl_final_exec_prefix="$exec_prefix" | |
7291 | fi | |
7292 | acl_save_prefix="$prefix" | |
7293 | prefix="$acl_final_prefix" | |
7294 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7295 | prefix="$acl_save_prefix" | |
7296 | ||
7297 | ||
81ecdfbb RW |
7298 | # Check whether --with-gnu-ld was given. |
7299 | if test "${with_gnu_ld+set}" = set; then : | |
7300 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7301 | else |
7302 | with_gnu_ld=no | |
81ecdfbb RW |
7303 | fi |
7304 | ||
3841debe DJ |
7305 | # Prepare PATH_SEPARATOR. |
7306 | # The user is always right. | |
7307 | if test "${PATH_SEPARATOR+set}" != set; then | |
7308 | echo "#! /bin/sh" >conf$$.sh | |
7309 | echo "exit 0" >>conf$$.sh | |
7310 | chmod +x conf$$.sh | |
7311 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7312 | PATH_SEPARATOR=';' | |
7313 | else | |
7314 | PATH_SEPARATOR=: | |
7315 | fi | |
7316 | rm -f conf$$.sh | |
7317 | fi | |
7318 | ac_prog=ld | |
7319 | if test "$GCC" = yes; then | |
7320 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7321 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7322 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7323 | case $host in |
7324 | *-*-mingw*) | |
7325 | # gcc leaves a trailing carriage return which upsets mingw | |
7326 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7327 | *) | |
7328 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7329 | esac | |
7330 | case $ac_prog in | |
7331 | # Accept absolute paths. | |
7332 | [\\/]* | [A-Za-z]:[\\/]*) | |
7333 | re_direlt='/[^/][^/]*/\.\./' | |
7334 | # Canonicalize the path of ld | |
7335 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7336 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7337 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7338 | done | |
7339 | test -z "$LD" && LD="$ac_prog" | |
7340 | ;; | |
7341 | "") | |
7342 | # If it fails, then pretend we aren't using GCC. | |
7343 | ac_prog=ld | |
7344 | ;; | |
7345 | *) | |
7346 | # If it is relative, then search for the first ld in PATH. | |
7347 | with_gnu_ld=unknown | |
7348 | ;; | |
7349 | esac | |
7350 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7351 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7352 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7353 | else |
81ecdfbb RW |
7354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7355 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7356 | fi |
81ecdfbb RW |
7357 | if test "${acl_cv_path_LD+set}" = set; then : |
7358 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7359 | else |
7360 | if test -z "$LD"; then | |
7361 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7362 | for ac_dir in $PATH; do | |
7363 | test -z "$ac_dir" && ac_dir=. | |
7364 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7365 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7366 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7367 | # but apparently some GNU ld's only accept -v. | |
7368 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7369 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7370 | test "$with_gnu_ld" != no && break | |
7371 | else | |
7372 | test "$with_gnu_ld" != yes && break | |
7373 | fi | |
7374 | fi | |
7375 | done | |
7376 | IFS="$ac_save_ifs" | |
7377 | else | |
7378 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7379 | fi | |
7380 | fi | |
7381 | ||
7382 | LD="$acl_cv_path_LD" | |
7383 | if test -n "$LD"; then | |
81ecdfbb RW |
7384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7385 | $as_echo "$LD" >&6; } | |
3841debe | 7386 | else |
81ecdfbb RW |
7387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7388 | $as_echo "no" >&6; } | |
3841debe | 7389 | fi |
81ecdfbb RW |
7390 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7392 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7393 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7394 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7395 | else |
7396 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7397 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7398 | acl_cv_prog_gnu_ld=yes | |
7399 | else | |
7400 | acl_cv_prog_gnu_ld=no | |
7401 | fi | |
7402 | fi | |
81ecdfbb RW |
7403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7404 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7405 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7406 | ||
7407 | ||
7408 | ||
81ecdfbb RW |
7409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7410 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7411 | if test "${acl_cv_rpath+set}" = set; then : | |
7412 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7413 | else |
7414 | ||
7415 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7416 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7417 | . ./conftest.sh | |
7418 | rm -f ./conftest.sh | |
7419 | acl_cv_rpath=done | |
7420 | ||
7421 | fi | |
81ecdfbb RW |
7422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7423 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7424 | wl="$acl_cv_wl" |
7425 | libext="$acl_cv_libext" | |
7426 | shlibext="$acl_cv_shlibext" | |
7427 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7428 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7429 | hardcode_direct="$acl_cv_hardcode_direct" | |
7430 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7431 | # Check whether --enable-rpath was given. |
7432 | if test "${enable_rpath+set}" = set; then : | |
7433 | enableval=$enable_rpath; : | |
3841debe DJ |
7434 | else |
7435 | enable_rpath=yes | |
81ecdfbb RW |
7436 | fi |
7437 | ||
3841debe DJ |
7438 | |
7439 | ||
7440 | ||
7441 | ||
7442 | ||
7443 | ||
7444 | ||
7445 | ||
7446 | ||
7447 | use_additional=yes | |
7448 | ||
7449 | acl_save_prefix="$prefix" | |
7450 | prefix="$acl_final_prefix" | |
7451 | acl_save_exec_prefix="$exec_prefix" | |
7452 | exec_prefix="$acl_final_exec_prefix" | |
7453 | ||
7454 | eval additional_includedir=\"$includedir\" | |
7455 | eval additional_libdir=\"$libdir\" | |
7456 | ||
7457 | exec_prefix="$acl_save_exec_prefix" | |
7458 | prefix="$acl_save_prefix" | |
7459 | ||
7460 | ||
81ecdfbb RW |
7461 | # Check whether --with-libexpat-prefix was given. |
7462 | if test "${with_libexpat_prefix+set}" = set; then : | |
7463 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7464 | if test "X$withval" = "Xno"; then |
7465 | use_additional=no | |
7466 | else | |
7467 | if test "X$withval" = "X"; then | |
7468 | ||
7469 | acl_save_prefix="$prefix" | |
7470 | prefix="$acl_final_prefix" | |
7471 | acl_save_exec_prefix="$exec_prefix" | |
7472 | exec_prefix="$acl_final_exec_prefix" | |
7473 | ||
7474 | eval additional_includedir=\"$includedir\" | |
7475 | eval additional_libdir=\"$libdir\" | |
7476 | ||
7477 | exec_prefix="$acl_save_exec_prefix" | |
7478 | prefix="$acl_save_prefix" | |
7479 | ||
7480 | else | |
7481 | additional_includedir="$withval/include" | |
7482 | additional_libdir="$withval/lib" | |
7483 | fi | |
7484 | fi | |
7485 | ||
81ecdfbb RW |
7486 | fi |
7487 | ||
3841debe DJ |
7488 | LIBEXPAT= |
7489 | LTLIBEXPAT= | |
7490 | INCEXPAT= | |
7491 | rpathdirs= | |
7492 | ltrpathdirs= | |
7493 | names_already_handled= | |
7494 | names_next_round='expat ' | |
7495 | while test -n "$names_next_round"; do | |
7496 | names_this_round="$names_next_round" | |
7497 | names_next_round= | |
7498 | for name in $names_this_round; do | |
7499 | already_handled= | |
7500 | for n in $names_already_handled; do | |
7501 | if test "$n" = "$name"; then | |
7502 | already_handled=yes | |
7503 | break | |
7504 | fi | |
7505 | done | |
7506 | if test -z "$already_handled"; then | |
7507 | names_already_handled="$names_already_handled $name" | |
7508 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7509 | eval value=\"\$HAVE_LIB$uppername\" | |
7510 | if test -n "$value"; then | |
7511 | if test "$value" = yes; then | |
7512 | eval value=\"\$LIB$uppername\" | |
7513 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7514 | eval value=\"\$LTLIB$uppername\" | |
7515 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7516 | else | |
7517 | : | |
7518 | fi | |
7519 | else | |
7520 | found_dir= | |
7521 | found_la= | |
7522 | found_so= | |
7523 | found_a= | |
7524 | if test $use_additional = yes; then | |
7525 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7526 | found_dir="$additional_libdir" | |
7527 | found_so="$additional_libdir/lib$name.$shlibext" | |
7528 | if test -f "$additional_libdir/lib$name.la"; then | |
7529 | found_la="$additional_libdir/lib$name.la" | |
7530 | fi | |
7531 | else | |
7532 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7533 | found_dir="$additional_libdir" | |
7534 | found_a="$additional_libdir/lib$name.$libext" | |
7535 | if test -f "$additional_libdir/lib$name.la"; then | |
7536 | found_la="$additional_libdir/lib$name.la" | |
7537 | fi | |
7538 | fi | |
7539 | fi | |
7540 | fi | |
7541 | if test "X$found_dir" = "X"; then | |
7542 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7543 | ||
7544 | acl_save_prefix="$prefix" | |
7545 | prefix="$acl_final_prefix" | |
7546 | acl_save_exec_prefix="$exec_prefix" | |
7547 | exec_prefix="$acl_final_exec_prefix" | |
7548 | eval x=\"$x\" | |
7549 | exec_prefix="$acl_save_exec_prefix" | |
7550 | prefix="$acl_save_prefix" | |
7551 | ||
7552 | case "$x" in | |
7553 | -L*) | |
7554 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7555 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7556 | found_dir="$dir" | |
7557 | found_so="$dir/lib$name.$shlibext" | |
7558 | if test -f "$dir/lib$name.la"; then | |
7559 | found_la="$dir/lib$name.la" | |
7560 | fi | |
7561 | else | |
7562 | if test -f "$dir/lib$name.$libext"; then | |
7563 | found_dir="$dir" | |
7564 | found_a="$dir/lib$name.$libext" | |
7565 | if test -f "$dir/lib$name.la"; then | |
7566 | found_la="$dir/lib$name.la" | |
7567 | fi | |
7568 | fi | |
7569 | fi | |
7570 | ;; | |
7571 | esac | |
7572 | if test "X$found_dir" != "X"; then | |
7573 | break | |
7574 | fi | |
7575 | done | |
7576 | fi | |
7577 | if test "X$found_dir" != "X"; then | |
7578 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7579 | if test "X$found_so" != "X"; then | |
7580 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7581 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7582 | else | |
7583 | haveit= | |
7584 | for x in $ltrpathdirs; do | |
7585 | if test "X$x" = "X$found_dir"; then | |
7586 | haveit=yes | |
7587 | break | |
7588 | fi | |
7589 | done | |
7590 | if test -z "$haveit"; then | |
7591 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7592 | fi | |
7593 | if test "$hardcode_direct" = yes; then | |
7594 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7595 | else | |
7596 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7597 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7598 | haveit= | |
7599 | for x in $rpathdirs; do | |
7600 | if test "X$x" = "X$found_dir"; then | |
7601 | haveit=yes | |
7602 | break | |
7603 | fi | |
7604 | done | |
7605 | if test -z "$haveit"; then | |
7606 | rpathdirs="$rpathdirs $found_dir" | |
7607 | fi | |
7608 | else | |
7609 | haveit= | |
7610 | for x in $LDFLAGS $LIBEXPAT; do | |
7611 | ||
7612 | acl_save_prefix="$prefix" | |
7613 | prefix="$acl_final_prefix" | |
7614 | acl_save_exec_prefix="$exec_prefix" | |
7615 | exec_prefix="$acl_final_exec_prefix" | |
7616 | eval x=\"$x\" | |
7617 | exec_prefix="$acl_save_exec_prefix" | |
7618 | prefix="$acl_save_prefix" | |
7619 | ||
7620 | if test "X$x" = "X-L$found_dir"; then | |
7621 | haveit=yes | |
7622 | break | |
7623 | fi | |
7624 | done | |
7625 | if test -z "$haveit"; then | |
7626 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7627 | fi | |
7628 | if test "$hardcode_minus_L" != no; then | |
7629 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7630 | else | |
7631 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7632 | fi | |
7633 | fi | |
7634 | fi | |
7635 | fi | |
7636 | else | |
7637 | if test "X$found_a" != "X"; then | |
7638 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7639 | else | |
7640 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7641 | fi | |
7642 | fi | |
7643 | additional_includedir= | |
7644 | case "$found_dir" in | |
7645 | */lib | */lib/) | |
7646 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7647 | additional_includedir="$basedir/include" | |
7648 | ;; | |
7649 | esac | |
7650 | if test "X$additional_includedir" != "X"; then | |
7651 | if test "X$additional_includedir" != "X/usr/include"; then | |
7652 | haveit= | |
7653 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7654 | if test -n "$GCC"; then | |
7655 | case $host_os in | |
7656 | linux*) haveit=yes;; | |
7657 | esac | |
7658 | fi | |
7659 | fi | |
7660 | if test -z "$haveit"; then | |
7661 | for x in $CPPFLAGS $INCEXPAT; do | |
7662 | ||
7663 | acl_save_prefix="$prefix" | |
7664 | prefix="$acl_final_prefix" | |
7665 | acl_save_exec_prefix="$exec_prefix" | |
7666 | exec_prefix="$acl_final_exec_prefix" | |
7667 | eval x=\"$x\" | |
7668 | exec_prefix="$acl_save_exec_prefix" | |
7669 | prefix="$acl_save_prefix" | |
7670 | ||
7671 | if test "X$x" = "X-I$additional_includedir"; then | |
7672 | haveit=yes | |
7673 | break | |
7674 | fi | |
7675 | done | |
7676 | if test -z "$haveit"; then | |
7677 | if test -d "$additional_includedir"; then | |
7678 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7679 | fi | |
7680 | fi | |
7681 | fi | |
7682 | fi | |
7683 | fi | |
7684 | if test -n "$found_la"; then | |
7685 | save_libdir="$libdir" | |
7686 | case "$found_la" in | |
7687 | */* | *\\*) . "$found_la" ;; | |
7688 | *) . "./$found_la" ;; | |
7689 | esac | |
7690 | libdir="$save_libdir" | |
7691 | for dep in $dependency_libs; do | |
7692 | case "$dep" in | |
7693 | -L*) | |
7694 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7695 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7696 | haveit= | |
7697 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7698 | if test -n "$GCC"; then | |
7699 | case $host_os in | |
7700 | linux*) haveit=yes;; | |
7701 | esac | |
7702 | fi | |
7703 | fi | |
7704 | if test -z "$haveit"; then | |
7705 | haveit= | |
7706 | for x in $LDFLAGS $LIBEXPAT; do | |
7707 | ||
7708 | acl_save_prefix="$prefix" | |
7709 | prefix="$acl_final_prefix" | |
7710 | acl_save_exec_prefix="$exec_prefix" | |
7711 | exec_prefix="$acl_final_exec_prefix" | |
7712 | eval x=\"$x\" | |
7713 | exec_prefix="$acl_save_exec_prefix" | |
7714 | prefix="$acl_save_prefix" | |
7715 | ||
7716 | if test "X$x" = "X-L$additional_libdir"; then | |
7717 | haveit=yes | |
7718 | break | |
7719 | fi | |
7720 | done | |
7721 | if test -z "$haveit"; then | |
7722 | if test -d "$additional_libdir"; then | |
7723 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7724 | fi | |
7725 | fi | |
7726 | haveit= | |
7727 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7728 | ||
7729 | acl_save_prefix="$prefix" | |
7730 | prefix="$acl_final_prefix" | |
7731 | acl_save_exec_prefix="$exec_prefix" | |
7732 | exec_prefix="$acl_final_exec_prefix" | |
7733 | eval x=\"$x\" | |
7734 | exec_prefix="$acl_save_exec_prefix" | |
7735 | prefix="$acl_save_prefix" | |
7736 | ||
7737 | if test "X$x" = "X-L$additional_libdir"; then | |
7738 | haveit=yes | |
7739 | break | |
7740 | fi | |
7741 | done | |
7742 | if test -z "$haveit"; then | |
7743 | if test -d "$additional_libdir"; then | |
7744 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7745 | fi | |
7746 | fi | |
7747 | fi | |
7748 | fi | |
7749 | ;; | |
7750 | -R*) | |
7751 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7752 | if test "$enable_rpath" != no; then | |
7753 | haveit= | |
7754 | for x in $rpathdirs; do | |
7755 | if test "X$x" = "X$dir"; then | |
7756 | haveit=yes | |
7757 | break | |
7758 | fi | |
7759 | done | |
7760 | if test -z "$haveit"; then | |
7761 | rpathdirs="$rpathdirs $dir" | |
7762 | fi | |
7763 | haveit= | |
7764 | for x in $ltrpathdirs; do | |
7765 | if test "X$x" = "X$dir"; then | |
7766 | haveit=yes | |
7767 | break | |
7768 | fi | |
7769 | done | |
7770 | if test -z "$haveit"; then | |
7771 | ltrpathdirs="$ltrpathdirs $dir" | |
7772 | fi | |
7773 | fi | |
7774 | ;; | |
7775 | -l*) | |
7776 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7777 | ;; | |
7778 | *.la) | |
7779 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7780 | ;; | |
7781 | *) | |
7782 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
7783 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
7784 | ;; | |
81ecdfbb RW |
7785 | esac |
7786 | done | |
7787 | fi | |
7788 | else | |
7789 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7790 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
7791 | fi | |
7792 | fi | |
7793 | fi | |
7794 | done | |
7795 | done | |
7796 | if test "X$rpathdirs" != "X"; then | |
7797 | if test -n "$hardcode_libdir_separator"; then | |
7798 | alldirs= | |
7799 | for found_dir in $rpathdirs; do | |
7800 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7801 | done | |
7802 | acl_save_libdir="$libdir" | |
7803 | libdir="$alldirs" | |
7804 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7805 | libdir="$acl_save_libdir" | |
7806 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7807 | else | |
7808 | for found_dir in $rpathdirs; do | |
7809 | acl_save_libdir="$libdir" | |
7810 | libdir="$found_dir" | |
7811 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7812 | libdir="$acl_save_libdir" | |
7813 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7814 | done | |
7815 | fi | |
7816 | fi | |
7817 | if test "X$ltrpathdirs" != "X"; then | |
7818 | for found_dir in $ltrpathdirs; do | |
7819 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
7820 | done | |
7821 | fi | |
a9322a30 TT |
7822 | |
7823 | ||
81ecdfbb | 7824 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 7825 | |
81ecdfbb RW |
7826 | for element in $INCEXPAT; do |
7827 | haveit= | |
7828 | for x in $CPPFLAGS; do | |
a9322a30 | 7829 | |
81ecdfbb RW |
7830 | acl_save_prefix="$prefix" |
7831 | prefix="$acl_final_prefix" | |
7832 | acl_save_exec_prefix="$exec_prefix" | |
7833 | exec_prefix="$acl_final_exec_prefix" | |
7834 | eval x=\"$x\" | |
7835 | exec_prefix="$acl_save_exec_prefix" | |
7836 | prefix="$acl_save_prefix" | |
a8111142 | 7837 | |
81ecdfbb RW |
7838 | if test "X$x" = "X$element"; then |
7839 | haveit=yes | |
7840 | break | |
7841 | fi | |
7842 | done | |
7843 | if test -z "$haveit"; then | |
7844 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
7845 | fi | |
7846 | done | |
a9322a30 TT |
7847 | |
7848 | ||
81ecdfbb RW |
7849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
7850 | $as_echo_n "checking for libexpat... " >&6; } | |
7851 | if test "${ac_cv_libexpat+set}" = set; then : | |
7852 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7853 | else |
bec39cab | 7854 | |
81ecdfbb RW |
7855 | ac_save_LIBS="$LIBS" |
7856 | LIBS="$LIBS $LIBEXPAT" | |
7857 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 7858 | /* end confdefs.h. */ |
81ecdfbb RW |
7859 | #include "expat.h" |
7860 | int | |
7861 | main () | |
7862 | { | |
7863 | XML_Parser p = XML_ParserCreate (0); | |
7864 | ; | |
7865 | return 0; | |
7866 | } | |
bec39cab | 7867 | _ACEOF |
81ecdfbb RW |
7868 | if ac_fn_c_try_link "$LINENO"; then : |
7869 | ac_cv_libexpat=yes | |
c906108c | 7870 | else |
81ecdfbb | 7871 | ac_cv_libexpat=no |
bec39cab | 7872 | fi |
81ecdfbb RW |
7873 | rm -f core conftest.err conftest.$ac_objext \ |
7874 | conftest$ac_exeext conftest.$ac_ext | |
7875 | LIBS="$ac_save_LIBS" | |
c906108c | 7876 | |
95ca63c4 | 7877 | fi |
81ecdfbb RW |
7878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
7879 | $as_echo "$ac_cv_libexpat" >&6; } | |
7880 | if test "$ac_cv_libexpat" = yes; then | |
7881 | HAVE_LIBEXPAT=yes | |
bec39cab | 7882 | |
81ecdfbb | 7883 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 7884 | |
81ecdfbb RW |
7885 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
7886 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
7887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
7888 | $as_echo "$LIBEXPAT" >&6; } | |
7889 | else | |
7890 | HAVE_LIBEXPAT=no | |
7891 | CPPFLAGS="$ac_save_CPPFLAGS" | |
7892 | LIBEXPAT= | |
7893 | LTLIBEXPAT= | |
7894 | fi | |
95ca63c4 CF |
7895 | |
7896 | ||
7897 | ||
7cb9022a MK |
7898 | |
7899 | ||
bec39cab | 7900 | |
81ecdfbb RW |
7901 | if test "$HAVE_LIBEXPAT" != yes; then |
7902 | if test "$with_expat" = yes; then | |
7903 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
7904 | else | |
7905 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
7906 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
7907 | fi | |
7908 | else | |
7909 | save_LIBS=$LIBS | |
7910 | LIBS="$LIBS $LIBEXPAT" | |
7911 | for ac_func in XML_StopParser | |
7912 | do : | |
7913 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
7914 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 7915 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7916 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 7917 | _ACEOF |
95ca63c4 | 7918 | |
bec39cab | 7919 | fi |
bec39cab | 7920 | done |
95ca63c4 | 7921 | |
81ecdfbb RW |
7922 | LIBS=$save_LIBS |
7923 | fi | |
a9322a30 TT |
7924 | fi |
7925 | ||
a9322a30 | 7926 | |
a9322a30 TT |
7927 | |
7928 | ||
ec685c5e | 7929 | |
0c4a4063 | 7930 | |
81ecdfbb RW |
7931 | # Check whether --with-python was given. |
7932 | if test "${with_python+set}" = set; then : | |
7933 | withval=$with_python; | |
bec39cab | 7934 | else |
81ecdfbb | 7935 | with_python=auto |
bec39cab | 7936 | fi |
bec39cab | 7937 | |
81ecdfbb RW |
7938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
7939 | $as_echo_n "checking whether to use python... " >&6; } | |
7940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
7941 | $as_echo "$with_python" >&6; } | |
9a156167 | 7942 | |
81ecdfbb RW |
7943 | if test "${with_python}" = no; then |
7944 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
7945 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
7946 | have_libpython=no | |
bec39cab | 7947 | else |
81ecdfbb | 7948 | case "${with_python}" in |
8c85a4e2 | 7949 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
7950 | if test -d ${with_python}; then |
7951 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 7952 | python_prog="${with_python}/bin/python" |
0c4a4063 | 7953 | python_prefix= |
9c4ea6c5 JB |
7954 | # If python does not exit ${with_python}/bin, then try in |
7955 | # ${with_python}. On Windows/MinGW, this is where the Python | |
7956 | # executable is. | |
7957 | if test ! -x "${python_prog}"; then | |
7958 | python_prog="${with_python}/python" | |
7959 | python_prefix= | |
7960 | fi | |
e7a30f46 | 7961 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
7962 | # Fall back to gdb 7.0/7.1 behaviour. |
7963 | python_prog=missing | |
0c4a4063 | 7964 | python_prefix=${with_python} |
ec685c5e | 7965 | fi |
e7a30f46 | 7966 | elif test -x "${with_python}"; then |
ec685c5e DE |
7967 | # While we can't run python compiled for $host (unless host == build), |
7968 | # the user could write a script that provides the needed information, | |
7969 | # so we support that. | |
ec685c5e | 7970 | python_prog=${with_python} |
0c4a4063 | 7971 | python_prefix= |
ec685c5e DE |
7972 | else |
7973 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
7974 | fi | |
81ecdfbb | 7975 | ;; |
ec685c5e DE |
7976 | */*) |
7977 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
7978 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
7979 | ;; | |
ec685c5e DE |
7980 | *) |
7981 | # The user has either specified auto, yes, or the name of the python | |
7982 | # program assumed to be in $PATH. | |
7983 | python_prefix= | |
7984 | case "${with_python}" in | |
7985 | yes | auto) | |
7986 | if test ${build} = ${host}; then | |
7987 | # Extract the first word of "python", so it can be a program name with args. | |
7988 | set dummy python; ac_word=$2 | |
7989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7990 | $as_echo_n "checking for $ac_word... " >&6; } | |
7991 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
7992 | $as_echo_n "(cached) " >&6 | |
7993 | else | |
7994 | case $python_prog_path in | |
7995 | [\\/]* | ?:[\\/]*) | |
7996 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
7997 | ;; | |
7998 | *) | |
7999 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8000 | for as_dir in $PATH | |
8001 | do | |
8002 | IFS=$as_save_IFS | |
8003 | test -z "$as_dir" && as_dir=. | |
8004 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8005 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8006 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8007 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8008 | break 2 | |
8009 | fi | |
8010 | done | |
8011 | done | |
8012 | IFS=$as_save_IFS | |
8013 | ||
8014 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8015 | ;; | |
8016 | esac | |
8017 | fi | |
8018 | python_prog_path=$ac_cv_path_python_prog_path | |
8019 | if test -n "$python_prog_path"; then | |
8020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8021 | $as_echo "$python_prog_path" >&6; } | |
8022 | else | |
8023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8024 | $as_echo "no" >&6; } | |
8025 | fi | |
8026 | ||
8027 | ||
8028 | if test "${python_prog_path}" = missing; then | |
8029 | python_prog=missing | |
8030 | else | |
8031 | python_prog=${python_prog_path} | |
8032 | fi | |
8033 | else | |
8034 | # Not much we can do except assume the cross-compiler will find the | |
8035 | # right files. | |
8036 | python_prog=missing | |
8037 | fi | |
8038 | ;; | |
8039 | *) | |
8040 | # While we can't run python compiled for $host (unless host == build), | |
8041 | # the user could write a script that provides the needed information, | |
8042 | # so we support that. | |
8043 | python_prog="${with_python}" | |
8044 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8045 | set dummy ${python_prog}; ac_word=$2 | |
8046 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8047 | $as_echo_n "checking for $ac_word... " >&6; } | |
8048 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8049 | $as_echo_n "(cached) " >&6 | |
8050 | else | |
8051 | case $python_prog_path in | |
8052 | [\\/]* | ?:[\\/]*) | |
8053 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8054 | ;; | |
8055 | *) | |
8056 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8057 | for as_dir in $PATH | |
8058 | do | |
8059 | IFS=$as_save_IFS | |
8060 | test -z "$as_dir" && as_dir=. | |
8061 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8062 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8063 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8064 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8065 | break 2 | |
8066 | fi | |
8067 | done | |
8068 | done | |
8069 | IFS=$as_save_IFS | |
8070 | ||
8071 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8072 | ;; | |
8073 | esac | |
8074 | fi | |
8075 | python_prog_path=$ac_cv_path_python_prog_path | |
8076 | if test -n "$python_prog_path"; then | |
8077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8078 | $as_echo "$python_prog_path" >&6; } | |
8079 | else | |
8080 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8081 | $as_echo "no" >&6; } | |
8082 | fi | |
8083 | ||
8084 | ||
8085 | if test "${python_prog_path}" = missing; then | |
8086 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8087 | fi | |
8088 | ;; | |
8089 | esac | |
81ecdfbb RW |
8090 | esac |
8091 | ||
ec685c5e | 8092 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8093 | # We have a python program to use, but it may be too old. |
8094 | # Don't flag an error for --with-python=auto (the default). | |
8095 | have_python_config=yes | |
ec685c5e DE |
8096 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8097 | if test $? != 0; then | |
e7a30f46 DE |
8098 | have_python_config=failed |
8099 | if test "${with_python}" != auto; then | |
8100 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8101 | fi | |
ec685c5e DE |
8102 | fi |
8103 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8104 | if test $? != 0; then | |
e7a30f46 DE |
8105 | have_python_config=failed |
8106 | if test "${with_python}" != auto; then | |
8107 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8108 | fi | |
ec685c5e | 8109 | fi |
0c4a4063 DE |
8110 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8111 | if test $? != 0; then | |
e7a30f46 DE |
8112 | have_python_config=failed |
8113 | if test "${with_python}" != auto; then | |
8114 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8115 | fi | |
0c4a4063 | 8116 | fi |
ec685c5e | 8117 | else |
ac534cba JB |
8118 | # We do not have a python executable we can use to determine where |
8119 | # to find the Python headers and libs. We cannot guess the include | |
8120 | # path from the python_prefix either, because that include path | |
8121 | # depends on the Python version. So, there is nothing much we can | |
8122 | # do except assume that the compiler will be able to find those files. | |
8123 | python_includes= | |
8124 | python_libs= | |
0c4a4063 | 8125 | have_python_config=no |
ec685c5e | 8126 | fi |
bec39cab | 8127 | |
ec685c5e DE |
8128 | # If we have python-config, only try the configuration it provides. |
8129 | # Otherwise fallback on the old way of trying different versions of | |
8130 | # python in turn. | |
81ecdfbb | 8131 | |
ec685c5e DE |
8132 | have_libpython=no |
8133 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8134 | # Determine the Python version by extracting "-lpython<version>" |
8135 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8136 | # being decimal numbers, but can also be XY (seen on Windows). | |
8137 | # | |
8138 | # The extraction is performed using sed with a regular expression. | |
8139 | # Initially, the regexp used was using the '?' quantifier to make | |
8140 | # the dot in the version number optional. Unfortunately, this | |
8141 | # does not work with non-GNU versions of sed because, because of | |
8142 | # what looks like a limitation (the '?' quantifier does not work | |
8143 | # with back-references). We work around this limitation by using | |
8144 | # the '*' quantifier instead. It means that, in theory, we might | |
8145 | # match unexpected version strings such as "-lpython2..7", but | |
8146 | # this seems unlikely in practice. And even if that happens, | |
8147 | # an error will be triggered later on, when checking that version | |
8148 | # number. | |
ec685c5e | 8149 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8150 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8151 | case "${python_version}" in |
8152 | python*) | |
ec685c5e DE |
8153 | |
8154 | version=${python_version} | |
8155 | ||
8156 | new_CPPFLAGS=${python_includes} | |
8157 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8159 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8160 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8161 | save_LIBS=$LIBS |
ec685c5e DE |
8162 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8163 | LIBS="$LIBS $new_LIBS" | |
8164 | found_usable_python=no | |
81ecdfbb | 8165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8166 | /* end confdefs.h. */ |
ac534cba | 8167 | #include "Python.h" |
81ecdfbb RW |
8168 | int |
8169 | main () | |
8170 | { | |
8171 | Py_Initialize (); | |
8172 | ; | |
8173 | return 0; | |
8174 | } | |
bec39cab | 8175 | _ACEOF |
81ecdfbb | 8176 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8177 | have_libpython=${version} |
8178 | found_usable_python=yes | |
ac534cba JB |
8179 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8180 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8181 | fi |
81ecdfbb RW |
8182 | rm -f core conftest.err conftest.$ac_objext \ |
8183 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8184 | CPPFLAGS=$save_CPPFLAGS |
8185 | LIBS=$save_LIBS | |
ec685c5e DE |
8186 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8187 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8188 | |
0c4a4063 DE |
8189 | ;; |
8190 | *) | |
ec685c5e | 8191 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8192 | ;; |
8193 | esac | |
e7a30f46 | 8194 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8195 | if test "${have_libpython}" = no; then |
9a156167 | 8196 | |
420697bb TT |
8197 | version=python2.7 |
8198 | ||
8199 | new_CPPFLAGS=${python_includes} | |
8200 | new_LIBS="${python_libs} -lpython2.7" | |
8201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8202 | $as_echo_n "checking for ${version}... " >&6; } | |
8203 | save_CPPFLAGS=$CPPFLAGS | |
8204 | save_LIBS=$LIBS | |
8205 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8206 | LIBS="$LIBS $new_LIBS" | |
8207 | found_usable_python=no | |
8208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8209 | /* end confdefs.h. */ | |
ac534cba | 8210 | #include "Python.h" |
420697bb TT |
8211 | int |
8212 | main () | |
8213 | { | |
8214 | Py_Initialize (); | |
8215 | ; | |
8216 | return 0; | |
8217 | } | |
8218 | _ACEOF | |
8219 | if ac_fn_c_try_link "$LINENO"; then : | |
8220 | have_libpython=${version} | |
8221 | found_usable_python=yes | |
ac534cba JB |
8222 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8223 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8224 | fi |
8225 | rm -f core conftest.err conftest.$ac_objext \ | |
8226 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8227 | CPPFLAGS=$save_CPPFLAGS |
8228 | LIBS=$save_LIBS | |
420697bb TT |
8229 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8230 | $as_echo "${found_usable_python}" >&6; } | |
8231 | ||
8232 | fi | |
8233 | if test "${have_libpython}" = no; then | |
8234 | ||
ec685c5e DE |
8235 | version=python2.6 |
8236 | ||
8237 | new_CPPFLAGS=${python_includes} | |
8238 | new_LIBS="${python_libs} -lpython2.6" | |
8239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8240 | $as_echo_n "checking for ${version}... " >&6; } | |
8241 | save_CPPFLAGS=$CPPFLAGS | |
8242 | save_LIBS=$LIBS | |
8243 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8244 | LIBS="$LIBS $new_LIBS" | |
8245 | found_usable_python=no | |
8246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8247 | /* end confdefs.h. */ | |
ac534cba | 8248 | #include "Python.h" |
ec685c5e DE |
8249 | int |
8250 | main () | |
8251 | { | |
8252 | Py_Initialize (); | |
8253 | ; | |
8254 | return 0; | |
8255 | } | |
8256 | _ACEOF | |
8257 | if ac_fn_c_try_link "$LINENO"; then : | |
8258 | have_libpython=${version} | |
8259 | found_usable_python=yes | |
ac534cba JB |
8260 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8261 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8262 | fi |
8263 | rm -f core conftest.err conftest.$ac_objext \ | |
8264 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8265 | CPPFLAGS=$save_CPPFLAGS |
8266 | LIBS=$save_LIBS | |
ec685c5e DE |
8267 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8268 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8269 | |
81ecdfbb | 8270 | fi |
ec685c5e | 8271 | if test ${have_libpython} = no; then |
9a156167 | 8272 | |
81ecdfbb | 8273 | version=python2.5 |
9a156167 | 8274 | |
ec685c5e DE |
8275 | new_CPPFLAGS=${python_includes} |
8276 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8278 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8279 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8280 | save_LIBS=$LIBS |
ec685c5e DE |
8281 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8282 | LIBS="$LIBS $new_LIBS" | |
8283 | found_usable_python=no | |
81ecdfbb | 8284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8285 | /* end confdefs.h. */ |
ac534cba | 8286 | #include "Python.h" |
81ecdfbb RW |
8287 | int |
8288 | main () | |
8289 | { | |
8290 | Py_Initialize (); | |
8291 | ; | |
8292 | return 0; | |
8293 | } | |
436868fb | 8294 | _ACEOF |
81ecdfbb | 8295 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8296 | have_libpython=${version} |
8297 | found_usable_python=yes | |
ac534cba JB |
8298 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8299 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8300 | fi |
81ecdfbb RW |
8301 | rm -f core conftest.err conftest.$ac_objext \ |
8302 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8303 | CPPFLAGS=$save_CPPFLAGS |
8304 | LIBS=$save_LIBS | |
ec685c5e DE |
8305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8306 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8307 | |
81ecdfbb | 8308 | fi |
ec685c5e | 8309 | if test ${have_libpython} = no; then |
a9322a30 | 8310 | |
81ecdfbb | 8311 | version=python2.4 |
a9322a30 | 8312 | |
ec685c5e DE |
8313 | new_CPPFLAGS=${python_includes} |
8314 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8316 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8317 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8318 | save_LIBS=$LIBS |
ec685c5e DE |
8319 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8320 | LIBS="$LIBS $new_LIBS" | |
8321 | found_usable_python=no | |
81ecdfbb | 8322 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8323 | /* end confdefs.h. */ |
ac534cba | 8324 | #include "Python.h" |
a9322a30 TT |
8325 | int |
8326 | main () | |
8327 | { | |
81ecdfbb | 8328 | Py_Initialize (); |
a9322a30 TT |
8329 | ; |
8330 | return 0; | |
8331 | } | |
436868fb | 8332 | _ACEOF |
81ecdfbb | 8333 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8334 | have_libpython=${version} |
8335 | found_usable_python=yes | |
ac534cba JB |
8336 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8337 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8338 | fi |
81ecdfbb RW |
8339 | rm -f core conftest.err conftest.$ac_objext \ |
8340 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8341 | CPPFLAGS=$save_CPPFLAGS |
8342 | LIBS=$save_LIBS | |
ec685c5e DE |
8343 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8344 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8345 | |
ec685c5e DE |
8346 | fi |
8347 | fi | |
9c4ea6c5 | 8348 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8349 | |
8350 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8351 | ||
9c4ea6c5 | 8352 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8353 | |
8354 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8355 | ||
9c4ea6c5 | 8356 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8357 | |
8358 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8359 | ||
9c4ea6c5 | 8360 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8361 | |
8362 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8363 | ||
81ecdfbb | 8364 | fi |
ec685c5e DE |
8365 | |
8366 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8367 | case "${with_python}" in |
8368 | yes) | |
8369 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8370 | ;; | |
8371 | auto) | |
8372 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8373 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8374 | ;; | |
8375 | *) | |
8376 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8377 | ;; | |
8378 | esac | |
0c4a4063 DE |
8379 | else |
8380 | if test -n "${python_prefix}"; then | |
8381 | ||
8382 | cat >>confdefs.h <<_ACEOF | |
8383 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8384 | _ACEOF | |
8385 | ||
8386 | ||
8387 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8388 | if test "x$prefix" = xNONE; then | |
8389 | test_prefix=/usr/local | |
8390 | else | |
8391 | test_prefix=$prefix | |
8392 | fi | |
8393 | else | |
8394 | test_prefix=$exec_prefix | |
8395 | fi | |
8396 | value=0 | |
8397 | case ${python_prefix} in | |
8398 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8399 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8400 | value=1 | |
8401 | ;; | |
8402 | esac | |
8403 | ||
8404 | cat >>confdefs.h <<_ACEOF | |
8405 | #define PYTHON_PATH_RELOCATABLE $value | |
8406 | _ACEOF | |
8407 | ||
8408 | ||
8409 | fi | |
81ecdfbb | 8410 | fi |
436868fb | 8411 | fi |
436868fb | 8412 | |
ec685c5e | 8413 | if test "${have_libpython}" != no; then |
436868fb | 8414 | |
81ecdfbb | 8415 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8416 | |
81ecdfbb RW |
8417 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8418 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8419 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8420 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8421 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8422 | |
81ecdfbb RW |
8423 | # Flags needed to compile Python code (taken from python-config --cflags). |
8424 | # We cannot call python-config directly because it will output whatever was | |
8425 | # used when compiling the Python interpreter itself, including flags which | |
8426 | # would make the python-related objects be compiled differently from the | |
8427 | # rest of GDB (e.g., -O2 and -fPIC). | |
8428 | if test "${GCC}" = yes; then | |
8429 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8430 | fi | |
436868fb | 8431 | |
81ecdfbb RW |
8432 | if test "x${tentative_python_cflags}" != x; then |
8433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8434 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8435 | for flag in ${tentative_python_cflags}; do | |
8436 | # Check that the compiler accepts it | |
8437 | saved_CFLAGS="$CFLAGS" | |
8438 | CFLAGS="$CFLAGS $flag" | |
8439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8440 | /* end confdefs.h. */ |
81ecdfbb | 8441 | |
a9322a30 TT |
8442 | int |
8443 | main () | |
8444 | { | |
a9322a30 TT |
8445 | |
8446 | ; | |
8447 | return 0; | |
8448 | } | |
bec39cab | 8449 | _ACEOF |
81ecdfbb RW |
8450 | if ac_fn_c_try_compile "$LINENO"; then : |
8451 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8452 | fi |
81ecdfbb RW |
8453 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8454 | CFLAGS="$saved_CFLAGS" | |
8455 | done | |
8456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8457 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8458 | fi | |
043b6510 JB |
8459 | |
8460 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
8461 | # #if _SGIAPI | |
8462 | # #define siginfo __siginfo | |
8463 | # #endif | |
8464 | # The problem is that including Python causes some XOPEN macros to be | |
8465 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
8466 | # to false. So, we work around this issue by defining siginfo ourself | |
8467 | # though the command-line. | |
8468 | case "$gdb_host" in | |
8469 | irix*) if test "${GCC}" = yes; then | |
8470 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
8471 | fi | |
8472 | ;; | |
8473 | esac | |
81ecdfbb RW |
8474 | else |
8475 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
8476 | # included. |
8477 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
8478 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
8479 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 8480 | fi |
9a156167 | 8481 | |
9a156167 | 8482 | |
ac534cba JB |
8483 | |
8484 | ||
81ecdfbb RW |
8485 | # ------------------------- # |
8486 | # Checks for header files. # | |
8487 | # ------------------------- # | |
c890192f | 8488 | |
81ecdfbb RW |
8489 | ac_header_dirent=no |
8490 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
8491 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
8492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
8493 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
8494 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8495 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8496 | else |
81ecdfbb | 8497 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8498 | /* end confdefs.h. */ |
81ecdfbb RW |
8499 | #include <sys/types.h> |
8500 | #include <$ac_hdr> | |
8501 | ||
a9322a30 TT |
8502 | int |
8503 | main () | |
8504 | { | |
81ecdfbb RW |
8505 | if ((DIR *) 0) |
8506 | return 0; | |
a9322a30 TT |
8507 | ; |
8508 | return 0; | |
8509 | } | |
bec39cab | 8510 | _ACEOF |
81ecdfbb RW |
8511 | if ac_fn_c_try_compile "$LINENO"; then : |
8512 | eval "$as_ac_Header=yes" | |
bec39cab | 8513 | else |
81ecdfbb | 8514 | eval "$as_ac_Header=no" |
bec39cab | 8515 | fi |
81ecdfbb | 8516 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 8517 | fi |
81ecdfbb RW |
8518 | eval ac_res=\$$as_ac_Header |
8519 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8520 | $as_echo "$ac_res" >&6; } | |
8521 | eval as_val=\$$as_ac_Header | |
8522 | if test "x$as_val" = x""yes; then : | |
8523 | cat >>confdefs.h <<_ACEOF | |
8524 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 8525 | _ACEOF |
bec39cab | 8526 | |
81ecdfbb RW |
8527 | ac_header_dirent=$ac_hdr; break |
8528 | fi | |
bec39cab | 8529 | |
81ecdfbb RW |
8530 | done |
8531 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
8532 | if test $ac_header_dirent = dirent.h; then | |
8533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
8534 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8535 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8536 | $as_echo_n "(cached) " >&6 | |
c890192f | 8537 | else |
81ecdfbb RW |
8538 | ac_func_search_save_LIBS=$LIBS |
8539 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8540 | /* end confdefs.h. */ | |
8541 | ||
8542 | /* Override any GCC internal prototype to avoid an error. | |
8543 | Use char because int might match the return type of a GCC | |
8544 | builtin and then its argument prototype would still apply. */ | |
8545 | #ifdef __cplusplus | |
8546 | extern "C" | |
8547 | #endif | |
8548 | char opendir (); | |
8549 | int | |
8550 | main () | |
8551 | { | |
8552 | return opendir (); | |
8553 | ; | |
8554 | return 0; | |
8555 | } | |
bec39cab | 8556 | _ACEOF |
81ecdfbb RW |
8557 | for ac_lib in '' dir; do |
8558 | if test -z "$ac_lib"; then | |
8559 | ac_res="none required" | |
8560 | else | |
8561 | ac_res=-l$ac_lib | |
8562 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8563 | fi | |
8564 | if ac_fn_c_try_link "$LINENO"; then : | |
8565 | ac_cv_search_opendir=$ac_res | |
8566 | fi | |
8567 | rm -f core conftest.err conftest.$ac_objext \ | |
8568 | conftest$ac_exeext | |
8569 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8570 | break | |
8571 | fi | |
8572 | done | |
8573 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 8574 | |
81ecdfbb RW |
8575 | else |
8576 | ac_cv_search_opendir=no | |
8577 | fi | |
8578 | rm conftest.$ac_ext | |
8579 | LIBS=$ac_func_search_save_LIBS | |
8580 | fi | |
8581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
8582 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8583 | ac_res=$ac_cv_search_opendir | |
8584 | if test "$ac_res" != no; then : | |
8585 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8586 | |
bec39cab | 8587 | fi |
81ecdfbb | 8588 | |
bec39cab | 8589 | else |
81ecdfbb RW |
8590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
8591 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8592 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8593 | $as_echo_n "(cached) " >&6 | |
8594 | else | |
8595 | ac_func_search_save_LIBS=$LIBS | |
8596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8597 | /* end confdefs.h. */ |
81ecdfbb RW |
8598 | |
8599 | /* Override any GCC internal prototype to avoid an error. | |
8600 | Use char because int might match the return type of a GCC | |
8601 | builtin and then its argument prototype would still apply. */ | |
8602 | #ifdef __cplusplus | |
8603 | extern "C" | |
8604 | #endif | |
8605 | char opendir (); | |
a9322a30 TT |
8606 | int |
8607 | main () | |
8608 | { | |
81ecdfbb | 8609 | return opendir (); |
a9322a30 TT |
8610 | ; |
8611 | return 0; | |
8612 | } | |
bec39cab | 8613 | _ACEOF |
81ecdfbb RW |
8614 | for ac_lib in '' x; do |
8615 | if test -z "$ac_lib"; then | |
8616 | ac_res="none required" | |
8617 | else | |
8618 | ac_res=-l$ac_lib | |
8619 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8620 | fi | |
8621 | if ac_fn_c_try_link "$LINENO"; then : | |
8622 | ac_cv_search_opendir=$ac_res | |
8623 | fi | |
8624 | rm -f core conftest.err conftest.$ac_objext \ | |
8625 | conftest$ac_exeext | |
8626 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8627 | break | |
8628 | fi | |
8629 | done | |
8630 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 8631 | |
81ecdfbb RW |
8632 | else |
8633 | ac_cv_search_opendir=no | |
bec39cab | 8634 | fi |
81ecdfbb RW |
8635 | rm conftest.$ac_ext |
8636 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 8637 | fi |
81ecdfbb RW |
8638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
8639 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8640 | ac_res=$ac_cv_search_opendir | |
8641 | if test "$ac_res" != no; then : | |
8642 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8643 | |
81ecdfbb | 8644 | fi |
bec39cab | 8645 | |
81ecdfbb | 8646 | fi |
bec39cab | 8647 | |
81ecdfbb RW |
8648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
8649 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
8650 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
8651 | $as_echo_n "(cached) " >&6 | |
9a156167 | 8652 | else |
81ecdfbb RW |
8653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8654 | /* end confdefs.h. */ | |
8655 | #include <sys/types.h> | |
8656 | #include <sys/stat.h> | |
8657 | ||
8658 | #if defined S_ISBLK && defined S_IFDIR | |
8659 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
8660 | #endif | |
8661 | ||
8662 | #if defined S_ISBLK && defined S_IFCHR | |
8663 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
8664 | #endif | |
8665 | ||
8666 | #if defined S_ISLNK && defined S_IFREG | |
8667 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
8668 | #endif | |
8669 | ||
8670 | #if defined S_ISSOCK && defined S_IFREG | |
8671 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
8672 | #endif | |
8673 | ||
bec39cab | 8674 | _ACEOF |
81ecdfbb RW |
8675 | if ac_fn_c_try_compile "$LINENO"; then : |
8676 | ac_cv_header_stat_broken=no | |
8677 | else | |
8678 | ac_cv_header_stat_broken=yes | |
8679 | fi | |
8680 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8681 | fi | |
8682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
8683 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
8684 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 8685 | |
81ecdfbb | 8686 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 8687 | |
bec39cab | 8688 | fi |
81ecdfbb RW |
8689 | |
8690 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
8691 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
8692 | if test "${ac_cv_header_stdc+set}" = set; then : | |
8693 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8694 | else |
81ecdfbb | 8695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8696 | /* end confdefs.h. */ |
81ecdfbb RW |
8697 | #include <stdlib.h> |
8698 | #include <stdarg.h> | |
8699 | #include <string.h> | |
8700 | #include <float.h> | |
8701 | ||
a9322a30 TT |
8702 | int |
8703 | main () | |
8704 | { | |
a9322a30 TT |
8705 | |
8706 | ; | |
8707 | return 0; | |
8708 | } | |
bec39cab | 8709 | _ACEOF |
81ecdfbb RW |
8710 | if ac_fn_c_try_compile "$LINENO"; then : |
8711 | ac_cv_header_stdc=yes | |
bec39cab | 8712 | else |
81ecdfbb | 8713 | ac_cv_header_stdc=no |
a9322a30 | 8714 | fi |
81ecdfbb | 8715 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8716 | |
81ecdfbb RW |
8717 | if test $ac_cv_header_stdc = yes; then |
8718 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
8719 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8720 | /* end confdefs.h. */ | |
8721 | #include <string.h> | |
bec39cab | 8722 | |
81ecdfbb RW |
8723 | _ACEOF |
8724 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8725 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 8726 | |
bec39cab | 8727 | else |
81ecdfbb RW |
8728 | ac_cv_header_stdc=no |
8729 | fi | |
8730 | rm -f conftest* | |
8731 | ||
8732 | fi | |
8733 | ||
8734 | if test $ac_cv_header_stdc = yes; then | |
8735 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
8736 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8737 | /* end confdefs.h. */ | |
8738 | #include <stdlib.h> | |
8739 | ||
bec39cab | 8740 | _ACEOF |
81ecdfbb RW |
8741 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8742 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 8743 | |
81ecdfbb RW |
8744 | else |
8745 | ac_cv_header_stdc=no | |
8746 | fi | |
8747 | rm -f conftest* | |
bec39cab | 8748 | |
bec39cab | 8749 | fi |
81ecdfbb RW |
8750 | |
8751 | if test $ac_cv_header_stdc = yes; then | |
8752 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
8753 | if test "$cross_compiling" = yes; then : | |
8754 | : | |
bec39cab | 8755 | else |
81ecdfbb | 8756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8757 | /* end confdefs.h. */ |
81ecdfbb RW |
8758 | #include <ctype.h> |
8759 | #include <stdlib.h> | |
8760 | #if ((' ' & 0x0FF) == 0x020) | |
8761 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8762 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8763 | #else | |
8764 | # define ISLOWER(c) \ | |
8765 | (('a' <= (c) && (c) <= 'i') \ | |
8766 | || ('j' <= (c) && (c) <= 'r') \ | |
8767 | || ('s' <= (c) && (c) <= 'z')) | |
8768 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
8769 | #endif | |
8770 | ||
8771 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
8772 | int |
8773 | main () | |
8774 | { | |
81ecdfbb RW |
8775 | int i; |
8776 | for (i = 0; i < 256; i++) | |
8777 | if (XOR (islower (i), ISLOWER (i)) | |
8778 | || toupper (i) != TOUPPER (i)) | |
8779 | return 2; | |
a9322a30 TT |
8780 | return 0; |
8781 | } | |
bec39cab | 8782 | _ACEOF |
81ecdfbb RW |
8783 | if ac_fn_c_try_run "$LINENO"; then : |
8784 | ||
bec39cab | 8785 | else |
81ecdfbb RW |
8786 | ac_cv_header_stdc=no |
8787 | fi | |
8788 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8789 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8790 | fi | |
bec39cab | 8791 | |
bec39cab | 8792 | fi |
a9322a30 | 8793 | fi |
81ecdfbb RW |
8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
8795 | $as_echo "$ac_cv_header_stdc" >&6; } | |
8796 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 8797 | |
81ecdfbb | 8798 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 8799 | |
81ecdfbb | 8800 | fi |
bec39cab | 8801 | |
81ecdfbb RW |
8802 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8803 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
8804 | # unconditionally, so what's the point in checking these? | |
8805 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
8806 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
8807 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
8808 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
8809 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
8810 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
8811 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
a2d08b9e | 8812 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \ |
2fa291ac | 8813 | dlfcn.h sys/socket.h sys/un.h |
81ecdfbb RW |
8814 | do : |
8815 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8816 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8817 | eval as_val=\$$as_ac_Header | |
8818 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8819 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8820 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8821 | _ACEOF |
c906108c | 8822 | |
bec39cab | 8823 | fi |
81ecdfbb RW |
8824 | |
8825 | done | |
8826 | ||
8827 | for ac_header in link.h | |
8828 | do : | |
8829 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
8830 | # include <sys/types.h> | |
8831 | #endif | |
8832 | #if HAVE_NLIST_H | |
8833 | # include <nlist.h> | |
a9322a30 TT |
8834 | #endif |
8835 | ||
81ecdfbb RW |
8836 | " |
8837 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
8838 | cat >>confdefs.h <<_ACEOF | |
8839 | #define HAVE_LINK_H 1 | |
bec39cab | 8840 | _ACEOF |
bec39cab | 8841 | |
a9322a30 | 8842 | fi |
bec39cab | 8843 | |
81ecdfbb | 8844 | done |
c906108c | 8845 | |
81ecdfbb RW |
8846 | for ac_header in sys/proc.h |
8847 | do : | |
8848 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
8849 | # include <sys/param.h> | |
8850 | #endif | |
c906108c | 8851 | |
81ecdfbb RW |
8852 | " |
8853 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 8854 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8855 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 8856 | _ACEOF |
5ee754fc | 8857 | |
bec39cab | 8858 | fi |
81ecdfbb RW |
8859 | |
8860 | done | |
8861 | ||
8862 | for ac_header in sys/user.h | |
8863 | do : | |
8864 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
8865 | # include <sys/param.h> | |
a9322a30 TT |
8866 | #endif |
8867 | ||
81ecdfbb RW |
8868 | " |
8869 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
8870 | cat >>confdefs.h <<_ACEOF | |
8871 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 8872 | _ACEOF |
bec39cab | 8873 | |
a9322a30 | 8874 | fi |
bec39cab | 8875 | |
81ecdfbb | 8876 | done |
5ee754fc | 8877 | |
5ee754fc | 8878 | |
81ecdfbb RW |
8879 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
8880 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
8881 | # think that we don't have <curses.h> if we're using GCC. | |
8882 | case $host_os in | |
8883 | solaris2.[789]) | |
8884 | if test "$GCC" = yes; then | |
8885 | ||
8886 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
8887 | ||
8888 | fi ;; | |
8889 | esac | |
8890 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
8891 | do : | |
8892 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8893 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8894 | eval as_val=\$$as_ac_Header | |
8895 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8896 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8897 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8898 | _ACEOF |
5ee754fc MK |
8899 | |
8900 | fi | |
8901 | ||
81ecdfbb | 8902 | done |
bec39cab | 8903 | |
81ecdfbb RW |
8904 | for ac_header in term.h |
8905 | do : | |
8906 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
8907 | # include <curses.h> | |
8908 | #endif | |
bec39cab | 8909 | |
81ecdfbb RW |
8910 | " |
8911 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
8912 | cat >>confdefs.h <<_ACEOF | |
8913 | #define HAVE_TERM_H 1 | |
a8111142 | 8914 | _ACEOF |
a8111142 | 8915 | |
a8111142 | 8916 | fi |
a8111142 | 8917 | |
81ecdfbb | 8918 | done |
a8111142 TT |
8919 | |
8920 | ||
81ecdfbb RW |
8921 | # ------------------------- # |
8922 | # Checks for declarations. # | |
8923 | # ------------------------- # | |
a9322a30 | 8924 | |
81ecdfbb RW |
8925 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
8926 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
8927 | ac_have_decl=1 | |
bec39cab | 8928 | else |
81ecdfbb RW |
8929 | ac_have_decl=0 |
8930 | fi | |
8931 | ||
8932 | cat >>confdefs.h <<_ACEOF | |
8933 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 8934 | _ACEOF |
81ecdfbb RW |
8935 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
8936 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
8937 | ac_have_decl=1 | |
8938 | else | |
8939 | ac_have_decl=0 | |
8940 | fi | |
8941 | ||
8942 | cat >>confdefs.h <<_ACEOF | |
8943 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 8944 | _ACEOF |
81ecdfbb RW |
8945 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
8946 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
8947 | ac_have_decl=1 | |
bec39cab | 8948 | else |
81ecdfbb RW |
8949 | ac_have_decl=0 |
8950 | fi | |
bec39cab | 8951 | |
81ecdfbb RW |
8952 | cat >>confdefs.h <<_ACEOF |
8953 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 8954 | _ACEOF |
81ecdfbb RW |
8955 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
8956 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
8957 | ac_have_decl=1 | |
8958 | else | |
8959 | ac_have_decl=0 | |
8960 | fi | |
8961 | ||
8962 | cat >>confdefs.h <<_ACEOF | |
8963 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 8964 | _ACEOF |
81ecdfbb RW |
8965 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
8966 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
8967 | ac_have_decl=1 | |
bec39cab | 8968 | else |
81ecdfbb RW |
8969 | ac_have_decl=0 |
8970 | fi | |
5ee754fc | 8971 | |
81ecdfbb RW |
8972 | cat >>confdefs.h <<_ACEOF |
8973 | #define HAVE_DECL_STRSTR $ac_have_decl | |
8974 | _ACEOF | |
8975 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
8976 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
8977 | ac_have_decl=1 | |
8978 | else | |
8979 | ac_have_decl=0 | |
5ee754fc | 8980 | fi |
81ecdfbb RW |
8981 | |
8982 | cat >>confdefs.h <<_ACEOF | |
8983 | #define HAVE_DECL_GETOPT $ac_have_decl | |
8984 | _ACEOF | |
8985 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
8986 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
8987 | ac_have_decl=1 | |
8988 | else | |
8989 | ac_have_decl=0 | |
5ee754fc | 8990 | fi |
81ecdfbb RW |
8991 | |
8992 | cat >>confdefs.h <<_ACEOF | |
8993 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
8994 | _ACEOF | |
8995 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
8996 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
8997 | ac_have_decl=1 | |
8998 | else | |
8999 | ac_have_decl=0 | |
5ee754fc MK |
9000 | fi |
9001 | ||
a9322a30 | 9002 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9003 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 9004 | _ACEOF |
5ee754fc | 9005 | |
5ee754fc | 9006 | |
81ecdfbb RW |
9007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9008 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9009 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9010 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9011 | else |
81ecdfbb | 9012 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9013 | /* end confdefs.h. */ |
81ecdfbb | 9014 | #include <locale.h> |
a9322a30 TT |
9015 | int |
9016 | main () | |
9017 | { | |
81ecdfbb | 9018 | return LC_MESSAGES |
a9322a30 TT |
9019 | ; |
9020 | return 0; | |
9021 | } | |
bec39cab | 9022 | _ACEOF |
81ecdfbb RW |
9023 | if ac_fn_c_try_link "$LINENO"; then : |
9024 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9025 | else |
81ecdfbb RW |
9026 | am_cv_val_LC_MESSAGES=no |
9027 | fi | |
9028 | rm -f core conftest.err conftest.$ac_objext \ | |
9029 | conftest$ac_exeext conftest.$ac_ext | |
9030 | fi | |
9031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9032 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9033 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9034 | |
81ecdfbb RW |
9035 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9036 | ||
9037 | fi | |
9038 | ||
9039 | ||
9040 | # ----------------------- # | |
9041 | # Checks for structures. # | |
9042 | # ----------------------- # | |
9043 | ||
9044 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9045 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9046 | ||
9047 | cat >>confdefs.h <<_ACEOF | |
9048 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9049 | _ACEOF |
7eb368b3 | 9050 | |
81ecdfbb | 9051 | |
7eb368b3 | 9052 | fi |
81ecdfbb RW |
9053 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9054 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9055 | |
a9322a30 TT |
9056 | cat >>confdefs.h <<_ACEOF |
9057 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9058 | _ACEOF |
9059 | ||
a9322a30 | 9060 | |
7eb368b3 NR |
9061 | fi |
9062 | ||
7eb368b3 | 9063 | |
a9322a30 TT |
9064 | # ------------------ # |
9065 | # Checks for types. # | |
9066 | # ------------------ # | |
7eb368b3 | 9067 | |
81ecdfbb RW |
9068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9069 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9070 | if test "${ac_cv_type_signal+set}" = set; then : | |
9071 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9072 | else |
81ecdfbb | 9073 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9074 | /* end confdefs.h. */ |
a9322a30 TT |
9075 | #include <sys/types.h> |
9076 | #include <signal.h> | |
7cb9022a | 9077 | |
a9322a30 TT |
9078 | int |
9079 | main () | |
9080 | { | |
81ecdfbb | 9081 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9082 | ; |
9083 | return 0; | |
9084 | } | |
bec39cab | 9085 | _ACEOF |
81ecdfbb RW |
9086 | if ac_fn_c_try_compile "$LINENO"; then : |
9087 | ac_cv_type_signal=int | |
bec39cab | 9088 | else |
81ecdfbb | 9089 | ac_cv_type_signal=void |
bec39cab | 9090 | fi |
81ecdfbb | 9091 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9092 | fi |
81ecdfbb RW |
9093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9094 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9095 | |
a9322a30 TT |
9096 | cat >>confdefs.h <<_ACEOF |
9097 | #define RETSIGTYPE $ac_cv_type_signal | |
9098 | _ACEOF | |
5ee754fc | 9099 | |
bec39cab | 9100 | |
81ecdfbb | 9101 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9102 | #include <sys/socket.h> |
9103 | ||
81ecdfbb RW |
9104 | " |
9105 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9106 | |
a9322a30 TT |
9107 | cat >>confdefs.h <<_ACEOF |
9108 | #define HAVE_SOCKLEN_T 1 | |
9109 | _ACEOF | |
9110 | ||
9111 | ||
9112 | fi | |
9113 | ||
9114 | ||
9115 | # ------------------------------------- # | |
9116 | # Checks for compiler characteristics. # | |
9117 | # ------------------------------------- # | |
9118 | ||
81ecdfbb RW |
9119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9120 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9121 | if test "${ac_cv_c_const+set}" = set; then : | |
9122 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9123 | else |
81ecdfbb | 9124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9125 | /* end confdefs.h. */ |
a9322a30 TT |
9126 | |
9127 | int | |
9128 | main () | |
9129 | { | |
9130 | /* FIXME: Include the comments suggested by Paul. */ | |
9131 | #ifndef __cplusplus | |
9132 | /* Ultrix mips cc rejects this. */ | |
9133 | typedef int charset[2]; | |
81ecdfbb | 9134 | const charset cs; |
a9322a30 | 9135 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9136 | char const *const *pcpcc; |
9137 | char **ppc; | |
a9322a30 TT |
9138 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9139 | struct point {int x, y;}; | |
9140 | static struct point const zero = {0,0}; | |
9141 | /* AIX XL C 1.02.0.0 rejects this. | |
9142 | It does not let you subtract one const X* pointer from another in | |
9143 | an arm of an if-expression whose if-part is not a constant | |
9144 | expression */ | |
9145 | const char *g = "string"; | |
81ecdfbb | 9146 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9147 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9148 | ++pcpcc; |
9149 | ppc = (char**) pcpcc; | |
9150 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9151 | { /* SCO 3.2v4 cc rejects this. */ |
9152 | char *t; | |
9153 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9154 | ||
9155 | *t++ = 0; | |
81ecdfbb | 9156 | if (s) return 0; |
a9322a30 TT |
9157 | } |
9158 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9159 | int x[] = {25, 17}; | |
9160 | const int *foo = &x[0]; | |
9161 | ++foo; | |
9162 | } | |
9163 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9164 | typedef const int *iptr; | |
9165 | iptr p = 0; | |
9166 | ++p; | |
9167 | } | |
9168 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9169 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9170 | struct s { int j; const int *ap[3]; }; | |
9171 | struct s *b; b->j = 5; | |
9172 | } | |
9173 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9174 | const int foo = 10; | |
81ecdfbb | 9175 | if (!foo) return 0; |
a9322a30 | 9176 | } |
81ecdfbb | 9177 | return !cs[0] && !zero.x; |
a9322a30 TT |
9178 | #endif |
9179 | ||
9180 | ; | |
9181 | return 0; | |
9182 | } | |
bec39cab | 9183 | _ACEOF |
81ecdfbb | 9184 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9185 | ac_cv_c_const=yes |
5ee754fc | 9186 | else |
81ecdfbb | 9187 | ac_cv_c_const=no |
5ee754fc | 9188 | fi |
81ecdfbb | 9189 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9190 | fi |
81ecdfbb RW |
9191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9192 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9193 | if test $ac_cv_c_const = no; then |
bec39cab | 9194 | |
81ecdfbb | 9195 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9196 | |
5ee754fc | 9197 | fi |
bec39cab | 9198 | |
81ecdfbb RW |
9199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9200 | $as_echo_n "checking for inline... " >&6; } | |
9201 | if test "${ac_cv_c_inline+set}" = set; then : | |
9202 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9203 | else |
a9322a30 TT |
9204 | ac_cv_c_inline=no |
9205 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9207 | /* end confdefs.h. */ |
a9322a30 TT |
9208 | #ifndef __cplusplus |
9209 | typedef int foo_t; | |
9210 | static $ac_kw foo_t static_foo () {return 0; } | |
9211 | $ac_kw foo_t foo () {return 0; } | |
9212 | #endif | |
9213 | ||
bec39cab | 9214 | _ACEOF |
81ecdfbb RW |
9215 | if ac_fn_c_try_compile "$LINENO"; then : |
9216 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9217 | fi |
81ecdfbb RW |
9218 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9219 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9220 | done |
bec39cab | 9221 | |
5ee754fc | 9222 | fi |
81ecdfbb RW |
9223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9224 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9225 | |
a9322a30 TT |
9226 | case $ac_cv_c_inline in |
9227 | inline | yes) ;; | |
9228 | *) | |
9229 | case $ac_cv_c_inline in | |
9230 | no) ac_val=;; | |
9231 | *) ac_val=$ac_cv_c_inline;; | |
9232 | esac | |
9233 | cat >>confdefs.h <<_ACEOF | |
9234 | #ifndef __cplusplus | |
9235 | #define inline $ac_val | |
9236 | #endif | |
9237 | _ACEOF | |
bec39cab AC |
9238 | ;; |
9239 | esac | |
bec39cab | 9240 | |
81ecdfbb RW |
9241 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9242 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9243 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9244 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9245 | else |
81ecdfbb RW |
9246 | ac_cv_c_bigendian=unknown |
9247 | # See if we're dealing with a universal compiler. | |
9248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9249 | /* end confdefs.h. */ | |
9250 | #ifndef __APPLE_CC__ | |
9251 | not a universal capable compiler | |
9252 | #endif | |
9253 | typedef int dummy; | |
9254 | ||
9255 | _ACEOF | |
9256 | if ac_fn_c_try_compile "$LINENO"; then : | |
9257 | ||
9258 | # Check for potential -arch flags. It is not universal unless | |
9259 | # there are at least two -arch flags with different values. | |
9260 | ac_arch= | |
9261 | ac_prev= | |
9262 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9263 | if test -n "$ac_prev"; then | |
9264 | case $ac_word in | |
9265 | i?86 | x86_64 | ppc | ppc64) | |
9266 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9267 | ac_arch=$ac_word | |
9268 | else | |
9269 | ac_cv_c_bigendian=universal | |
9270 | break | |
9271 | fi | |
9272 | ;; | |
9273 | esac | |
9274 | ac_prev= | |
9275 | elif test "x$ac_word" = "x-arch"; then | |
9276 | ac_prev=arch | |
9277 | fi | |
9278 | done | |
9279 | fi | |
9280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9281 | if test $ac_cv_c_bigendian = unknown; then | |
9282 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9283 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9284 | /* end confdefs.h. */ |
a9322a30 | 9285 | #include <sys/types.h> |
81ecdfbb | 9286 | #include <sys/param.h> |
a9322a30 TT |
9287 | |
9288 | int | |
9289 | main () | |
9290 | { | |
81ecdfbb RW |
9291 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9292 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9293 | && LITTLE_ENDIAN) | |
9294 | bogus endian macros | |
9295 | #endif | |
a9322a30 TT |
9296 | |
9297 | ; | |
9298 | return 0; | |
9299 | } | |
bec39cab | 9300 | _ACEOF |
81ecdfbb | 9301 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9302 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9304 | /* end confdefs.h. */ |
a9322a30 | 9305 | #include <sys/types.h> |
81ecdfbb | 9306 | #include <sys/param.h> |
a9322a30 TT |
9307 | |
9308 | int | |
9309 | main () | |
9310 | { | |
9311 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9312 | not big endian |
9313 | #endif | |
a9322a30 TT |
9314 | |
9315 | ; | |
9316 | return 0; | |
9317 | } | |
bec39cab | 9318 | _ACEOF |
81ecdfbb | 9319 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9320 | ac_cv_c_bigendian=yes |
5ee754fc | 9321 | else |
81ecdfbb | 9322 | ac_cv_c_bigendian=no |
5ee754fc | 9323 | fi |
81ecdfbb RW |
9324 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9325 | fi | |
9326 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9327 | fi | |
9328 | if test $ac_cv_c_bigendian = unknown; then | |
9329 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9331 | /* end confdefs.h. */ | |
9332 | #include <limits.h> | |
bec39cab | 9333 | |
81ecdfbb RW |
9334 | int |
9335 | main () | |
9336 | { | |
9337 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9338 | bogus endian macros | |
9339 | #endif | |
9340 | ||
9341 | ; | |
9342 | return 0; | |
9343 | } | |
7eb368b3 | 9344 | _ACEOF |
81ecdfbb RW |
9345 | if ac_fn_c_try_compile "$LINENO"; then : |
9346 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9347 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9348 | /* end confdefs.h. */ |
81ecdfbb RW |
9349 | #include <limits.h> |
9350 | ||
7eb368b3 NR |
9351 | int |
9352 | main () | |
9353 | { | |
81ecdfbb RW |
9354 | #ifndef _BIG_ENDIAN |
9355 | not big endian | |
9356 | #endif | |
9357 | ||
7eb368b3 NR |
9358 | ; |
9359 | return 0; | |
9360 | } | |
9361 | _ACEOF | |
81ecdfbb | 9362 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9363 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9364 | else |
9365 | ac_cv_c_bigendian=no | |
a9322a30 | 9366 | fi |
81ecdfbb | 9367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9368 | fi |
81ecdfbb RW |
9369 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9370 | fi | |
9371 | if test $ac_cv_c_bigendian = unknown; then | |
9372 | # Compile a test program. | |
9373 | if test "$cross_compiling" = yes; then : | |
9374 | # Try to guess by grepping values from an object file. | |
9375 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9376 | /* end confdefs.h. */ | |
9377 | short int ascii_mm[] = | |
9378 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9379 | short int ascii_ii[] = | |
9380 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9381 | int use_ascii (int i) { | |
9382 | return ascii_mm[i] + ascii_ii[i]; | |
9383 | } | |
9384 | short int ebcdic_ii[] = | |
9385 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9386 | short int ebcdic_mm[] = | |
9387 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9388 | int use_ebcdic (int i) { | |
9389 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9390 | } | |
9391 | extern int foo; | |
7eb368b3 | 9392 | |
81ecdfbb RW |
9393 | int |
9394 | main () | |
9395 | { | |
9396 | return use_ascii (foo) == use_ebcdic (foo); | |
9397 | ; | |
9398 | return 0; | |
9399 | } | |
9400 | _ACEOF | |
9401 | if ac_fn_c_try_compile "$LINENO"; then : | |
9402 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9403 | ac_cv_c_bigendian=yes | |
9404 | fi | |
9405 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9406 | if test "$ac_cv_c_bigendian" = unknown; then | |
9407 | ac_cv_c_bigendian=no | |
9408 | else | |
9409 | # finding both strings is unlikely to happen, but who knows? | |
9410 | ac_cv_c_bigendian=unknown | |
9411 | fi | |
9412 | fi | |
7eb368b3 | 9413 | fi |
81ecdfbb | 9414 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9415 | else |
81ecdfbb | 9416 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9417 | /* end confdefs.h. */ |
81ecdfbb | 9418 | $ac_includes_default |
d3ea6809 MM |
9419 | int |
9420 | main () | |
9421 | { | |
81ecdfbb RW |
9422 | |
9423 | /* Are we little or big endian? From Harbison&Steele. */ | |
9424 | union | |
9425 | { | |
9426 | long int l; | |
9427 | char c[sizeof (long int)]; | |
9428 | } u; | |
9429 | u.l = 1; | |
9430 | return u.c[sizeof (long int) - 1] == 1; | |
9431 | ||
9432 | ; | |
9433 | return 0; | |
d3ea6809 MM |
9434 | } |
9435 | _ACEOF | |
81ecdfbb | 9436 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9437 | ac_cv_c_bigendian=no |
d3ea6809 | 9438 | else |
81ecdfbb | 9439 | ac_cv_c_bigendian=yes |
d3ea6809 | 9440 | fi |
81ecdfbb RW |
9441 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9442 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9443 | fi |
a9322a30 | 9444 | |
81ecdfbb RW |
9445 | fi |
9446 | fi | |
9447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9448 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9449 | case $ac_cv_c_bigendian in #( | |
9450 | yes) | |
9451 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9452 | ;; #( | |
9453 | no) | |
9454 | ;; #( | |
9455 | universal) | |
9456 | ||
9457 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9458 | ||
9459 | ;; #( | |
9460 | *) | |
9461 | as_fn_error "unknown endianness | |
9462 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
9463 | esac | |
d3ea6809 MM |
9464 | |
9465 | ||
a9322a30 TT |
9466 | # ------------------------------ # |
9467 | # Checks for library functions. # | |
9468 | # ------------------------------ # | |
d3ea6809 | 9469 | |
a9322a30 TT |
9470 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
9471 | # for constant arguments. Useless! | |
81ecdfbb RW |
9472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
9473 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9474 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
9475 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 9476 | else |
81ecdfbb | 9477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 9478 | /* end confdefs.h. */ |
a9322a30 | 9479 | #include <alloca.h> |
bec39cab AC |
9480 | int |
9481 | main () | |
9482 | { | |
a9322a30 | 9483 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 9484 | if (p) return 0; |
bec39cab AC |
9485 | ; |
9486 | return 0; | |
9487 | } | |
9488 | _ACEOF | |
81ecdfbb | 9489 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9490 | ac_cv_working_alloca_h=yes |
bec39cab | 9491 | else |
81ecdfbb | 9492 | ac_cv_working_alloca_h=no |
bec39cab | 9493 | fi |
81ecdfbb RW |
9494 | rm -f core conftest.err conftest.$ac_objext \ |
9495 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9496 | fi |
81ecdfbb RW |
9497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
9498 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
9499 | if test $ac_cv_working_alloca_h = yes; then |
9500 | ||
81ecdfbb | 9501 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 9502 | |
c906108c | 9503 | fi |
bec39cab | 9504 | |
81ecdfbb RW |
9505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9506 | $as_echo_n "checking for alloca... " >&6; } | |
9507 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
9508 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9509 | else |
81ecdfbb | 9510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9511 | /* end confdefs.h. */ |
a9322a30 TT |
9512 | #ifdef __GNUC__ |
9513 | # define alloca __builtin_alloca | |
b4e70030 | 9514 | #else |
a9322a30 TT |
9515 | # ifdef _MSC_VER |
9516 | # include <malloc.h> | |
9517 | # define alloca _alloca | |
9518 | # else | |
81ecdfbb | 9519 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
9520 | # include <alloca.h> |
9521 | # else | |
9522 | # ifdef _AIX | |
9523 | #pragma alloca | |
9524 | # else | |
9525 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9526 | char *alloca (); | |
9527 | # endif | |
9528 | # endif | |
9529 | # endif | |
9530 | # endif | |
c906108c | 9531 | #endif |
97bf5e38 | 9532 | |
bec39cab AC |
9533 | int |
9534 | main () | |
9535 | { | |
a9322a30 | 9536 | char *p = (char *) alloca (1); |
81ecdfbb | 9537 | if (p) return 0; |
bec39cab AC |
9538 | ; |
9539 | return 0; | |
9540 | } | |
9541 | _ACEOF | |
81ecdfbb | 9542 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9543 | ac_cv_func_alloca_works=yes |
bec39cab | 9544 | else |
81ecdfbb | 9545 | ac_cv_func_alloca_works=no |
bec39cab | 9546 | fi |
81ecdfbb RW |
9547 | rm -f core conftest.err conftest.$ac_objext \ |
9548 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9549 | fi |
81ecdfbb RW |
9550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
9551 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
9552 | |
9553 | if test $ac_cv_func_alloca_works = yes; then | |
9554 | ||
81ecdfbb | 9555 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 9556 | |
a9322a30 TT |
9557 | else |
9558 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
9559 | # that cause trouble. Some versions do not even contain alloca or | |
9560 | # contain a buggy version. If you still want to use their alloca, | |
9561 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
9562 | ||
81ecdfbb | 9563 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 9564 | |
81ecdfbb | 9565 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 9566 | |
bec39cab | 9567 | |
81ecdfbb RW |
9568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
9569 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9570 | if test "${ac_cv_os_cray+set}" = set; then : | |
9571 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9572 | else |
81ecdfbb | 9573 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 9574 | /* end confdefs.h. */ |
81ecdfbb | 9575 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
9576 | webecray |
9577 | #else | |
9578 | wenotbecray | |
9579 | #endif | |
9580 | ||
9581 | _ACEOF | |
9582 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 9583 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
9584 | ac_cv_os_cray=yes |
9585 | else | |
81ecdfbb | 9586 | ac_cv_os_cray=no |
bec39cab | 9587 | fi |
81ecdfbb RW |
9588 | rm -f conftest* |
9589 | ||
bec39cab | 9590 | fi |
81ecdfbb RW |
9591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
9592 | $as_echo "$ac_cv_os_cray" >&6; } | |
9593 | if test $ac_cv_os_cray = yes; then | |
9594 | for ac_func in _getb67 GETB67 getb67; do | |
9595 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9596 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9597 | eval as_val=\$$as_ac_var | |
9598 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
9599 | |
9600 | cat >>confdefs.h <<_ACEOF | |
9601 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 9602 | _ACEOF |
c906108c | 9603 | |
a9322a30 | 9604 | break |
c906108c SS |
9605 | fi |
9606 | ||
a9322a30 TT |
9607 | done |
9608 | fi | |
bec39cab | 9609 | |
81ecdfbb RW |
9610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
9611 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9612 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
9613 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9614 | else |
81ecdfbb | 9615 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9616 | ac_cv_c_stack_direction=0 |
bec39cab | 9617 | else |
81ecdfbb | 9618 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9619 | /* end confdefs.h. */ |
81ecdfbb | 9620 | $ac_includes_default |
a9322a30 TT |
9621 | int |
9622 | find_stack_direction () | |
b4e70030 | 9623 | { |
a9322a30 TT |
9624 | static char *addr = 0; |
9625 | auto char dummy; | |
9626 | if (addr == 0) | |
9627 | { | |
9628 | addr = &dummy; | |
9629 | return find_stack_direction (); | |
9630 | } | |
9631 | else | |
9632 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 9633 | } |
b757528f | 9634 | |
bec39cab AC |
9635 | int |
9636 | main () | |
9637 | { | |
81ecdfbb | 9638 | return find_stack_direction () < 0; |
bec39cab AC |
9639 | } |
9640 | _ACEOF | |
81ecdfbb | 9641 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9642 | ac_cv_c_stack_direction=1 |
9643 | else | |
81ecdfbb | 9644 | ac_cv_c_stack_direction=-1 |
a9322a30 | 9645 | fi |
81ecdfbb RW |
9646 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9647 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9648 | fi |
a9322a30 | 9649 | |
81ecdfbb RW |
9650 | fi |
9651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
9652 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
9653 | cat >>confdefs.h <<_ACEOF |
9654 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
9655 | _ACEOF | |
9656 | ||
9657 | ||
9658 | fi | |
9659 | ||
a9322a30 | 9660 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
9661 | do : |
9662 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9663 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9664 | eval as_val=\$$as_ac_Header | |
9665 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9666 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9667 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9668 | _ACEOF |
b757528f | 9669 | |
b757528f | 9670 | fi |
bec39cab | 9671 | |
a9322a30 | 9672 | done |
a3828db0 | 9673 | |
a9322a30 | 9674 | for ac_func in getpagesize |
81ecdfbb RW |
9675 | do : |
9676 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9677 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 9678 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9679 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 9680 | _ACEOF |
bcb3dc3d | 9681 | |
bcb3dc3d MK |
9682 | fi |
9683 | done | |
9684 | ||
81ecdfbb RW |
9685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
9686 | $as_echo_n "checking for working mmap... " >&6; } | |
9687 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
9688 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9689 | else |
81ecdfbb | 9690 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9691 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 9692 | else |
81ecdfbb | 9693 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9694 | /* end confdefs.h. */ |
a9322a30 TT |
9695 | $ac_includes_default |
9696 | /* malloc might have been renamed as rpl_malloc. */ | |
9697 | #undef malloc | |
bec39cab | 9698 | |
a9322a30 TT |
9699 | /* Thanks to Mike Haertel and Jim Avera for this test. |
9700 | Here is a matrix of mmap possibilities: | |
9701 | mmap private not fixed | |
9702 | mmap private fixed at somewhere currently unmapped | |
9703 | mmap private fixed at somewhere already mapped | |
9704 | mmap shared not fixed | |
9705 | mmap shared fixed at somewhere currently unmapped | |
9706 | mmap shared fixed at somewhere already mapped | |
9707 | For private mappings, we should verify that changes cannot be read() | |
9708 | back from the file, nor mmap's back from the file at a different | |
9709 | address. (There have been systems where private was not correctly | |
9710 | implemented like the infamous i386 svr4.0, and systems where the | |
9711 | VM page cache was not coherent with the file system buffer cache | |
9712 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9713 | For shared mappings, we should conversely verify that changes get | |
9714 | propagated back to all the places they're supposed to be. | |
bec39cab | 9715 | |
a9322a30 TT |
9716 | Grep wants private fixed already mapped. |
9717 | The main things grep needs to know about mmap are: | |
9718 | * does it exist and is it safe to write into the mmap'd area | |
9719 | * how to use it (BSD variants) */ | |
8b9cf735 | 9720 | |
a9322a30 TT |
9721 | #include <fcntl.h> |
9722 | #include <sys/mman.h> | |
8b9cf735 | 9723 | |
81ecdfbb | 9724 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 9725 | char *malloc (); |
a3828db0 MK |
9726 | #endif |
9727 | ||
a9322a30 | 9728 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 9729 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 9730 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 9731 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
9732 | # define HAVE_SYS_PARAM_H 1 |
9733 | # endif | |
9734 | ||
9735 | # ifdef _SC_PAGESIZE | |
9736 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9737 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 9738 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
9739 | # include <sys/param.h> |
9740 | # ifdef EXEC_PAGESIZE | |
9741 | # define getpagesize() EXEC_PAGESIZE | |
9742 | # else /* no EXEC_PAGESIZE */ | |
9743 | # ifdef NBPG | |
9744 | # define getpagesize() NBPG * CLSIZE | |
9745 | # ifndef CLSIZE | |
9746 | # define CLSIZE 1 | |
9747 | # endif /* no CLSIZE */ | |
9748 | # else /* no NBPG */ | |
9749 | # ifdef NBPC | |
9750 | # define getpagesize() NBPC | |
9751 | # else /* no NBPC */ | |
9752 | # ifdef PAGESIZE | |
9753 | # define getpagesize() PAGESIZE | |
9754 | # endif /* PAGESIZE */ | |
9755 | # endif /* no NBPC */ | |
9756 | # endif /* no NBPG */ | |
9757 | # endif /* no EXEC_PAGESIZE */ | |
9758 | # else /* no HAVE_SYS_PARAM_H */ | |
9759 | # define getpagesize() 8192 /* punt totally */ | |
9760 | # endif /* no HAVE_SYS_PARAM_H */ | |
9761 | # endif /* no _SC_PAGESIZE */ | |
9762 | ||
9763 | #endif /* no HAVE_GETPAGESIZE */ | |
9764 | ||
bec39cab AC |
9765 | int |
9766 | main () | |
9767 | { | |
a9322a30 TT |
9768 | char *data, *data2, *data3; |
9769 | int i, pagesize; | |
9770 | int fd; | |
9771 | ||
9772 | pagesize = getpagesize (); | |
9773 | ||
9774 | /* First, make a file with some known garbage in it. */ | |
9775 | data = (char *) malloc (pagesize); | |
9776 | if (!data) | |
81ecdfbb | 9777 | return 1; |
a9322a30 TT |
9778 | for (i = 0; i < pagesize; ++i) |
9779 | *(data + i) = rand (); | |
9780 | umask (0); | |
9781 | fd = creat ("conftest.mmap", 0600); | |
9782 | if (fd < 0) | |
81ecdfbb | 9783 | return 1; |
a9322a30 | 9784 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 9785 | return 1; |
a9322a30 TT |
9786 | close (fd); |
9787 | ||
9788 | /* Next, try to mmap the file at a fixed address which already has | |
9789 | something else allocated at it. If we can, also make sure that | |
9790 | we see the same garbage. */ | |
9791 | fd = open ("conftest.mmap", O_RDWR); | |
9792 | if (fd < 0) | |
81ecdfbb | 9793 | return 1; |
a9322a30 TT |
9794 | data2 = (char *) malloc (2 * pagesize); |
9795 | if (!data2) | |
81ecdfbb RW |
9796 | return 1; |
9797 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
9798 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
9799 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 9800 | return 1; |
a9322a30 TT |
9801 | for (i = 0; i < pagesize; ++i) |
9802 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 9803 | return 1; |
a9322a30 TT |
9804 | |
9805 | /* Finally, make sure that changes to the mapped area do not | |
9806 | percolate back to the file as seen by read(). (This is a bug on | |
9807 | some variants of i386 svr4.0.) */ | |
9808 | for (i = 0; i < pagesize; ++i) | |
9809 | *(data2 + i) = *(data2 + i) + 1; | |
9810 | data3 = (char *) malloc (pagesize); | |
9811 | if (!data3) | |
81ecdfbb | 9812 | return 1; |
a9322a30 | 9813 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 9814 | return 1; |
a9322a30 TT |
9815 | for (i = 0; i < pagesize; ++i) |
9816 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 9817 | return 1; |
a9322a30 | 9818 | close (fd); |
81ecdfbb | 9819 | return 0; |
bec39cab AC |
9820 | } |
9821 | _ACEOF | |
81ecdfbb | 9822 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9823 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 9824 | else |
81ecdfbb | 9825 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 9826 | fi |
81ecdfbb RW |
9827 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9828 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 9829 | fi |
81ecdfbb | 9830 | |
a9322a30 | 9831 | fi |
81ecdfbb RW |
9832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
9833 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
9834 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
9835 | ||
81ecdfbb | 9836 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 9837 | |
086ec9eb | 9838 | fi |
a9322a30 | 9839 | rm -f conftest.mmap |
a3828db0 | 9840 | |
81ecdfbb RW |
9841 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
9842 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 9843 | |
a9322a30 TT |
9844 | else |
9845 | ||
9846 | cat >>confdefs.h <<_ACEOF | |
9847 | #define pid_t int | |
bec39cab | 9848 | _ACEOF |
086ec9eb MK |
9849 | |
9850 | fi | |
9851 | ||
81ecdfbb RW |
9852 | for ac_header in vfork.h |
9853 | do : | |
9854 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9855 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 9856 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9857 | #define HAVE_VFORK_H 1 |
bec39cab | 9858 | _ACEOF |
c906108c SS |
9859 | |
9860 | fi | |
a9322a30 | 9861 | |
a3828db0 | 9862 | done |
c906108c | 9863 | |
a9322a30 | 9864 | for ac_func in fork vfork |
81ecdfbb RW |
9865 | do : |
9866 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9867 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9868 | eval as_val=\$$as_ac_var | |
9869 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 9870 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9871 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 9872 | _ACEOF |
b83266a0 | 9873 | |
97bf5e38 | 9874 | fi |
a3828db0 | 9875 | done |
b83266a0 | 9876 | |
a9322a30 | 9877 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
9878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
9879 | $as_echo_n "checking for working fork... " >&6; } | |
9880 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
9881 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9882 | else |
81ecdfbb | 9883 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9884 | ac_cv_func_fork_works=cross |
9885 | else | |
81ecdfbb RW |
9886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9887 | /* end confdefs.h. */ | |
9888 | $ac_includes_default | |
9889 | int | |
9890 | main () | |
9891 | { | |
9892 | ||
9893 | /* By Ruediger Kuhlmann. */ | |
9894 | return fork () < 0; | |
9895 | ||
9896 | ; | |
9897 | return 0; | |
9898 | } | |
a9322a30 | 9899 | _ACEOF |
81ecdfbb | 9900 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9901 | ac_cv_func_fork_works=yes |
9902 | else | |
81ecdfbb | 9903 | ac_cv_func_fork_works=no |
a9322a30 | 9904 | fi |
81ecdfbb RW |
9905 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9906 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9907 | fi |
81ecdfbb | 9908 | |
a9322a30 | 9909 | fi |
81ecdfbb RW |
9910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
9911 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
9912 | |
9913 | else | |
9914 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9915 | fi | |
9916 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9917 | case $host in | |
9918 | *-*-amigaos* | *-*-msdosdjgpp*) | |
9919 | # Override, as these systems have only a dummy fork() stub | |
9920 | ac_cv_func_fork_works=no | |
9921 | ;; | |
9922 | *) | |
9923 | ac_cv_func_fork_works=yes | |
9924 | ;; | |
9925 | esac | |
81ecdfbb RW |
9926 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
9927 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
9928 | fi |
9929 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9930 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
9931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
9932 | $as_echo_n "checking for working vfork... " >&6; } | |
9933 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
9934 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9935 | else |
81ecdfbb | 9936 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9937 | ac_cv_func_vfork_works=cross |
9938 | else | |
81ecdfbb | 9939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
9940 | /* end confdefs.h. */ |
9941 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 9942 | $ac_includes_default |
a9322a30 | 9943 | #include <sys/wait.h> |
81ecdfbb | 9944 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
9945 | # include <vfork.h> |
9946 | #endif | |
9947 | /* On some sparc systems, changes by the child to local and incoming | |
9948 | argument registers are propagated back to the parent. The compiler | |
9949 | is told about this with #include <vfork.h>, but some compilers | |
9950 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
9951 | static variable whose address is put into a register that is | |
9952 | clobbered by the vfork. */ | |
9953 | static void | |
9954 | #ifdef __cplusplus | |
9955 | sparc_address_test (int arg) | |
9956 | # else | |
9957 | sparc_address_test (arg) int arg; | |
9958 | #endif | |
9959 | { | |
9960 | static pid_t child; | |
9961 | if (!child) { | |
9962 | child = vfork (); | |
9963 | if (child < 0) { | |
9964 | perror ("vfork"); | |
9965 | _exit(2); | |
9966 | } | |
9967 | if (!child) { | |
9968 | arg = getpid(); | |
9969 | write(-1, "", 0); | |
9970 | _exit (arg); | |
9971 | } | |
9972 | } | |
9973 | } | |
9974 | ||
9975 | int | |
9976 | main () | |
9977 | { | |
9978 | pid_t parent = getpid (); | |
9979 | pid_t child; | |
9980 | ||
9981 | sparc_address_test (0); | |
9982 | ||
9983 | child = vfork (); | |
9984 | ||
9985 | if (child == 0) { | |
9986 | /* Here is another test for sparc vfork register problems. This | |
9987 | test uses lots of local variables, at least as many local | |
9988 | variables as main has allocated so far including compiler | |
9989 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
9990 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
9991 | reuse the register of parent for one of the local variables, | |
9992 | since it will think that parent can't possibly be used any more | |
9993 | in this routine. Assigning to the local variable will thus | |
9994 | munge parent in the parent process. */ | |
9995 | pid_t | |
9996 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
9997 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
9998 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
9999 | use the same hardware register for all 8 local variables. */ | |
10000 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10001 | || p != p5 || p != p6 || p != p7) | |
10002 | _exit(1); | |
10003 | ||
10004 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10005 | from child file descriptors. If the child closes a descriptor | |
10006 | before it execs or exits, this munges the parent's descriptor | |
10007 | as well. Test for this by closing stdout in the child. */ | |
10008 | _exit(close(fileno(stdout)) != 0); | |
10009 | } else { | |
10010 | int status; | |
10011 | struct stat st; | |
10012 | ||
10013 | while (wait(&status) != child) | |
10014 | ; | |
81ecdfbb | 10015 | return ( |
a9322a30 TT |
10016 | /* Was there some problem with vforking? */ |
10017 | child < 0 | |
10018 | ||
10019 | /* Did the child fail? (This shouldn't happen.) */ | |
10020 | || status | |
10021 | ||
10022 | /* Did the vfork/compiler bug occur? */ | |
10023 | || parent != getpid() | |
10024 | ||
10025 | /* Did the file descriptor bug occur? */ | |
10026 | || fstat(fileno(stdout), &st) != 0 | |
10027 | ); | |
10028 | } | |
10029 | } | |
10030 | _ACEOF | |
81ecdfbb | 10031 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10032 | ac_cv_func_vfork_works=yes |
10033 | else | |
81ecdfbb | 10034 | ac_cv_func_vfork_works=no |
a9322a30 | 10035 | fi |
81ecdfbb RW |
10036 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10037 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10038 | fi |
81ecdfbb | 10039 | |
a9322a30 | 10040 | fi |
81ecdfbb RW |
10041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10042 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10043 | |
10044 | fi; | |
10045 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10046 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10047 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10048 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10049 | fi |
10050 | ||
10051 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10052 | ||
81ecdfbb | 10053 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10054 | |
10055 | else | |
10056 | ||
81ecdfbb | 10057 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10058 | |
10059 | fi | |
10060 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10061 | ||
81ecdfbb | 10062 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10063 | |
10064 | fi | |
10065 | ||
7313baad | 10066 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 10067 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 10068 | sbrk setpgid setpgrp setsid \ |
a9322a30 | 10069 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 10070 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
1db33378 | 10071 | setrlimit getrlimit posix_madvise waitpid lstat |
81ecdfbb RW |
10072 | do : |
10073 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10074 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10075 | eval as_val=\$$as_ac_var | |
10076 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10077 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10078 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10079 | _ACEOF |
10080 | ||
10081 | fi | |
10082 | done | |
10083 | ||
10084 | ||
81ecdfbb RW |
10085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10086 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10087 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10088 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10089 | else |
81ecdfbb | 10090 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10091 | /* end confdefs.h. */ |
10092 | #include <langinfo.h> | |
10093 | int | |
10094 | main () | |
10095 | { | |
10096 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10097 | ; |
10098 | return 0; | |
10099 | } | |
10100 | _ACEOF | |
81ecdfbb | 10101 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10102 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10103 | else |
81ecdfbb | 10104 | am_cv_langinfo_codeset=no |
a4db0f07 | 10105 | fi |
81ecdfbb RW |
10106 | rm -f core conftest.err conftest.$ac_objext \ |
10107 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10108 | |
a4db0f07 | 10109 | fi |
81ecdfbb RW |
10110 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10111 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10112 | if test $am_cv_langinfo_codeset = yes; then |
10113 | ||
81ecdfbb | 10114 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10115 | |
6c7a06a3 | 10116 | fi |
c906108c | 10117 | |
06825bd1 | 10118 | |
a3828db0 MK |
10119 | # Check the return and argument types of ptrace. No canned test for |
10120 | # this, so roll our own. | |
10121 | gdb_ptrace_headers=' | |
10122 | #if HAVE_SYS_TYPES_H | |
10123 | # include <sys/types.h> | |
10124 | #endif | |
10125 | #if HAVE_SYS_PTRACE_H | |
10126 | # include <sys/ptrace.h> | |
10127 | #endif | |
10128 | #if HAVE_UNISTD_H | |
10129 | # include <unistd.h> | |
10130 | #endif | |
10131 | ' | |
10132 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
10133 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
10134 | " | |
10135 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
10136 | ac_have_decl=1 | |
06825bd1 | 10137 | else |
81ecdfbb | 10138 | ac_have_decl=0 |
06825bd1 | 10139 | fi |
06825bd1 | 10140 | |
a3828db0 | 10141 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10142 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 10143 | _ACEOF |
81ecdfbb | 10144 | if test $ac_have_decl = 1; then : |
bec39cab | 10145 | |
a3828db0 | 10146 | else |
a3828db0 MK |
10147 | |
10148 | : ${gdb_cv_func_ptrace_ret='int'} | |
10149 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10150 | ||
06825bd1 MK |
10151 | fi |
10152 | ||
064ef605 DJ |
10153 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
10154 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
10155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
10156 | $as_echo_n "checking return type of ptrace... " >&6; } | |
10157 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
10158 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10159 | else |
81ecdfbb | 10160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10161 | /* end confdefs.h. */ |
a3828db0 | 10162 | $gdb_ptrace_headers |
bec39cab AC |
10163 | int |
10164 | main () | |
10165 | { | |
064ef605 DJ |
10166 | extern long ptrace (enum __ptrace_request, ...); |
10167 | ; | |
10168 | return 0; | |
10169 | } | |
10170 | _ACEOF | |
81ecdfbb | 10171 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10172 | gdb_cv_func_ptrace_ret='long' |
10173 | else | |
81ecdfbb | 10174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10175 | /* end confdefs.h. */ |
10176 | $gdb_ptrace_headers | |
10177 | int | |
10178 | main () | |
10179 | { | |
a3828db0 | 10180 | extern int ptrace (); |
bec39cab AC |
10181 | ; |
10182 | return 0; | |
10183 | } | |
10184 | _ACEOF | |
81ecdfbb | 10185 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10186 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 10187 | else |
81ecdfbb | 10188 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 10189 | fi |
81ecdfbb | 10190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 10191 | fi |
81ecdfbb | 10192 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 10193 | fi |
81ecdfbb RW |
10194 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
10195 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 10196 | |
a3828db0 MK |
10197 | cat >>confdefs.h <<_ACEOF |
10198 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 10199 | _ACEOF |
70f9f479 | 10200 | |
a3828db0 | 10201 | # Check argument types. |
81ecdfbb RW |
10202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
10203 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
10204 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
10205 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10206 | else |
a3828db0 | 10207 | |
81ecdfbb | 10208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10209 | /* end confdefs.h. */ |
10210 | $gdb_ptrace_headers | |
10211 | int | |
10212 | main () | |
10213 | { | |
10214 | extern long ptrace (enum __ptrace_request, ...); | |
10215 | ; | |
10216 | return 0; | |
10217 | } | |
10218 | _ACEOF | |
81ecdfbb | 10219 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10220 | gdb_cv_func_ptrace_args='int,int,long,long' |
10221 | else | |
064ef605 | 10222 | |
a3828db0 MK |
10223 | for gdb_arg1 in 'int' 'long'; do |
10224 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 10225 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 10226 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 10227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10228 | /* end confdefs.h. */ |
a3828db0 | 10229 | $gdb_ptrace_headers |
bec39cab AC |
10230 | int |
10231 | main () | |
10232 | { | |
a3828db0 MK |
10233 | |
10234 | extern $gdb_cv_func_ptrace_ret | |
10235 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
10236 | ||
bec39cab AC |
10237 | ; |
10238 | return 0; | |
10239 | } | |
10240 | _ACEOF | |
81ecdfbb | 10241 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10242 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
10243 | break 4; | |
5c7f2947 | 10244 | fi |
81ecdfbb | 10245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 10246 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 10247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10248 | /* end confdefs.h. */ |
a3828db0 | 10249 | $gdb_ptrace_headers |
bec39cab AC |
10250 | int |
10251 | main () | |
10252 | { | |
a3828db0 MK |
10253 | |
10254 | extern $gdb_cv_func_ptrace_ret | |
10255 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
10256 | ||
bec39cab AC |
10257 | ; |
10258 | return 0; | |
10259 | } | |
10260 | _ACEOF | |
81ecdfbb | 10261 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10262 | |
10263 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
10264 | break 5; | |
78434e59 | 10265 | fi |
81ecdfbb | 10266 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
10267 | done |
10268 | done | |
10269 | done | |
10270 | done | |
10271 | done | |
10272 | # Provide a safe default value. | |
10273 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10274 | ||
064ef605 | 10275 | fi |
81ecdfbb | 10276 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 10277 | fi |
81ecdfbb RW |
10278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
10279 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
10280 | ac_save_IFS=$IFS; IFS=',' |
10281 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10282 | IFS=$ac_save_IFS | |
10283 | shift | |
bec39cab | 10284 | |
a3828db0 MK |
10285 | cat >>confdefs.h <<_ACEOF |
10286 | #define PTRACE_TYPE_ARG3 $3 | |
10287 | _ACEOF | |
10288 | ||
10289 | if test -n "$5"; then | |
10290 | ||
10291 | cat >>confdefs.h <<_ACEOF | |
10292 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 10293 | _ACEOF |
78434e59 MK |
10294 | |
10295 | fi | |
10296 | ||
a3828db0 | 10297 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
10298 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10299 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10300 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10301 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 10302 | else |
81ecdfbb RW |
10303 | if test "$cross_compiling" = yes; then : |
10304 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 10305 | else |
81ecdfbb | 10306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10307 | /* end confdefs.h. */ |
81ecdfbb | 10308 | $ac_includes_default |
bec39cab AC |
10309 | int |
10310 | main () | |
10311 | { | |
a3828db0 MK |
10312 | /* If this system has a BSD-style setpgrp which takes arguments, |
10313 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
10314 | exit successfully. */ | |
81ecdfbb | 10315 | return setpgrp (1,1) != -1; |
bec39cab AC |
10316 | ; |
10317 | return 0; | |
10318 | } | |
10319 | _ACEOF | |
81ecdfbb | 10320 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 10321 | ac_cv_func_setpgrp_void=no |
c906108c | 10322 | else |
81ecdfbb | 10323 | ac_cv_func_setpgrp_void=yes |
c906108c | 10324 | fi |
81ecdfbb RW |
10325 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10326 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 10327 | fi |
81ecdfbb | 10328 | |
a3828db0 | 10329 | fi |
81ecdfbb RW |
10330 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10331 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
10332 | if test $ac_cv_func_setpgrp_void = yes; then |
10333 | ||
81ecdfbb | 10334 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
10335 | |
10336 | fi | |
a3828db0 MK |
10337 | |
10338 | else | |
81ecdfbb RW |
10339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10340 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10341 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10342 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 10343 | else |
81ecdfbb | 10344 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10345 | /* end confdefs.h. */ |
a3828db0 MK |
10346 | |
10347 | #include <unistd.h> | |
10348 | ||
bec39cab AC |
10349 | int |
10350 | main () | |
10351 | { | |
a3828db0 MK |
10352 | |
10353 | if (setpgrp(1,1) == -1) | |
10354 | exit (0); | |
10355 | else | |
10356 | exit (1); | |
10357 | ||
bec39cab AC |
10358 | ; |
10359 | return 0; | |
10360 | } | |
10361 | _ACEOF | |
81ecdfbb | 10362 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10363 | ac_cv_func_setpgrp_void=no |
c906108c | 10364 | else |
81ecdfbb | 10365 | ac_cv_func_setpgrp_void=yes |
c906108c | 10366 | fi |
81ecdfbb | 10367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10368 | fi |
81ecdfbb RW |
10369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10370 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 10371 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 10372 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 10373 | |
a3828db0 | 10374 | fi |
c906108c SS |
10375 | fi |
10376 | ||
a3828db0 MK |
10377 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
10378 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
10379 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
10380 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
10381 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
10382 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10383 | else |
81ecdfbb | 10384 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10385 | /* end confdefs.h. */ |
a3828db0 MK |
10386 | |
10387 | #include <setjmp.h> | |
10388 | ||
bec39cab AC |
10389 | int |
10390 | main () | |
10391 | { | |
a3828db0 | 10392 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
10393 | ; |
10394 | return 0; | |
10395 | } | |
10396 | _ACEOF | |
81ecdfbb | 10397 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10398 | gdb_cv_func_sigsetjmp=yes |
c906108c | 10399 | else |
81ecdfbb | 10400 | gdb_cv_func_sigsetjmp=no |
c906108c | 10401 | fi |
81ecdfbb | 10402 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10403 | fi |
81ecdfbb RW |
10404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
10405 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 10406 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 10407 | |
81ecdfbb | 10408 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 10409 | |
97bf5e38 | 10410 | fi |
c906108c | 10411 | |
a3828db0 MK |
10412 | # Assume we'll default to using the included libiberty regex. |
10413 | gdb_use_included_regex=yes | |
10414 | ||
10415 | # However, if the system regex is GNU regex, then default to *not* | |
10416 | # using the included regex. | |
81ecdfbb RW |
10417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
10418 | $as_echo_n "checking for GNU regex... " >&6; } | |
10419 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
10420 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10421 | else |
81ecdfbb | 10422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10423 | /* end confdefs.h. */ |
a3828db0 | 10424 | #include <gnu-versions.h> |
bec39cab AC |
10425 | int |
10426 | main () | |
10427 | { | |
81ecdfbb RW |
10428 | #define REGEX_INTERFACE_VERSION 1 |
10429 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
10430 | # error "Version mismatch" | |
10431 | #endif | |
5c45e068 MK |
10432 | ; |
10433 | return 0; | |
10434 | } | |
10435 | _ACEOF | |
81ecdfbb RW |
10436 | if ac_fn_c_try_compile "$LINENO"; then : |
10437 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 10438 | else |
81ecdfbb RW |
10439 | gdb_cv_have_gnu_regex=no |
10440 | fi | |
10441 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10442 | fi | |
10443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
10444 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
10445 | if test $gdb_cv_have_gnu_regex = yes; then | |
10446 | gdb_use_included_regex=no | |
5c45e068 | 10447 | fi |
81ecdfbb RW |
10448 | |
10449 | ||
10450 | # Check whether --with-included-regex was given. | |
10451 | if test "${with_included_regex+set}" = set; then : | |
10452 | withval=$with_included_regex; gdb_with_regex=$withval | |
10453 | else | |
10454 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 10455 | fi |
81ecdfbb RW |
10456 | |
10457 | if test "$gdb_with_regex" = yes; then | |
10458 | ||
10459 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
10460 | ||
c906108c | 10461 | fi |
81ecdfbb RW |
10462 | |
10463 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
10464 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
10465 | #include <sys/proc.h> | |
10466 | ||
10467 | " | |
10468 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 10469 | |
5c45e068 | 10470 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 10471 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 10472 | _ACEOF |
c906108c | 10473 | |
5c45e068 | 10474 | |
97bf5e38 | 10475 | fi |
c906108c | 10476 | |
5c45e068 | 10477 | |
a3828db0 | 10478 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
10479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
10480 | $as_echo_n "checking for struct lwp... " >&6; } | |
10481 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
10482 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10483 | else |
81ecdfbb | 10484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10485 | /* end confdefs.h. */ |
a3828db0 MK |
10486 | #include <sys/param.h> |
10487 | #include <sys/lwp.h> | |
bec39cab AC |
10488 | int |
10489 | main () | |
10490 | { | |
a3828db0 | 10491 | struct lwp l; |
bec39cab AC |
10492 | ; |
10493 | return 0; | |
10494 | } | |
10495 | _ACEOF | |
81ecdfbb | 10496 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10497 | gdb_cv_struct_lwp=yes |
c906108c | 10498 | else |
81ecdfbb | 10499 | gdb_cv_struct_lwp=no |
c906108c | 10500 | fi |
81ecdfbb | 10501 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10502 | fi |
81ecdfbb RW |
10503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
10504 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 10505 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 10506 | |
81ecdfbb | 10507 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 10508 | |
97bf5e38 | 10509 | fi |
c906108c | 10510 | |
a3828db0 | 10511 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
10512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
10513 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
10514 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
10515 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10516 | else |
81ecdfbb | 10517 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10518 | /* end confdefs.h. */ |
a3828db0 MK |
10519 | #include <sys/types.h> |
10520 | #include <machine/reg.h> | |
bec39cab AC |
10521 | int |
10522 | main () | |
10523 | { | |
a3828db0 | 10524 | struct reg r; |
bec39cab AC |
10525 | ; |
10526 | return 0; | |
10527 | } | |
10528 | _ACEOF | |
81ecdfbb | 10529 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10530 | gdb_cv_struct_reg=yes |
27ca5dad | 10531 | else |
81ecdfbb | 10532 | gdb_cv_struct_reg=no |
27ca5dad | 10533 | fi |
81ecdfbb | 10534 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 10535 | fi |
81ecdfbb RW |
10536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
10537 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 10538 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 10539 | |
81ecdfbb | 10540 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
10541 | |
10542 | fi | |
97bf5e38 | 10543 | |
a3828db0 MK |
10544 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
10545 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
10546 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
10547 | " | |
10548 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
10549 | |
10550 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10551 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 10552 | _ACEOF |
3862412b | 10553 | |
5c45e068 | 10554 | |
97bf5e38 | 10555 | fi |
81ecdfbb RW |
10556 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
10557 | " | |
10558 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
10559 | |
10560 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10561 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 10562 | _ACEOF |
3862412b | 10563 | |
5c45e068 | 10564 | |
97bf5e38 | 10565 | fi |
3862412b | 10566 | |
5c45e068 | 10567 | |
a3828db0 | 10568 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
10569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10570 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
10571 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
10572 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10573 | else |
81ecdfbb | 10574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10575 | /* end confdefs.h. */ |
a3828db0 | 10576 | #include <sys/ptrace.h> |
bec39cab AC |
10577 | int |
10578 | main () | |
10579 | { | |
a3828db0 | 10580 | PTRACE_GETREGS; |
bec39cab AC |
10581 | ; |
10582 | return 0; | |
10583 | } | |
10584 | _ACEOF | |
81ecdfbb | 10585 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10586 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 10587 | else |
81ecdfbb | 10588 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 10589 | fi |
81ecdfbb | 10590 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10591 | fi |
10592 | ||
81ecdfbb RW |
10593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
10594 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 10595 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 10596 | |
81ecdfbb | 10597 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 10598 | |
97bf5e38 | 10599 | fi |
451928c5 | 10600 | |
a3828db0 | 10601 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
10602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10603 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
10604 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
10605 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10606 | else |
81ecdfbb | 10607 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10608 | /* end confdefs.h. */ |
a3828db0 | 10609 | #include <sys/ptrace.h> |
bec39cab AC |
10610 | int |
10611 | main () | |
10612 | { | |
a3828db0 | 10613 | PTRACE_GETFPXREGS; |
bec39cab AC |
10614 | ; |
10615 | return 0; | |
10616 | } | |
10617 | _ACEOF | |
81ecdfbb | 10618 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10619 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 10620 | else |
81ecdfbb | 10621 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 10622 | fi |
81ecdfbb | 10623 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10624 | fi |
10625 | ||
81ecdfbb RW |
10626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
10627 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 10628 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 10629 | |
81ecdfbb | 10630 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 10631 | |
97bf5e38 | 10632 | fi |
451928c5 | 10633 | |
a3828db0 | 10634 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
10635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
10636 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
10637 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
10638 | $as_echo_n "(cached) " >&6 | |
3862412b | 10639 | else |
81ecdfbb | 10640 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10641 | /* end confdefs.h. */ |
a3828db0 MK |
10642 | #include <sys/types.h> |
10643 | #include <sys/ptrace.h> | |
bec39cab AC |
10644 | int |
10645 | main () | |
10646 | { | |
a3828db0 | 10647 | PT_GETDBREGS; |
bec39cab AC |
10648 | ; |
10649 | return 0; | |
10650 | } | |
10651 | _ACEOF | |
81ecdfbb | 10652 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10653 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 10654 | else |
81ecdfbb | 10655 | gdb_cv_have_pt_getdbregs=no |
3862412b | 10656 | fi |
81ecdfbb | 10657 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10658 | fi |
10659 | ||
81ecdfbb RW |
10660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
10661 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 10662 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 10663 | |
81ecdfbb | 10664 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 10665 | |
97bf5e38 | 10666 | fi |
3862412b | 10667 | |
a3828db0 | 10668 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
10669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
10670 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
10671 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
10672 | $as_echo_n "(cached) " >&6 | |
3862412b | 10673 | else |
81ecdfbb | 10674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10675 | /* end confdefs.h. */ |
a3828db0 MK |
10676 | #include <sys/types.h> |
10677 | #include <sys/ptrace.h> | |
bec39cab AC |
10678 | int |
10679 | main () | |
10680 | { | |
a3828db0 | 10681 | PT_GETXMMREGS; |
bec39cab AC |
10682 | ; |
10683 | return 0; | |
10684 | } | |
10685 | _ACEOF | |
81ecdfbb | 10686 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10687 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 10688 | else |
81ecdfbb | 10689 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 10690 | fi |
81ecdfbb | 10691 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10692 | fi |
10693 | ||
81ecdfbb RW |
10694 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
10695 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 10696 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 10697 | |
81ecdfbb | 10698 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 10699 | |
97bf5e38 | 10700 | fi |
3862412b | 10701 | |
eb368090 | 10702 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
10703 | |
10704 | if test "${target}" = "${host}"; then | |
10705 | case "${host}" in | |
97bf5e38 | 10706 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 10707 | |
81ecdfbb | 10708 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
10709 | |
10710 | ;; | |
c162e8c9 | 10711 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 10712 | |
81ecdfbb | 10713 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
10714 | |
10715 | ;; | |
10716 | mips-sgi-irix5*) | |
10717 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 10718 | |
81ecdfbb | 10719 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
10720 | |
10721 | ;; | |
10722 | esac | |
10723 | fi | |
10724 | ||
10725 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
10726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
10727 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
10728 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
10729 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10730 | else |
81ecdfbb | 10731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10732 | /* end confdefs.h. */ |
596c9d4b KB |
10733 | |
10734 | #define _SYSCALL32 | |
d30c5336 JK |
10735 | /* Needed for new procfs interface on sparc-solaris. */ |
10736 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10737 | #include <sys/procfs.h> |
bec39cab AC |
10738 | int |
10739 | main () | |
10740 | { | |
97bf5e38 | 10741 | pstatus_t avar |
bec39cab AC |
10742 | ; |
10743 | return 0; | |
10744 | } | |
10745 | _ACEOF | |
81ecdfbb | 10746 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10747 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 10748 | else |
81ecdfbb | 10749 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 10750 | |
596c9d4b | 10751 | fi |
81ecdfbb | 10752 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10753 | fi |
10754 | ||
97bf5e38 | 10755 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 10756 | |
81ecdfbb | 10757 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
10758 | |
10759 | fi | |
81ecdfbb RW |
10760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
10761 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 10762 | |
81ecdfbb RW |
10763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
10764 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
10765 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
10766 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10767 | else |
81ecdfbb | 10768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10769 | /* end confdefs.h. */ |
596c9d4b KB |
10770 | |
10771 | #define _SYSCALL32 | |
d30c5336 JK |
10772 | /* Needed for new procfs interface on sparc-solaris. */ |
10773 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10774 | #include <sys/procfs.h> |
bec39cab AC |
10775 | int |
10776 | main () | |
10777 | { | |
97bf5e38 | 10778 | prrun_t avar |
bec39cab AC |
10779 | ; |
10780 | return 0; | |
10781 | } | |
10782 | _ACEOF | |
81ecdfbb | 10783 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10784 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 10785 | else |
81ecdfbb | 10786 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 10787 | |
596c9d4b | 10788 | fi |
81ecdfbb | 10789 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10790 | fi |
10791 | ||
97bf5e38 | 10792 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 10793 | |
81ecdfbb | 10794 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
10795 | |
10796 | fi | |
81ecdfbb RW |
10797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
10798 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 10799 | |
81ecdfbb RW |
10800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
10801 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
10802 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
10803 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10804 | else |
81ecdfbb | 10805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10806 | /* end confdefs.h. */ |
596c9d4b KB |
10807 | |
10808 | #define _SYSCALL32 | |
d30c5336 JK |
10809 | /* Needed for new procfs interface on sparc-solaris. */ |
10810 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10811 | #include <sys/procfs.h> |
bec39cab AC |
10812 | int |
10813 | main () | |
10814 | { | |
97bf5e38 | 10815 | gregset_t avar |
bec39cab AC |
10816 | ; |
10817 | return 0; | |
10818 | } | |
10819 | _ACEOF | |
81ecdfbb | 10820 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10821 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 10822 | else |
81ecdfbb | 10823 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 10824 | |
596c9d4b | 10825 | fi |
81ecdfbb | 10826 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10827 | fi |
10828 | ||
97bf5e38 | 10829 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 10830 | |
81ecdfbb | 10831 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
10832 | |
10833 | fi | |
81ecdfbb RW |
10834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
10835 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 10836 | |
81ecdfbb RW |
10837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
10838 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
10839 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
10840 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 10841 | else |
81ecdfbb | 10842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10843 | /* end confdefs.h. */ |
97bf5e38 MK |
10844 | |
10845 | #define _SYSCALL32 | |
d30c5336 JK |
10846 | /* Needed for new procfs interface on sparc-solaris. */ |
10847 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 10848 | #include <sys/procfs.h> |
bec39cab AC |
10849 | int |
10850 | main () | |
10851 | { | |
97bf5e38 | 10852 | fpregset_t avar |
bec39cab AC |
10853 | ; |
10854 | return 0; | |
10855 | } | |
10856 | _ACEOF | |
81ecdfbb | 10857 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10858 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 10859 | else |
81ecdfbb | 10860 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 10861 | |
d84dd0c5 | 10862 | fi |
81ecdfbb | 10863 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
10864 | fi |
10865 | ||
97bf5e38 | 10866 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 10867 | |
81ecdfbb | 10868 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 10869 | |
97bf5e38 | 10870 | fi |
81ecdfbb RW |
10871 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
10872 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 10873 | |
81ecdfbb RW |
10874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
10875 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
10876 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
10877 | $as_echo_n "(cached) " >&6 | |
c906108c | 10878 | else |
81ecdfbb | 10879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10880 | /* end confdefs.h. */ |
c906108c | 10881 | |
97bf5e38 | 10882 | #define _SYSCALL32 |
d30c5336 JK |
10883 | /* Needed for new procfs interface on sparc-solaris. */ |
10884 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10885 | #include <sys/procfs.h> |
bec39cab AC |
10886 | int |
10887 | main () | |
10888 | { | |
97bf5e38 | 10889 | prgregset_t avar |
bec39cab AC |
10890 | ; |
10891 | return 0; | |
10892 | } | |
10893 | _ACEOF | |
81ecdfbb | 10894 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10895 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 10896 | else |
81ecdfbb | 10897 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 10898 | |
c906108c | 10899 | fi |
81ecdfbb | 10900 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
10901 | fi |
10902 | ||
97bf5e38 | 10903 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 10904 | |
81ecdfbb | 10905 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 10906 | |
97bf5e38 | 10907 | fi |
81ecdfbb RW |
10908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
10909 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 10910 | |
81ecdfbb RW |
10911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
10912 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
10913 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
10914 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10915 | else |
81ecdfbb | 10916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10917 | /* end confdefs.h. */ |
97bf5e38 MK |
10918 | |
10919 | #define _SYSCALL32 | |
d30c5336 JK |
10920 | /* Needed for new procfs interface on sparc-solaris. */ |
10921 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10922 | #include <sys/procfs.h> |
bec39cab AC |
10923 | int |
10924 | main () | |
10925 | { | |
97bf5e38 | 10926 | prfpregset_t avar |
bec39cab AC |
10927 | ; |
10928 | return 0; | |
10929 | } | |
10930 | _ACEOF | |
81ecdfbb | 10931 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10932 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 10933 | else |
81ecdfbb | 10934 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 10935 | |
d45fe813 | 10936 | fi |
81ecdfbb | 10937 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
10938 | fi |
10939 | ||
97bf5e38 | 10940 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 10941 | |
81ecdfbb | 10942 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 10943 | |
97bf5e38 | 10944 | fi |
81ecdfbb RW |
10945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
10946 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 10947 | |
81ecdfbb RW |
10948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
10949 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
10950 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
10951 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10952 | else |
81ecdfbb | 10953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10954 | /* end confdefs.h. */ |
97bf5e38 MK |
10955 | |
10956 | #define _SYSCALL32 | |
d30c5336 JK |
10957 | /* Needed for new procfs interface on sparc-solaris. */ |
10958 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10959 | #include <sys/procfs.h> |
bec39cab AC |
10960 | int |
10961 | main () | |
10962 | { | |
97bf5e38 | 10963 | prgregset32_t avar |
bec39cab AC |
10964 | ; |
10965 | return 0; | |
10966 | } | |
10967 | _ACEOF | |
81ecdfbb | 10968 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10969 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 10970 | else |
81ecdfbb | 10971 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 10972 | |
d45fe813 | 10973 | fi |
81ecdfbb | 10974 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
10975 | fi |
10976 | ||
97bf5e38 | 10977 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 10978 | |
81ecdfbb | 10979 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 10980 | |
97bf5e38 | 10981 | fi |
81ecdfbb RW |
10982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
10983 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 10984 | |
81ecdfbb RW |
10985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
10986 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
10987 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
10988 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10989 | else |
81ecdfbb | 10990 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10991 | /* end confdefs.h. */ |
97bf5e38 MK |
10992 | |
10993 | #define _SYSCALL32 | |
d30c5336 JK |
10994 | /* Needed for new procfs interface on sparc-solaris. */ |
10995 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10996 | #include <sys/procfs.h> |
bec39cab AC |
10997 | int |
10998 | main () | |
10999 | { | |
97bf5e38 | 11000 | prfpregset32_t avar |
bec39cab AC |
11001 | ; |
11002 | return 0; | |
11003 | } | |
11004 | _ACEOF | |
81ecdfbb | 11005 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11006 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 11007 | else |
81ecdfbb | 11008 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 11009 | |
d45fe813 | 11010 | fi |
81ecdfbb | 11011 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11012 | fi |
11013 | ||
97bf5e38 | 11014 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 11015 | |
81ecdfbb | 11016 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 11017 | |
97bf5e38 | 11018 | fi |
81ecdfbb RW |
11019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
11020 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 11021 | |
81ecdfbb RW |
11022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11023 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11024 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11025 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11026 | else |
81ecdfbb | 11027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11028 | /* end confdefs.h. */ |
97bf5e38 | 11029 | |
d45fe813 | 11030 | #define _SYSCALL32 |
d30c5336 JK |
11031 | /* Needed for new procfs interface on sparc-solaris. */ |
11032 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11033 | #include <sys/procfs.h> |
bec39cab AC |
11034 | int |
11035 | main () | |
11036 | { | |
97bf5e38 | 11037 | lwpid_t avar |
bec39cab AC |
11038 | ; |
11039 | return 0; | |
11040 | } | |
11041 | _ACEOF | |
81ecdfbb | 11042 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11043 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11044 | else |
81ecdfbb | 11045 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11046 | |
d45fe813 | 11047 | fi |
81ecdfbb | 11048 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11049 | fi |
11050 | ||
97bf5e38 | 11051 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11052 | |
81ecdfbb | 11053 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11054 | |
97bf5e38 | 11055 | fi |
81ecdfbb RW |
11056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11057 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11058 | |
81ecdfbb RW |
11059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11060 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11061 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11062 | $as_echo_n "(cached) " >&6 | |
c906108c | 11063 | else |
81ecdfbb | 11064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11065 | /* end confdefs.h. */ |
c906108c | 11066 | |
97bf5e38 | 11067 | #define _SYSCALL32 |
d30c5336 JK |
11068 | /* Needed for new procfs interface on sparc-solaris. */ |
11069 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11070 | #include <sys/procfs.h> |
bec39cab AC |
11071 | int |
11072 | main () | |
11073 | { | |
97bf5e38 | 11074 | psaddr_t avar |
bec39cab AC |
11075 | ; |
11076 | return 0; | |
11077 | } | |
11078 | _ACEOF | |
81ecdfbb | 11079 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11080 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11081 | else |
81ecdfbb | 11082 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11083 | |
c906108c | 11084 | fi |
81ecdfbb | 11085 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11086 | fi |
11087 | ||
97bf5e38 | 11088 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11089 | |
81ecdfbb | 11090 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11091 | |
97bf5e38 | 11092 | fi |
81ecdfbb RW |
11093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11094 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11095 | |
81ecdfbb RW |
11096 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11097 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11098 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11099 | $as_echo_n "(cached) " >&6 | |
c906108c | 11100 | else |
81ecdfbb | 11101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11102 | /* end confdefs.h. */ |
c906108c | 11103 | |
97bf5e38 | 11104 | #define _SYSCALL32 |
d30c5336 JK |
11105 | /* Needed for new procfs interface on sparc-solaris. */ |
11106 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11107 | #include <sys/procfs.h> |
bec39cab AC |
11108 | int |
11109 | main () | |
11110 | { | |
97bf5e38 | 11111 | prsysent_t avar |
bec39cab AC |
11112 | ; |
11113 | return 0; | |
11114 | } | |
11115 | _ACEOF | |
81ecdfbb | 11116 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11117 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11118 | else |
81ecdfbb | 11119 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11120 | |
c906108c | 11121 | fi |
81ecdfbb | 11122 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11123 | fi |
11124 | ||
97bf5e38 | 11125 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11126 | |
81ecdfbb | 11127 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11128 | |
97bf5e38 | 11129 | fi |
81ecdfbb RW |
11130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11131 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11132 | |
81ecdfbb RW |
11133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11134 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11135 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11136 | $as_echo_n "(cached) " >&6 | |
c906108c | 11137 | else |
81ecdfbb | 11138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11139 | /* end confdefs.h. */ |
c906108c | 11140 | |
97bf5e38 | 11141 | #define _SYSCALL32 |
d30c5336 JK |
11142 | /* Needed for new procfs interface on sparc-solaris. */ |
11143 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11144 | #include <sys/procfs.h> |
bec39cab AC |
11145 | int |
11146 | main () | |
11147 | { | |
97bf5e38 | 11148 | pr_sigset_t avar |
bec39cab AC |
11149 | ; |
11150 | return 0; | |
11151 | } | |
11152 | _ACEOF | |
81ecdfbb | 11153 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11154 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11155 | else |
81ecdfbb | 11156 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11157 | |
c906108c | 11158 | fi |
81ecdfbb | 11159 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11160 | fi |
11161 | ||
97bf5e38 | 11162 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11163 | |
81ecdfbb | 11164 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11165 | |
97bf5e38 | 11166 | fi |
81ecdfbb RW |
11167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11168 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11169 | |
81ecdfbb RW |
11170 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11171 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11172 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11173 | $as_echo_n "(cached) " >&6 | |
c906108c | 11174 | else |
81ecdfbb | 11175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11176 | /* end confdefs.h. */ |
c906108c | 11177 | |
97bf5e38 | 11178 | #define _SYSCALL32 |
d30c5336 JK |
11179 | /* Needed for new procfs interface on sparc-solaris. */ |
11180 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11181 | #include <sys/procfs.h> |
bec39cab AC |
11182 | int |
11183 | main () | |
11184 | { | |
97bf5e38 | 11185 | pr_sigaction64_t avar |
bec39cab AC |
11186 | ; |
11187 | return 0; | |
11188 | } | |
11189 | _ACEOF | |
81ecdfbb | 11190 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11191 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11192 | else |
81ecdfbb | 11193 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11194 | |
c906108c | 11195 | fi |
81ecdfbb | 11196 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11197 | fi |
11198 | ||
97bf5e38 | 11199 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11200 | |
81ecdfbb | 11201 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11202 | |
97bf5e38 | 11203 | fi |
81ecdfbb RW |
11204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11205 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11206 | |
81ecdfbb RW |
11207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
11208 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
11209 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
11210 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11211 | else |
81ecdfbb | 11212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11213 | /* end confdefs.h. */ |
97bf5e38 MK |
11214 | |
11215 | #define _SYSCALL32 | |
d30c5336 JK |
11216 | /* Needed for new procfs interface on sparc-solaris. */ |
11217 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11218 | #include <sys/procfs.h> |
bec39cab AC |
11219 | int |
11220 | main () | |
11221 | { | |
97bf5e38 | 11222 | pr_siginfo64_t avar |
bec39cab AC |
11223 | ; |
11224 | return 0; | |
11225 | } | |
11226 | _ACEOF | |
81ecdfbb | 11227 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11228 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
11229 | else | |
81ecdfbb | 11230 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 11231 | |
97bf5e38 | 11232 | fi |
81ecdfbb | 11233 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11234 | fi |
c906108c | 11235 | |
97bf5e38 | 11236 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 11237 | |
81ecdfbb | 11238 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 11239 | |
97bf5e38 | 11240 | fi |
81ecdfbb RW |
11241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
11242 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
11243 | |
11244 | ||
97bf5e38 MK |
11245 | |
11246 | ||
11247 | ||
97bf5e38 | 11248 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
11249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
11250 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
11251 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
11252 | $as_echo_n "(cached) " >&6 | |
c906108c | 11253 | else |
81ecdfbb | 11254 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 11255 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 11256 | else |
81ecdfbb | 11257 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11258 | /* end confdefs.h. */ |
97bf5e38 MK |
11259 | #include <sys/procfs.h> |
11260 | int main () | |
11261 | { | |
11262 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
11263 | return 1; | |
11264 | return 0; | |
11265 | } | |
bec39cab | 11266 | _ACEOF |
81ecdfbb | 11267 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11268 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
11269 | else |
11270 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 11271 | fi |
81ecdfbb RW |
11272 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11273 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11274 | fi |
81ecdfbb | 11275 | |
c906108c SS |
11276 | fi |
11277 | ||
81ecdfbb RW |
11278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
11279 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 11280 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 11281 | |
81ecdfbb | 11282 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 11283 | |
97bf5e38 MK |
11284 | fi |
11285 | fi | |
c906108c | 11286 | |
bec39cab | 11287 | |
81ecdfbb RW |
11288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
11289 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
11290 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
11291 | $as_echo_n "(cached) " >&6 | |
c906108c | 11292 | else |
81ecdfbb | 11293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11294 | /* end confdefs.h. */ |
97bf5e38 MK |
11295 | #include <unistd.h> |
11296 | #include <sys/types.h> | |
11297 | #include <sys/procfs.h> | |
11298 | ||
bec39cab AC |
11299 | int |
11300 | main () | |
11301 | { | |
97bf5e38 MK |
11302 | |
11303 | int dummy;; | |
11304 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
11305 | |
11306 | ; | |
11307 | return 0; | |
11308 | } | |
11309 | _ACEOF | |
81ecdfbb | 11310 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11311 | gdb_cv_have_procfs_piocset=yes |
c906108c | 11312 | else |
81ecdfbb | 11313 | gdb_cv_have_procfs_piocset=no |
c906108c | 11314 | fi |
81ecdfbb | 11315 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11316 | fi |
97bf5e38 | 11317 | |
81ecdfbb RW |
11318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
11319 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 11320 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 11321 | |
81ecdfbb | 11322 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
11323 | |
11324 | fi | |
c906108c | 11325 | fi |
c906108c | 11326 | |
97bf5e38 | 11327 | if test ${host} = ${target} ; then |
bec39cab | 11328 | |
81ecdfbb RW |
11329 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
11330 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
11331 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
11332 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11333 | else |
81ecdfbb | 11334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11335 | /* end confdefs.h. */ |
97bf5e38 | 11336 | #include <link.h> |
bec39cab AC |
11337 | int |
11338 | main () | |
11339 | { | |
97bf5e38 | 11340 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
11341 | ; |
11342 | return 0; | |
11343 | } | |
11344 | _ACEOF | |
81ecdfbb | 11345 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11346 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 11347 | else |
81ecdfbb | 11348 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 11349 | fi |
81ecdfbb | 11350 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11351 | fi |
11352 | ||
81ecdfbb RW |
11353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
11354 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 11355 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 11356 | |
81ecdfbb | 11357 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11358 | |
11359 | fi | |
11360 | ||
bec39cab | 11361 | |
81ecdfbb RW |
11362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
11363 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
11364 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
11365 | $as_echo_n "(cached) " >&6 | |
c906108c | 11366 | else |
81ecdfbb | 11367 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11368 | /* end confdefs.h. */ |
97bf5e38 MK |
11369 | #include <sys/types.h> |
11370 | #include <link.h> | |
bec39cab AC |
11371 | int |
11372 | main () | |
11373 | { | |
97bf5e38 | 11374 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
11375 | ; |
11376 | return 0; | |
11377 | } | |
11378 | _ACEOF | |
81ecdfbb | 11379 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11380 | gdb_cv_have_struct_link_map_with_lm_members=yes |
11381 | else | |
81ecdfbb | 11382 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 11383 | fi |
81ecdfbb | 11384 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11385 | fi |
c906108c | 11386 | |
81ecdfbb RW |
11387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
11388 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 11389 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 11390 | |
81ecdfbb | 11391 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11392 | |
11393 | fi | |
11394 | ||
bec39cab | 11395 | |
81ecdfbb RW |
11396 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
11397 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
11398 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
11399 | $as_echo_n "(cached) " >&6 | |
c906108c | 11400 | else |
81ecdfbb | 11401 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11402 | /* end confdefs.h. */ |
97bf5e38 MK |
11403 | #include <sys/types.h> |
11404 | #ifdef HAVE_NLIST_H | |
11405 | #include <nlist.h> | |
11406 | #endif | |
11407 | #include <link.h> | |
bec39cab AC |
11408 | int |
11409 | main () | |
11410 | { | |
97bf5e38 | 11411 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
11412 | ; |
11413 | return 0; | |
11414 | } | |
11415 | _ACEOF | |
81ecdfbb | 11416 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11417 | gdb_cv_have_struct_so_map_with_som_members=yes |
11418 | else | |
81ecdfbb | 11419 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 11420 | fi |
81ecdfbb | 11421 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11422 | fi |
c906108c | 11423 | |
81ecdfbb RW |
11424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
11425 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 11426 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 11427 | |
81ecdfbb | 11428 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 11429 | |
97bf5e38 | 11430 | fi |
c906108c | 11431 | |
bec39cab | 11432 | |
81ecdfbb RW |
11433 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
11434 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
11435 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
11436 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11437 | else |
81ecdfbb | 11438 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11439 | /* end confdefs.h. */ |
97bf5e38 MK |
11440 | #define _SYSCALL32 |
11441 | #include <sys/link.h> | |
bec39cab AC |
11442 | int |
11443 | main () | |
11444 | { | |
97bf5e38 | 11445 | struct link_map32 l; |
bec39cab AC |
11446 | ; |
11447 | return 0; | |
11448 | } | |
11449 | _ACEOF | |
81ecdfbb | 11450 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11451 | gdb_cv_have_struct_link_map32=yes |
11452 | else | |
81ecdfbb | 11453 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 11454 | fi |
81ecdfbb | 11455 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11456 | fi |
c906108c | 11457 | |
81ecdfbb RW |
11458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
11459 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 11460 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 11461 | |
81ecdfbb | 11462 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 11463 | |
60ca704f | 11464 | |
81ecdfbb | 11465 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 11466 | |
97bf5e38 MK |
11467 | fi |
11468 | fi | |
c906108c | 11469 | |
bc8bcb4b | 11470 | # Check if the compiler supports the `long long' type. |
c906108c | 11471 | |
81ecdfbb RW |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
11473 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
11474 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
11475 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11476 | else |
81ecdfbb | 11477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11478 | /* end confdefs.h. */ |
bc8bcb4b | 11479 | extern long long foo; |
bec39cab AC |
11480 | int |
11481 | main () | |
11482 | { | |
bc8bcb4b | 11483 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
11484 | ; |
11485 | return 0; | |
11486 | } | |
11487 | _ACEOF | |
81ecdfbb | 11488 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11489 | gdb_cv_c_long_long=yes |
11490 | else | |
81ecdfbb | 11491 | gdb_cv_c_long_long=no |
97bf5e38 | 11492 | fi |
81ecdfbb | 11493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11494 | fi |
81ecdfbb RW |
11495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
11496 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 11497 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 11498 | |
81ecdfbb | 11499 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11500 | |
11501 | fi | |
11502 | ||
bc8bcb4b | 11503 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 11504 | |
81ecdfbb RW |
11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
11506 | $as_echo_n "checking for long long support in printf... " >&6; } | |
11507 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
11508 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11509 | else |
81ecdfbb | 11510 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11511 | gdb_cv_printf_has_long_long=no |
11512 | else | |
81ecdfbb | 11513 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11514 | /* end confdefs.h. */ |
bc8bcb4b MK |
11515 | $ac_includes_default |
11516 | int | |
11517 | main () | |
11518 | { | |
11519 | char buf[32]; | |
97bf5e38 MK |
11520 | long long l = 0; |
11521 | l = (l << 16) + 0x0123; | |
11522 | l = (l << 16) + 0x4567; | |
11523 | l = (l << 16) + 0x89ab; | |
11524 | l = (l << 16) + 0xcdef; | |
11525 | sprintf (buf, "0x%016llx", l); | |
11526 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
11527 | ; |
11528 | return 0; | |
c906108c | 11529 | } |
bec39cab | 11530 | _ACEOF |
81ecdfbb | 11531 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11532 | gdb_cv_printf_has_long_long=yes |
11533 | else | |
81ecdfbb | 11534 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 11535 | fi |
81ecdfbb RW |
11536 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11537 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11538 | fi |
81ecdfbb | 11539 | |
97bf5e38 | 11540 | fi |
81ecdfbb RW |
11541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
11542 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 11543 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 11544 | |
81ecdfbb | 11545 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11546 | |
11547 | fi | |
97bf5e38 | 11548 | |
1a619819 LM |
11549 | # Check if the compiler and runtime support printing decfloats. |
11550 | ||
81ecdfbb RW |
11551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
11552 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
11553 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
11554 | $as_echo_n "(cached) " >&6 | |
1a619819 | 11555 | else |
81ecdfbb | 11556 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
11557 | gdb_cv_printf_has_decfloat=no |
11558 | else | |
81ecdfbb | 11559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
11560 | /* end confdefs.h. */ |
11561 | $ac_includes_default | |
11562 | int | |
11563 | main () | |
11564 | { | |
11565 | char buf[64]; | |
11566 | _Decimal32 d32 = 1.2345df; | |
11567 | _Decimal64 d64 = 1.2345dd; | |
11568 | _Decimal128 d128 = 1.2345dl; | |
11569 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
11570 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
11571 | ; | |
11572 | return 0; | |
11573 | } | |
11574 | _ACEOF | |
81ecdfbb | 11575 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
11576 | gdb_cv_printf_has_decfloat=yes |
11577 | else | |
81ecdfbb | 11578 | gdb_cv_printf_has_decfloat=no |
1a619819 | 11579 | fi |
81ecdfbb RW |
11580 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11581 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 11582 | fi |
81ecdfbb | 11583 | |
1a619819 | 11584 | fi |
81ecdfbb RW |
11585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
11586 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
11587 | if test $gdb_cv_printf_has_decfloat = yes; then |
11588 | ||
81ecdfbb | 11589 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
11590 | |
11591 | fi | |
11592 | ||
bc8bcb4b MK |
11593 | # Check if the compiler supports the `long double' type. We can't use |
11594 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
11595 | # constants defined in <float.h> that fail on some systems, | |
11596 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 11597 | |
81ecdfbb RW |
11598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
11599 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
11600 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
11601 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11602 | else |
81ecdfbb | 11603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11604 | /* end confdefs.h. */ |
97bf5e38 | 11605 | long double foo; |
bec39cab | 11606 | _ACEOF |
81ecdfbb | 11607 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 11608 | gdb_cv_c_long_double=yes |
97bf5e38 | 11609 | else |
81ecdfbb | 11610 | gdb_cv_c_long_double=no |
97bf5e38 | 11611 | fi |
81ecdfbb | 11612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11613 | fi |
81ecdfbb RW |
11614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
11615 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 11616 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 11617 | |
81ecdfbb | 11618 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11619 | |
11620 | fi | |
11621 | ||
bc8bcb4b | 11622 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 11623 | |
81ecdfbb RW |
11624 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
11625 | $as_echo_n "checking for long double support in printf... " >&6; } | |
11626 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
11627 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11628 | else |
81ecdfbb | 11629 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11630 | gdb_cv_printf_has_long_double=no |
11631 | else | |
81ecdfbb | 11632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11633 | /* end confdefs.h. */ |
bc8bcb4b MK |
11634 | $ac_includes_default |
11635 | int | |
11636 | main () | |
11637 | { | |
11638 | char buf[16]; | |
97bf5e38 MK |
11639 | long double f = 3.141592653; |
11640 | sprintf (buf, "%Lg", f); | |
11641 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
11642 | ; |
11643 | return 0; | |
97bf5e38 | 11644 | } |
bec39cab | 11645 | _ACEOF |
81ecdfbb | 11646 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11647 | gdb_cv_printf_has_long_double=yes |
c906108c | 11648 | else |
81ecdfbb | 11649 | gdb_cv_printf_has_long_double=no |
c906108c | 11650 | fi |
81ecdfbb RW |
11651 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11652 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11653 | fi |
81ecdfbb | 11654 | |
c906108c | 11655 | fi |
81ecdfbb RW |
11656 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
11657 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 11658 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 11659 | |
81ecdfbb | 11660 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11661 | |
11662 | fi | |
97bf5e38 | 11663 | |
bc8bcb4b | 11664 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 11665 | |
81ecdfbb RW |
11666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
11667 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
11668 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
11669 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11670 | else |
81ecdfbb | 11671 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11672 | gdb_cv_scanf_has_long_double=no |
11673 | else | |
81ecdfbb | 11674 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11675 | /* end confdefs.h. */ |
bc8bcb4b MK |
11676 | #include <stdio.h> |
11677 | int | |
11678 | main () | |
11679 | { | |
11680 | char *buf = "3.141592653"; | |
97bf5e38 MK |
11681 | long double f = 0; |
11682 | sscanf (buf, "%Lg", &f); | |
11683 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
11684 | ; |
11685 | return 0; | |
97bf5e38 | 11686 | } |
bec39cab | 11687 | _ACEOF |
81ecdfbb | 11688 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11689 | gdb_cv_scanf_has_long_double=yes |
11690 | else | |
81ecdfbb | 11691 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 11692 | fi |
81ecdfbb RW |
11693 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11694 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11695 | fi |
81ecdfbb | 11696 | |
c906108c | 11697 | fi |
81ecdfbb RW |
11698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
11699 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 11700 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 11701 | |
81ecdfbb | 11702 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11703 | |
11704 | fi | |
c906108c | 11705 | |
438013df AO |
11706 | case ${host_os} in |
11707 | aix*) | |
81ecdfbb RW |
11708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
11709 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
11710 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
11711 | $as_echo_n "(cached) " >&6 | |
438013df | 11712 | else |
bec39cab | 11713 | |
438013df AO |
11714 | SAVE_LDFLAGS=$LDFLAGS |
11715 | ||
11716 | case $GCC in | |
11717 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
11718 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
11719 | esac | |
11720 | ||
11721 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 11722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11723 | /* end confdefs.h. */ |
438013df | 11724 | |
bec39cab AC |
11725 | int |
11726 | main () | |
11727 | { | |
438013df | 11728 | int i; |
bec39cab AC |
11729 | ; |
11730 | return 0; | |
11731 | } | |
11732 | _ACEOF | |
81ecdfbb | 11733 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 11734 | |
81ecdfbb RW |
11735 | else |
11736 | gdb_cv_bigtoc= | |
438013df | 11737 | fi |
81ecdfbb RW |
11738 | rm -f core conftest.err conftest.$ac_objext \ |
11739 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 11740 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 11741 | |
bec39cab | 11742 | fi |
81ecdfbb RW |
11743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
11744 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
11745 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
11746 | ;; | |
11747 | esac | |
11748 | ||
38f6b338 | 11749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 11750 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
11751 | dynamic_list=false |
11752 | if test "${gdb_native}" = yes; then | |
11753 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
11754 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
11755 | # may not be supported there. | |
11756 | old_LDFLAGS="$LDFLAGS" | |
11757 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
11758 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
11759 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
11760 | if test "${have_libpython}" = no; then | |
11761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
11762 | /* end confdefs.h. */ |
11763 | ||
11764 | int | |
11765 | main () | |
11766 | { | |
11767 | ||
11768 | ; | |
11769 | return 0; | |
11770 | } | |
11771 | _ACEOF | |
11772 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
11773 | dynamic_list=true |
11774 | fi | |
11775 | rm -f core conftest.err conftest.$ac_objext \ | |
11776 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
11777 | else |
11778 | # Workaround http://bugs.python.org/issue4434 where static | |
11779 | # libpythonX.Y.a would get its symbols required for | |
11780 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
11781 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
11782 | old_CFLAGS="$CFLAGS" | |
11783 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
11784 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 11785 | true |
f6528abd | 11786 | else |
3bebe2f2 JK |
11787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11788 | /* end confdefs.h. */ | |
11789 | #include "${have_libpython}/Python.h" | |
11790 | int | |
11791 | main () | |
11792 | { | |
11793 | int err; | |
38f6b338 JK |
11794 | Py_Initialize (); |
11795 | err = PyRun_SimpleString ("import itertools\n"); | |
11796 | Py_Finalize (); | |
11797 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
11798 | ; |
11799 | return 0; | |
11800 | } | |
11801 | _ACEOF | |
11802 | if ac_fn_c_try_run "$LINENO"; then : | |
11803 | dynamic_list=true | |
11804 | fi | |
11805 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11806 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11807 | fi | |
11808 | ||
38f6b338 JK |
11809 | CFLAGS="$old_CFLAGS" |
11810 | fi | |
11811 | LDFLAGS="$old_LDFLAGS" | |
11812 | fi | |
11813 | if $dynamic_list; then | |
11814 | found="-Wl,--dynamic-list" | |
11815 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 11816 | else |
38f6b338 JK |
11817 | found="-rdynamic" |
11818 | RDYNAMIC="-rdynamic" | |
f6528abd | 11819 | fi |
f6528abd | 11820 | |
38f6b338 | 11821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 11822 | $as_echo "$found" >&6; } |
0407b3f1 | 11823 | |
f6528abd | 11824 | |
0407b3f1 | 11825 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 11826 | case ${host_os} in |
c906108c | 11827 | solaris*) |
d92419e5 JB |
11828 | # See if thread_db library is around for Solaris thread debugging. |
11829 | # Note that we must explicitly test for version 1 of the library | |
11830 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
11831 | # the same API. | |
81ecdfbb RW |
11832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
11833 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 11834 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
11835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11836 | $as_echo "yes" >&6; } | |
60ca704f | 11837 | |
81ecdfbb | 11838 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 11839 | |
3483b318 | 11840 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 11841 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
11842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
11843 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
11844 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
11845 | $as_echo_n "(cached) " >&6 | |
c906108c | 11846 | else |
bec39cab | 11847 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 11848 | LIBS="-ldl $LIBS" |
81ecdfbb | 11849 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
11850 | /* end confdefs.h. */ |
11851 | ||
81ecdfbb RW |
11852 | /* Override any GCC internal prototype to avoid an error. |
11853 | Use char because int might match the return type of a GCC | |
11854 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
11855 | #ifdef __cplusplus |
11856 | extern "C" | |
11857 | #endif | |
bec39cab AC |
11858 | char dlopen (); |
11859 | int | |
11860 | main () | |
11861 | { | |
81ecdfbb | 11862 | return dlopen (); |
bec39cab AC |
11863 | ; |
11864 | return 0; | |
11865 | } | |
11866 | _ACEOF | |
81ecdfbb | 11867 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
11868 | ac_cv_lib_dl_dlopen=yes |
11869 | else | |
81ecdfbb | 11870 | ac_cv_lib_dl_dlopen=no |
bec39cab | 11871 | fi |
81ecdfbb RW |
11872 | rm -f core conftest.err conftest.$ac_objext \ |
11873 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
11874 | LIBS=$ac_check_lib_save_LIBS |
11875 | fi | |
81ecdfbb RW |
11876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
11877 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
11878 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
11879 | cat >>confdefs.h <<_ACEOF |
11880 | #define HAVE_LIBDL 1 | |
11881 | _ACEOF | |
c906108c SS |
11882 | |
11883 | LIBS="-ldl $LIBS" | |
11884 | ||
c906108c SS |
11885 | fi |
11886 | ||
f6528abd | 11887 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
11888 | # Sun randomly tweaked the prototypes in <proc_service.h> |
11889 | # at one point. | |
81ecdfbb RW |
11890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
11891 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
11892 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
11893 | $as_echo_n "(cached) " >&6 | |
c906108c | 11894 | else |
bec39cab | 11895 | |
81ecdfbb | 11896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11897 | /* end confdefs.h. */ |
c906108c SS |
11898 | |
11899 | #include <proc_service.h> | |
11900 | ps_err_e ps_pdwrite | |
11901 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 11902 | |
bec39cab AC |
11903 | int |
11904 | main () | |
11905 | { | |
11906 | ||
11907 | ; | |
11908 | return 0; | |
11909 | } | |
11910 | _ACEOF | |
81ecdfbb | 11911 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
11912 | gdb_cv_proc_service_is_old=no |
11913 | else | |
81ecdfbb | 11914 | gdb_cv_proc_service_is_old=yes |
c906108c | 11915 | fi |
81ecdfbb | 11916 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11917 | |
c906108c SS |
11918 | fi |
11919 | ||
81ecdfbb RW |
11920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
11921 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 11922 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 11923 | |
81ecdfbb | 11924 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
11925 | |
11926 | fi | |
11927 | else | |
81ecdfbb RW |
11928 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11929 | $as_echo "no" >&6; } | |
c906108c SS |
11930 | fi |
11931 | ;; | |
d92419e5 | 11932 | aix*) |
81ecdfbb RW |
11933 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
11934 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
11935 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
11936 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11937 | else |
81ecdfbb | 11938 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11939 | /* end confdefs.h. */ |
d92419e5 | 11940 | #include <sys/pthdebug.h> |
bec39cab AC |
11941 | int |
11942 | main () | |
11943 | { | |
d92419e5 JB |
11944 | #ifndef PTHDB_VERSION_3 |
11945 | #error | |
11946 | #endif | |
bec39cab AC |
11947 | ; |
11948 | return 0; | |
11949 | } | |
11950 | _ACEOF | |
81ecdfbb | 11951 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
11952 | gdb_cv_have_aix_thread_debug=yes |
11953 | else | |
81ecdfbb | 11954 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 11955 | fi |
81ecdfbb | 11956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
11957 | fi |
11958 | ||
81ecdfbb RW |
11959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
11960 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
11961 | if test $gdb_cv_have_aix_thread_debug = yes; then |
11962 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 11963 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 11964 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
11965 | |
11966 | # Older versions of AIX do not provide the declaration for | |
11967 | # the getthrds function (it appears that it was introduced | |
11968 | # with AIX 6.x). | |
11969 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
11970 | " | |
11971 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
11972 | ac_have_decl=1 | |
11973 | else | |
11974 | ac_have_decl=0 | |
11975 | fi | |
11976 | ||
11977 | cat >>confdefs.h <<_ACEOF | |
11978 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
11979 | _ACEOF | |
11980 | ||
d92419e5 JB |
11981 | fi |
11982 | ;; | |
c906108c | 11983 | esac |
bec39cab | 11984 | |
c906108c SS |
11985 | fi |
11986 | ||
3f47be5c | 11987 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
11988 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
11989 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
11990 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
11991 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11992 | else |
81ecdfbb | 11993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11994 | /* end confdefs.h. */ |
3f47be5c | 11995 | #include <thread_db.h> |
bec39cab AC |
11996 | int |
11997 | main () | |
11998 | { | |
3f47be5c | 11999 | int i = TD_NOTALLOC; |
bec39cab AC |
12000 | ; |
12001 | return 0; | |
12002 | } | |
12003 | _ACEOF | |
81ecdfbb | 12004 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12005 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12006 | else | |
81ecdfbb | 12007 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12008 | |
3f47be5c | 12009 | fi |
81ecdfbb | 12010 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12011 | |
bec39cab | 12012 | fi |
81ecdfbb RW |
12013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12014 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12016 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12017 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12018 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12019 | else |
81ecdfbb | 12020 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12021 | /* end confdefs.h. */ |
12022 | #include <thread_db.h> | |
12023 | int | |
12024 | main () | |
12025 | { | |
12026 | int i = TD_VERSION; | |
12027 | ; | |
12028 | return 0; | |
12029 | } | |
12030 | _ACEOF | |
81ecdfbb | 12031 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12032 | gdb_cv_thread_db_h_has_td_version=yes |
12033 | else | |
81ecdfbb | 12034 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12035 | |
12036 | fi | |
81ecdfbb | 12037 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12038 | |
12039 | fi | |
81ecdfbb RW |
12040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12041 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12043 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12044 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12045 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12046 | else |
81ecdfbb | 12047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12048 | /* end confdefs.h. */ |
12049 | #include <thread_db.h> | |
12050 | int | |
12051 | main () | |
12052 | { | |
12053 | int i = TD_NOTLS; | |
12054 | ; | |
12055 | return 0; | |
12056 | } | |
12057 | _ACEOF | |
81ecdfbb | 12058 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12059 | gdb_cv_thread_db_h_has_td_notls=yes |
12060 | else | |
81ecdfbb | 12061 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12062 | |
12063 | fi | |
81ecdfbb | 12064 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12065 | |
12066 | fi | |
81ecdfbb RW |
12067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12068 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12069 | fi |
12070 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12071 | |
81ecdfbb | 12072 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12073 | |
59f80f10 DJ |
12074 | fi |
12075 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12076 | ||
81ecdfbb | 12077 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12078 | |
12079 | fi | |
12080 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12081 | ||
81ecdfbb | 12082 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12083 | |
3f47be5c EZ |
12084 | fi |
12085 | ||
b757528f | 12086 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12088 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12089 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12090 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12091 | else |
81ecdfbb | 12092 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12093 | /* end confdefs.h. */ |
b757528f | 12094 | #include <sys/syscall.h> |
bec39cab AC |
12095 | int |
12096 | main () | |
12097 | { | |
b757528f | 12098 | int i = __NR_tkill; |
bec39cab AC |
12099 | ; |
12100 | return 0; | |
12101 | } | |
12102 | _ACEOF | |
81ecdfbb | 12103 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12104 | gdb_cv_sys_syscall_h_has_tkill=yes |
12105 | else | |
81ecdfbb | 12106 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12107 | |
b757528f | 12108 | fi |
81ecdfbb | 12109 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12110 | |
bec39cab | 12111 | fi |
81ecdfbb RW |
12112 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12113 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
12114 | fi |
12115 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 12116 | |
81ecdfbb | 12117 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
12118 | |
12119 | fi | |
12120 | ||
81ecdfbb RW |
12121 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12122 | " | |
12123 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12124 | ac_have_decl=1 | |
10568435 | 12125 | else |
81ecdfbb | 12126 | ac_have_decl=0 |
10568435 | 12127 | fi |
10568435 JK |
12128 | |
12129 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12130 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12131 | _ACEOF |
12132 | ||
12133 | ||
81ecdfbb RW |
12134 | if test "$cross_compiling" = yes; then : |
12135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12136 | /* end confdefs.h. */ |
12137 | #include <sys/personality.h> | |
12138 | int | |
12139 | main () | |
12140 | { | |
12141 | ||
12142 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12143 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12144 | # endif | |
12145 | /* Test the flag could be set and stays set. */ | |
12146 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12147 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12148 | return 1 | |
12149 | ; | |
12150 | return 0; | |
12151 | } | |
12152 | _ACEOF | |
81ecdfbb | 12153 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12154 | have_personality=true |
12155 | else | |
81ecdfbb | 12156 | have_personality=false |
10568435 | 12157 | fi |
81ecdfbb RW |
12158 | rm -f core conftest.err conftest.$ac_objext \ |
12159 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12160 | else |
81ecdfbb | 12161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12162 | /* end confdefs.h. */ |
12163 | #include <sys/personality.h> | |
12164 | int | |
12165 | main () | |
12166 | { | |
12167 | ||
12168 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12169 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12170 | # endif | |
12171 | /* Test the flag could be set and stays set. */ | |
12172 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12173 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12174 | return 1 | |
12175 | ; | |
12176 | return 0; | |
12177 | } | |
12178 | _ACEOF | |
81ecdfbb | 12179 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12180 | have_personality=true |
12181 | else | |
81ecdfbb | 12182 | have_personality=false |
10568435 | 12183 | fi |
81ecdfbb RW |
12184 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12185 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12186 | fi |
81ecdfbb | 12187 | |
10568435 JK |
12188 | if $have_personality |
12189 | then | |
12190 | ||
81ecdfbb | 12191 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12192 | |
12193 | fi | |
12194 | ||
fb40c209 | 12195 | |
f83d8a90 DE |
12196 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12197 | # except that the argument to --with-sysroot is optional. | |
12198 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12199 | if test "x$with_sysroot" = xyes; then | |
12200 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12201 | fi | |
bec39cab | 12202 | |
81ecdfbb RW |
12203 | # Check whether --with-sysroot was given. |
12204 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12205 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12206 | else | |
12207 | TARGET_SYSTEM_ROOT= | |
12208 | fi | |
030292b7 | 12209 | |
030292b7 | 12210 | |
f83d8a90 DE |
12211 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12212 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12213 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12214 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12215 | |
f83d8a90 DE |
12216 | cat >>confdefs.h <<_ACEOF |
12217 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12218 | _ACEOF | |
bec39cab | 12219 | |
030292b7 | 12220 | |
b14b1491 | 12221 | |
f83d8a90 DE |
12222 | |
12223 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12224 | if test "x$prefix" = xNONE; then | |
12225 | test_prefix=/usr/local | |
12226 | else | |
12227 | test_prefix=$prefix | |
12228 | fi | |
12229 | else | |
12230 | test_prefix=$exec_prefix | |
12231 | fi | |
12232 | value=0 | |
12233 | case ${ac_define_dir} in | |
12234 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12235 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12236 | value=1 | |
12237 | ;; | |
12238 | esac | |
12239 | ||
12240 | cat >>confdefs.h <<_ACEOF | |
12241 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12242 | _ACEOF | |
030292b7 DJ |
12243 | |
12244 | ||
12245 | ||
16e7150e | 12246 | |
16e7150e | 12247 | |
81ecdfbb RW |
12248 | # Check whether --with-system-gdbinit was given. |
12249 | if test "${with_system_gdbinit+set}" = set; then : | |
12250 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12251 | SYSTEM_GDBINIT=$withval |
12252 | else | |
12253 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12254 | fi |
12255 | ||
16e7150e JG |
12256 | |
12257 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12258 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12259 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12260 | ac_define_dir=`eval echo $ac_define_dir` |
12261 | ||
12262 | cat >>confdefs.h <<_ACEOF | |
12263 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12264 | _ACEOF | |
12265 | ||
12266 | ||
12267 | ||
0c4a4063 | 12268 | |
b14b1491 TT |
12269 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12270 | if test "x$prefix" = xNONE; then | |
12271 | test_prefix=/usr/local | |
12272 | else | |
12273 | test_prefix=$prefix | |
12274 | fi | |
12275 | else | |
12276 | test_prefix=$exec_prefix | |
12277 | fi | |
12278 | value=0 | |
12279 | case ${ac_define_dir} in | |
12280 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12281 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12282 | value=1 | |
12283 | ;; | |
12284 | esac | |
16e7150e | 12285 | |
b14b1491 TT |
12286 | cat >>confdefs.h <<_ACEOF |
12287 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12288 | _ACEOF |
12289 | ||
b14b1491 | 12290 | |
16e7150e | 12291 | |
0c4a4063 | 12292 | |
81ecdfbb RW |
12293 | # Check whether --enable-werror was given. |
12294 | if test "${enable_werror+set}" = set; then : | |
12295 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12296 | yes | y) ERROR_ON_WARNING="yes" ;; |
12297 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12298 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12299 | esac |
81ecdfbb RW |
12300 | fi |
12301 | ||
094a342e MK |
12302 | |
12303 | # Enable -Werror by default when using gcc | |
12304 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
12305 | ERROR_ON_WARNING=yes | |
12306 | fi | |
12307 | ||
12308 | WERROR_CFLAGS="" | |
12309 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12310 | WERROR_CFLAGS="-Werror" | |
12311 | fi | |
12312 | ||
aa79a185 DJ |
12313 | # The entries after -Wno-pointer-sign are disabled warnings which may |
12314 | # be enabled in the future, which can not currently be used to build | |
12315 | # GDB. | |
12316 | # NOTE: If you change this list, remember to update | |
3b851bce | 12317 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
12318 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
12319 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 | 12320 | -Wno-unused -Wunused-value -Wunused-function \ |
b03a2011 | 12321 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes" |
a3b362c4 | 12322 | |
3526781e DJ |
12323 | # Enable -Wno-format by default when using gcc on mingw since many |
12324 | # GCC versions complain about %I64. | |
12325 | case "${host}" in | |
12326 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
12327 | esac | |
12328 | ||
81ecdfbb RW |
12329 | # Check whether --enable-build-warnings was given. |
12330 | if test "${enable_build_warnings+set}" = set; then : | |
12331 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12332 | yes) ;; |
12333 | no) build_warnings="-w";; | |
12334 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12335 | build_warnings="${build_warnings} ${t}";; | |
12336 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12337 | build_warnings="${t} ${build_warnings}";; | |
12338 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12339 | esac | |
d4f3574e | 12340 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12341 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12342 | fi |
81ecdfbb RW |
12343 | fi |
12344 | # Check whether --enable-gdb-build-warnings was given. | |
12345 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12346 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12347 | yes) ;; |
12348 | no) build_warnings="-w";; | |
12349 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12350 | build_warnings="${build_warnings} ${t}";; | |
12351 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12352 | build_warnings="${t} ${build_warnings}";; | |
12353 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12354 | esac | |
12355 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12356 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12357 | fi | |
81ecdfbb RW |
12358 | fi |
12359 | WARN_CFLAGS="" | |
c906108c SS |
12360 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12361 | then | |
81ecdfbb RW |
12362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12363 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12364 | # Separate out the -Werror flag as some files just cannot be |
12365 | # compiled with it enabled. | |
12366 | for w in ${build_warnings}; do | |
12367 | case $w in | |
12368 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12369 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12370 | saved_CFLAGS="$CFLAGS" |
12371 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 12372 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12373 | /* end confdefs.h. */ |
4536bbc6 | 12374 | |
bec39cab AC |
12375 | int |
12376 | main () | |
12377 | { | |
4536bbc6 | 12378 | |
bec39cab AC |
12379 | ; |
12380 | return 0; | |
12381 | } | |
12382 | _ACEOF | |
81ecdfbb | 12383 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 12384 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 12385 | fi |
81ecdfbb | 12386 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 12387 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
12388 | esac |
12389 | done | |
81ecdfbb RW |
12390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
12391 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
12392 | fi |
12393 | ||
12394 | ||
104c1213 | 12395 | |
7a292a7a | 12396 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
12397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
12398 | $as_echo_n "checking for cygwin... " >&6; } | |
12399 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
12400 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12401 | else |
81ecdfbb | 12402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12403 | /* end confdefs.h. */ |
7a292a7a SS |
12404 | |
12405 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
12406 | lose | |
12407 | #endif | |
bec39cab | 12408 | _ACEOF |
7a292a7a | 12409 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 12410 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
12411 | gdb_cv_os_cygwin=yes |
12412 | else | |
7a292a7a SS |
12413 | gdb_cv_os_cygwin=no |
12414 | fi | |
12415 | rm -f conftest* | |
12416 | ||
12417 | fi | |
81ecdfbb RW |
12418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
12419 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 12420 | |
aff38e61 | 12421 | |
3eb25fda | 12422 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 12423 | case ${host} in |
95cbc983 AC |
12424 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
12425 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 12426 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
12427 | esac |
12428 | ||
12429 | ||
cd0fc7c3 SS |
12430 | # libreadline needs libuser32.a in a cygwin environment |
12431 | WIN32LIBS= | |
12432 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
12433 | WIN32LIBS="-luser32" |
12434 | case "${target}" in | |
12435 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
12436 | ;; | |
12437 | esac | |
cd0fc7c3 | 12438 | fi |
c906108c | 12439 | |
b4505029 MM |
12440 | # The ser-tcp.c module requires sockets. |
12441 | case ${host} in | |
12442 | *mingw32*) | |
12443 | ||
81ecdfbb | 12444 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
12445 | |
12446 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
12447 | ;; | |
12448 | esac | |
12449 | ||
7a292a7a | 12450 | |
31d99776 DJ |
12451 | # Add ELF support to GDB, but only if BFD includes ELF support. |
12452 | OLD_CFLAGS=$CFLAGS | |
12453 | OLD_LDFLAGS=$LDFLAGS | |
12454 | OLD_LIBS=$LIBS | |
12cd34f3 PA |
12455 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
12456 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12457 | # always want our bfd. | |
12458 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5579a92e | 12459 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" |
7b3200f9 | 12460 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
12461 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12462 | if test "$plugins" = "yes"; then | |
12463 | LIBS="-ldl $LIBS" | |
12464 | fi | |
0f72fb1c | 12465 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
12466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
12467 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
12468 | if test "${gdb_cv_var_elf+set}" = set; then : | |
12469 | $as_echo_n "(cached) " >&6 | |
31d99776 | 12470 | else |
81ecdfbb | 12471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
12472 | /* end confdefs.h. */ |
12473 | #include <stdlib.h> | |
12474 | #include "bfd.h" | |
12475 | #include "elf-bfd.h" | |
12476 | ||
12477 | int | |
12478 | main () | |
12479 | { | |
12480 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
12481 | ; | |
12482 | return 0; | |
12483 | } | |
12484 | _ACEOF | |
81ecdfbb | 12485 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
12486 | gdb_cv_var_elf=yes |
12487 | else | |
81ecdfbb | 12488 | gdb_cv_var_elf=no |
31d99776 | 12489 | fi |
81ecdfbb RW |
12490 | rm -f core conftest.err conftest.$ac_objext \ |
12491 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 12492 | fi |
81ecdfbb RW |
12493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
12494 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 | 12495 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 12496 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 12497 | |
81ecdfbb | 12498 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 12499 | |
075ff26d JK |
12500 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12501 | if test "$plugins" = "yes"; then | |
12502 | OLD_LIBS="-ldl $OLD_LIBS" | |
12503 | fi | |
31d99776 DJ |
12504 | fi |
12505 | CFLAGS=$OLD_CFLAGS | |
12506 | LDFLAGS=$OLD_LDFLAGS | |
12507 | LIBS=$OLD_LIBS | |
12508 | ||
121ce6e5 DJ |
12509 | # Add any host-specific objects to GDB. |
12510 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
12511 | ||
3fc11d3e JM |
12512 | LIBGUI="../libgui/src/libgui.a" |
12513 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
12514 | ||
12515 | ||
7a292a7a | 12516 | |
3fc11d3e JM |
12517 | WIN32LDAPP= |
12518 | ||
12519 | ||
12520 | ||
d91670b9 | 12521 | case "${host}" in |
686a5eed | 12522 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
12523 | configdir="win" |
12524 | ;; | |
12525 | *) | |
12526 | configdir="unix" | |
12527 | ;; | |
12528 | esac | |
3fc11d3e JM |
12529 | |
12530 | GDBTKLIBS= | |
12531 | if test "${enable_gdbtk}" = "yes"; then | |
12532 | ||
d1c3b63a KS |
12533 | # Gdbtk must have an absolute path to srcdir in order to run |
12534 | # properly when not installed. | |
12535 | here=`pwd` | |
12536 | cd ${srcdir} | |
12537 | GDBTK_SRC_DIR=`pwd` | |
12538 | cd $here | |
12539 | ||
bec39cab | 12540 | |
5062cc19 KS |
12541 | # |
12542 | # Ok, lets find the tcl configuration | |
12543 | # First, look for one uninstalled. | |
12544 | # the alternative search directory is invoked by --with-tcl | |
12545 | # | |
3fc11d3e | 12546 | |
5062cc19 KS |
12547 | if test x"${no_tcl}" = x ; then |
12548 | # we reset no_tcl in case something fails here | |
12549 | no_tcl=true | |
bec39cab | 12550 | |
81ecdfbb RW |
12551 | # Check whether --with-tcl was given. |
12552 | if test "${with_tcl+set}" = set; then : | |
12553 | withval=$with_tcl; with_tclconfig=${withval} | |
12554 | fi | |
12555 | ||
12556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
12557 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
12558 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
12559 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 12560 | else |
bec39cab | 12561 | |
3fc11d3e | 12562 | |
5062cc19 KS |
12563 | # First check to see if --with-tcl was specified. |
12564 | case "${host}" in | |
12565 | *-*-cygwin*) platDir="win" ;; | |
12566 | *) platDir="unix" ;; | |
12567 | esac | |
12568 | if test x"${with_tclconfig}" != x ; then | |
12569 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
12570 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
12571 | else | |
81ecdfbb | 12572 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
12573 | fi |
12574 | fi | |
12575 | ||
12576 | # then check for a private Tcl installation | |
12577 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12578 | for i in \ | |
12579 | ../tcl \ | |
12580 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12581 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
12582 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
12583 | ../../tcl \ | |
12584 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12585 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
12586 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
12587 | ../../../tcl \ | |
12588 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12589 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
12590 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
12591 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
12592 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
12593 | break | |
12594 | fi | |
12595 | done | |
12596 | fi | |
12597 | ||
12598 | # on Darwin, check in Framework installation locations | |
12599 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
12600 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
12601 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
12602 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
12603 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
12604 | ; do | |
12605 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
12606 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
12607 | break | |
12608 | fi | |
12609 | done | |
12610 | fi | |
12611 | ||
12612 | # check in a few common install locations | |
12613 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12614 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
12615 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
12616 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
12617 | `ls -d /usr/local/lib 2>/dev/null` \ | |
12618 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
12619 | `ls -d /usr/lib 2>/dev/null` \ | |
12620 | ; do | |
12621 | if test -f "$i/tclConfig.sh" ; then | |
12622 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
12623 | break | |
12624 | fi | |
12625 | done | |
12626 | fi | |
3fc11d3e | 12627 | |
5062cc19 KS |
12628 | # check in a few other private locations |
12629 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12630 | for i in \ | |
12631 | ${srcdir}/../tcl \ | |
12632 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12633 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
12634 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
12635 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
12636 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
12637 | break | |
12638 | fi | |
12639 | done | |
12640 | fi | |
bec39cab | 12641 | |
3fc11d3e JM |
12642 | fi |
12643 | ||
5062cc19 KS |
12644 | |
12645 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12646 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
12647 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
12648 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
12649 | else |
12650 | no_tcl= | |
12651 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
12652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12653 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
12654 | fi |
12655 | fi | |
3fc11d3e | 12656 | |
bec39cab | 12657 | |
85541719 DE |
12658 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
12659 | # point to doing Tcl. | |
bec39cab | 12660 | |
5062cc19 KS |
12661 | # |
12662 | # Ok, lets find the tk configuration | |
12663 | # First, look for one uninstalled. | |
12664 | # the alternative search directory is invoked by --with-tk | |
12665 | # | |
3fc11d3e | 12666 | |
5062cc19 KS |
12667 | if test x"${no_tk}" = x ; then |
12668 | # we reset no_tk in case something fails here | |
12669 | no_tk=true | |
bec39cab | 12670 | |
81ecdfbb RW |
12671 | # Check whether --with-tk was given. |
12672 | if test "${with_tk+set}" = set; then : | |
12673 | withval=$with_tk; with_tkconfig=${withval} | |
12674 | fi | |
12675 | ||
12676 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
12677 | $as_echo_n "checking for Tk configuration... " >&6; } | |
12678 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
12679 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12680 | else |
3fc11d3e JM |
12681 | |
12682 | ||
5062cc19 KS |
12683 | # First check to see if --with-tkconfig was specified. |
12684 | if test x"${with_tkconfig}" != x ; then | |
12685 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
12686 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
12687 | else | |
81ecdfbb | 12688 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
12689 | fi |
12690 | fi | |
3fc11d3e | 12691 | |
5062cc19 KS |
12692 | # then check for a private Tk library |
12693 | case "${host}" in | |
12694 | *-*-cygwin*) platDir="win" ;; | |
12695 | *) platDir="unix" ;; | |
12696 | esac | |
12697 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12698 | for i in \ | |
12699 | ../tk \ | |
12700 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12701 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
12702 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
12703 | ../../tk \ | |
12704 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12705 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
12706 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
12707 | ../../../tk \ | |
12708 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12709 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
12710 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
12711 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
12712 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
12713 | break | |
12714 | fi | |
12715 | done | |
12716 | fi | |
12717 | ||
12718 | # on Darwin, check in Framework installation locations | |
12719 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
12720 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
12721 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
12722 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
12723 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
12724 | ; do | |
12725 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
12726 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
12727 | break | |
12728 | fi | |
12729 | done | |
12730 | fi | |
12731 | ||
12732 | # check in a few common install locations | |
12733 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12734 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
12735 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
12736 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
12737 | `ls -d /usr/local/lib 2>/dev/null` \ | |
12738 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
12739 | `ls -d /usr/lib 2>/dev/null` \ | |
12740 | ; do | |
12741 | if test -f "$i/tkConfig.sh" ; then | |
12742 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
12743 | break | |
12744 | fi | |
12745 | done | |
12746 | fi | |
12747 | # check in a few other private locations | |
12748 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12749 | for i in \ | |
12750 | ${srcdir}/../tk \ | |
12751 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12752 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
12753 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
12754 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
12755 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
12756 | break | |
12757 | fi | |
12758 | done | |
12759 | fi | |
3fc11d3e | 12760 | |
3fc11d3e JM |
12761 | fi |
12762 | ||
12763 | ||
5062cc19 KS |
12764 | if test x"${ac_cv_c_tkconfig}" = x ; then |
12765 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
12766 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
12767 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
12768 | else |
12769 | no_tk= | |
12770 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
12771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12772 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 12773 | fi |
3fc11d3e | 12774 | fi |
dd2504ab | 12775 | |
dd2504ab | 12776 | |
85541719 DE |
12777 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
12778 | ||
81ecdfbb RW |
12779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12780 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
12781 | |
12782 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
12783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
12784 | $as_echo "loading" >&6; } | |
85541719 DE |
12785 | . ${TCL_BIN_DIR}/tclConfig.sh |
12786 | else | |
81ecdfbb RW |
12787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12788 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
12789 | fi |
12790 | ||
12791 | # eval is required to do the TCL_DBGX substitution | |
12792 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
12793 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
12794 | ||
12795 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
12796 | # then set the common variable name to the value of the build variables. | |
12797 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
12798 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
12799 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
12800 | # installed and uninstalled version of Tcl. | |
12801 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
12802 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
12803 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
12804 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
12805 | elif test "`uname -s`" = "Darwin"; then | |
12806 | # If Tcl was built as a framework, attempt to use the libraries | |
12807 | # from the framework at the given location so that linking works | |
12808 | # against Tcl.framework installed in an arbitary location. | |
12809 | case ${TCL_DEFS} in | |
12810 | *TCL_FRAMEWORK*) | |
12811 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
12812 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
12813 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
12814 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
12815 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
12816 | break | |
12817 | fi | |
12818 | done | |
12819 | fi | |
12820 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
12821 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
12822 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
12823 | fi | |
12824 | ;; | |
12825 | esac | |
12826 | fi | |
12827 | ||
12828 | # eval is required to do the TCL_DBGX substitution | |
12829 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
12830 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
12831 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
12832 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
12833 | ||
12834 | ||
12835 | ||
12836 | ||
12837 | ||
12838 | ||
12839 | ||
12840 | ||
12841 | ||
12842 | ||
12843 | ||
12844 | ||
12845 | ||
12846 | ||
12847 | ||
12848 | # Check for in-tree tcl | |
12849 | here=`pwd` | |
12850 | cd ${srcdir}/.. | |
12851 | topdir=`pwd` | |
12852 | cd ${here} | |
12853 | ||
12854 | intree="no" | |
12855 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
12856 | intree="yes" | |
12857 | fi | |
12858 | ||
12859 | # Find Tcl private headers | |
12860 | if test x"${intree}" = xno; then | |
12861 | ||
81ecdfbb RW |
12862 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
12863 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
12864 | private_dir="" |
12865 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
12866 | if test -f ${dir}/tclInt.h ; then | |
12867 | private_dir=${dir} | |
12868 | fi | |
12869 | ||
12870 | if test x"${private_dir}" = x; then | |
81ecdfbb | 12871 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
12872 | else |
12873 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
12874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
12875 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
12876 | fi |
12877 | ||
12878 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
12879 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
12880 | TCL_DEPS="" | |
12881 | else | |
12882 | # If building tcl in the same src tree, private headers | |
12883 | # are not needed, but we need to be sure to use the right | |
12884 | # headers library | |
12885 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
12886 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
12887 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
12888 | fi | |
12889 | ||
12890 | ||
12891 | ||
12892 | ||
12893 | ||
81ecdfbb RW |
12894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12895 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 12896 | |
5062cc19 | 12897 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
12898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
12899 | $as_echo "loading" >&6; } | |
5062cc19 | 12900 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 12901 | else |
81ecdfbb RW |
12902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12903 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 12904 | fi |
bec39cab | 12905 | |
5062cc19 KS |
12906 | # eval is required to do the TK_DBGX substitution |
12907 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
12908 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
12909 | ||
12910 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
12911 | # then set the common variable name to the value of the build variables. | |
12912 | # For example, the variable TK_LIB_SPEC will be set to the value | |
12913 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
12914 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
12915 | # installed and uninstalled version of Tcl. | |
85541719 | 12916 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
12917 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
12918 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
12919 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
12920 | elif test "`uname -s`" = "Darwin"; then | |
12921 | # If Tk was built as a framework, attempt to use the libraries | |
12922 | # from the framework at the given location so that linking works | |
12923 | # against Tk.framework installed in an arbitary location. | |
12924 | case ${TK_DEFS} in | |
12925 | *TK_FRAMEWORK*) | |
85541719 | 12926 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
12927 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
12928 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
12929 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
12930 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
12931 | break | |
12932 | fi | |
12933 | done | |
12934 | fi | |
85541719 | 12935 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
12936 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
12937 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
12938 | fi | |
12939 | ;; | |
12940 | esac | |
3fc11d3e JM |
12941 | fi |
12942 | ||
5062cc19 KS |
12943 | # eval is required to do the TK_DBGX substitution |
12944 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
12945 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
12946 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
12947 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 12948 | |
3fc11d3e JM |
12949 | |
12950 | ||
bec39cab AC |
12951 | |
12952 | ||
12953 | ||
12954 | ||
12955 | ||
12956 | ||
12957 | ||
3fc11d3e | 12958 | |
3fc11d3e | 12959 | |
bec39cab | 12960 | |
bec39cab | 12961 | |
85541719 DE |
12962 | # Check for in-tree Tk |
12963 | intree="no" | |
12964 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
12965 | intree="yes" | |
12966 | fi | |
3fc11d3e | 12967 | |
85541719 DE |
12968 | # Find Tk private headers |
12969 | if test x"${intree}" = xno; then | |
3fc11d3e | 12970 | |
81ecdfbb RW |
12971 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
12972 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
12973 | private_dir="" |
12974 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
12975 | if test -f ${dir}/tkInt.h; then | |
12976 | private_dir=${dir} | |
3fc11d3e | 12977 | fi |
bec39cab | 12978 | |
5062cc19 | 12979 | if test x"${private_dir}" = x; then |
81ecdfbb | 12980 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 12981 | else |
5062cc19 | 12982 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
12983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
12984 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 12985 | fi |
3fc11d3e | 12986 | |
85541719 DE |
12987 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
12988 | TK_LIBRARY=${TK_LIB_SPEC} | |
12989 | TK_DEPS="" | |
12990 | else | |
12991 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
12992 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
12993 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
12994 | fi | |
3fc11d3e JM |
12995 | |
12996 | ||
3fc11d3e JM |
12997 | |
12998 | ||
3fc11d3e | 12999 | |
85541719 | 13000 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 13001 | |
85541719 DE |
13002 | # Include some libraries that Tcl and Tk want. |
13003 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
13004 | # Yes, the ordering seems wrong here. But it isn't. | |
13005 | # TK_LIBS is the list of libraries that need to be linked | |
13006 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
13007 | # were in LIBS then any link tests after this point would | |
13008 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
13009 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 13010 | |
85541719 DE |
13011 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
13012 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
13013 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
13014 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
13015 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
13016 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
13017 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 13018 | |
85541719 DE |
13019 | if test x$gdb_cv_os_cygwin = xyes; then |
13020 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
13021 | WIN32LDAPP="-Wl,--subsystem,console" | |
13022 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 13023 | fi |
ffc6a242 | 13024 | |
81ecdfbb | 13025 | subdirs="$subdirs gdbtk" |
3ace7edb | 13026 | |
85541719 | 13027 | fi |
3fc11d3e JM |
13028 | fi |
13029 | ||
13030 | ||
13031 | ||
13032 | ||
13033 | ||
13034 | ||
13035 | ||
13036 | ||
81ecdfbb RW |
13037 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
13038 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 13039 | |
c906108c | 13040 | |
81ecdfbb RW |
13041 | # Check whether --with-x was given. |
13042 | if test "${with_x+set}" = set; then : | |
13043 | withval=$with_x; | |
13044 | fi | |
c906108c SS |
13045 | |
13046 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
13047 | if test "x$with_x" = xno; then | |
13048 | # The user explicitly disabled X. | |
13049 | have_x=disabled | |
13050 | else | |
81ecdfbb RW |
13051 | case $x_includes,$x_libraries in #( |
13052 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
13053 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
13054 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
13055 | else |
13056 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 13057 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 13058 | rm -f -r conftest.dir |
bec39cab AC |
13059 | if mkdir conftest.dir; then |
13060 | cd conftest.dir | |
bec39cab | 13061 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
13062 | incroot: |
13063 | @echo incroot='${INCROOT}' | |
13064 | usrlibdir: | |
13065 | @echo usrlibdir='${USRLIBDIR}' | |
13066 | libdir: | |
13067 | @echo libdir='${LIBDIR}' | |
13068 | _ACEOF | |
13069 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 13070 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
13071 | for ac_var in incroot usrlibdir libdir; do |
13072 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
13073 | done | |
c906108c | 13074 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
13075 | for ac_extension in a so sl dylib la dll; do |
13076 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
13077 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 13078 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
13079 | fi |
13080 | done | |
13081 | # Screen out bogus values from the imake configuration. They are | |
13082 | # bogus both because they are the default anyway, and because | |
13083 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 13084 | case $ac_im_incroot in |
81ecdfbb | 13085 | /usr/include) ac_x_includes= ;; |
bec39cab | 13086 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 13087 | esac |
bec39cab | 13088 | case $ac_im_usrlibdir in |
81ecdfbb | 13089 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 13090 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
13091 | esac |
13092 | fi | |
13093 | cd .. | |
81ecdfbb | 13094 | rm -f -r conftest.dir |
c906108c SS |
13095 | fi |
13096 | ||
bec39cab AC |
13097 | # Standard set of common directories for X headers. |
13098 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
13099 | ac_x_header_dirs=' | |
13100 | /usr/X11/include | |
81ecdfbb | 13101 | /usr/X11R7/include |
bec39cab AC |
13102 | /usr/X11R6/include |
13103 | /usr/X11R5/include | |
13104 | /usr/X11R4/include | |
13105 | ||
13106 | /usr/include/X11 | |
81ecdfbb | 13107 | /usr/include/X11R7 |
bec39cab AC |
13108 | /usr/include/X11R6 |
13109 | /usr/include/X11R5 | |
13110 | /usr/include/X11R4 | |
13111 | ||
13112 | /usr/local/X11/include | |
81ecdfbb | 13113 | /usr/local/X11R7/include |
bec39cab AC |
13114 | /usr/local/X11R6/include |
13115 | /usr/local/X11R5/include | |
13116 | /usr/local/X11R4/include | |
13117 | ||
13118 | /usr/local/include/X11 | |
81ecdfbb | 13119 | /usr/local/include/X11R7 |
bec39cab AC |
13120 | /usr/local/include/X11R6 |
13121 | /usr/local/include/X11R5 | |
13122 | /usr/local/include/X11R4 | |
13123 | ||
13124 | /usr/X386/include | |
13125 | /usr/x386/include | |
13126 | /usr/XFree86/include/X11 | |
13127 | ||
13128 | /usr/include | |
13129 | /usr/local/include | |
13130 | /usr/unsupported/include | |
13131 | /usr/athena/include | |
13132 | /usr/local/x11r5/include | |
13133 | /usr/lpp/Xamples/include | |
13134 | ||
13135 | /usr/openwin/include | |
13136 | /usr/openwin/share/include' | |
13137 | ||
13138 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 13139 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 13140 | # First, try using that file with no special directory specified. |
81ecdfbb | 13141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13142 | /* end confdefs.h. */ |
81ecdfbb | 13143 | #include <X11/Xlib.h> |
bec39cab | 13144 | _ACEOF |
81ecdfbb | 13145 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
13146 | # We can compile using X headers with no special include directory. |
13147 | ac_x_includes= | |
13148 | else | |
bec39cab | 13149 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 13150 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
13151 | ac_x_includes=$ac_dir |
13152 | break | |
13153 | fi | |
13154 | done | |
c906108c | 13155 | fi |
bec39cab AC |
13156 | rm -f conftest.err conftest.$ac_ext |
13157 | fi # $ac_x_includes = no | |
c906108c | 13158 | |
bec39cab | 13159 | if test "$ac_x_libraries" = no; then |
c906108c | 13160 | # Check for the libraries. |
c906108c SS |
13161 | # See if we find them without any special options. |
13162 | # Don't add to $LIBS permanently. | |
bec39cab | 13163 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
13164 | LIBS="-lX11 $LIBS" |
13165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 13166 | /* end confdefs.h. */ |
81ecdfbb | 13167 | #include <X11/Xlib.h> |
bec39cab AC |
13168 | int |
13169 | main () | |
13170 | { | |
81ecdfbb | 13171 | XrmInitialize () |
bec39cab AC |
13172 | ; |
13173 | return 0; | |
13174 | } | |
13175 | _ACEOF | |
81ecdfbb | 13176 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13177 | LIBS=$ac_save_LIBS |
c906108c SS |
13178 | # We can link X programs with no special library path. |
13179 | ac_x_libraries= | |
13180 | else | |
81ecdfbb RW |
13181 | LIBS=$ac_save_LIBS |
13182 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 13183 | do |
bec39cab | 13184 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
13185 | for ac_extension in a so sl dylib la dll; do |
13186 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
13187 | ac_x_libraries=$ac_dir |
13188 | break 2 | |
13189 | fi | |
13190 | done | |
13191 | done | |
13192 | fi | |
81ecdfbb RW |
13193 | rm -f core conftest.err conftest.$ac_objext \ |
13194 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13195 | fi # $ac_x_libraries = no |
c906108c | 13196 | |
81ecdfbb RW |
13197 | case $ac_x_includes,$ac_x_libraries in #( |
13198 | no,* | *,no | *\'*) | |
13199 | # Didn't find X, or a directory has "'" in its name. | |
13200 | ac_cv_have_x="have_x=no";; #( | |
13201 | *) | |
13202 | # Record where we found X for the cache. | |
13203 | ac_cv_have_x="have_x=yes\ | |
13204 | ac_x_includes='$ac_x_includes'\ | |
13205 | ac_x_libraries='$ac_x_libraries'" | |
13206 | esac | |
c906108c | 13207 | fi |
81ecdfbb RW |
13208 | ;; #( |
13209 | *) have_x=yes;; | |
13210 | esac | |
c906108c SS |
13211 | eval "$ac_cv_have_x" |
13212 | fi # $with_x != no | |
13213 | ||
13214 | if test "$have_x" != yes; then | |
81ecdfbb RW |
13215 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
13216 | $as_echo "$have_x" >&6; } | |
c906108c SS |
13217 | no_x=yes |
13218 | else | |
13219 | # If each of the values was on the command line, it overrides each guess. | |
13220 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
13221 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
13222 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
13223 | ac_cv_have_x="have_x=yes\ |
13224 | ac_x_includes='$x_includes'\ | |
13225 | ac_x_libraries='$x_libraries'" | |
13226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
13227 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
13228 | fi |
13229 | ||
13230 | ||
bec39cab | 13231 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 13232 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
13233 | # This code just checks for a few cases where we'd like to ignore those |
13234 | # definitions, even when they're present in the '.mt' file. These cases | |
13235 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 13236 | # not part of the source tree. |
7a292a7a | 13237 | # |
81ecdfbb RW |
13238 | # Check whether --enable-sim was given. |
13239 | if test "${enable_sim+set}" = set; then : | |
13240 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
13241 | echo "enableval = ${enableval}"; |
13242 | case "${enableval}" in | |
13243 | yes) ignore_sim=false ;; | |
13244 | no) ignore_sim=true ;; | |
13245 | *) ignore_sim=false ;; | |
13246 | esac | |
13247 | else | |
13248 | ignore_sim=false | |
81ecdfbb RW |
13249 | fi |
13250 | ||
7a292a7a SS |
13251 | |
13252 | if test ! -d "${srcdir}/../sim"; then | |
13253 | ignore_sim=true | |
13254 | fi | |
13255 | ||
9b624dbe UW |
13256 | SIM= |
13257 | SIM_OBS= | |
13258 | if test "${ignore_sim}" = "false"; then | |
13259 | if test x"${gdb_sim}" != x ; then | |
13260 | SIM="${gdb_sim}" | |
13261 | SIM_OBS="remote-sim.o" | |
60ca704f | 13262 | |
81ecdfbb | 13263 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 13264 | |
9b624dbe | 13265 | fi |
7a292a7a SS |
13266 | fi |
13267 | ||
13268 | ||
13269 | ||
c906108c SS |
13270 | |
13271 | ||
13272 | ||
13273 | ||
13274 | ||
13275 | ||
dfcd3bfb | 13276 | |
e56ac5c3 AC |
13277 | |
13278 | ||
b3a90332 AC |
13279 | |
13280 | ||
c35f4ffc | 13281 | # List of host floatformats. |
bec39cab AC |
13282 | |
13283 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13284 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 13285 | _ACEOF |
c35f4ffc | 13286 | |
bec39cab AC |
13287 | |
13288 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13289 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
13290 | _ACEOF |
13291 | ||
c35f4ffc | 13292 | |
bec39cab | 13293 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 13294 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 13295 | _ACEOF |
c35f4ffc AC |
13296 | |
13297 | ||
c906108c SS |
13298 | # target_subdir is used by the testsuite to find the target libraries. |
13299 | target_subdir= | |
13300 | if test "${host}" != "${target}"; then | |
13301 | target_subdir="${target_alias}/" | |
13302 | fi | |
13303 | ||
13304 | ||
13305 | frags= | |
771b4502 | 13306 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
13307 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
13308 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 13309 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
13310 | fi |
13311 | frags="$frags $host_makefile_frag" | |
13312 | else | |
13313 | host_makefile_frag=/dev/null | |
c906108c | 13314 | fi |
c906108c | 13315 | |
c906108c SS |
13316 | |
13317 | ||
13318 | ||
771b4502 | 13319 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
13320 | # We pick this up from the host configuration file (.mh) because we |
13321 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
13322 | nativefile=`sed -n ' |
13323 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
13324 | ' ${host_makefile_frag}` | |
c906108c SS |
13325 | fi |
13326 | ||
13327 | ||
b00a8037 | 13328 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
13329 | |
13330 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 13331 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 13332 | _ACEOF |
b00a8037 DJ |
13333 | |
13334 | fi | |
13335 | ||
8dcde887 | 13336 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
13337 | # Check whether --enable-multi-ice was given. |
13338 | if test "${enable_multi_ice+set}" = set; then : | |
13339 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
13340 | yes | no) |
13341 | ;; | |
81ecdfbb | 13342 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 13343 | esac |
81ecdfbb | 13344 | fi |
b4e70030 | 13345 | |
81ecdfbb RW |
13346 | if test "x$enable_multi_ice" = xyes; then |
13347 | subdirs="$subdirs multi-ice" | |
3ace7edb | 13348 | |
a85f51e7 DJ |
13349 | fi |
13350 | ||
496c0e1b JB |
13351 | # Check whether --enable-gdbserver was given. |
13352 | if test "${enable_gdbserver+set}" = set; then : | |
13353 | enableval=$enable_gdbserver; case "${enableval}" in | |
13354 | yes| no|auto) ;; | |
13355 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
13356 | esac | |
13357 | else | |
13358 | enable_gdbserver=auto | |
13359 | fi | |
13360 | ||
13361 | ||
13362 | # We only build gdbserver automatically in a native configuration, and | |
13363 | # only if the user did not explicitly disable its build. | |
13364 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
13365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
13366 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 13367 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
13368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13369 | $as_echo "yes" >&6; } | |
13370 | subdirs="$subdirs gdbserver" | |
3ace7edb | 13371 | |
496c0e1b | 13372 | gdbserver_build_enabled=yes |
8dcde887 | 13373 | else |
81ecdfbb RW |
13374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13375 | $as_echo "no" >&6; } | |
8dcde887 MK |
13376 | fi |
13377 | fi | |
13378 | ||
496c0e1b JB |
13379 | # If the user explicitly request the gdbserver to be built, verify that |
13380 | # we were in fact able to enable it. | |
13381 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
13382 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
13383 | fi | |
13384 | ||
db985757 | 13385 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 13386 | # to an empty version. |
c906108c SS |
13387 | |
13388 | files= | |
13389 | links= | |
5a2402b8 | 13390 | |
c906108c SS |
13391 | rm -f nm.h |
13392 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
13393 | case "${nativefile}" in |
13394 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
13395 | * ) GDB_NM_FILE="${nativefile}" | |
13396 | esac | |
5a2402b8 AC |
13397 | files="${files} ${GDB_NM_FILE}" |
13398 | links="${links} nm.h" | |
60ca704f SE |
13399 | |
13400 | cat >>confdefs.h <<_ACEOF | |
b78960be | 13401 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 13402 | _ACEOF |
5a2402b8 | 13403 | |
c906108c | 13404 | fi |
5a2402b8 AC |
13405 | |
13406 | ||
bec39cab AC |
13407 | ac_sources="$files" |
13408 | ac_dests="$links" | |
13409 | while test -n "$ac_sources"; do | |
13410 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
13411 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
13412 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
13413 | done | |
81ecdfbb | 13414 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
13415 | |
13416 | ||
c906108c SS |
13417 | |
13418 | ||
c906108c | 13419 | |
81ecdfbb | 13420 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 13421 | |
bec39cab | 13422 | |
c971b7fa | 13423 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
13424 | |
13425 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 13426 | |
bec39cab AC |
13427 | cat >confcache <<\_ACEOF |
13428 | # This file is a shell script that caches the results of configure | |
13429 | # tests run on this system so they can be shared between configure | |
13430 | # scripts and configure runs, see configure's option --config-cache. | |
13431 | # It is not useful on other systems. If it contains results you don't | |
13432 | # want to keep, you may remove or edit it. | |
13433 | # | |
13434 | # config.status only pays attention to the cache file if you give it | |
13435 | # the --recheck option to rerun configure. | |
13436 | # | |
13437 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
13438 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
13439 | # following values. | |
13440 | ||
13441 | _ACEOF | |
13442 | ||
13443 | # The following way of writing the cache mishandles newlines in values, | |
13444 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 13445 | # So, we kill variables containing newlines. |
bec39cab AC |
13446 | # Ultrix sh set writes to stderr and can't be redirected directly, |
13447 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
13448 | ( |
13449 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
13450 | eval ac_val=\$$ac_var | |
13451 | case $ac_val in #( | |
13452 | *${as_nl}*) | |
13453 | case $ac_var in #( | |
13454 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
13455 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
13456 | esac | |
13457 | case $ac_var in #( | |
13458 | _ | IFS | as_nl) ;; #( | |
13459 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
13460 | *) { eval $ac_var=; unset $ac_var;} ;; | |
13461 | esac ;; | |
13462 | esac | |
13463 | done | |
13464 | ||
bec39cab | 13465 | (set) 2>&1 | |
81ecdfbb RW |
13466 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
13467 | *${as_nl}ac_space=\ *) | |
13468 | # `set' does not quote correctly, so add quotes: double-quote | |
13469 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
13470 | sed -n \ |
13471 | "s/'/'\\\\''/g; | |
13472 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 13473 | ;; #( |
bec39cab AC |
13474 | *) |
13475 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 13476 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 13477 | ;; |
81ecdfbb RW |
13478 | esac | |
13479 | sort | |
13480 | ) | | |
bec39cab | 13481 | sed ' |
81ecdfbb | 13482 | /^ac_cv_env_/b end |
bec39cab | 13483 | t clear |
81ecdfbb | 13484 | :clear |
bec39cab AC |
13485 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
13486 | t end | |
81ecdfbb RW |
13487 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
13488 | :end' >>confcache | |
13489 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
13490 | if test -w "$cache_file"; then | |
13491 | test "x$cache_file" != "x/dev/null" && | |
13492 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
13493 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
13494 | cat confcache >$cache_file |
13495 | else | |
81ecdfbb RW |
13496 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
13497 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
13498 | fi |
13499 | fi | |
13500 | rm -f confcache | |
13501 | ||
13502 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
13503 | # Let make expand exec_prefix. | |
13504 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
13505 | ||
bec39cab AC |
13506 | DEFS=-DHAVE_CONFIG_H |
13507 | ||
13508 | ac_libobjs= | |
13509 | ac_ltlibobjs= | |
13510 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
13511 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
13512 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
13513 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
13514 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
13515 | # will be set to the directory where LIBOBJS objects are built. | |
13516 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
13517 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
13518 | done |
13519 | LIBOBJS=$ac_libobjs | |
13520 | ||
13521 | LTLIBOBJS=$ac_ltlibobjs | |
13522 | ||
13523 | ||
85981d60 | 13524 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
13525 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
13526 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 13527 | fi |
a417dc56 | 13528 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
13529 | as_fn_error "conditional \"GMAKE\" was never defined. |
13530 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 13531 | fi |
81ecdfbb RW |
13532 | |
13533 | ||
bec39cab | 13534 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 13535 | ac_write_fail=0 |
bec39cab AC |
13536 | ac_clean_files_save=$ac_clean_files |
13537 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
13538 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
13539 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
13540 | as_write_fail=0 | |
13541 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
13542 | #! $SHELL |
13543 | # Generated by $as_me. | |
13544 | # Run this file to recreate the current configuration. | |
13545 | # Compiler output produced by configure, useful for debugging | |
13546 | # configure, is in config.log if it exists. | |
13547 | ||
13548 | debug=false | |
13549 | ac_cs_recheck=false | |
13550 | ac_cs_silent=false | |
bec39cab | 13551 | |
81ecdfbb RW |
13552 | SHELL=\${CONFIG_SHELL-$SHELL} |
13553 | export SHELL | |
13554 | _ASEOF | |
13555 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
13556 | ## -------------------- ## | |
13557 | ## M4sh Initialization. ## | |
13558 | ## -------------------- ## | |
13559 | ||
13560 | # Be more Bourne compatible | |
13561 | DUALCASE=1; export DUALCASE # for MKS sh | |
13562 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
13563 | emulate sh |
13564 | NULLCMD=: | |
81ecdfbb | 13565 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
13566 | # is contrary to our usage. Disable this feature. |
13567 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
13568 | setopt NO_GLOB_SUBST |
13569 | else | |
13570 | case `(set -o) 2>/dev/null` in #( | |
13571 | *posix*) : | |
13572 | set -o posix ;; #( | |
13573 | *) : | |
13574 | ;; | |
13575 | esac | |
bec39cab | 13576 | fi |
bec39cab | 13577 | |
81ecdfbb RW |
13578 | |
13579 | as_nl=' | |
13580 | ' | |
13581 | export as_nl | |
13582 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
13583 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
13584 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
13585 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
13586 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
13587 | # but without wasting forks for bash or zsh. | |
13588 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
13589 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
13590 | as_echo='print -r --' | |
13591 | as_echo_n='print -rn --' | |
13592 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
13593 | as_echo='printf %s\n' | |
13594 | as_echo_n='printf %s' | |
13595 | else | |
13596 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
13597 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
13598 | as_echo_n='/usr/ucb/echo -n' | |
13599 | else | |
13600 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
13601 | as_echo_n_body='eval | |
13602 | arg=$1; | |
13603 | case $arg in #( | |
13604 | *"$as_nl"*) | |
13605 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
13606 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
13607 | esac; | |
13608 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
13609 | ' | |
13610 | export as_echo_n_body | |
13611 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
13612 | fi | |
13613 | export as_echo_body | |
13614 | as_echo='sh -c $as_echo_body as_echo' | |
13615 | fi | |
13616 | ||
13617 | # The user is always right. | |
13618 | if test "${PATH_SEPARATOR+set}" != set; then | |
13619 | PATH_SEPARATOR=: | |
13620 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
13621 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
13622 | PATH_SEPARATOR=';' | |
13623 | } | |
bec39cab AC |
13624 | fi |
13625 | ||
13626 | ||
81ecdfbb RW |
13627 | # IFS |
13628 | # We need space, tab and new line, in precisely that order. Quoting is | |
13629 | # there to prevent editors from complaining about space-tab. | |
13630 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
13631 | # splitting by setting IFS to empty value.) | |
13632 | IFS=" "" $as_nl" | |
13633 | ||
13634 | # Find who we are. Look in the path if we contain no directory separator. | |
13635 | case $0 in #(( | |
13636 | *[\\/]* ) as_myself=$0 ;; | |
13637 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13638 | for as_dir in $PATH | |
13639 | do | |
13640 | IFS=$as_save_IFS | |
13641 | test -z "$as_dir" && as_dir=. | |
13642 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
13643 | done | |
13644 | IFS=$as_save_IFS | |
13645 | ||
13646 | ;; | |
13647 | esac | |
13648 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
13649 | # in which case we are not to be found in the path. | |
13650 | if test "x$as_myself" = x; then | |
13651 | as_myself=$0 | |
13652 | fi | |
13653 | if test ! -f "$as_myself"; then | |
13654 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
13655 | exit 1 | |
13656 | fi | |
13657 | ||
13658 | # Unset variables that we do not need and which cause bugs (e.g. in | |
13659 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
13660 | # suppresses any "Segmentation fault" message there. '((' could | |
13661 | # trigger a bug in pdksh 5.2.14. | |
13662 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
13663 | do eval test x\${$as_var+set} = xset \ | |
13664 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
13665 | done | |
bec39cab AC |
13666 | PS1='$ ' |
13667 | PS2='> ' | |
13668 | PS4='+ ' | |
13669 | ||
13670 | # NLS nuisances. | |
81ecdfbb RW |
13671 | LC_ALL=C |
13672 | export LC_ALL | |
13673 | LANGUAGE=C | |
13674 | export LANGUAGE | |
13675 | ||
13676 | # CDPATH. | |
13677 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
13678 | ||
13679 | ||
13680 | # as_fn_error ERROR [LINENO LOG_FD] | |
13681 | # --------------------------------- | |
13682 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
13683 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
13684 | # script with status $?, using 1 if that was 0. | |
13685 | as_fn_error () | |
13686 | { | |
13687 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
13688 | if test "$3"; then | |
13689 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
13690 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
13691 | fi | |
13692 | $as_echo "$as_me: error: $1" >&2 | |
13693 | as_fn_exit $as_status | |
13694 | } # as_fn_error | |
13695 | ||
13696 | ||
13697 | # as_fn_set_status STATUS | |
13698 | # ----------------------- | |
13699 | # Set $? to STATUS, without forking. | |
13700 | as_fn_set_status () | |
13701 | { | |
13702 | return $1 | |
13703 | } # as_fn_set_status | |
13704 | ||
13705 | # as_fn_exit STATUS | |
13706 | # ----------------- | |
13707 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
13708 | as_fn_exit () | |
13709 | { | |
13710 | set +e | |
13711 | as_fn_set_status $1 | |
13712 | exit $1 | |
13713 | } # as_fn_exit | |
13714 | ||
13715 | # as_fn_unset VAR | |
13716 | # --------------- | |
13717 | # Portably unset VAR. | |
13718 | as_fn_unset () | |
13719 | { | |
13720 | { eval $1=; unset $1;} | |
13721 | } | |
13722 | as_unset=as_fn_unset | |
13723 | # as_fn_append VAR VALUE | |
13724 | # ---------------------- | |
13725 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
13726 | # advantage of any shell optimizations that allow amortized linear growth over | |
13727 | # repeated appends, instead of the typical quadratic growth present in naive | |
13728 | # implementations. | |
13729 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
13730 | eval 'as_fn_append () | |
13731 | { | |
13732 | eval $1+=\$2 | |
13733 | }' | |
13734 | else | |
13735 | as_fn_append () | |
13736 | { | |
13737 | eval $1=\$$1\$2 | |
13738 | } | |
13739 | fi # as_fn_append | |
13740 | ||
13741 | # as_fn_arith ARG... | |
13742 | # ------------------ | |
13743 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
13744 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
13745 | # must be portable across $(()) and expr. | |
13746 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
13747 | eval 'as_fn_arith () | |
13748 | { | |
13749 | as_val=$(( $* )) | |
13750 | }' | |
13751 | else | |
13752 | as_fn_arith () | |
13753 | { | |
13754 | as_val=`expr "$@" || test $? -eq 1` | |
13755 | } | |
13756 | fi # as_fn_arith | |
bec39cab | 13757 | |
81ecdfbb RW |
13758 | |
13759 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
13760 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
13761 | as_expr=expr |
13762 | else | |
13763 | as_expr=false | |
13764 | fi | |
13765 | ||
81ecdfbb | 13766 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
13767 | as_basename=basename |
13768 | else | |
13769 | as_basename=false | |
13770 | fi | |
13771 | ||
81ecdfbb RW |
13772 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
13773 | as_dirname=dirname | |
13774 | else | |
13775 | as_dirname=false | |
13776 | fi | |
bec39cab | 13777 | |
81ecdfbb | 13778 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
13779 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
13780 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
13781 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
13782 | $as_echo X/"$0" | | |
13783 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
13784 | s//\1/ | |
13785 | q | |
13786 | } | |
13787 | /^X\/\(\/\/\)$/{ | |
13788 | s//\1/ | |
13789 | q | |
13790 | } | |
13791 | /^X\/\(\/\).*/{ | |
13792 | s//\1/ | |
13793 | q | |
13794 | } | |
13795 | s/.*/./; q'` | |
b4e70030 | 13796 | |
b4e70030 JB |
13797 | # Avoid depending upon Character Ranges. |
13798 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
13799 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
13800 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
13801 | as_cr_digits='0123456789' | |
13802 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
13803 | ||
81ecdfbb RW |
13804 | ECHO_C= ECHO_N= ECHO_T= |
13805 | case `echo -n x` in #((((( | |
13806 | -n*) | |
13807 | case `echo 'xy\c'` in | |
13808 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
13809 | xy) ECHO_C='\c';; | |
13810 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
13811 | ECHO_T=' ';; | |
13812 | esac;; | |
13813 | *) | |
13814 | ECHO_N='-n';; | |
bec39cab AC |
13815 | esac |
13816 | ||
81ecdfbb RW |
13817 | rm -f conf$$ conf$$.exe conf$$.file |
13818 | if test -d conf$$.dir; then | |
13819 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 13820 | else |
81ecdfbb RW |
13821 | rm -f conf$$.dir |
13822 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 13823 | fi |
81ecdfbb RW |
13824 | if (echo >conf$$.file) 2>/dev/null; then |
13825 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 13826 | as_ln_s='ln -s' |
81ecdfbb RW |
13827 | # ... but there are two gotchas: |
13828 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
13829 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
13830 | # In both cases, we have to default to `cp -p'. | |
13831 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
13832 | as_ln_s='cp -p' | |
13833 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
13834 | as_ln_s=ln | |
13835 | else | |
13836 | as_ln_s='cp -p' | |
b4e70030 | 13837 | fi |
bec39cab AC |
13838 | else |
13839 | as_ln_s='cp -p' | |
13840 | fi | |
81ecdfbb RW |
13841 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
13842 | rmdir conf$$.dir 2>/dev/null | |
13843 | ||
13844 | ||
13845 | # as_fn_mkdir_p | |
13846 | # ------------- | |
13847 | # Create "$as_dir" as a directory, including parents if necessary. | |
13848 | as_fn_mkdir_p () | |
13849 | { | |
13850 | ||
13851 | case $as_dir in #( | |
13852 | -*) as_dir=./$as_dir;; | |
13853 | esac | |
13854 | test -d "$as_dir" || eval $as_mkdir_p || { | |
13855 | as_dirs= | |
13856 | while :; do | |
13857 | case $as_dir in #( | |
13858 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
13859 | *) as_qdir=$as_dir;; | |
13860 | esac | |
13861 | as_dirs="'$as_qdir' $as_dirs" | |
13862 | as_dir=`$as_dirname -- "$as_dir" || | |
13863 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
13864 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
13865 | X"$as_dir" : 'X\(//\)$' \| \ | |
13866 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
13867 | $as_echo X"$as_dir" | | |
13868 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
13869 | s//\1/ | |
13870 | q | |
13871 | } | |
13872 | /^X\(\/\/\)[^/].*/{ | |
13873 | s//\1/ | |
13874 | q | |
13875 | } | |
13876 | /^X\(\/\/\)$/{ | |
13877 | s//\1/ | |
13878 | q | |
13879 | } | |
13880 | /^X\(\/\).*/{ | |
13881 | s//\1/ | |
13882 | q | |
13883 | } | |
13884 | s/.*/./; q'` | |
13885 | test -d "$as_dir" && break | |
13886 | done | |
13887 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
13888 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
13889 | ||
bec39cab | 13890 | |
81ecdfbb | 13891 | } # as_fn_mkdir_p |
bec39cab | 13892 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 13893 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
13894 | else |
13895 | test -d ./-p && rmdir ./-p | |
13896 | as_mkdir_p=false | |
13897 | fi | |
13898 | ||
81ecdfbb RW |
13899 | if test -x / >/dev/null 2>&1; then |
13900 | as_test_x='test -x' | |
13901 | else | |
13902 | if ls -dL / >/dev/null 2>&1; then | |
13903 | as_ls_L_option=L | |
13904 | else | |
13905 | as_ls_L_option= | |
13906 | fi | |
13907 | as_test_x=' | |
13908 | eval sh -c '\'' | |
13909 | if test -d "$1"; then | |
13910 | test -d "$1/."; | |
13911 | else | |
13912 | case $1 in #( | |
13913 | -*)set "./$1";; | |
13914 | esac; | |
13915 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
13916 | ???[sx]*):;;*)false;;esac;fi | |
13917 | '\'' sh | |
13918 | ' | |
13919 | fi | |
13920 | as_executable_p=$as_test_x | |
bec39cab AC |
13921 | |
13922 | # Sed expression to map a string onto a valid CPP name. | |
13923 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
13924 | ||
13925 | # Sed expression to map a string onto a valid variable name. | |
13926 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
13927 | ||
13928 | ||
bec39cab | 13929 | exec 6>&1 |
81ecdfbb RW |
13930 | ## ----------------------------------- ## |
13931 | ## Main body of $CONFIG_STATUS script. ## | |
13932 | ## ----------------------------------- ## | |
13933 | _ASEOF | |
13934 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
13935 | ||
13936 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
13937 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 13938 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
13939 | # values after options handling. |
13940 | ac_log=" | |
bec39cab | 13941 | This file was extended by $as_me, which was |
81ecdfbb | 13942 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
13943 | |
13944 | CONFIG_FILES = $CONFIG_FILES | |
13945 | CONFIG_HEADERS = $CONFIG_HEADERS | |
13946 | CONFIG_LINKS = $CONFIG_LINKS | |
13947 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
13948 | $ $0 $@ | |
13949 | ||
81ecdfbb RW |
13950 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
13951 | " | |
13952 | ||
bec39cab AC |
13953 | _ACEOF |
13954 | ||
81ecdfbb RW |
13955 | case $ac_config_files in *" |
13956 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
13957 | esac | |
234b45d4 | 13958 | |
81ecdfbb RW |
13959 | case $ac_config_headers in *" |
13960 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
13961 | esac | |
b4e70030 | 13962 | |
b4e70030 | 13963 | |
81ecdfbb RW |
13964 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
13965 | # Files that config.status was made for. | |
13966 | config_files="$ac_config_files" | |
13967 | config_headers="$ac_config_headers" | |
13968 | config_links="$ac_config_links" | |
13969 | config_commands="$ac_config_commands" | |
234b45d4 | 13970 | |
81ecdfbb | 13971 | _ACEOF |
b4e70030 | 13972 | |
81ecdfbb | 13973 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 13974 | ac_cs_usage="\ |
81ecdfbb RW |
13975 | \`$as_me' instantiates files and other configuration actions |
13976 | from templates according to the current configuration. Unless the files | |
13977 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 13978 | |
81ecdfbb | 13979 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 13980 | |
bec39cab | 13981 | -h, --help print this help, then exit |
81ecdfbb RW |
13982 | -V, --version print version number and configuration settings, then exit |
13983 | -q, --quiet, --silent | |
13984 | do not print progress messages | |
bec39cab AC |
13985 | -d, --debug don't remove temporary files |
13986 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
13987 | --file=FILE[:TEMPLATE] |
13988 | instantiate the configuration file FILE | |
13989 | --header=FILE[:TEMPLATE] | |
13990 | instantiate the configuration header FILE | |
234b45d4 | 13991 | |
bec39cab AC |
13992 | Configuration files: |
13993 | $config_files | |
234b45d4 | 13994 | |
bec39cab AC |
13995 | Configuration headers: |
13996 | $config_headers | |
234b45d4 | 13997 | |
bec39cab AC |
13998 | Configuration links: |
13999 | $config_links | |
234b45d4 | 14000 | |
bec39cab AC |
14001 | Configuration commands: |
14002 | $config_commands | |
14003 | ||
81ecdfbb | 14004 | Report bugs to the package provider." |
b4e70030 | 14005 | |
81ecdfbb RW |
14006 | _ACEOF |
14007 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
14008 | ac_cs_version="\\ |
14009 | config.status | |
81ecdfbb RW |
14010 | configured by $0, generated by GNU Autoconf 2.64, |
14011 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 14012 | |
81ecdfbb | 14013 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
14014 | This config.status script is free software; the Free Software Foundation |
14015 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
14016 | |
14017 | ac_pwd='$ac_pwd' | |
14018 | srcdir='$srcdir' | |
14019 | INSTALL='$INSTALL' | |
81ecdfbb RW |
14020 | AWK='$AWK' |
14021 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
14022 | _ACEOF |
14023 | ||
81ecdfbb RW |
14024 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14025 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
14026 | ac_need_defaults=: |
14027 | while test $# != 0 | |
14028 | do | |
14029 | case $1 in | |
14030 | --*=*) | |
81ecdfbb RW |
14031 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
14032 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 14033 | ac_shift=: |
c906108c | 14034 | ;; |
81ecdfbb | 14035 | *) |
bec39cab AC |
14036 | ac_option=$1 |
14037 | ac_optarg=$2 | |
14038 | ac_shift=shift | |
c906108c | 14039 | ;; |
bec39cab | 14040 | esac |
c906108c | 14041 | |
bec39cab AC |
14042 | case $ac_option in |
14043 | # Handling of the options. | |
bec39cab AC |
14044 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
14045 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
14046 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
14047 | $as_echo "$ac_cs_version"; exit ;; | |
14048 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
14049 | debug=: ;; |
14050 | --file | --fil | --fi | --f ) | |
14051 | $ac_shift | |
81ecdfbb RW |
14052 | case $ac_optarg in |
14053 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14054 | esac | |
14055 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
14056 | ac_need_defaults=false;; |
14057 | --header | --heade | --head | --hea ) | |
14058 | $ac_shift | |
81ecdfbb RW |
14059 | case $ac_optarg in |
14060 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14061 | esac | |
14062 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 14063 | ac_need_defaults=false;; |
81ecdfbb RW |
14064 | --he | --h) |
14065 | # Conflict between --help and --header | |
14066 | as_fn_error "ambiguous option: \`$1' | |
14067 | Try \`$0 --help' for more information.";; | |
14068 | --help | --hel | -h ) | |
14069 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
14070 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
14071 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
14072 | ac_cs_silent=: ;; | |
c906108c | 14073 | |
bec39cab | 14074 | # This is an error. |
81ecdfbb RW |
14075 | -*) as_fn_error "unrecognized option: \`$1' |
14076 | Try \`$0 --help' for more information." ;; | |
c906108c | 14077 | |
81ecdfbb RW |
14078 | *) as_fn_append ac_config_targets " $1" |
14079 | ac_need_defaults=false ;; | |
c906108c | 14080 | |
bec39cab AC |
14081 | esac |
14082 | shift | |
14083 | done | |
c906108c | 14084 | |
bec39cab | 14085 | ac_configure_extra_args= |
c906108c | 14086 | |
bec39cab AC |
14087 | if $ac_cs_silent; then |
14088 | exec 6>/dev/null | |
14089 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
14090 | fi | |
c906108c | 14091 | |
bec39cab | 14092 | _ACEOF |
81ecdfbb | 14093 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 14094 | if \$ac_cs_recheck; then |
81ecdfbb RW |
14095 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
14096 | shift | |
14097 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
14098 | CONFIG_SHELL='$SHELL' | |
14099 | export CONFIG_SHELL | |
14100 | exec "\$@" | |
bec39cab AC |
14101 | fi |
14102 | ||
14103 | _ACEOF | |
81ecdfbb RW |
14104 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14105 | exec 5>>config.log | |
14106 | { | |
14107 | echo | |
14108 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
14109 | ## Running $as_me. ## | |
14110 | _ASBOX | |
14111 | $as_echo "$ac_log" | |
14112 | } >&5 | |
bec39cab | 14113 | |
81ecdfbb RW |
14114 | _ACEOF |
14115 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 14116 | # |
81ecdfbb | 14117 | # INIT-COMMANDS |
c906108c | 14118 | # |
a417dc56 | 14119 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 14120 | |
bec39cab AC |
14121 | _ACEOF |
14122 | ||
81ecdfbb | 14123 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 14124 | |
81ecdfbb | 14125 | # Handling of arguments. |
bec39cab | 14126 | for ac_config_target in $ac_config_targets |
c906108c | 14127 | do |
81ecdfbb RW |
14128 | case $ac_config_target in |
14129 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
14130 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 14131 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb RW |
14132 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
14133 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
e2207b9a | 14134 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 14135 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 14136 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
14137 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
14138 | ||
14139 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
14140 | esac |
14141 | done | |
14142 | ||
81ecdfbb | 14143 | |
bec39cab AC |
14144 | # If the user did not use the arguments to specify the items to instantiate, |
14145 | # then the envvar interface is used. Set only those that are not. | |
14146 | # We use the long form for the default assignment because of an extremely | |
14147 | # bizarre bug on SunOS 4.1.3. | |
14148 | if $ac_need_defaults; then | |
14149 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
14150 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
14151 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
14152 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
14153 | fi | |
14154 | ||
b4e70030 | 14155 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 14156 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 14157 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
14158 | # Hook for its removal unless debugging. |
14159 | # Note that there is a small window in which the directory will not be cleaned: | |
14160 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
14161 | $debug || |
14162 | { | |
81ecdfbb RW |
14163 | tmp= |
14164 | trap 'exit_status=$? | |
14165 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
14166 | ' 0 | |
14167 | trap 'as_fn_exit 1' 1 2 13 15 | |
14168 | } | |
14169 | # Create a (secure) tmp directory for tmp files. | |
14170 | ||
14171 | { | |
14172 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
14173 | test -n "$tmp" && test -d "$tmp" | |
14174 | } || | |
14175 | { | |
14176 | tmp=./conf$$-$RANDOM | |
14177 | (umask 077 && mkdir "$tmp") | |
14178 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
14179 | ||
14180 | # Set up the scripts for CONFIG_FILES section. | |
14181 | # No need to generate them if there are no CONFIG_FILES. | |
14182 | # This happens for instance with `./config.status config.h'. | |
14183 | if test -n "$CONFIG_FILES"; then | |
14184 | ||
14185 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
14186 | ac_cs_awk_getline=: | |
14187 | ac_cs_awk_pipe_init= | |
14188 | ac_cs_awk_read_file=' | |
14189 | while ((getline aline < (F[key])) > 0) | |
14190 | print(aline) | |
14191 | close(F[key])' | |
14192 | ac_cs_awk_pipe_fini= | |
14193 | else | |
14194 | ac_cs_awk_getline=false | |
14195 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
14196 | ac_cs_awk_read_file=' | |
14197 | print "|#_!!_#|" | |
14198 | print "cat " F[key] " &&" | |
14199 | '$ac_cs_awk_pipe_init | |
14200 | # The final `:' finishes the AND list. | |
14201 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
14202 | fi | |
14203 | ac_cr=`echo X | tr X '\015'` | |
14204 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
14205 | # But we know of no other shell where ac_cr would be empty at this | |
14206 | # point, so we can use a bashism as a fallback. | |
14207 | if test "x$ac_cr" = x; then | |
14208 | eval ac_cr=\$\'\\r\' | |
14209 | fi | |
14210 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
14211 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
14212 | ac_cs_awk_cr='\r' | |
14213 | else | |
14214 | ac_cs_awk_cr=$ac_cr | |
14215 | fi | |
14216 | ||
14217 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
14218 | _ACEOF | |
14219 | ||
14220 | # Create commands to substitute file output variables. | |
14221 | { | |
14222 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
14223 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
14224 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
14225 | echo "_ACAWK" && | |
14226 | echo "_ACEOF" | |
14227 | } >conf$$files.sh && | |
14228 | . ./conf$$files.sh || | |
14229 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14230 | rm -f conf$$files.sh | |
14231 | ||
14232 | { | |
14233 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
14234 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
14235 | echo "_ACEOF" | |
14236 | } >conf$$subs.sh || | |
14237 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14238 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
14239 | ac_delim='%!_!# ' | |
14240 | for ac_last_try in false false false false false :; do | |
14241 | . ./conf$$subs.sh || | |
14242 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14243 | ||
14244 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
14245 | if test $ac_delim_n = $ac_delim_num; then | |
14246 | break | |
14247 | elif $ac_last_try; then | |
14248 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14249 | else | |
14250 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14251 | fi | |
14252 | done | |
14253 | rm -f conf$$subs.sh | |
14254 | ||
14255 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14256 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
14257 | _ACEOF | |
14258 | sed -n ' | |
14259 | h | |
14260 | s/^/S["/; s/!.*/"]=/ | |
14261 | p | |
14262 | g | |
14263 | s/^[^!]*!// | |
14264 | :repl | |
14265 | t repl | |
14266 | s/'"$ac_delim"'$// | |
14267 | t delim | |
14268 | :nl | |
14269 | h | |
14270 | s/\(.\{148\}\).*/\1/ | |
14271 | t more1 | |
14272 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
14273 | p | |
14274 | n | |
14275 | b repl | |
14276 | :more1 | |
14277 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14278 | p | |
14279 | g | |
14280 | s/.\{148\}// | |
14281 | t nl | |
14282 | :delim | |
14283 | h | |
14284 | s/\(.\{148\}\).*/\1/ | |
14285 | t more2 | |
14286 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
14287 | p | |
14288 | b | |
14289 | :more2 | |
14290 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14291 | p | |
14292 | g | |
14293 | s/.\{148\}// | |
14294 | t delim | |
14295 | ' <conf$$subs.awk | sed ' | |
14296 | /^[^""]/{ | |
14297 | N | |
14298 | s/\n// | |
14299 | } | |
14300 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
14301 | rm -f conf$$subs.awk | |
14302 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14303 | _ACAWK | |
14304 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
14305 | for (key in S) S_is_set[key] = 1 | |
14306 | FS = "\a" | |
14307 | \$ac_cs_awk_pipe_init | |
14308 | } | |
14309 | { | |
14310 | line = $ 0 | |
14311 | nfields = split(line, field, "@") | |
14312 | substed = 0 | |
14313 | len = length(field[1]) | |
14314 | for (i = 2; i < nfields; i++) { | |
14315 | key = field[i] | |
14316 | keylen = length(key) | |
14317 | if (S_is_set[key]) { | |
14318 | value = S[key] | |
14319 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
14320 | len += length(value) + length(field[++i]) | |
14321 | substed = 1 | |
14322 | } else | |
14323 | len += 1 + keylen | |
14324 | } | |
14325 | if (nfields == 3 && !substed) { | |
14326 | key = field[2] | |
14327 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
14328 | \$ac_cs_awk_read_file | |
14329 | next | |
14330 | } | |
14331 | } | |
14332 | print line | |
b4e70030 | 14333 | } |
81ecdfbb RW |
14334 | \$ac_cs_awk_pipe_fini |
14335 | _ACAWK | |
14336 | _ACEOF | |
14337 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14338 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
14339 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
14340 | else | |
14341 | cat | |
14342 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
14343 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
14344 | _ACEOF | |
14345 | ||
14346 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
14347 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
14348 | # trailing colons and then remove the whole line if VPATH becomes empty | |
14349 | # (actually we leave an empty line to preserve line numbers). | |
14350 | if test "x$srcdir" = x.; then | |
14351 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
14352 | s/:*\$(srcdir):*/:/ | |
14353 | s/:*\${srcdir}:*/:/ | |
14354 | s/:*@srcdir@:*/:/ | |
14355 | s/^\([^=]*=[ ]*\):*/\1/ | |
14356 | s/:*$// | |
14357 | s/^[^=]*=[ ]*$// | |
14358 | }' | |
14359 | fi | |
14360 | ||
14361 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14362 | fi # test -n "$CONFIG_FILES" | |
14363 | ||
14364 | # Set up the scripts for CONFIG_HEADERS section. | |
14365 | # No need to generate them if there are no CONFIG_HEADERS. | |
14366 | # This happens for instance with `./config.status Makefile'. | |
14367 | if test -n "$CONFIG_HEADERS"; then | |
14368 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
14369 | BEGIN { | |
14370 | _ACEOF | |
14371 | ||
14372 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
14373 | # here-document in config.status, that substitutes the proper values into | |
14374 | # config.h.in to produce config.h. | |
4e8d927d | 14375 | |
81ecdfbb RW |
14376 | # Create a delimiter string that does not exist in confdefs.h, to ease |
14377 | # handling of long lines. | |
14378 | ac_delim='%!_!# ' | |
14379 | for ac_last_try in false false :; do | |
14380 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
14381 | if test -z "$ac_t"; then | |
14382 | break | |
14383 | elif $ac_last_try; then | |
14384 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
14385 | else | |
14386 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14387 | fi | |
14388 | done | |
4e8d927d | 14389 | |
81ecdfbb RW |
14390 | # For the awk script, D is an array of macro values keyed by name, |
14391 | # likewise P contains macro parameters if any. Preserve backslash | |
14392 | # newline sequences. | |
14393 | ||
14394 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
14395 | sed -n ' | |
14396 | s/.\{148\}/&'"$ac_delim"'/g | |
14397 | t rset | |
14398 | :rset | |
14399 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
14400 | t def | |
14401 | d | |
14402 | :def | |
14403 | s/\\$// | |
14404 | t bsnl | |
14405 | s/["\\]/\\&/g | |
14406 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
14407 | D["\1"]=" \3"/p | |
14408 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
14409 | d | |
14410 | :bsnl | |
14411 | s/["\\]/\\&/g | |
14412 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
14413 | D["\1"]=" \3\\\\\\n"\\/p | |
14414 | t cont | |
14415 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
14416 | t cont | |
14417 | d | |
14418 | :cont | |
14419 | n | |
14420 | s/.\{148\}/&'"$ac_delim"'/g | |
14421 | t clear | |
14422 | :clear | |
14423 | s/\\$// | |
14424 | t bsnlc | |
14425 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
14426 | d | |
14427 | :bsnlc | |
14428 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
14429 | b cont | |
14430 | ' <confdefs.h | sed ' | |
14431 | s/'"$ac_delim"'/"\\\ | |
14432 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
14433 | ||
14434 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14435 | for (key in D) D_is_set[key] = 1 | |
14436 | FS = "\a" | |
14437 | } | |
14438 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
14439 | line = \$ 0 | |
14440 | split(line, arg, " ") | |
14441 | if (arg[1] == "#") { | |
14442 | defundef = arg[2] | |
14443 | mac1 = arg[3] | |
14444 | } else { | |
14445 | defundef = substr(arg[1], 2) | |
14446 | mac1 = arg[2] | |
14447 | } | |
14448 | split(mac1, mac2, "(") #) | |
14449 | macro = mac2[1] | |
14450 | prefix = substr(line, 1, index(line, defundef) - 1) | |
14451 | if (D_is_set[macro]) { | |
14452 | # Preserve the white space surrounding the "#". | |
14453 | print prefix "define", macro P[macro] D[macro] | |
14454 | next | |
14455 | } else { | |
14456 | # Replace #undef with comments. This is necessary, for example, | |
14457 | # in the case of _POSIX_SOURCE, which is predefined and required | |
14458 | # on some systems where configure will not decide to define it. | |
14459 | if (defundef == "undef") { | |
14460 | print "/*", prefix defundef, macro, "*/" | |
14461 | next | |
14462 | } | |
14463 | } | |
b4e70030 | 14464 | } |
81ecdfbb RW |
14465 | { print } |
14466 | _ACAWK | |
b4e70030 | 14467 | _ACEOF |
81ecdfbb RW |
14468 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14469 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
14470 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 14471 | |
4e8d927d | 14472 | |
81ecdfbb RW |
14473 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
14474 | shift | |
14475 | for ac_tag | |
14476 | do | |
14477 | case $ac_tag in | |
14478 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
14479 | esac | |
14480 | case $ac_mode$ac_tag in | |
14481 | :[FHL]*:*);; | |
14482 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
14483 | :[FH]-) ac_tag=-:-;; | |
14484 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
14485 | esac | |
14486 | ac_save_IFS=$IFS | |
14487 | IFS=: | |
14488 | set x $ac_tag | |
14489 | IFS=$ac_save_IFS | |
14490 | shift | |
14491 | ac_file=$1 | |
14492 | shift | |
4e8d927d | 14493 | |
81ecdfbb RW |
14494 | case $ac_mode in |
14495 | :L) ac_source=$1;; | |
14496 | :[FH]) | |
14497 | ac_file_inputs= | |
14498 | for ac_f | |
14499 | do | |
14500 | case $ac_f in | |
14501 | -) ac_f="$tmp/stdin";; | |
14502 | *) # Look for the file first in the build tree, then in the source tree | |
14503 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
14504 | # because $ac_f cannot contain `:'. | |
14505 | test -f "$ac_f" || | |
14506 | case $ac_f in | |
14507 | [\\/$]*) false;; | |
14508 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
14509 | esac || | |
14510 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
14511 | esac | |
14512 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
14513 | as_fn_append ac_file_inputs " '$ac_f'" | |
14514 | done | |
14515 | ||
14516 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
14517 | # use $as_me), people would be surprised to read: | |
14518 | # /* config.h. Generated by config.status. */ | |
14519 | configure_input='Generated from '` | |
14520 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
14521 | `' by configure.' | |
14522 | if test x"$ac_file" != x-; then | |
14523 | configure_input="$ac_file. $configure_input" | |
14524 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
14525 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 14526 | fi |
81ecdfbb RW |
14527 | # Neutralize special characters interpreted by sed in replacement strings. |
14528 | case $configure_input in #( | |
14529 | *\&* | *\|* | *\\* ) | |
14530 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
14531 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
14532 | *) ac_sed_conf_input=$configure_input;; | |
14533 | esac | |
4e8d927d | 14534 | |
81ecdfbb RW |
14535 | case $ac_tag in |
14536 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
14537 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
14538 | esac | |
14539 | ;; | |
c906108c SS |
14540 | esac |
14541 | ||
81ecdfbb | 14542 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
14543 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
14544 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
14545 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
14546 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
14547 | $as_echo X"$ac_file" | | |
14548 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14549 | s//\1/ | |
14550 | q | |
14551 | } | |
14552 | /^X\(\/\/\)[^/].*/{ | |
14553 | s//\1/ | |
14554 | q | |
14555 | } | |
14556 | /^X\(\/\/\)$/{ | |
14557 | s//\1/ | |
14558 | q | |
14559 | } | |
14560 | /^X\(\/\).*/{ | |
14561 | s//\1/ | |
14562 | q | |
14563 | } | |
14564 | s/.*/./; q'` | |
14565 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
14566 | ac_builddir=. |
14567 | ||
81ecdfbb RW |
14568 | case "$ac_dir" in |
14569 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14570 | *) | |
14571 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
14572 | # A ".." for each directory in $ac_dir_suffix. | |
14573 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
14574 | case $ac_top_builddir_sub in | |
14575 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14576 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
14577 | esac ;; | |
14578 | esac | |
14579 | ac_abs_top_builddir=$ac_pwd | |
14580 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
14581 | # for backward compatibility: | |
14582 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
14583 | |
14584 | case $srcdir in | |
81ecdfbb | 14585 | .) # We are building in place. |
bec39cab | 14586 | ac_srcdir=. |
81ecdfbb RW |
14587 | ac_top_srcdir=$ac_top_builddir_sub |
14588 | ac_abs_top_srcdir=$ac_pwd ;; | |
14589 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 14590 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
14591 | ac_top_srcdir=$srcdir |
14592 | ac_abs_top_srcdir=$srcdir ;; | |
14593 | *) # Relative name. | |
14594 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
14595 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
14596 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 14597 | esac |
81ecdfbb | 14598 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 14599 | |
c906108c | 14600 | |
81ecdfbb RW |
14601 | case $ac_mode in |
14602 | :F) | |
14603 | # | |
14604 | # CONFIG_FILE | |
14605 | # | |
c906108c | 14606 | |
bec39cab AC |
14607 | case $INSTALL in |
14608 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 14609 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 14610 | esac |
81ecdfbb | 14611 | _ACEOF |
121ce6e5 | 14612 | |
81ecdfbb RW |
14613 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14614 | # If the template does not know about datarootdir, expand it. | |
14615 | # FIXME: This hack should be removed a few years after 2.60. | |
14616 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
14617 | ac_sed_dataroot=' | |
14618 | /datarootdir/ { | |
14619 | p | |
14620 | q | |
14621 | } | |
14622 | /@datadir@/p | |
14623 | /@docdir@/p | |
14624 | /@infodir@/p | |
14625 | /@localedir@/p | |
14626 | /@mandir@/p' | |
14627 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
14628 | *datarootdir*) ac_datarootdir_seen=yes;; | |
14629 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
14630 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
14631 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
14632 | _ACEOF | |
14633 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14634 | ac_datarootdir_hack=' | |
14635 | s&@datadir@&$datadir&g | |
14636 | s&@docdir@&$docdir&g | |
14637 | s&@infodir@&$infodir&g | |
14638 | s&@localedir@&$localedir&g | |
14639 | s&@mandir@&$mandir&g | |
14640 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
14641 | esac | |
4e8d927d | 14642 | _ACEOF |
81ecdfbb RW |
14643 | |
14644 | # Neutralize VPATH when `$srcdir' = `.'. | |
14645 | # Shell code in configure.ac might set extrasub. | |
14646 | # FIXME: do we really want to maintain this feature? | |
14647 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14648 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
14649 | $extrasub |
14650 | _ACEOF | |
81ecdfbb | 14651 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
14652 | :t |
14653 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
14654 | s|@configure_input@|$ac_sed_conf_input|;t t |
14655 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
14656 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
14657 | s&@srcdir@&$ac_srcdir&;t t | |
14658 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
14659 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
14660 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
14661 | s&@builddir@&$ac_builddir&;t t | |
14662 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
14663 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
14664 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
14665 | $ac_datarootdir_hack |
14666 | " | |
14667 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
14668 | if $ac_cs_awk_getline; then | |
14669 | $AWK -f "$tmp/subs.awk" | |
14670 | else | |
14671 | $AWK -f "$tmp/subs.awk" | $SHELL | |
14672 | fi >$tmp/out \ | |
14673 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14674 | ||
14675 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
14676 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
14677 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
14678 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
14679 | which seems to be undefined. Please make sure it is defined." >&5 | |
14680 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
14681 | which seems to be undefined. Please make sure it is defined." >&2;} | |
14682 | ||
14683 | rm -f "$tmp/stdin" | |
bec39cab | 14684 | case $ac_file in |
81ecdfbb RW |
14685 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
14686 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
14687 | esac \ | |
14688 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14689 | ;; | |
14690 | :H) | |
14691 | # | |
14692 | # CONFIG_HEADER | |
14693 | # | |
bec39cab | 14694 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
14695 | { |
14696 | $as_echo "/* $configure_input */" \ | |
14697 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
14698 | } >"$tmp/config.h" \ | |
14699 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14700 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
14701 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
14702 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 14703 | else |
81ecdfbb RW |
14704 | rm -f "$ac_file" |
14705 | mv "$tmp/config.h" "$ac_file" \ | |
14706 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
14707 | fi |
14708 | else | |
81ecdfbb RW |
14709 | $as_echo "/* $configure_input */" \ |
14710 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
14711 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 14712 | fi |
81ecdfbb RW |
14713 | ;; |
14714 | :L) | |
14715 | # | |
14716 | # CONFIG_LINK | |
14717 | # | |
c906108c | 14718 | |
81ecdfbb RW |
14719 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
14720 | : | |
b4e70030 | 14721 | else |
81ecdfbb RW |
14722 | # Prefer the file from the source tree if names are identical. |
14723 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
14724 | ac_source=$srcdir/$ac_source | |
14725 | fi | |
b4e70030 | 14726 | |
81ecdfbb RW |
14727 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
14728 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 14729 | |
81ecdfbb RW |
14730 | if test ! -r "$ac_source"; then |
14731 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
14732 | fi | |
14733 | rm -f "$ac_file" | |
bec39cab | 14734 | |
81ecdfbb RW |
14735 | # Try a relative symlink, then a hard link, then a copy. |
14736 | case $srcdir in | |
14737 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
14738 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
14739 | esac | |
14740 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
14741 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
14742 | cp -p "$ac_source" "$ac_file" || | |
14743 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
14744 | fi | |
14745 | ;; | |
14746 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
14747 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
14748 | ;; | |
c906108c | 14749 | esac |
b4e70030 | 14750 | |
bec39cab | 14751 | |
81ecdfbb RW |
14752 | case $ac_file$ac_mode in |
14753 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
81ecdfbb | 14754 | "default":C) |
c906108c SS |
14755 | case x$CONFIG_HEADERS in |
14756 | xconfig.h:config.in) | |
14757 | echo > stamp-h ;; | |
14758 | esac | |
bec39cab | 14759 | ;; |
81ecdfbb | 14760 | |
bec39cab | 14761 | esac |
81ecdfbb | 14762 | done # for ac_tag |
c906108c | 14763 | |
bec39cab | 14764 | |
81ecdfbb | 14765 | as_fn_exit 0 |
bec39cab | 14766 | _ACEOF |
bec39cab AC |
14767 | ac_clean_files=$ac_clean_files_save |
14768 | ||
81ecdfbb RW |
14769 | test $ac_write_fail = 0 || |
14770 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
14771 | ||
bec39cab AC |
14772 | |
14773 | # configure is writing to config.log, and then calls config.status. | |
14774 | # config.status does its own redirection, appending to config.log. | |
14775 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
14776 | # by configure, so config.status won't be able to write to it; its | |
14777 | # output is simply discarded. So we exec the FD to /dev/null, | |
14778 | # effectively closing config.log, so it can be properly (re)opened and | |
14779 | # appended to by config.status. When coming back to configure, we | |
14780 | # need to make the FD available again. | |
14781 | if test "$no_create" != yes; then | |
14782 | ac_cs_success=: | |
14783 | ac_config_status_args= | |
14784 | test "$silent" = yes && | |
14785 | ac_config_status_args="$ac_config_status_args --quiet" | |
14786 | exec 5>/dev/null | |
14787 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
14788 | exec 5>>config.log | |
14789 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
14790 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 14791 | $ac_cs_success || as_fn_exit $? |
bec39cab | 14792 | fi |
c906108c | 14793 | |
bec39cab | 14794 | # |
81ecdfbb | 14795 | # CONFIG_SUBDIRS section. |
bec39cab | 14796 | # |
c906108c SS |
14797 | if test "$no_recursion" != yes; then |
14798 | ||
81ecdfbb RW |
14799 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
14800 | # so they do not pile up. | |
c906108c SS |
14801 | ac_sub_configure_args= |
14802 | ac_prev= | |
fdc59709 PB |
14803 | eval "set x $ac_configure_args" |
14804 | shift | |
14805 | for ac_arg | |
14806 | do | |
c906108c SS |
14807 | if test -n "$ac_prev"; then |
14808 | ac_prev= | |
14809 | continue | |
14810 | fi | |
bec39cab | 14811 | case $ac_arg in |
c906108c SS |
14812 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
14813 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
14814 | ac_prev=cache_file ;; | |
14815 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
14816 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
14817 | | --c=*) | |
14818 | ;; | |
14819 | --config-cache | -C) | |
c906108c SS |
14820 | ;; |
14821 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
14822 | ac_prev=srcdir ;; | |
14823 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
14824 | ;; | |
bec39cab AC |
14825 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
14826 | ac_prev=prefix ;; | |
14827 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
14828 | ;; | |
81ecdfbb RW |
14829 | --disable-option-checking) |
14830 | ;; | |
fdc59709 PB |
14831 | *) |
14832 | case $ac_arg in | |
81ecdfbb | 14833 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 14834 | esac |
81ecdfbb | 14835 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
14836 | esac |
14837 | done | |
14838 | ||
bec39cab AC |
14839 | # Always prepend --prefix to ensure using the same prefix |
14840 | # in subdir configurations. | |
fdc59709 PB |
14841 | ac_arg="--prefix=$prefix" |
14842 | case $ac_arg in | |
81ecdfbb | 14843 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 14844 | esac |
81ecdfbb RW |
14845 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
14846 | ||
14847 | # Pass --silent | |
14848 | if test "$silent" = yes; then | |
14849 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
14850 | fi | |
14851 | ||
14852 | # Always prepend --disable-option-checking to silence warnings, since | |
14853 | # different subdirs can have different --enable and --with options. | |
14854 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 14855 | |
b4e70030 | 14856 | ac_popdir=`pwd` |
bec39cab | 14857 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
14858 | |
14859 | # Do not complain, so a configure script can configure whichever | |
14860 | # parts of a large source tree are present. | |
fdc59709 | 14861 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 14862 | |
81ecdfbb RW |
14863 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
14864 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
14865 | $as_echo "$ac_msg" >&6 | |
14866 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
14867 | ac_builddir=. |
14868 | ||
81ecdfbb RW |
14869 | case "$ac_dir" in |
14870 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14871 | *) | |
14872 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
14873 | # A ".." for each directory in $ac_dir_suffix. | |
14874 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
14875 | case $ac_top_builddir_sub in | |
14876 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14877 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
14878 | esac ;; | |
14879 | esac | |
14880 | ac_abs_top_builddir=$ac_pwd | |
14881 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
14882 | # for backward compatibility: | |
14883 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
14884 | |
14885 | case $srcdir in | |
81ecdfbb | 14886 | .) # We are building in place. |
bec39cab | 14887 | ac_srcdir=. |
81ecdfbb RW |
14888 | ac_top_srcdir=$ac_top_builddir_sub |
14889 | ac_abs_top_srcdir=$ac_pwd ;; | |
14890 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 14891 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
14892 | ac_top_srcdir=$srcdir |
14893 | ac_abs_top_srcdir=$srcdir ;; | |
14894 | *) # Relative name. | |
14895 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
14896 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
14897 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 14898 | esac |
81ecdfbb | 14899 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 14900 | |
c906108c | 14901 | |
fdc59709 | 14902 | cd "$ac_dir" |
c906108c SS |
14903 | |
14904 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
14905 | if test -f "$ac_srcdir/configure.gnu"; then |
14906 | ac_sub_configure=$ac_srcdir/configure.gnu | |
14907 | elif test -f "$ac_srcdir/configure"; then | |
14908 | ac_sub_configure=$ac_srcdir/configure | |
14909 | elif test -f "$ac_srcdir/configure.in"; then | |
14910 | # This should be Cygnus configure. | |
14911 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 14912 | else |
81ecdfbb RW |
14913 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
14914 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
14915 | ac_sub_configure= |
14916 | fi | |
14917 | ||
14918 | # The recursion is here. | |
14919 | if test -n "$ac_sub_configure"; then | |
c906108c | 14920 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
14921 | case $cache_file in |
14922 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
14923 | *) # Relative name. |
14924 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 14925 | esac |
c906108c | 14926 | |
81ecdfbb RW |
14927 | { $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 |
14928 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 14929 | # The eval makes quoting arguments work. |
fdc59709 PB |
14930 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
14931 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 14932 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
14933 | fi |
14934 | ||
fdc59709 | 14935 | cd "$ac_popdir" |
c906108c SS |
14936 | done |
14937 | fi | |
81ecdfbb RW |
14938 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
14939 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
14940 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
14941 | fi | |
c906108c SS |
14942 | |
14943 | ||
14944 | exit 0 |