Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
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 JK |
1489 | --with-auto-load-dir=PATH |
1490 | directories from which to load auto-loaded scripts, | |
1491 | use '$ddir' for -data-directory [$ddir/auto-load] | |
bccbefd2 | 1492 | --with-auto-load-safe-path=PATH |
6dea1fbd | 1493 | directories safe to hold auto-loaded files, use |
7349ff92 JK |
1494 | $ddir for --with-gdb-datadir path |
1495 | [--with-auto-load-dir] | |
bccbefd2 JK |
1496 | --without-auto-load-safe-path |
1497 | do not restrict auto-loaded files locations | |
05e7c244 | 1498 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1499 | --with-curses use the curses library instead of the termcap |
1500 | library | |
c16158bc JM |
1501 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1502 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1503 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1504 | --with-libiconv-prefix=DIR |
1505 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1506 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1507 | --with-system-readline use installed readline library |
b8e0a31c SD |
1508 | --with-jit-reader-dir=PATH |
1509 | directory to load the JIT readers from | |
5c39566f | 1510 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1511 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1512 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1513 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1514 | --with-python[=PYTHON] include python support |
1515 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1516 | --without-included-regex |
1517 | don't use included regex; this is the default on | |
1518 | systems with version 2 of the GNU C library (use | |
1519 | with caution on other system) | |
81ecdfbb | 1520 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1521 | --with-system-gdbinit=PATH |
32c1c914 | 1522 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1523 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1524 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1525 | --with-x use the X Window System |
bec39cab AC |
1526 | |
1527 | Some influential environment variables: | |
1528 | CC C compiler command | |
1529 | CFLAGS C compiler flags | |
1530 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1531 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1532 | LIBS libraries to pass to the linker, e.g. -l<library> |
1533 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1534 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1535 | CPP C preprocessor |
f06e05e0 JK |
1536 | MAKEINFO Parent configure detects if it is of sufficient version. |
1537 | MAKEINFOFLAGS | |
1538 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1539 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1540 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1541 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1542 | This script will default YFLAGS to the empty string to avoid a | |
1543 | default value of `-d' given by some make applications. | |
1544 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1545 | |
1546 | Use these variables to override the choices made by `configure' or to help | |
1547 | it to find libraries and programs with nonstandard names/locations. | |
1548 | ||
81ecdfbb | 1549 | Report bugs to the package provider. |
bec39cab | 1550 | _ACEOF |
81ecdfbb | 1551 | ac_status=$? |
bec39cab AC |
1552 | fi |
1553 | ||
1554 | if test "$ac_init_help" = "recursive"; then | |
1555 | # If there are subdirs, report their specific --help. | |
bec39cab | 1556 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1557 | test -d "$ac_dir" || |
1558 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1559 | continue | |
bec39cab AC |
1560 | ac_builddir=. |
1561 | ||
81ecdfbb RW |
1562 | case "$ac_dir" in |
1563 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1564 | *) | |
1565 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1566 | # A ".." for each directory in $ac_dir_suffix. | |
1567 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1568 | case $ac_top_builddir_sub in | |
1569 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1570 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1571 | esac ;; | |
1572 | esac | |
1573 | ac_abs_top_builddir=$ac_pwd | |
1574 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1575 | # for backward compatibility: | |
1576 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1577 | |
1578 | case $srcdir in | |
81ecdfbb | 1579 | .) # We are building in place. |
bec39cab | 1580 | ac_srcdir=. |
81ecdfbb RW |
1581 | ac_top_srcdir=$ac_top_builddir_sub |
1582 | ac_abs_top_srcdir=$ac_pwd ;; | |
1583 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1584 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1585 | ac_top_srcdir=$srcdir |
1586 | ac_abs_top_srcdir=$srcdir ;; | |
1587 | *) # Relative name. | |
1588 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1589 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1590 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1591 | esac |
81ecdfbb | 1592 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1593 | |
81ecdfbb RW |
1594 | cd "$ac_dir" || { ac_status=$?; continue; } |
1595 | # Check for guested configure. | |
1596 | if test -f "$ac_srcdir/configure.gnu"; then | |
1597 | echo && | |
1598 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1599 | elif test -f "$ac_srcdir/configure"; then | |
1600 | echo && | |
1601 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1602 | else |
81ecdfbb RW |
1603 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1604 | fi || ac_status=$? | |
1605 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1606 | done |
1607 | fi | |
1608 | ||
81ecdfbb | 1609 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1610 | if $ac_init_version; then |
1611 | cat <<\_ACEOF | |
81ecdfbb RW |
1612 | configure |
1613 | generated by GNU Autoconf 2.64 | |
bec39cab | 1614 | |
81ecdfbb | 1615 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1616 | This configure script is free software; the Free Software Foundation |
1617 | gives unlimited permission to copy, distribute and modify it. | |
1618 | _ACEOF | |
81ecdfbb | 1619 | exit |
bec39cab | 1620 | fi |
bec39cab | 1621 | |
81ecdfbb RW |
1622 | ## ------------------------ ## |
1623 | ## Autoconf initialization. ## | |
1624 | ## ------------------------ ## | |
bec39cab | 1625 | |
81ecdfbb RW |
1626 | # ac_fn_c_try_compile LINENO |
1627 | # -------------------------- | |
1628 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1629 | ac_fn_c_try_compile () | |
1630 | { | |
1631 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1632 | rm -f conftest.$ac_objext | |
1633 | if { { ac_try="$ac_compile" | |
1634 | case "(($ac_try" in | |
1635 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1636 | *) ac_try_echo=$ac_try;; | |
1637 | esac | |
1638 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1639 | $as_echo "$ac_try_echo"; } >&5 | |
1640 | (eval "$ac_compile") 2>conftest.err | |
1641 | ac_status=$? | |
1642 | if test -s conftest.err; then | |
1643 | grep -v '^ *+' conftest.err >conftest.er1 | |
1644 | cat conftest.er1 >&5 | |
1645 | mv -f conftest.er1 conftest.err | |
1646 | fi | |
1647 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1648 | test $ac_status = 0; } && { | |
1649 | test -z "$ac_c_werror_flag" || | |
1650 | test ! -s conftest.err | |
1651 | } && test -s conftest.$ac_objext; then : | |
1652 | ac_retval=0 | |
1653 | else | |
1654 | $as_echo "$as_me: failed program was:" >&5 | |
1655 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1656 | |
81ecdfbb RW |
1657 | ac_retval=1 |
1658 | fi | |
1659 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1660 | return $ac_retval | |
1661 | ||
1662 | } # ac_fn_c_try_compile | |
1663 | ||
1664 | # ac_fn_c_try_cpp LINENO | |
1665 | # ---------------------- | |
1666 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1667 | ac_fn_c_try_cpp () | |
bec39cab | 1668 | { |
81ecdfbb RW |
1669 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1670 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1671 | case "(($ac_try" in | |
1672 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1673 | *) ac_try_echo=$ac_try;; | |
1674 | esac | |
1675 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1676 | $as_echo "$ac_try_echo"; } >&5 | |
1677 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1678 | ac_status=$? | |
1679 | if test -s conftest.err; then | |
1680 | grep -v '^ *+' conftest.err >conftest.er1 | |
1681 | cat conftest.er1 >&5 | |
1682 | mv -f conftest.er1 conftest.err | |
1683 | fi | |
1684 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1685 | test $ac_status = 0; } >/dev/null && { | |
1686 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1687 | test ! -s conftest.err | |
1688 | }; then : | |
1689 | ac_retval=0 | |
1690 | else | |
1691 | $as_echo "$as_me: failed program was:" >&5 | |
1692 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1693 | |
81ecdfbb RW |
1694 | ac_retval=1 |
1695 | fi | |
1696 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1697 | return $ac_retval | |
bec39cab | 1698 | |
81ecdfbb | 1699 | } # ac_fn_c_try_cpp |
bec39cab | 1700 | |
81ecdfbb RW |
1701 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1702 | # ------------------------------------------------------- | |
1703 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1704 | # the include files in INCLUDES and setting the cache variable VAR | |
1705 | # accordingly. | |
1706 | ac_fn_c_check_header_mongrel () | |
1707 | { | |
1708 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1709 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1711 | $as_echo_n "checking for $2... " >&6; } | |
1712 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1713 | $as_echo_n "(cached) " >&6 | |
1714 | fi | |
1715 | eval ac_res=\$$3 | |
1716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1717 | $as_echo "$ac_res" >&6; } | |
1718 | else | |
1719 | # Is the header compilable? | |
1720 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1721 | $as_echo_n "checking $2 usability... " >&6; } | |
1722 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1723 | /* end confdefs.h. */ | |
1724 | $4 | |
1725 | #include <$2> | |
1726 | _ACEOF | |
1727 | if ac_fn_c_try_compile "$LINENO"; then : | |
1728 | ac_header_compiler=yes | |
1729 | else | |
1730 | ac_header_compiler=no | |
1731 | fi | |
1732 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1733 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1734 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1735 | |
81ecdfbb RW |
1736 | # Is the header present? |
1737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1738 | $as_echo_n "checking $2 presence... " >&6; } | |
1739 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1740 | /* end confdefs.h. */ | |
1741 | #include <$2> | |
1742 | _ACEOF | |
1743 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1744 | ac_header_preproc=yes | |
1745 | else | |
1746 | ac_header_preproc=no | |
1747 | fi | |
1748 | rm -f conftest.err conftest.$ac_ext | |
1749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1750 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1751 | |
81ecdfbb RW |
1752 | # So? What about this header? |
1753 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1754 | yes:no: ) | |
1755 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1756 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1757 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1758 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1759 | ;; | |
1760 | no:yes:* ) | |
1761 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1762 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1763 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1764 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1765 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1766 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1767 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1768 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1769 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1770 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1771 | ;; | |
1772 | esac | |
1773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1774 | $as_echo_n "checking for $2... " >&6; } | |
1775 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1776 | $as_echo_n "(cached) " >&6 | |
1777 | else | |
1778 | eval "$3=\$ac_header_compiler" | |
1779 | fi | |
1780 | eval ac_res=\$$3 | |
1781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1782 | $as_echo "$ac_res" >&6; } | |
1783 | fi | |
1784 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1785 | |
81ecdfbb | 1786 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1787 | |
81ecdfbb RW |
1788 | # ac_fn_c_try_run LINENO |
1789 | # ---------------------- | |
1790 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1791 | # that executables *can* be run. | |
1792 | ac_fn_c_try_run () | |
1793 | { | |
1794 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1795 | if { { ac_try="$ac_link" | |
1796 | case "(($ac_try" in | |
1797 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1798 | *) ac_try_echo=$ac_try;; | |
1799 | esac | |
1800 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1801 | $as_echo "$ac_try_echo"; } >&5 | |
1802 | (eval "$ac_link") 2>&5 | |
1803 | ac_status=$? | |
1804 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1805 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1806 | { { case "(($ac_try" in | |
1807 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1808 | *) ac_try_echo=$ac_try;; | |
1809 | esac | |
1810 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1811 | $as_echo "$ac_try_echo"; } >&5 | |
1812 | (eval "$ac_try") 2>&5 | |
1813 | ac_status=$? | |
1814 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1815 | test $ac_status = 0; }; }; then : | |
1816 | ac_retval=0 | |
1817 | else | |
1818 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1819 | $as_echo "$as_me: failed program was:" >&5 | |
1820 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1821 | |
81ecdfbb RW |
1822 | ac_retval=$ac_status |
1823 | fi | |
1824 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1825 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1826 | return $ac_retval | |
bec39cab | 1827 | |
81ecdfbb | 1828 | } # ac_fn_c_try_run |
bec39cab | 1829 | |
81ecdfbb RW |
1830 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1831 | # ------------------------------------------------------- | |
1832 | # Tests whether HEADER exists and can be compiled using the include files in | |
1833 | # INCLUDES, setting the cache variable VAR accordingly. | |
1834 | ac_fn_c_check_header_compile () | |
1835 | { | |
1836 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1838 | $as_echo_n "checking for $2... " >&6; } | |
1839 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1840 | $as_echo_n "(cached) " >&6 | |
1841 | else | |
1842 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1843 | /* end confdefs.h. */ | |
1844 | $4 | |
1845 | #include <$2> | |
bec39cab | 1846 | _ACEOF |
81ecdfbb RW |
1847 | if ac_fn_c_try_compile "$LINENO"; then : |
1848 | eval "$3=yes" | |
1849 | else | |
1850 | eval "$3=no" | |
1851 | fi | |
1852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1853 | fi | |
1854 | eval ac_res=\$$3 | |
1855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1856 | $as_echo "$ac_res" >&6; } | |
1857 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1858 | |
81ecdfbb | 1859 | } # ac_fn_c_check_header_compile |
bec39cab | 1860 | |
81ecdfbb RW |
1861 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1862 | # -------------------------------------------- | |
1863 | # Tries to find the compile-time value of EXPR in a program that includes | |
1864 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1865 | # computed | |
1866 | ac_fn_c_compute_int () | |
1867 | { | |
1868 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1869 | if test "$cross_compiling" = yes; then | |
1870 | # Depending upon the size, compute the lo and hi bounds. | |
1871 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1872 | /* end confdefs.h. */ | |
1873 | $4 | |
1874 | int | |
1875 | main () | |
1876 | { | |
1877 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1878 | test_array [0] = 0 | |
bec39cab | 1879 | |
81ecdfbb RW |
1880 | ; |
1881 | return 0; | |
1882 | } | |
1883 | _ACEOF | |
1884 | if ac_fn_c_try_compile "$LINENO"; then : | |
1885 | ac_lo=0 ac_mid=0 | |
1886 | while :; do | |
1887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1888 | /* end confdefs.h. */ | |
1889 | $4 | |
1890 | int | |
1891 | main () | |
1892 | { | |
1893 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1894 | test_array [0] = 0 | |
bec39cab | 1895 | |
81ecdfbb RW |
1896 | ; |
1897 | return 0; | |
1898 | } | |
1899 | _ACEOF | |
1900 | if ac_fn_c_try_compile "$LINENO"; then : | |
1901 | ac_hi=$ac_mid; break | |
1902 | else | |
1903 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1904 | if test $ac_lo -le $ac_mid; then | |
1905 | ac_lo= ac_hi= | |
1906 | break | |
1907 | fi | |
1908 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1909 | fi |
81ecdfbb RW |
1910 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1911 | done | |
c906108c | 1912 | else |
81ecdfbb RW |
1913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1914 | /* end confdefs.h. */ | |
1915 | $4 | |
1916 | int | |
1917 | main () | |
1918 | { | |
1919 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1920 | test_array [0] = 0 | |
bec39cab | 1921 | |
81ecdfbb RW |
1922 | ; |
1923 | return 0; | |
1924 | } | |
1925 | _ACEOF | |
1926 | if ac_fn_c_try_compile "$LINENO"; then : | |
1927 | ac_hi=-1 ac_mid=-1 | |
1928 | while :; do | |
1929 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1930 | /* end confdefs.h. */ | |
1931 | $4 | |
1932 | int | |
1933 | main () | |
1934 | { | |
1935 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1936 | test_array [0] = 0 | |
bec39cab | 1937 | |
81ecdfbb RW |
1938 | ; |
1939 | return 0; | |
1940 | } | |
1941 | _ACEOF | |
1942 | if ac_fn_c_try_compile "$LINENO"; then : | |
1943 | ac_lo=$ac_mid; break | |
1944 | else | |
1945 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1946 | if test $ac_mid -le $ac_hi; then | |
1947 | ac_lo= ac_hi= | |
1948 | break | |
1949 | fi | |
1950 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1951 | fi | |
1952 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1953 | done | |
1954 | else | |
1955 | ac_lo= ac_hi= | |
1956 | fi | |
1957 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1958 | fi | |
1959 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1960 | # Binary search between lo and hi bounds. | |
1961 | while test "x$ac_lo" != "x$ac_hi"; do | |
1962 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1964 | /* end confdefs.h. */ | |
1965 | $4 | |
1966 | int | |
1967 | main () | |
1968 | { | |
1969 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1970 | test_array [0] = 0 | |
bec39cab | 1971 | |
81ecdfbb RW |
1972 | ; |
1973 | return 0; | |
1974 | } | |
1975 | _ACEOF | |
1976 | if ac_fn_c_try_compile "$LINENO"; then : | |
1977 | ac_hi=$ac_mid | |
1978 | else | |
1979 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
1980 | fi | |
1981 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1982 | done | |
1983 | case $ac_lo in #(( | |
1984 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
1985 | '') ac_retval=1 ;; | |
1986 | esac | |
1987 | else | |
1988 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1989 | /* end confdefs.h. */ | |
1990 | $4 | |
1991 | static long int longval () { return $2; } | |
1992 | static unsigned long int ulongval () { return $2; } | |
1993 | #include <stdio.h> | |
1994 | #include <stdlib.h> | |
1995 | int | |
1996 | main () | |
1997 | { | |
bec39cab | 1998 | |
81ecdfbb RW |
1999 | FILE *f = fopen ("conftest.val", "w"); |
2000 | if (! f) | |
2001 | return 1; | |
2002 | if (($2) < 0) | |
2003 | { | |
2004 | long int i = longval (); | |
2005 | if (i != ($2)) | |
2006 | return 1; | |
2007 | fprintf (f, "%ld", i); | |
2008 | } | |
2009 | else | |
2010 | { | |
2011 | unsigned long int i = ulongval (); | |
2012 | if (i != ($2)) | |
2013 | return 1; | |
2014 | fprintf (f, "%lu", i); | |
2015 | } | |
2016 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2017 | on some platforms. */ | |
2018 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2019 | |
81ecdfbb RW |
2020 | ; |
2021 | return 0; | |
2022 | } | |
2023 | _ACEOF | |
2024 | if ac_fn_c_try_run "$LINENO"; then : | |
2025 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2026 | else | |
2027 | ac_retval=1 | |
2028 | fi | |
2029 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2030 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2031 | rm -f conftest.val | |
bec39cab | 2032 | |
81ecdfbb RW |
2033 | fi |
2034 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2035 | return $ac_retval | |
bec39cab | 2036 | |
81ecdfbb | 2037 | } # ac_fn_c_compute_int |
bec39cab | 2038 | |
c971b7fa PA |
2039 | # ac_fn_c_try_link LINENO |
2040 | # ----------------------- | |
2041 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2042 | ac_fn_c_try_link () | |
2043 | { | |
2044 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2045 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2046 | if { { ac_try="$ac_link" | |
2047 | case "(($ac_try" in | |
2048 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2049 | *) ac_try_echo=$ac_try;; | |
2050 | esac | |
2051 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2052 | $as_echo "$ac_try_echo"; } >&5 | |
2053 | (eval "$ac_link") 2>conftest.err | |
2054 | ac_status=$? | |
2055 | if test -s conftest.err; then | |
2056 | grep -v '^ *+' conftest.err >conftest.er1 | |
2057 | cat conftest.er1 >&5 | |
2058 | mv -f conftest.er1 conftest.err | |
2059 | fi | |
2060 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2061 | test $ac_status = 0; } && { | |
2062 | test -z "$ac_c_werror_flag" || | |
2063 | test ! -s conftest.err | |
2064 | } && test -s conftest$ac_exeext && { | |
2065 | test "$cross_compiling" = yes || | |
2066 | $as_test_x conftest$ac_exeext | |
2067 | }; then : | |
2068 | ac_retval=0 | |
2069 | else | |
2070 | $as_echo "$as_me: failed program was:" >&5 | |
2071 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2072 | ||
2073 | ac_retval=1 | |
2074 | fi | |
2075 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2076 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2077 | # interfere with the next link command; also delete a directory that is | |
2078 | # left behind by Apple's compiler. We do this before executing the actions. | |
2079 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2080 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2081 | return $ac_retval | |
2082 | ||
2083 | } # ac_fn_c_try_link | |
2084 | ||
55a8c076 YQ |
2085 | # ac_fn_c_check_func LINENO FUNC VAR |
2086 | # ---------------------------------- | |
2087 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2088 | ac_fn_c_check_func () | |
81ecdfbb RW |
2089 | { |
2090 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2092 | $as_echo_n "checking for $2... " >&6; } | |
2093 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2094 | $as_echo_n "(cached) " >&6 | |
2095 | else | |
81ecdfbb RW |
2096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2097 | /* end confdefs.h. */ | |
55a8c076 YQ |
2098 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2099 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2100 | #define $2 innocuous_$2 | |
2101 | ||
2102 | /* System header to define __stub macros and hopefully few prototypes, | |
2103 | which can conflict with char $2 (); below. | |
2104 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2105 | <limits.h> exists even on freestanding compilers. */ | |
2106 | ||
2107 | #ifdef __STDC__ | |
2108 | # include <limits.h> | |
2109 | #else | |
2110 | # include <assert.h> | |
2111 | #endif | |
2112 | ||
2113 | #undef $2 | |
2114 | ||
2115 | /* Override any GCC internal prototype to avoid an error. | |
2116 | Use char because int might match the return type of a GCC | |
2117 | builtin and then its argument prototype would still apply. */ | |
2118 | #ifdef __cplusplus | |
2119 | extern "C" | |
2120 | #endif | |
2121 | char $2 (); | |
2122 | /* The GNU C library defines this for functions which it implements | |
2123 | to always fail with ENOSYS. Some functions are actually named | |
2124 | something starting with __ and the normal name is an alias. */ | |
2125 | #if defined __stub_$2 || defined __stub___$2 | |
2126 | choke me | |
2127 | #endif | |
2128 | ||
2129 | int | |
2130 | main () | |
2131 | { | |
2132 | return $2 (); | |
2133 | ; | |
2134 | return 0; | |
2135 | } | |
2136 | _ACEOF | |
2137 | if ac_fn_c_try_link "$LINENO"; then : | |
2138 | eval "$3=yes" | |
2139 | else | |
2140 | eval "$3=no" | |
2141 | fi | |
2142 | rm -f core conftest.err conftest.$ac_objext \ | |
2143 | conftest$ac_exeext conftest.$ac_ext | |
2144 | fi | |
2145 | eval ac_res=\$$3 | |
2146 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2147 | $as_echo "$ac_res" >&6; } | |
2148 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2149 | ||
2150 | } # ac_fn_c_check_func | |
2151 | ||
770d76d7 PA |
2152 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2153 | # ------------------------------------ | |
2154 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2155 | ac_fn_c_check_decl () | |
2156 | { | |
2157 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2158 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2159 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2161 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2162 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2163 | $as_echo_n "(cached) " >&6 | |
2164 | else | |
2165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2166 | /* end confdefs.h. */ | |
2167 | $4 | |
2168 | int | |
2169 | main () | |
2170 | { | |
2171 | #ifndef $as_decl_name | |
2172 | #ifdef __cplusplus | |
2173 | (void) $as_decl_use; | |
2174 | #else | |
2175 | (void) $as_decl_name; | |
2176 | #endif | |
2177 | #endif | |
2178 | ||
2179 | ; | |
2180 | return 0; | |
2181 | } | |
2182 | _ACEOF | |
2183 | if ac_fn_c_try_compile "$LINENO"; then : | |
2184 | eval "$3=yes" | |
2185 | else | |
2186 | eval "$3=no" | |
2187 | fi | |
2188 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2189 | fi | |
2190 | eval ac_res=\$$3 | |
2191 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2192 | $as_echo "$ac_res" >&6; } | |
2193 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2194 | ||
2195 | } # ac_fn_c_check_decl | |
2196 | ||
55a8c076 YQ |
2197 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2198 | # ---------------------------------------------------- | |
2199 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2200 | # INCLUDES, setting cache variable VAR accordingly. | |
2201 | ac_fn_c_check_member () | |
2202 | { | |
2203 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2205 | $as_echo_n "checking for $2.$3... " >&6; } | |
2206 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2207 | $as_echo_n "(cached) " >&6 | |
2208 | else | |
2209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2210 | /* end confdefs.h. */ | |
2211 | $5 | |
2212 | int | |
2213 | main () | |
2214 | { | |
2215 | static $2 ac_aggr; | |
2216 | if (ac_aggr.$3) | |
2217 | return 0; | |
2218 | ; | |
2219 | return 0; | |
2220 | } | |
2221 | _ACEOF | |
2222 | if ac_fn_c_try_compile "$LINENO"; then : | |
2223 | eval "$4=yes" | |
2224 | else | |
2225 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2226 | /* end confdefs.h. */ | |
2227 | $5 | |
2228 | int | |
2229 | main () | |
2230 | { | |
2231 | static $2 ac_aggr; | |
2232 | if (sizeof ac_aggr.$3) | |
2233 | return 0; | |
2234 | ; | |
2235 | return 0; | |
2236 | } | |
2237 | _ACEOF | |
2238 | if ac_fn_c_try_compile "$LINENO"; then : | |
2239 | eval "$4=yes" | |
2240 | else | |
2241 | eval "$4=no" | |
2242 | fi | |
2243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2244 | fi | |
2245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2246 | fi | |
2247 | eval ac_res=\$$4 | |
2248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2249 | $as_echo "$ac_res" >&6; } | |
2250 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2251 | ||
2252 | } # ac_fn_c_check_member | |
2253 | ||
2254 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2255 | # ------------------------------------------- | |
2256 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2257 | # variable VAR accordingly. | |
2258 | ac_fn_c_check_type () | |
2259 | { | |
2260 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2261 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2262 | $as_echo_n "checking for $2... " >&6; } | |
2263 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2264 | $as_echo_n "(cached) " >&6 | |
2265 | else | |
2266 | eval "$3=no" | |
2267 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2268 | /* end confdefs.h. */ | |
2269 | $4 | |
2270 | int | |
2271 | main () | |
2272 | { | |
2273 | if (sizeof ($2)) | |
2274 | return 0; | |
2275 | ; | |
2276 | return 0; | |
2277 | } | |
2278 | _ACEOF | |
2279 | if ac_fn_c_try_compile "$LINENO"; then : | |
2280 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2281 | /* end confdefs.h. */ | |
2282 | $4 | |
2283 | int | |
2284 | main () | |
2285 | { | |
2286 | if (sizeof (($2))) | |
2287 | return 0; | |
2288 | ; | |
2289 | return 0; | |
2290 | } | |
2291 | _ACEOF | |
2292 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2293 | |
81ecdfbb RW |
2294 | else |
2295 | eval "$3=yes" | |
2296 | fi | |
2297 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2298 | fi | |
2299 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2300 | fi | |
2301 | eval ac_res=\$$3 | |
2302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2303 | $as_echo "$ac_res" >&6; } | |
2304 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2305 | |
81ecdfbb RW |
2306 | } # ac_fn_c_check_type |
2307 | cat >config.log <<_ACEOF | |
2308 | This file contains any messages produced by compilers while | |
2309 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2310 | |
81ecdfbb RW |
2311 | It was created by $as_me, which was |
2312 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2313 | |
81ecdfbb | 2314 | $ $0 $@ |
413ccac7 | 2315 | |
81ecdfbb RW |
2316 | _ACEOF |
2317 | exec 5>>config.log | |
2318 | { | |
2319 | cat <<_ASUNAME | |
2320 | ## --------- ## | |
2321 | ## Platform. ## | |
2322 | ## --------- ## | |
413ccac7 | 2323 | |
81ecdfbb RW |
2324 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2325 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2326 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2327 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2328 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2329 | |
81ecdfbb RW |
2330 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2331 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2332 | |
81ecdfbb RW |
2333 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2334 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2335 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2336 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2337 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2338 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2339 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2340 | |
81ecdfbb | 2341 | _ASUNAME |
bec39cab | 2342 | |
bec39cab AC |
2343 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2344 | for as_dir in $PATH | |
2345 | do | |
2346 | IFS=$as_save_IFS | |
2347 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2348 | $as_echo "PATH: $as_dir" |
2349 | done | |
2350 | IFS=$as_save_IFS | |
bec39cab | 2351 | |
81ecdfbb | 2352 | } >&5 |
bec39cab | 2353 | |
81ecdfbb | 2354 | cat >&5 <<_ACEOF |
bec39cab | 2355 | |
bec39cab | 2356 | |
81ecdfbb RW |
2357 | ## ----------- ## |
2358 | ## Core tests. ## | |
2359 | ## ----------- ## | |
2360 | ||
2361 | _ACEOF | |
2362 | ||
2363 | ||
2364 | # Keep a trace of the command line. | |
2365 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2366 | # Strip out --silent because we don't want to record it for future runs. | |
2367 | # Also quote any args containing shell meta-characters. | |
2368 | # Make two passes to allow for proper duplicate-argument suppression. | |
2369 | ac_configure_args= | |
2370 | ac_configure_args0= | |
2371 | ac_configure_args1= | |
2372 | ac_must_keep_next=false | |
2373 | for ac_pass in 1 2 | |
2374 | do | |
2375 | for ac_arg | |
2376 | do | |
2377 | case $ac_arg in | |
2378 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2379 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2380 | | -silent | --silent | --silen | --sile | --sil) | |
2381 | continue ;; | |
2382 | *\'*) | |
2383 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2384 | esac | |
2385 | case $ac_pass in | |
2386 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2387 | 2) | |
2388 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2389 | if test $ac_must_keep_next = true; then | |
2390 | ac_must_keep_next=false # Got value, back to normal. | |
2391 | else | |
2392 | case $ac_arg in | |
2393 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2394 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2395 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2396 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2397 | case "$ac_configure_args0 " in | |
2398 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2399 | esac | |
2400 | ;; | |
2401 | -* ) ac_must_keep_next=true ;; | |
2402 | esac | |
2403 | fi | |
2404 | as_fn_append ac_configure_args " '$ac_arg'" | |
2405 | ;; | |
2406 | esac | |
2407 | done | |
2408 | done | |
2409 | { ac_configure_args0=; unset ac_configure_args0;} | |
2410 | { ac_configure_args1=; unset ac_configure_args1;} | |
2411 | ||
2412 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2413 | # config.log. We remove comments because anyway the quotes in there | |
2414 | # would cause problems or look ugly. | |
2415 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2416 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2417 | trap 'exit_status=$? | |
2418 | # Save into config.log some information that might help in debugging. | |
2419 | { | |
2420 | echo | |
2421 | ||
2422 | cat <<\_ASBOX | |
2423 | ## ---------------- ## | |
2424 | ## Cache variables. ## | |
2425 | ## ---------------- ## | |
2426 | _ASBOX | |
2427 | echo | |
2428 | # The following way of writing the cache mishandles newlines in values, | |
2429 | ( | |
2430 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2431 | eval ac_val=\$$ac_var | |
2432 | case $ac_val in #( | |
2433 | *${as_nl}*) | |
2434 | case $ac_var in #( | |
2435 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2436 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2437 | esac | |
2438 | case $ac_var in #( | |
2439 | _ | IFS | as_nl) ;; #( | |
2440 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2441 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2442 | esac ;; | |
2443 | esac | |
2444 | done | |
2445 | (set) 2>&1 | | |
2446 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2447 | *${as_nl}ac_space=\ *) | |
2448 | sed -n \ | |
2449 | "s/'\''/'\''\\\\'\'''\''/g; | |
2450 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2451 | ;; #( | |
2452 | *) | |
2453 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2454 | ;; | |
2455 | esac | | |
2456 | sort | |
2457 | ) | |
2458 | echo | |
2459 | ||
2460 | cat <<\_ASBOX | |
2461 | ## ----------------- ## | |
2462 | ## Output variables. ## | |
2463 | ## ----------------- ## | |
2464 | _ASBOX | |
2465 | echo | |
2466 | for ac_var in $ac_subst_vars | |
2467 | do | |
2468 | eval ac_val=\$$ac_var | |
2469 | case $ac_val in | |
2470 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2471 | esac | |
2472 | $as_echo "$ac_var='\''$ac_val'\''" | |
2473 | done | sort | |
2474 | echo | |
2475 | ||
2476 | if test -n "$ac_subst_files"; then | |
2477 | cat <<\_ASBOX | |
2478 | ## ------------------- ## | |
2479 | ## File substitutions. ## | |
2480 | ## ------------------- ## | |
2481 | _ASBOX | |
2482 | echo | |
2483 | for ac_var in $ac_subst_files | |
2484 | do | |
2485 | eval ac_val=\$$ac_var | |
2486 | case $ac_val in | |
2487 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2488 | esac | |
2489 | $as_echo "$ac_var='\''$ac_val'\''" | |
2490 | done | sort | |
2491 | echo | |
2492 | fi | |
2493 | ||
2494 | if test -s confdefs.h; then | |
2495 | cat <<\_ASBOX | |
2496 | ## ----------- ## | |
2497 | ## confdefs.h. ## | |
2498 | ## ----------- ## | |
2499 | _ASBOX | |
2500 | echo | |
2501 | cat confdefs.h | |
2502 | echo | |
2503 | fi | |
2504 | test "$ac_signal" != 0 && | |
2505 | $as_echo "$as_me: caught signal $ac_signal" | |
2506 | $as_echo "$as_me: exit $exit_status" | |
2507 | } >&5 | |
2508 | rm -f core *.core core.conftest.* && | |
2509 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2510 | exit $exit_status | |
2511 | ' 0 | |
2512 | for ac_signal in 1 2 13 15; do | |
2513 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2514 | done | |
2515 | ac_signal=0 | |
2516 | ||
2517 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2518 | rm -f -r conftest* confdefs.h | |
2519 | ||
2520 | $as_echo "/* confdefs.h */" > confdefs.h | |
2521 | ||
2522 | # Predefined preprocessor variables. | |
2523 | ||
2524 | cat >>confdefs.h <<_ACEOF | |
2525 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2526 | _ACEOF | |
2527 | ||
2528 | cat >>confdefs.h <<_ACEOF | |
2529 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2530 | _ACEOF | |
2531 | ||
2532 | cat >>confdefs.h <<_ACEOF | |
2533 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2534 | _ACEOF | |
2535 | ||
2536 | cat >>confdefs.h <<_ACEOF | |
2537 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2538 | _ACEOF | |
2539 | ||
2540 | cat >>confdefs.h <<_ACEOF | |
2541 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2542 | _ACEOF | |
2543 | ||
2544 | cat >>confdefs.h <<_ACEOF | |
2545 | #define PACKAGE_URL "$PACKAGE_URL" | |
2546 | _ACEOF | |
2547 | ||
2548 | ||
2549 | # Let the site file select an alternate cache file if it wants to. | |
2550 | # Prefer an explicitly selected file to automatically selected ones. | |
2551 | ac_site_file1=NONE | |
2552 | ac_site_file2=NONE | |
2553 | if test -n "$CONFIG_SITE"; then | |
2554 | ac_site_file1=$CONFIG_SITE | |
2555 | elif test "x$prefix" != xNONE; then | |
2556 | ac_site_file1=$prefix/share/config.site | |
2557 | ac_site_file2=$prefix/etc/config.site | |
2558 | else | |
2559 | ac_site_file1=$ac_default_prefix/share/config.site | |
2560 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2561 | fi | |
2562 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2563 | do | |
2564 | test "x$ac_site_file" = xNONE && continue | |
2565 | if test -r "$ac_site_file"; then | |
2566 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2567 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2568 | sed 's/^/| /' "$ac_site_file" >&5 | |
2569 | . "$ac_site_file" | |
2570 | fi | |
2571 | done | |
2572 | ||
2573 | if test -r "$cache_file"; then | |
2574 | # Some versions of bash will fail to source /dev/null (special | |
2575 | # files actually), so we avoid doing that. | |
2576 | if test -f "$cache_file"; then | |
2577 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2578 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2579 | case $cache_file in | |
2580 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2581 | *) . "./$cache_file";; | |
2582 | esac | |
2583 | fi | |
2584 | else | |
2585 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2586 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2587 | >$cache_file | |
bec39cab AC |
2588 | fi |
2589 | ||
81ecdfbb RW |
2590 | # Check that the precious variables saved in the cache have kept the same |
2591 | # value. | |
2592 | ac_cache_corrupted=false | |
2593 | for ac_var in $ac_precious_vars; do | |
2594 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2595 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2596 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2597 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2598 | case $ac_old_set,$ac_new_set in | |
2599 | set,) | |
2600 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2601 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2602 | ac_cache_corrupted=: ;; | |
2603 | ,set) | |
2604 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2605 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2606 | ac_cache_corrupted=: ;; | |
2607 | ,);; | |
2608 | *) | |
2609 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2610 | # differences in whitespace do not lead to failure. | |
2611 | ac_old_val_w=`echo x $ac_old_val` | |
2612 | ac_new_val_w=`echo x $ac_new_val` | |
2613 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2614 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2615 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2616 | ac_cache_corrupted=: | |
2617 | else | |
2618 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2619 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2620 | eval $ac_var=\$ac_old_val | |
2621 | fi | |
2622 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2623 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2624 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2625 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2626 | fi;; | |
2627 | esac | |
2628 | # Pass precious variables to config.status. | |
2629 | if test "$ac_new_set" = set; then | |
2630 | case $ac_new_val in | |
2631 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2632 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2633 | esac | |
2634 | case " $ac_configure_args " in | |
2635 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2636 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2637 | esac | |
2638 | fi | |
2639 | done | |
2640 | if $ac_cache_corrupted; then | |
2641 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2642 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2643 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2644 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2645 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2646 | fi | |
2647 | ## -------------------- ## | |
2648 | ## Main body of script. ## | |
2649 | ## -------------------- ## | |
2650 | ||
2651 | ac_ext=c | |
2652 | ac_cpp='$CPP $CPPFLAGS' | |
2653 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2654 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2655 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2656 | ||
2657 | ||
2658 | ||
2659 | ||
2660 | ||
2661 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2662 | ||
2663 | ||
2664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2665 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2666 | # Check whether --enable-maintainer-mode was given. | |
2667 | if test "${enable_maintainer_mode+set}" = set; then : | |
2668 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2669 | else | |
2670 | USE_MAINTAINER_MODE=no | |
2671 | fi | |
2672 | ||
2673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2674 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2675 | if test $USE_MAINTAINER_MODE = yes; then | |
2676 | MAINTAINER_MODE_TRUE= | |
2677 | MAINTAINER_MODE_FALSE='#' | |
2678 | else | |
2679 | MAINTAINER_MODE_TRUE='#' | |
2680 | MAINTAINER_MODE_FALSE= | |
2681 | fi | |
2682 | ||
2683 | MAINT=$MAINTAINER_MODE_TRUE | |
2684 | ||
2685 | ||
2686 | ||
2687 | ac_ext=c | |
2688 | ac_cpp='$CPP $CPPFLAGS' | |
2689 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2690 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2691 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2692 | if test -n "$ac_tool_prefix"; then | |
2693 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2694 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2696 | $as_echo_n "checking for $ac_word... " >&6; } | |
2697 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2698 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2699 | else |
2700 | if test -n "$CC"; then | |
2701 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2702 | else | |
bec39cab AC |
2703 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2704 | for as_dir in $PATH | |
2705 | do | |
2706 | IFS=$as_save_IFS | |
2707 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2708 | for ac_exec_ext in '' $ac_executable_extensions; do |
2709 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2710 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2711 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2712 | break 2 |
2713 | fi | |
2714 | done | |
81ecdfbb RW |
2715 | done |
2716 | IFS=$as_save_IFS | |
bec39cab | 2717 | |
c906108c SS |
2718 | fi |
2719 | fi | |
bec39cab | 2720 | CC=$ac_cv_prog_CC |
c906108c | 2721 | if test -n "$CC"; then |
81ecdfbb RW |
2722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2723 | $as_echo "$CC" >&6; } | |
c906108c | 2724 | else |
81ecdfbb RW |
2725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2726 | $as_echo "no" >&6; } | |
c906108c SS |
2727 | fi |
2728 | ||
81ecdfbb | 2729 | |
b4e70030 JB |
2730 | fi |
2731 | if test -z "$ac_cv_prog_CC"; then | |
2732 | ac_ct_CC=$CC | |
81ecdfbb RW |
2733 | # Extract the first word of "gcc", so it can be a program name with args. |
2734 | set dummy gcc; ac_word=$2 | |
2735 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2736 | $as_echo_n "checking for $ac_word... " >&6; } | |
2737 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2738 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2739 | else |
2740 | if test -n "$ac_ct_CC"; then | |
2741 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2742 | else | |
2743 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2744 | for as_dir in $PATH | |
2745 | do | |
2746 | IFS=$as_save_IFS | |
2747 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2748 | for ac_exec_ext in '' $ac_executable_extensions; do |
2749 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2750 | ac_cv_prog_ac_ct_CC="gcc" | |
2751 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2752 | break 2 |
4e8d927d | 2753 | fi |
b4e70030 | 2754 | done |
81ecdfbb RW |
2755 | done |
2756 | IFS=$as_save_IFS | |
b4e70030 JB |
2757 | |
2758 | fi | |
2759 | fi | |
2760 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2761 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2762 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2763 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2764 | else |
81ecdfbb RW |
2765 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2766 | $as_echo "no" >&6; } | |
b4e70030 JB |
2767 | fi |
2768 | ||
81ecdfbb RW |
2769 | if test "x$ac_ct_CC" = x; then |
2770 | CC="" | |
2771 | else | |
2772 | case $cross_compiling:$ac_tool_warned in | |
2773 | yes:) | |
2774 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2775 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2776 | ac_tool_warned=yes ;; | |
2777 | esac | |
2778 | CC=$ac_ct_CC | |
2779 | fi | |
b4e70030 JB |
2780 | else |
2781 | CC="$ac_cv_prog_CC" | |
2782 | fi | |
2783 | ||
c906108c | 2784 | if test -z "$CC"; then |
81ecdfbb RW |
2785 | if test -n "$ac_tool_prefix"; then |
2786 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2787 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2789 | $as_echo_n "checking for $ac_word... " >&6; } | |
2790 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2791 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2792 | else |
2793 | if test -n "$CC"; then | |
2794 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2795 | else | |
bec39cab AC |
2796 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2797 | for as_dir in $PATH | |
2798 | do | |
2799 | IFS=$as_save_IFS | |
2800 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2801 | for ac_exec_ext in '' $ac_executable_extensions; do |
2802 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2803 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2804 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2805 | break 2 |
2806 | fi | |
2807 | done | |
81ecdfbb RW |
2808 | done |
2809 | IFS=$as_save_IFS | |
2810 | ||
2811 | fi | |
2812 | fi | |
2813 | CC=$ac_cv_prog_CC | |
2814 | if test -n "$CC"; then | |
2815 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2816 | $as_echo "$CC" >&6; } | |
2817 | else | |
2818 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2819 | $as_echo "no" >&6; } | |
2820 | fi | |
2821 | ||
2822 | ||
2823 | fi | |
2824 | fi | |
2825 | if test -z "$CC"; then | |
2826 | # Extract the first word of "cc", so it can be a program name with args. | |
2827 | set dummy cc; ac_word=$2 | |
2828 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2829 | $as_echo_n "checking for $ac_word... " >&6; } | |
2830 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2831 | $as_echo_n "(cached) " >&6 | |
2832 | else | |
2833 | if test -n "$CC"; then | |
2834 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2835 | else | |
2836 | ac_prog_rejected=no | |
2837 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2838 | for as_dir in $PATH | |
2839 | do | |
2840 | IFS=$as_save_IFS | |
2841 | test -z "$as_dir" && as_dir=. | |
2842 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2843 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2844 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2845 | ac_prog_rejected=yes | |
2846 | continue | |
2847 | fi | |
2848 | ac_cv_prog_CC="cc" | |
2849 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2850 | break 2 | |
2851 | fi | |
2852 | done | |
2853 | done | |
2854 | IFS=$as_save_IFS | |
bec39cab | 2855 | |
c906108c SS |
2856 | if test $ac_prog_rejected = yes; then |
2857 | # We found a bogon in the path, so make sure we never use it. | |
2858 | set dummy $ac_cv_prog_CC | |
2859 | shift | |
bec39cab | 2860 | if test $# != 0; then |
c906108c SS |
2861 | # We chose a different compiler from the bogus one. |
2862 | # However, it has the same basename, so the bogon will be chosen | |
2863 | # first if we set CC to just the basename; use the full file name. | |
2864 | shift | |
bec39cab | 2865 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2866 | fi |
2867 | fi | |
2868 | fi | |
2869 | fi | |
bec39cab | 2870 | CC=$ac_cv_prog_CC |
c906108c | 2871 | if test -n "$CC"; then |
81ecdfbb RW |
2872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2873 | $as_echo "$CC" >&6; } | |
c906108c | 2874 | else |
81ecdfbb RW |
2875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2876 | $as_echo "no" >&6; } | |
c906108c SS |
2877 | fi |
2878 | ||
81ecdfbb | 2879 | |
bec39cab AC |
2880 | fi |
2881 | if test -z "$CC"; then | |
2882 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2883 | for ac_prog in cl.exe |
bec39cab AC |
2884 | do |
2885 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2886 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2888 | $as_echo_n "checking for $ac_word... " >&6; } | |
2889 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2890 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2891 | else |
2892 | if test -n "$CC"; then | |
2893 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2894 | else | |
bec39cab AC |
2895 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2896 | for as_dir in $PATH | |
2897 | do | |
2898 | IFS=$as_save_IFS | |
2899 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2900 | for ac_exec_ext in '' $ac_executable_extensions; do |
2901 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2902 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2903 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2904 | break 2 |
2905 | fi | |
2906 | done | |
81ecdfbb RW |
2907 | done |
2908 | IFS=$as_save_IFS | |
bec39cab | 2909 | |
c906108c SS |
2910 | fi |
2911 | fi | |
bec39cab | 2912 | CC=$ac_cv_prog_CC |
c906108c | 2913 | if test -n "$CC"; then |
81ecdfbb RW |
2914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2915 | $as_echo "$CC" >&6; } | |
c906108c | 2916 | else |
81ecdfbb RW |
2917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2918 | $as_echo "no" >&6; } | |
c906108c | 2919 | fi |
bec39cab | 2920 | |
81ecdfbb | 2921 | |
bec39cab AC |
2922 | test -n "$CC" && break |
2923 | done | |
2924 | fi | |
2925 | if test -z "$CC"; then | |
2926 | ac_ct_CC=$CC | |
81ecdfbb | 2927 | for ac_prog in cl.exe |
bec39cab AC |
2928 | do |
2929 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2930 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2932 | $as_echo_n "checking for $ac_word... " >&6; } | |
2933 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2934 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2935 | else |
2936 | if test -n "$ac_ct_CC"; then | |
2937 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2938 | else | |
2939 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2940 | for as_dir in $PATH | |
2941 | do | |
2942 | IFS=$as_save_IFS | |
2943 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2944 | for ac_exec_ext in '' $ac_executable_extensions; do |
2945 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2946 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2947 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2948 | break 2 |
c906108c | 2949 | fi |
bec39cab | 2950 | done |
81ecdfbb RW |
2951 | done |
2952 | IFS=$as_save_IFS | |
bec39cab AC |
2953 | |
2954 | fi | |
2955 | fi | |
2956 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2957 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2959 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2960 | else |
81ecdfbb RW |
2961 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2962 | $as_echo "no" >&6; } | |
c906108c SS |
2963 | fi |
2964 | ||
81ecdfbb | 2965 | |
bec39cab AC |
2966 | test -n "$ac_ct_CC" && break |
2967 | done | |
c906108c | 2968 | |
81ecdfbb RW |
2969 | if test "x$ac_ct_CC" = x; then |
2970 | CC="" | |
2971 | else | |
2972 | case $cross_compiling:$ac_tool_warned in | |
2973 | yes:) | |
2974 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2975 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2976 | ac_tool_warned=yes ;; | |
2977 | esac | |
2978 | CC=$ac_ct_CC | |
2979 | fi | |
bec39cab AC |
2980 | fi |
2981 | ||
2982 | fi | |
2983 | ||
2984 | ||
81ecdfbb RW |
2985 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
2986 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2987 | as_fn_error "no acceptable C compiler found in \$PATH | |
2988 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
2989 | |
2990 | # Provide some information about the compiler. | |
81ecdfbb RW |
2991 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
2992 | set X $ac_compile | |
2993 | ac_compiler=$2 | |
2994 | for ac_option in --version -v -V -qversion; do | |
2995 | { { ac_try="$ac_compiler $ac_option >&5" | |
2996 | case "(($ac_try" in | |
2997 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2998 | *) ac_try_echo=$ac_try;; | |
2999 | esac | |
3000 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3001 | $as_echo "$ac_try_echo"; } >&5 | |
3002 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3003 | ac_status=$? |
81ecdfbb RW |
3004 | if test -s conftest.err; then |
3005 | sed '10a\ | |
3006 | ... rest of stderr output deleted ... | |
3007 | 10q' conftest.err >conftest.er1 | |
3008 | cat conftest.er1 >&5 | |
3009 | rm -f conftest.er1 conftest.err | |
3010 | fi | |
3011 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3012 | test $ac_status = 0; } | |
3013 | done | |
bec39cab | 3014 | |
81ecdfbb | 3015 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3016 | /* end confdefs.h. */ |
3017 | ||
3018 | int | |
3019 | main () | |
3020 | { | |
3021 | ||
3022 | ; | |
3023 | return 0; | |
3024 | } | |
3025 | _ACEOF | |
3026 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3027 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3028 | # Try to create an executable without -o first, disregard a.out. |
3029 | # It will help us diagnose broken compilers, and finding out an intuition | |
3030 | # of exeext. | |
81ecdfbb RW |
3031 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3032 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3033 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3034 | ||
3035 | # The possible output files: | |
3036 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3037 | ||
3038 | ac_rmfiles= | |
3039 | for ac_file in $ac_files | |
3040 | do | |
3041 | case $ac_file in | |
3042 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3043 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3044 | esac | |
3045 | done | |
3046 | rm -f $ac_rmfiles | |
3047 | ||
3048 | if { { ac_try="$ac_link_default" | |
3049 | case "(($ac_try" in | |
3050 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3051 | *) ac_try_echo=$ac_try;; | |
3052 | esac | |
3053 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3054 | $as_echo "$ac_try_echo"; } >&5 | |
3055 | (eval "$ac_link_default") 2>&5 | |
3056 | ac_status=$? | |
3057 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3058 | test $ac_status = 0; }; then : | |
3059 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3060 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3061 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3062 | # so that the user can short-circuit this test for compilers unknown to | |
3063 | # Autoconf. | |
3064 | for ac_file in $ac_files '' | |
bec39cab AC |
3065 | do |
3066 | test -f "$ac_file" || continue | |
3067 | case $ac_file in | |
81ecdfbb | 3068 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3069 | ;; |
3070 | [ab].out ) | |
3071 | # We found the default executable, but exeext='' is most | |
3072 | # certainly right. | |
3073 | break;; | |
3074 | *.* ) | |
81ecdfbb RW |
3075 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3076 | then :; else | |
3077 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3078 | fi | |
3079 | # We set ac_cv_exeext here because the later test for it is not | |
3080 | # safe: cross compilers may not add the suffix if given an `-o' | |
3081 | # argument, so we may need to know it at that point already. | |
3082 | # Even if this section looks crufty: it has the advantage of | |
3083 | # actually working. | |
b4e70030 JB |
3084 | break;; |
3085 | * ) | |
3086 | break;; | |
bec39cab AC |
3087 | esac |
3088 | done | |
81ecdfbb RW |
3089 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3090 | ||
bec39cab | 3091 | else |
81ecdfbb RW |
3092 | ac_file='' |
3093 | fi | |
3094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3095 | $as_echo "$ac_file" >&6; } | |
3096 | if test -z "$ac_file"; then : | |
3097 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3098 | sed 's/^/| /' conftest.$ac_ext >&5 |
3099 | ||
81ecdfbb RW |
3100 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3101 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3102 | { as_fn_set_status 77 | |
3103 | as_fn_error "C compiler cannot create executables | |
3104 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3105 | fi |
b4e70030 | 3106 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3107 | |
81ecdfbb | 3108 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3109 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3111 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3112 | # If not cross compiling, check that we can run a simple program. |
3113 | if test "$cross_compiling" != yes; then | |
3114 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3115 | { { case "(($ac_try" in |
3116 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3117 | *) ac_try_echo=$ac_try;; | |
3118 | esac | |
3119 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3120 | $as_echo "$ac_try_echo"; } >&5 | |
3121 | (eval "$ac_try") 2>&5 | |
bec39cab | 3122 | ac_status=$? |
81ecdfbb RW |
3123 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3124 | test $ac_status = 0; }; }; then | |
bec39cab | 3125 | cross_compiling=no |
c906108c | 3126 | else |
bec39cab AC |
3127 | if test "$cross_compiling" = maybe; then |
3128 | cross_compiling=yes | |
3129 | else | |
81ecdfbb RW |
3130 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3131 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3132 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3133 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3134 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3135 | fi |
c906108c | 3136 | fi |
bec39cab | 3137 | fi |
81ecdfbb RW |
3138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3139 | $as_echo "yes" >&6; } | |
bec39cab | 3140 | |
81ecdfbb | 3141 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3142 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3143 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3144 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3146 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3148 | $as_echo "$cross_compiling" >&6; } | |
3149 | ||
3150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3151 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3152 | if { { ac_try="$ac_link" | |
3153 | case "(($ac_try" in | |
3154 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3155 | *) ac_try_echo=$ac_try;; | |
3156 | esac | |
3157 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3158 | $as_echo "$ac_try_echo"; } >&5 | |
3159 | (eval "$ac_link") 2>&5 | |
bec39cab | 3160 | ac_status=$? |
81ecdfbb RW |
3161 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3162 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3163 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3164 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3165 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3166 | # `rm'. | |
3167 | for ac_file in conftest.exe conftest conftest.*; do | |
3168 | test -f "$ac_file" || continue | |
3169 | case $ac_file in | |
81ecdfbb | 3170 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3171 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3172 | break;; |
3173 | * ) break;; | |
3174 | esac | |
3175 | done | |
c906108c | 3176 | else |
81ecdfbb RW |
3177 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3178 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3179 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3180 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3181 | fi |
b4e70030 | 3182 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3184 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3185 | |
b4e70030 | 3186 | rm -f conftest.$ac_ext |
bec39cab AC |
3187 | EXEEXT=$ac_cv_exeext |
3188 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3189 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3190 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3191 | if test "${ac_cv_objext+set}" = set; then : | |
3192 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3193 | else |
81ecdfbb | 3194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3195 | /* end confdefs.h. */ |
3196 | ||
3197 | int | |
3198 | main () | |
3199 | { | |
3200 | ||
3201 | ; | |
3202 | return 0; | |
3203 | } | |
3204 | _ACEOF | |
3205 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3206 | if { { ac_try="$ac_compile" |
3207 | case "(($ac_try" in | |
3208 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3209 | *) ac_try_echo=$ac_try;; | |
3210 | esac | |
3211 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3212 | $as_echo "$ac_try_echo"; } >&5 | |
3213 | (eval "$ac_compile") 2>&5 | |
3214 | ac_status=$? | |
3215 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3216 | test $ac_status = 0; }; then : | |
3217 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3218 | test -f "$ac_file" || continue; | |
bec39cab | 3219 | case $ac_file in |
81ecdfbb | 3220 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3221 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3222 | break;; | |
3223 | esac | |
3224 | done | |
c906108c | 3225 | else |
81ecdfbb | 3226 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3227 | sed 's/^/| /' conftest.$ac_ext >&5 |
3228 | ||
81ecdfbb RW |
3229 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3230 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3231 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3232 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3233 | fi |
b4e70030 | 3234 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3235 | fi |
81ecdfbb RW |
3236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3237 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3238 | OBJEXT=$ac_cv_objext |
3239 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3241 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3242 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3243 | $as_echo_n "(cached) " >&6 | |
c906108c | 3244 | else |
81ecdfbb | 3245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3246 | /* end confdefs.h. */ |
3247 | ||
3248 | int | |
3249 | main () | |
3250 | { | |
3251 | #ifndef __GNUC__ | |
3252 | choke me | |
3253 | #endif | |
3254 | ||
3255 | ; | |
3256 | return 0; | |
3257 | } | |
3258 | _ACEOF | |
81ecdfbb | 3259 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3260 | ac_compiler_gnu=yes |
3261 | else | |
81ecdfbb | 3262 | ac_compiler_gnu=no |
bec39cab | 3263 | fi |
81ecdfbb | 3264 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3265 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3266 | ||
3267 | fi | |
81ecdfbb RW |
3268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3269 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3270 | if test $ac_compiler_gnu = yes; then | |
3271 | GCC=yes | |
3272 | else | |
3273 | GCC= | |
3274 | fi | |
bec39cab AC |
3275 | ac_test_CFLAGS=${CFLAGS+set} |
3276 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3277 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3278 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3279 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3280 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3281 | else |
81ecdfbb RW |
3282 | ac_save_c_werror_flag=$ac_c_werror_flag |
3283 | ac_c_werror_flag=yes | |
3284 | ac_cv_prog_cc_g=no | |
3285 | CFLAGS="-g" | |
3286 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3287 | /* end confdefs.h. */ |
3288 | ||
3289 | int | |
3290 | main () | |
3291 | { | |
3292 | ||
3293 | ; | |
3294 | return 0; | |
3295 | } | |
3296 | _ACEOF | |
81ecdfbb | 3297 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3298 | ac_cv_prog_cc_g=yes |
3299 | else | |
81ecdfbb RW |
3300 | CFLAGS="" |
3301 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3302 | /* end confdefs.h. */ | |
3303 | ||
3304 | int | |
3305 | main () | |
3306 | { | |
3307 | ||
3308 | ; | |
3309 | return 0; | |
3310 | } | |
3311 | _ACEOF | |
3312 | if ac_fn_c_try_compile "$LINENO"; then : | |
3313 | ||
3314 | else | |
3315 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3316 | CFLAGS="-g" | |
3317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3318 | /* end confdefs.h. */ | |
3319 | ||
3320 | int | |
3321 | main () | |
3322 | { | |
c906108c | 3323 | |
81ecdfbb RW |
3324 | ; |
3325 | return 0; | |
3326 | } | |
3327 | _ACEOF | |
3328 | if ac_fn_c_try_compile "$LINENO"; then : | |
3329 | ac_cv_prog_cc_g=yes | |
3330 | fi | |
3331 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3332 | fi | |
3333 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3334 | fi |
81ecdfbb RW |
3335 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3336 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3337 | fi |
81ecdfbb RW |
3338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3339 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3340 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3341 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3342 | elif test $ac_cv_prog_cc_g = yes; then |
3343 | if test "$GCC" = yes; then | |
3344 | CFLAGS="-g -O2" | |
3345 | else | |
3346 | CFLAGS="-g" | |
3347 | fi | |
3348 | else | |
3349 | if test "$GCC" = yes; then | |
3350 | CFLAGS="-O2" | |
3351 | else | |
3352 | CFLAGS= | |
3353 | fi | |
3354 | fi | |
81ecdfbb RW |
3355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3356 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3357 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3358 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3359 | else |
81ecdfbb | 3360 | ac_cv_prog_cc_c89=no |
bec39cab | 3361 | ac_save_CC=$CC |
81ecdfbb | 3362 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3363 | /* end confdefs.h. */ |
c906108c SS |
3364 | #include <stdarg.h> |
3365 | #include <stdio.h> | |
3366 | #include <sys/types.h> | |
3367 | #include <sys/stat.h> | |
3368 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3369 | struct buf { int x; }; | |
3370 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3371 | static char *e (p, i) | |
3372 | char **p; | |
3373 | int i; | |
3374 | { | |
3375 | return p[i]; | |
3376 | } | |
3377 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3378 | { | |
3379 | char *s; | |
3380 | va_list v; | |
3381 | va_start (v,p); | |
3382 | s = g (p, va_arg (v,int)); | |
3383 | va_end (v); | |
3384 | return s; | |
3385 | } | |
bec39cab AC |
3386 | |
3387 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3388 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3389 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3390 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3391 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3392 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3393 | that's true only with -std. */ |
bec39cab AC |
3394 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3395 | ||
81ecdfbb RW |
3396 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3397 | inside strings and character constants. */ | |
3398 | #define FOO(x) 'x' | |
3399 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3400 | ||
c906108c SS |
3401 | int test (int i, double x); |
3402 | struct s1 {int (*f) (int a);}; | |
3403 | struct s2 {int (*f) (double a);}; | |
3404 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3405 | int argc; | |
3406 | char **argv; | |
bec39cab AC |
3407 | int |
3408 | main () | |
3409 | { | |
c906108c | 3410 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3411 | ; |
3412 | return 0; | |
3413 | } | |
3414 | _ACEOF | |
81ecdfbb RW |
3415 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3416 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3417 | do |
3418 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3419 | if ac_fn_c_try_compile "$LINENO"; then : |
3420 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3421 | fi |
81ecdfbb RW |
3422 | rm -f core conftest.err conftest.$ac_objext |
3423 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3424 | done |
81ecdfbb | 3425 | rm -f conftest.$ac_ext |
bec39cab | 3426 | CC=$ac_save_CC |
c906108c SS |
3427 | |
3428 | fi | |
81ecdfbb RW |
3429 | # AC_CACHE_VAL |
3430 | case "x$ac_cv_prog_cc_c89" in | |
3431 | x) | |
3432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3433 | $as_echo "none needed" >&6; } ;; | |
3434 | xno) | |
3435 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3436 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3437 | *) |
81ecdfbb RW |
3438 | CC="$CC $ac_cv_prog_cc_c89" |
3439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3440 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3441 | esac |
81ecdfbb | 3442 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3443 | |
b4e70030 JB |
3444 | fi |
3445 | ||
bec39cab AC |
3446 | ac_ext=c |
3447 | ac_cpp='$CPP $CPPFLAGS' | |
3448 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3449 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3450 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3451 | |
60ca704f | 3452 | |
bec39cab AC |
3453 | ac_ext=c |
3454 | ac_cpp='$CPP $CPPFLAGS' | |
3455 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3456 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3457 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3459 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3460 | # On Suns, sometimes $CPP names a directory. |
3461 | if test -n "$CPP" && test -d "$CPP"; then | |
3462 | CPP= | |
8bb2c122 | 3463 | fi |
bec39cab | 3464 | if test -z "$CPP"; then |
81ecdfbb RW |
3465 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3466 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3467 | else |
3468 | # Double quotes because CPP needs to be expanded | |
3469 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3470 | do | |
3471 | ac_preproc_ok=false | |
3472 | for ac_c_preproc_warn_flag in '' yes | |
3473 | do | |
3474 | # Use a header file that comes with gcc, so configuring glibc | |
3475 | # with a fresh cross-compiler works. | |
3476 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3477 | # <limits.h> exists even on freestanding compilers. | |
3478 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3479 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3480 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3481 | /* end confdefs.h. */ |
3482 | #ifdef __STDC__ | |
3483 | # include <limits.h> | |
3484 | #else | |
3485 | # include <assert.h> | |
3486 | #endif | |
3487 | Syntax error | |
3488 | _ACEOF | |
81ecdfbb | 3489 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3490 | |
81ecdfbb | 3491 | else |
bec39cab AC |
3492 | # Broken: fails on valid input. |
3493 | continue | |
3494 | fi | |
3495 | rm -f conftest.err conftest.$ac_ext | |
3496 | ||
81ecdfbb | 3497 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3498 | # can be detected and how. |
81ecdfbb | 3499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3500 | /* end confdefs.h. */ |
3501 | #include <ac_nonexistent.h> | |
3502 | _ACEOF | |
81ecdfbb | 3503 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3504 | # Broken: success on invalid input. |
3505 | continue | |
8bb2c122 | 3506 | else |
bec39cab AC |
3507 | # Passes both tests. |
3508 | ac_preproc_ok=: | |
3509 | break | |
8bb2c122 | 3510 | fi |
bec39cab | 3511 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3512 | |
bec39cab AC |
3513 | done |
3514 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3515 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3516 | if $ac_preproc_ok; then : |
bec39cab AC |
3517 | break |
3518 | fi | |
8bb2c122 | 3519 | |
bec39cab AC |
3520 | done |
3521 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3522 | |
c906108c | 3523 | fi |
bec39cab AC |
3524 | CPP=$ac_cv_prog_CPP |
3525 | else | |
3526 | ac_cv_prog_CPP=$CPP | |
c906108c | 3527 | fi |
81ecdfbb RW |
3528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3529 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3530 | ac_preproc_ok=false |
3531 | for ac_c_preproc_warn_flag in '' yes | |
3532 | do | |
3533 | # Use a header file that comes with gcc, so configuring glibc | |
3534 | # with a fresh cross-compiler works. | |
3535 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3536 | # <limits.h> exists even on freestanding compilers. | |
3537 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3538 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3539 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3540 | /* end confdefs.h. */ |
3541 | #ifdef __STDC__ | |
3542 | # include <limits.h> | |
3543 | #else | |
3544 | # include <assert.h> | |
3545 | #endif | |
3546 | Syntax error | |
3547 | _ACEOF | |
81ecdfbb | 3548 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3549 | |
81ecdfbb | 3550 | else |
bec39cab AC |
3551 | # Broken: fails on valid input. |
3552 | continue | |
3553 | fi | |
3554 | rm -f conftest.err conftest.$ac_ext | |
3555 | ||
81ecdfbb | 3556 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3557 | # can be detected and how. |
81ecdfbb | 3558 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3559 | /* end confdefs.h. */ |
3560 | #include <ac_nonexistent.h> | |
3561 | _ACEOF | |
81ecdfbb | 3562 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3563 | # Broken: success on invalid input. |
3564 | continue | |
c906108c | 3565 | else |
bec39cab AC |
3566 | # Passes both tests. |
3567 | ac_preproc_ok=: | |
3568 | break | |
c906108c | 3569 | fi |
bec39cab | 3570 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3571 | |
bec39cab AC |
3572 | done |
3573 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3574 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3575 | if $ac_preproc_ok; then : |
3576 | ||
c906108c | 3577 | else |
81ecdfbb RW |
3578 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3579 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3580 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3581 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3582 | fi |
c906108c | 3583 | |
bec39cab AC |
3584 | ac_ext=c |
3585 | ac_cpp='$CPP $CPPFLAGS' | |
3586 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3587 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3588 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3589 | ||
3590 | ||
81ecdfbb RW |
3591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3592 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3593 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3594 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3595 | else |
81ecdfbb RW |
3596 | if test -z "$GREP"; then |
3597 | ac_path_GREP_found=false | |
3598 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3599 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3600 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3601 | do | |
3602 | IFS=$as_save_IFS | |
3603 | test -z "$as_dir" && as_dir=. | |
3604 | for ac_prog in grep ggrep; do | |
3605 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3606 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3607 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3608 | # Check for GNU ac_path_GREP and select it if it is found. | |
3609 | # Check for GNU $ac_path_GREP | |
3610 | case `"$ac_path_GREP" --version 2>&1` in | |
3611 | *GNU*) | |
3612 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3613 | *) | |
3614 | ac_count=0 | |
3615 | $as_echo_n 0123456789 >"conftest.in" | |
3616 | while : | |
3617 | do | |
3618 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3619 | mv "conftest.tmp" "conftest.in" | |
3620 | cp "conftest.in" "conftest.nl" | |
3621 | $as_echo 'GREP' >> "conftest.nl" | |
3622 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3623 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3624 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3625 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3626 | # Best one so far, save it but keep looking for a better one | |
3627 | ac_cv_path_GREP="$ac_path_GREP" | |
3628 | ac_path_GREP_max=$ac_count | |
bec39cab | 3629 | fi |
81ecdfbb RW |
3630 | # 10*(2^10) chars as input seems more than enough |
3631 | test $ac_count -gt 10 && break | |
3632 | done | |
3633 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3634 | esac | |
bec39cab | 3635 | |
81ecdfbb RW |
3636 | $ac_path_GREP_found && break 3 |
3637 | done | |
3638 | done | |
3639 | done | |
3640 | IFS=$as_save_IFS | |
3641 | if test -z "$ac_cv_path_GREP"; then | |
3642 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3643 | fi | |
c906108c | 3644 | else |
81ecdfbb | 3645 | ac_cv_path_GREP=$GREP |
c906108c | 3646 | fi |
c906108c | 3647 | |
81ecdfbb RW |
3648 | fi |
3649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3650 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3651 | GREP="$ac_cv_path_GREP" | |
c906108c | 3652 | |
c906108c | 3653 | |
81ecdfbb RW |
3654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3655 | $as_echo_n "checking for egrep... " >&6; } | |
3656 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3657 | $as_echo_n "(cached) " >&6 | |
783e057b | 3658 | else |
81ecdfbb RW |
3659 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3660 | then ac_cv_path_EGREP="$GREP -E" | |
3661 | else | |
3662 | if test -z "$EGREP"; then | |
3663 | ac_path_EGREP_found=false | |
3664 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3665 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3666 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3667 | do |
3668 | IFS=$as_save_IFS | |
3669 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3670 | for ac_prog in egrep; do |
3671 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3672 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3673 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3674 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3675 | # Check for GNU $ac_path_EGREP | |
3676 | case `"$ac_path_EGREP" --version 2>&1` in | |
3677 | *GNU*) | |
3678 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3679 | *) | |
3680 | ac_count=0 | |
3681 | $as_echo_n 0123456789 >"conftest.in" | |
3682 | while : | |
3683 | do | |
3684 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3685 | mv "conftest.tmp" "conftest.in" | |
3686 | cp "conftest.in" "conftest.nl" | |
3687 | $as_echo 'EGREP' >> "conftest.nl" | |
3688 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3689 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3690 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3691 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3692 | # Best one so far, save it but keep looking for a better one | |
3693 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3694 | ac_path_EGREP_max=$ac_count | |
3695 | fi | |
3696 | # 10*(2^10) chars as input seems more than enough | |
3697 | test $ac_count -gt 10 && break | |
3698 | done | |
3699 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3700 | esac | |
bec39cab | 3701 | |
81ecdfbb RW |
3702 | $ac_path_EGREP_found && break 3 |
3703 | done | |
3704 | done | |
3705 | done | |
3706 | IFS=$as_save_IFS | |
3707 | if test -z "$ac_cv_path_EGREP"; then | |
3708 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3709 | fi |
783e057b | 3710 | else |
81ecdfbb | 3711 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3712 | fi |
3713 | ||
81ecdfbb | 3714 | fi |
783e057b | 3715 | fi |
81ecdfbb RW |
3716 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3717 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3718 | EGREP="$ac_cv_path_EGREP" | |
3719 | ||
783e057b | 3720 | |
81ecdfbb RW |
3721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3722 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3723 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3724 | $as_echo_n "(cached) " >&6 | |
783e057b | 3725 | else |
81ecdfbb | 3726 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3727 | /* end confdefs.h. */ |
783e057b | 3728 | #include <stdlib.h> |
bec39cab | 3729 | #include <stdarg.h> |
783e057b DJ |
3730 | #include <string.h> |
3731 | #include <float.h> | |
c906108c | 3732 | |
bec39cab AC |
3733 | int |
3734 | main () | |
3735 | { | |
c906108c | 3736 | |
bec39cab AC |
3737 | ; |
3738 | return 0; | |
3739 | } | |
3740 | _ACEOF | |
81ecdfbb | 3741 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3742 | ac_cv_header_stdc=yes |
c906108c | 3743 | else |
81ecdfbb | 3744 | ac_cv_header_stdc=no |
c906108c | 3745 | fi |
81ecdfbb | 3746 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3747 | |
783e057b DJ |
3748 | if test $ac_cv_header_stdc = yes; then |
3749 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3751 | /* end confdefs.h. */ |
3752 | #include <string.h> | |
c906108c | 3753 | |
783e057b DJ |
3754 | _ACEOF |
3755 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3756 | $EGREP "memchr" >/dev/null 2>&1; then : |
3757 | ||
c906108c | 3758 | else |
783e057b | 3759 | ac_cv_header_stdc=no |
c906108c | 3760 | fi |
783e057b | 3761 | rm -f conftest* |
c906108c SS |
3762 | |
3763 | fi | |
3764 | ||
783e057b DJ |
3765 | if test $ac_cv_header_stdc = yes; then |
3766 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3768 | /* end confdefs.h. */ |
3769 | #include <stdlib.h> | |
bec39cab | 3770 | |
783e057b DJ |
3771 | _ACEOF |
3772 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3773 | $EGREP "free" >/dev/null 2>&1; then : |
3774 | ||
bec39cab | 3775 | else |
783e057b | 3776 | ac_cv_header_stdc=no |
bec39cab | 3777 | fi |
783e057b | 3778 | rm -f conftest* |
bec39cab AC |
3779 | |
3780 | fi | |
bec39cab | 3781 | |
783e057b DJ |
3782 | if test $ac_cv_header_stdc = yes; then |
3783 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3784 | if test "$cross_compiling" = yes; then : |
783e057b | 3785 | : |
bec39cab | 3786 | else |
81ecdfbb | 3787 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3788 | /* end confdefs.h. */ |
3789 | #include <ctype.h> | |
81ecdfbb | 3790 | #include <stdlib.h> |
783e057b DJ |
3791 | #if ((' ' & 0x0FF) == 0x020) |
3792 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3793 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3794 | #else | |
3795 | # define ISLOWER(c) \ | |
3796 | (('a' <= (c) && (c) <= 'i') \ | |
3797 | || ('j' <= (c) && (c) <= 'r') \ | |
3798 | || ('s' <= (c) && (c) <= 'z')) | |
3799 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3800 | #endif | |
3801 | ||
3802 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3803 | int | |
3804 | main () | |
3805 | { | |
3806 | int i; | |
3807 | for (i = 0; i < 256; i++) | |
3808 | if (XOR (islower (i), ISLOWER (i)) | |
3809 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3810 | return 2; |
3811 | return 0; | |
783e057b DJ |
3812 | } |
3813 | _ACEOF | |
81ecdfbb | 3814 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3815 | |
81ecdfbb RW |
3816 | else |
3817 | ac_cv_header_stdc=no | |
783e057b | 3818 | fi |
81ecdfbb RW |
3819 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3820 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3821 | fi |
81ecdfbb | 3822 | |
783e057b DJ |
3823 | fi |
3824 | fi | |
81ecdfbb RW |
3825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3826 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3827 | if test $ac_cv_header_stdc = yes; then |
3828 | ||
81ecdfbb | 3829 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3830 | |
3831 | fi | |
3832 | ||
3833 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3834 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3835 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3836 | do : |
3837 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3838 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3839 | " | |
3840 | eval as_val=\$$as_ac_Header | |
3841 | if test "x$as_val" = x""yes; then : | |
783e057b | 3842 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3843 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3844 | _ACEOF |
3845 | ||
3846 | fi | |
3847 | ||
3848 | done | |
3849 | ||
3850 | ||
3851 | ||
81ecdfbb RW |
3852 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3853 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3854 | MINIX=yes |
3855 | else | |
3856 | MINIX= | |
3857 | fi | |
3858 | ||
3859 | ||
3860 | if test "$MINIX" = yes; then | |
3861 | ||
81ecdfbb | 3862 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3863 | |
3864 | ||
81ecdfbb | 3865 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3866 | |
3867 | ||
81ecdfbb | 3868 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3869 | |
3870 | fi | |
3871 | ||
3872 | ||
81ecdfbb RW |
3873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3874 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3875 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3876 | $as_echo_n "(cached) " >&6 | |
783e057b | 3877 | else |
81ecdfbb | 3878 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3879 | /* end confdefs.h. */ |
3880 | ||
c971b7fa PA |
3881 | # define __EXTENSIONS__ 1 |
3882 | $ac_includes_default | |
783e057b DJ |
3883 | int |
3884 | main () | |
3885 | { | |
3886 | ||
3887 | ; | |
3888 | return 0; | |
3889 | } | |
3890 | _ACEOF | |
81ecdfbb | 3891 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3892 | ac_cv_safe_to_define___extensions__=yes |
3893 | else | |
81ecdfbb | 3894 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3895 | fi |
81ecdfbb | 3896 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3897 | fi |
81ecdfbb RW |
3898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3899 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3900 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3901 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3902 | |
81ecdfbb | 3903 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3904 | |
81ecdfbb | 3905 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3906 | |
81ecdfbb | 3907 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3908 | |
81ecdfbb | 3909 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3910 | |
3911 | ||
c971b7fa PA |
3912 | ac_aux_dir= |
3913 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3914 | for ac_t in install-sh install.sh shtool; do | |
3915 | if test -f "$ac_dir/$ac_t"; then | |
3916 | ac_aux_dir=$ac_dir | |
3917 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3918 | break 2 | |
3919 | fi | |
3920 | done | |
3921 | done | |
3922 | if test -z "$ac_aux_dir"; then | |
3923 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3924 | fi | |
770d76d7 | 3925 | |
c971b7fa PA |
3926 | # These three variables are undocumented and unsupported, |
3927 | # and are intended to be withdrawn in a future Autoconf release. | |
3928 | # They can cause serious problems if a builder's source tree is in a directory | |
3929 | # whose full name contains unusual characters. | |
3930 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3931 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3932 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3933 | |
770d76d7 | 3934 | |
c971b7fa PA |
3935 | # Make sure we can run config.sub. |
3936 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3937 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3938 | |
c971b7fa PA |
3939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3940 | $as_echo_n "checking build system type... " >&6; } | |
3941 | if test "${ac_cv_build+set}" = set; then : | |
3942 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3943 | else |
c971b7fa PA |
3944 | ac_build_alias=$build_alias |
3945 | test "x$ac_build_alias" = x && | |
3946 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3947 | test "x$ac_build_alias" = x && | |
3948 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3949 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3950 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3951 | ||
770d76d7 | 3952 | fi |
c971b7fa PA |
3953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3954 | $as_echo "$ac_cv_build" >&6; } | |
3955 | case $ac_cv_build in | |
3956 | *-*-*) ;; | |
3957 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3958 | esac |
c971b7fa PA |
3959 | build=$ac_cv_build |
3960 | ac_save_IFS=$IFS; IFS='-' | |
3961 | set x $ac_cv_build | |
3962 | shift | |
3963 | build_cpu=$1 | |
3964 | build_vendor=$2 | |
3965 | shift; shift | |
3966 | # Remember, the first character of IFS is used to create $*, | |
3967 | # except with old shells: | |
3968 | build_os=$* | |
3969 | IFS=$ac_save_IFS | |
3970 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
3971 | |
3972 | ||
c971b7fa PA |
3973 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
3974 | $as_echo_n "checking host system type... " >&6; } | |
3975 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
3976 | $as_echo_n "(cached) " >&6 |
3977 | else | |
c971b7fa PA |
3978 | if test "x$host_alias" = x; then |
3979 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 3980 | else |
c971b7fa PA |
3981 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
3982 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 3983 | fi |
81ecdfbb RW |
3984 | |
3985 | fi | |
c971b7fa PA |
3986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
3987 | $as_echo "$ac_cv_host" >&6; } | |
3988 | case $ac_cv_host in | |
3989 | *-*-*) ;; | |
3990 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 3991 | esac |
c971b7fa PA |
3992 | host=$ac_cv_host |
3993 | ac_save_IFS=$IFS; IFS='-' | |
3994 | set x $ac_cv_host | |
3995 | shift | |
3996 | host_cpu=$1 | |
3997 | host_vendor=$2 | |
3998 | shift; shift | |
3999 | # Remember, the first character of IFS is used to create $*, | |
4000 | # except with old shells: | |
4001 | host_os=$* | |
4002 | IFS=$ac_save_IFS | |
4003 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4004 | |
4005 | ||
4006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4007 | $as_echo_n "checking target system type... " >&6; } | |
4008 | if test "${ac_cv_target+set}" = set; then : | |
4009 | $as_echo_n "(cached) " >&6 | |
4010 | else | |
4011 | if test "x$target_alias" = x; then | |
4012 | ac_cv_target=$ac_cv_host | |
4013 | else | |
4014 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4015 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4016 | fi | |
4017 | ||
4018 | fi | |
4019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4020 | $as_echo "$ac_cv_target" >&6; } | |
4021 | case $ac_cv_target in | |
4022 | *-*-*) ;; | |
4023 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4024 | esac | |
4025 | target=$ac_cv_target | |
4026 | ac_save_IFS=$IFS; IFS='-' | |
4027 | set x $ac_cv_target | |
4028 | shift | |
4029 | target_cpu=$1 | |
4030 | target_vendor=$2 | |
4031 | shift; shift | |
4032 | # Remember, the first character of IFS is used to create $*, | |
4033 | # except with old shells: | |
4034 | target_os=$* | |
4035 | IFS=$ac_save_IFS | |
4036 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4037 | ||
4038 | ||
4039 | # The aliases save the names the user supplied, while $host etc. | |
4040 | # will get canonicalized. | |
4041 | test -n "$target_alias" && | |
4042 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4043 | NONENONEs,x,x, && | |
4044 | program_prefix=${target_alias}- | |
4045 | ||
4046 | # The tests for host and target for $enable_largefile require | |
4047 | # canonical names. | |
4048 | ||
4049 | ||
81ecdfbb | 4050 | |
da2f07f1 JK |
4051 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4052 | # even in directories otherwise not depending on the $plugins option. | |
4053 | ||
4054 | ||
4055 | # Check whether --enable-plugins was given. | |
4056 | if test "${enable_plugins+set}" = set; then : | |
4057 | enableval=$enable_plugins; case "${enableval}" in | |
4058 | yes | "") plugins=yes ;; | |
4059 | no) plugins=no ;; | |
4060 | *) plugins=yes ;; | |
4061 | esac | |
4062 | else | |
4063 | plugins=no | |
4064 | fi | |
4065 | ||
4066 | ||
4067 | ||
4068 | case "${host}" in | |
4069 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4070 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4071 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4072 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4073 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4074 | # large-file support through the --enable-largefile switch, disable | |
4075 | # large-file support in favor of procfs support. | |
4076 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4077 | && : ${enable_largefile="no"} | |
4078 | ;; | |
4079 | esac | |
4080 | ||
4081 | # Check whether --enable-largefile was given. | |
4082 | if test "${enable_largefile+set}" = set; then : | |
4083 | enableval=$enable_largefile; | |
4084 | fi | |
4085 | ||
4086 | if test "$enable_largefile" != no; then | |
4087 | ||
4088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4089 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4090 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4091 | $as_echo_n "(cached) " >&6 | |
4092 | else | |
4093 | ac_cv_sys_largefile_CC=no | |
4094 | if test "$GCC" != yes; then | |
4095 | ac_save_CC=$CC | |
4096 | while :; do | |
4097 | # IRIX 6.2 and later do not support large files by default, | |
4098 | # so use the C compiler's -n32 option if that helps. | |
4099 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4100 | /* end confdefs.h. */ | |
4101 | #include <sys/types.h> | |
4102 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4103 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4104 | since some C++ compilers masquerading as C compilers | |
4105 | incorrectly reject 9223372036854775807. */ | |
4106 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4107 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4108 | && LARGE_OFF_T % 2147483647 == 1) | |
4109 | ? 1 : -1]; | |
4110 | int | |
4111 | main () | |
4112 | { | |
4113 | ||
4114 | ; | |
4115 | return 0; | |
4116 | } | |
4117 | _ACEOF | |
4118 | if ac_fn_c_try_compile "$LINENO"; then : | |
4119 | break | |
4120 | fi | |
4121 | rm -f core conftest.err conftest.$ac_objext | |
4122 | CC="$CC -n32" | |
4123 | if ac_fn_c_try_compile "$LINENO"; then : | |
4124 | ac_cv_sys_largefile_CC=' -n32'; break | |
4125 | fi | |
4126 | rm -f core conftest.err conftest.$ac_objext | |
4127 | break | |
4128 | done | |
4129 | CC=$ac_save_CC | |
4130 | rm -f conftest.$ac_ext | |
4131 | fi | |
4132 | fi | |
4133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4134 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4135 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4136 | CC=$CC$ac_cv_sys_largefile_CC | |
4137 | fi | |
4138 | ||
4139 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4140 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4141 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4142 | $as_echo_n "(cached) " >&6 | |
4143 | else | |
4144 | while :; do | |
4145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4146 | /* end confdefs.h. */ | |
4147 | #include <sys/types.h> | |
4148 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4149 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4150 | since some C++ compilers masquerading as C compilers | |
4151 | incorrectly reject 9223372036854775807. */ | |
4152 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4153 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4154 | && LARGE_OFF_T % 2147483647 == 1) | |
4155 | ? 1 : -1]; | |
4156 | int | |
4157 | main () | |
4158 | { | |
4159 | ||
4160 | ; | |
4161 | return 0; | |
4162 | } | |
4163 | _ACEOF | |
4164 | if ac_fn_c_try_compile "$LINENO"; then : | |
4165 | ac_cv_sys_file_offset_bits=no; break | |
4166 | fi | |
4167 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4169 | /* end confdefs.h. */ | |
4170 | #define _FILE_OFFSET_BITS 64 | |
4171 | #include <sys/types.h> | |
4172 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4173 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4174 | since some C++ compilers masquerading as C compilers | |
4175 | incorrectly reject 9223372036854775807. */ | |
4176 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4177 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4178 | && LARGE_OFF_T % 2147483647 == 1) | |
4179 | ? 1 : -1]; | |
4180 | int | |
4181 | main () | |
4182 | { | |
4183 | ||
4184 | ; | |
4185 | return 0; | |
4186 | } | |
4187 | _ACEOF | |
4188 | if ac_fn_c_try_compile "$LINENO"; then : | |
4189 | ac_cv_sys_file_offset_bits=64; break | |
4190 | fi | |
4191 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4192 | ac_cv_sys_file_offset_bits=unknown | |
4193 | break | |
4194 | done | |
4195 | fi | |
4196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4197 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4198 | case $ac_cv_sys_file_offset_bits in #( | |
4199 | no | unknown) ;; | |
4200 | *) | |
4201 | cat >>confdefs.h <<_ACEOF | |
4202 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4203 | _ACEOF | |
4204 | ;; | |
4205 | esac | |
4206 | rm -rf conftest* | |
4207 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4209 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4210 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4211 | $as_echo_n "(cached) " >&6 | |
4212 | else | |
4213 | while :; do | |
4214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4215 | /* end confdefs.h. */ | |
4216 | #include <sys/types.h> | |
4217 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4218 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4219 | since some C++ compilers masquerading as C compilers | |
4220 | incorrectly reject 9223372036854775807. */ | |
4221 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4222 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4223 | && LARGE_OFF_T % 2147483647 == 1) | |
4224 | ? 1 : -1]; | |
4225 | int | |
4226 | main () | |
4227 | { | |
4228 | ||
4229 | ; | |
4230 | return 0; | |
4231 | } | |
4232 | _ACEOF | |
4233 | if ac_fn_c_try_compile "$LINENO"; then : | |
4234 | ac_cv_sys_large_files=no; break | |
4235 | fi | |
4236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4238 | /* end confdefs.h. */ | |
4239 | #define _LARGE_FILES 1 | |
4240 | #include <sys/types.h> | |
4241 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4242 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4243 | since some C++ compilers masquerading as C compilers | |
4244 | incorrectly reject 9223372036854775807. */ | |
4245 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4246 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4247 | && LARGE_OFF_T % 2147483647 == 1) | |
4248 | ? 1 : -1]; | |
4249 | int | |
4250 | main () | |
4251 | { | |
4252 | ||
4253 | ; | |
4254 | return 0; | |
4255 | } | |
4256 | _ACEOF | |
4257 | if ac_fn_c_try_compile "$LINENO"; then : | |
4258 | ac_cv_sys_large_files=1; break | |
4259 | fi | |
4260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4261 | ac_cv_sys_large_files=unknown | |
4262 | break | |
4263 | done | |
4264 | fi | |
4265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4266 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4267 | case $ac_cv_sys_large_files in #( | |
4268 | no | unknown) ;; | |
4269 | *) | |
4270 | cat >>confdefs.h <<_ACEOF | |
4271 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4272 | _ACEOF | |
4273 | ;; | |
4274 | esac | |
4275 | rm -rf conftest* | |
4276 | fi | |
4277 | fi | |
4278 | ||
4279 | ||
4280 | ||
81ecdfbb RW |
4281 | |
4282 | ||
4283 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4284 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4285 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4286 | $as_echo_n "(cached) " >&6 | |
4287 | else | |
4288 | am_cv_prog_cc_stdc=no | |
4289 | ac_save_CC="$CC" | |
4290 | # Don't try gcc -ansi; that turns off useful extensions and | |
4291 | # breaks some systems' header files. | |
4292 | # AIX -qlanglvl=ansi | |
4293 | # Ultrix and OSF/1 -std1 | |
4294 | # HP-UX 10.20 and later -Ae | |
4295 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4296 | # SVR4 -Xc -D__EXTENSIONS__ | |
4297 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4298 | do | |
783e057b | 4299 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4301 | /* end confdefs.h. */ |
4302 | #include <stdarg.h> | |
4303 | #include <stdio.h> | |
4304 | #include <sys/types.h> | |
4305 | #include <sys/stat.h> | |
4306 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4307 | struct buf { int x; }; | |
4308 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4309 | static char *e (p, i) | |
4310 | char **p; | |
4311 | int i; | |
4312 | { | |
4313 | return p[i]; | |
4314 | } | |
4315 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4316 | { | |
4317 | char *s; | |
4318 | va_list v; | |
4319 | va_start (v,p); | |
4320 | s = g (p, va_arg (v,int)); | |
4321 | va_end (v); | |
4322 | return s; | |
4323 | } | |
4324 | int test (int i, double x); | |
4325 | struct s1 {int (*f) (int a);}; | |
4326 | struct s2 {int (*f) (double a);}; | |
4327 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4328 | int argc; | |
4329 | char **argv; | |
4330 | ||
4331 | int | |
4332 | main () | |
4333 | { | |
4334 | ||
4335 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4336 | ||
4337 | ; | |
4338 | return 0; | |
4339 | } | |
4340 | _ACEOF | |
81ecdfbb | 4341 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4342 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4343 | fi |
81ecdfbb | 4344 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4345 | done |
4346 | CC="$ac_save_CC" | |
4347 | ||
4348 | fi | |
4349 | ||
4350 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4352 | $as_echo "none needed" >&6; } | |
783e057b | 4353 | else |
81ecdfbb RW |
4354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4355 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4356 | fi |
4357 | case "x$am_cv_prog_cc_stdc" in | |
4358 | x|xno) ;; | |
4359 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4360 | esac | |
4361 | ||
4362 | ||
4363 | ac_aux_dir= | |
81ecdfbb RW |
4364 | for ac_dir in .. "$srcdir"/..; do |
4365 | for ac_t in install-sh install.sh shtool; do | |
4366 | if test -f "$ac_dir/$ac_t"; then | |
4367 | ac_aux_dir=$ac_dir | |
4368 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4369 | break 2 | |
4370 | fi | |
4371 | done | |
783e057b DJ |
4372 | done |
4373 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4374 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4375 | fi |
81ecdfbb RW |
4376 | |
4377 | # These three variables are undocumented and unsupported, | |
4378 | # and are intended to be withdrawn in a future Autoconf release. | |
4379 | # They can cause serious problems if a builder's source tree is in a directory | |
4380 | # whose full name contains unusual characters. | |
4381 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4382 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4383 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4384 | ||
783e057b | 4385 | |
783e057b | 4386 | |
9009e1ae MR |
4387 | test "$program_prefix" != NONE && |
4388 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4389 | # Use a double $ so make ignores it. | |
4390 | test "$program_suffix" != NONE && | |
4391 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4392 | # Double any \ or $. | |
4393 | # By default was `s,x,x', remove it if useless. | |
4394 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4395 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4396 | ||
81ecdfbb | 4397 | |
a417dc56 RW |
4398 | # Dependency checking. |
4399 | rm -rf .tst 2>/dev/null | |
4400 | mkdir .tst 2>/dev/null | |
4401 | if test -d .tst; then | |
4402 | am__leading_dot=. | |
4403 | else | |
4404 | am__leading_dot=_ | |
4405 | fi | |
4406 | rmdir .tst 2>/dev/null | |
4407 | ||
4408 | DEPDIR="${am__leading_dot}deps" | |
4409 | ||
81ecdfbb | 4410 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4411 | |
4412 | ||
4413 | depcc="$CC" am_compiler_list= | |
4414 | ||
4415 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4417 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4418 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4419 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4420 | else |
4421 | if test -f "$am_depcomp"; then | |
4422 | # We make a subdir and do the tests there. Otherwise we can end up | |
4423 | # making bogus files that we don't know about and never remove. For | |
4424 | # instance it was reported that on HP-UX the gcc test will end up | |
4425 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4426 | # in D'. | |
4427 | mkdir conftest.dir | |
4428 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4429 | # using a relative directory. | |
4430 | cp "$am_depcomp" conftest.dir | |
4431 | cd conftest.dir | |
4432 | # We will build objects and dependencies in a subdirectory because | |
4433 | # it helps to detect inapplicable dependency modes. For instance | |
4434 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4435 | # side effect of compilation, but ICC will put the dependencies in | |
4436 | # the current directory while Tru64 will put them in the object | |
4437 | # directory. | |
4438 | mkdir sub | |
4439 | ||
4440 | am_cv_CC_dependencies_compiler_type=none | |
4441 | if test "$am_compiler_list" = ""; then | |
4442 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4443 | fi | |
4444 | for depmode in $am_compiler_list; do | |
4445 | if test $depmode = none; then break; fi | |
4446 | ||
81ecdfbb | 4447 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4448 | # Setup a source with many dependencies, because some compilers |
4449 | # like to wrap large dependency lists on column 80 (with \), and | |
4450 | # we should not choose a depcomp mode which is confused by this. | |
4451 | # | |
4452 | # We need to recreate these files for each test, as the compiler may | |
4453 | # overwrite some of them when testing with obscure command lines. | |
4454 | # This happens at least with the AIX C compiler. | |
4455 | : > sub/conftest.c | |
4456 | for i in 1 2 3 4 5 6; do | |
4457 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4458 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4459 | # Solaris 8's {/usr,}/bin/sh. | |
4460 | touch sub/conftst$i.h | |
4461 | done | |
4462 | echo "include sub/conftest.Po" > confmf | |
4463 | ||
4464 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4465 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4466 | # handle `-M -o', and we need to detect this. | |
4467 | depcmd="depmode=$depmode \ | |
4468 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4469 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4470 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4471 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4472 | if env $depcmd > conftest.err 2>&1 && | |
4473 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4474 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4475 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4476 | # icc doesn't choke on unknown options, it will just issue warnings | |
4477 | # or remarks (even with -Werror). So we grep stderr for any message | |
4478 | # that says an option was ignored or not supported. | |
4479 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4480 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4481 | # The diagnosis changed in icc 8.0: | |
4482 | # icc: Command line remark: option '-MP' not supported | |
4483 | if (grep 'ignoring option' conftest.err || | |
4484 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4485 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4486 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4487 | break |
4488 | fi | |
4489 | fi | |
81ecdfbb | 4490 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4491 | sed -e 's/^/| /' < conftest.err >&5 |
4492 | done | |
4493 | ||
4494 | cd .. | |
4495 | rm -rf conftest.dir | |
4496 | else | |
4497 | am_cv_CC_dependencies_compiler_type=none | |
4498 | fi | |
4499 | ||
4500 | fi | |
81ecdfbb RW |
4501 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4502 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4503 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4504 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4505 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4506 | ||
4507 | fi | |
4508 | ||
4509 | ||
4510 | # Check for the 'make' the user wants to use. | |
4511 | for ac_prog in make | |
4512 | do | |
4513 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4514 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4515 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4516 | $as_echo_n "checking for $ac_word... " >&6; } | |
4517 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4518 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4519 | else |
4520 | if test -n "$MAKE"; then | |
4521 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4522 | else | |
4523 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4524 | for as_dir in $PATH | |
4525 | do | |
4526 | IFS=$as_save_IFS | |
4527 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4528 | for ac_exec_ext in '' $ac_executable_extensions; do |
4529 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4530 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4531 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4532 | break 2 |
4533 | fi | |
4534 | done | |
81ecdfbb RW |
4535 | done |
4536 | IFS=$as_save_IFS | |
a417dc56 RW |
4537 | |
4538 | fi | |
4539 | fi | |
4540 | MAKE=$ac_cv_prog_MAKE | |
4541 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4543 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4544 | else |
81ecdfbb RW |
4545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4546 | $as_echo "no" >&6; } | |
a417dc56 RW |
4547 | fi |
4548 | ||
81ecdfbb | 4549 | |
a417dc56 RW |
4550 | test -n "$MAKE" && break |
4551 | done | |
4552 | ||
4553 | MAKE_IS_GNU= | |
4554 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4555 | *GNU*) | |
4556 | MAKE_IS_GNU=yes | |
4557 | ;; | |
4558 | esac | |
81ecdfbb | 4559 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4560 | GMAKE_TRUE= |
4561 | GMAKE_FALSE='#' | |
4562 | else | |
4563 | GMAKE_TRUE='#' | |
4564 | GMAKE_FALSE= | |
4565 | fi | |
4566 | ||
81ecdfbb RW |
4567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4568 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4569 | set x ${MAKE-make} | |
4570 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4571 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4572 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4573 | else |
4574 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4575 | SHELL = /bin/sh |
a417dc56 | 4576 | all: |
81ecdfbb | 4577 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4578 | _ACEOF |
4579 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4580 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4581 | *@@@%%%=?*=@@@%%%*) | |
4582 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4583 | *) | |
4584 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4585 | esac | |
a417dc56 RW |
4586 | rm -f conftest.make |
4587 | fi | |
81ecdfbb RW |
4588 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4590 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4591 | SET_MAKE= |
4592 | else | |
81ecdfbb RW |
4593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4594 | $as_echo "no" >&6; } | |
a417dc56 RW |
4595 | SET_MAKE="MAKE=${MAKE-make}" |
4596 | fi | |
4597 | ||
4598 | ||
c971b7fa PA |
4599 | # Configure gnulib. We need to build gnulib under some other |
4600 | # directory not "gnulib", to avoid the problem of both GDB and | |
4601 | # GDBserver wanting to build it in the same directory, when building | |
4602 | # in the source dir. | |
783e057b | 4603 | |
c971b7fa PA |
4604 | in_src="gnulib" |
4605 | in_build="build-gnulib" | |
4606 | ||
4607 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4608 | # so they do not pile up. | |
4609 | ac_sub_configure_args= | |
4610 | ac_prev= | |
4611 | eval "set x $ac_configure_args" | |
4612 | shift | |
4613 | for ac_arg | |
4614 | do | |
4615 | if test -n "$ac_prev"; then | |
4616 | ac_prev= | |
4617 | continue | |
4618 | fi | |
4619 | case $ac_arg in | |
4620 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4621 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4622 | ac_prev=cache_file ;; | |
4623 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4624 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4625 | | --c=*) | |
4626 | ;; | |
4627 | --config-cache | -C) | |
4628 | ;; | |
4629 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4630 | ac_prev=srcdir ;; | |
4631 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4632 | ;; | |
4633 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4634 | ac_prev=prefix ;; | |
4635 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4636 | ;; | |
4637 | --disable-option-checking) | |
4638 | ;; | |
4639 | *) | |
4640 | case $ac_arg in | |
4641 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4642 | esac | |
4643 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4644 | esac | |
4645 | done | |
4646 | ||
4647 | # Always prepend --prefix to ensure using the same prefix | |
4648 | # in subdir configurations. | |
4649 | ac_arg="--prefix=$prefix" | |
4650 | case $ac_arg in | |
4651 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4652 | esac | |
4653 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4654 | ||
4655 | # Pass --silent | |
4656 | if test "$silent" = yes; then | |
4657 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4658 | fi | |
4659 | ||
4660 | # Always prepend --disable-option-checking to silence warnings, since | |
4661 | # different subdirs can have different --enable and --with options. | |
4662 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4663 | ||
4664 | ac_popdir=`pwd` | |
4665 | ac_dir=$in_build | |
4666 | ||
4667 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4668 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4669 | $as_echo "$ac_msg" >&6 | |
4670 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4671 | ||
38ea300a PA |
4672 | case $srcdir in |
4673 | [\\/]* | ?:[\\/]* ) | |
4674 | ac_srcdir=$srcdir/$in_src ;; | |
4675 | *) # Relative name. | |
4676 | ac_srcdir=../$srcdir/$in_src ;; | |
4677 | esac | |
c971b7fa PA |
4678 | |
4679 | cd "$ac_dir" | |
4680 | ||
4681 | ac_sub_configure=$ac_srcdir/configure | |
4682 | ||
4683 | # Make the cache file name correct relative to the subdirectory. | |
4684 | case $cache_file in | |
4685 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4686 | *) # Relative name. | |
4687 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4688 | esac | |
4689 | ||
4690 | { $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 | |
4691 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4692 | # The eval makes quoting arguments work. | |
4693 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4694 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4695 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4696 | ||
4697 | cd "$ac_popdir" | |
783e057b | 4698 | |
c971b7fa PA |
4699 | |
4700 | ||
4701 | CONFIG_OBS= | |
4702 | CONFIG_DEPS= | |
4703 | CONFIG_SRCS= | |
4704 | ENABLE_CFLAGS= | |
4705 | ||
4706 | CONFIG_ALL= | |
4707 | CONFIG_CLEAN= | |
4708 | CONFIG_INSTALL= | |
4709 | CONFIG_UNINSTALL= | |
4710 | ||
4711 | # If we haven't got the data from the intl directory, | |
4712 | # assume NLS is disabled. | |
4713 | USE_NLS=no | |
4714 | LIBINTL= | |
4715 | LIBINTL_DEP= | |
4716 | INCINTL= | |
4717 | XGETTEXT= | |
4718 | GMSGFMT= | |
4719 | POSUB= | |
783e057b DJ |
4720 | |
4721 | if test -f ../intl/config.intl; then | |
4722 | . ../intl/config.intl | |
4723 | fi | |
81ecdfbb RW |
4724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4725 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4726 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4728 | $as_echo "no" >&6; } | |
783e057b | 4729 | else |
81ecdfbb RW |
4730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4731 | $as_echo "yes" >&6; } | |
783e057b | 4732 | |
81ecdfbb | 4733 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4734 | |
4735 | ||
81ecdfbb RW |
4736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4737 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4738 | # Look for .po and .gmo files in the source directory. |
4739 | CATALOGS= | |
4740 | XLINGUAS= | |
4741 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4742 | # If there aren't any .gmo files the shell will give us the | |
4743 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4744 | # weeded out. | |
4745 | case "$cat" in *\**) | |
4746 | continue;; | |
4747 | esac | |
4748 | # The quadruple backslash is collapsed to a double backslash | |
4749 | # by the backticks, then collapsed again by the double quotes, | |
4750 | # leaving us with one backslash in the sed expression (right | |
4751 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4752 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4753 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4754 | # The user is allowed to set LINGUAS to a list of languages to | |
4755 | # install catalogs for. If it's empty that means "all of them." | |
4756 | if test "x$LINGUAS" = x; then | |
4757 | CATALOGS="$CATALOGS $cat" | |
4758 | XLINGUAS="$XLINGUAS $lang" | |
4759 | else | |
4760 | case "$LINGUAS" in *$lang*) | |
4761 | CATALOGS="$CATALOGS $cat" | |
4762 | XLINGUAS="$XLINGUAS $lang" | |
4763 | ;; | |
4764 | esac | |
e28b3332 DJ |
4765 | fi |
4766 | done | |
c971b7fa PA |
4767 | LINGUAS="$XLINGUAS" |
4768 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
4769 | $as_echo "$LINGUAS" >&6; } | |
4770 | ||
4771 | ||
4772 | DATADIRNAME=share | |
4773 | ||
4774 | INSTOBJEXT=.mo | |
4775 | ||
4776 | GENCAT=gencat | |
4777 | ||
4778 | CATOBJEXT=.gmo | |
e28b3332 | 4779 | |
e28b3332 DJ |
4780 | fi |
4781 | ||
c971b7fa PA |
4782 | localedir='${datadir}/locale' |
4783 | ||
4784 | ||
4785 | if test x"$USE_NLS" = xyes; then | |
4786 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4787 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4788 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4789 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 4790 | fi |
e28b3332 | 4791 | |
c971b7fa PA |
4792 | GNULIB=build-gnulib/import |
4793 | ||
4794 | # For Makefile dependencies. | |
4795 | GNULIB_STDINT_H= | |
4796 | if test x"$STDINT_H" != x; then | |
4797 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
4798 | fi |
4799 | ||
4800 | ||
c971b7fa PA |
4801 | PACKAGE=gdb |
4802 | ||
4803 | cat >>confdefs.h <<_ACEOF | |
4804 | #define PACKAGE "$PACKAGE" | |
4805 | _ACEOF | |
4806 | ||
4807 | ||
4808 | ||
4809 | # We never need to detect it in this sub-configure. | |
4810 | # But preserve it for config.status --recheck. | |
4811 | ||
4812 | ||
4813 | ||
4814 | MAKEINFO_EXTRA_FLAGS="" | |
4815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
4816 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
4817 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
4818 | $as_echo_n "(cached) " >&6 | |
4819 | else | |
4820 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
4821 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
4822 | gdb_cv_have_makeinfo_click=yes | |
4823 | else | |
4824 | gdb_cv_have_makeinfo_click=no | |
4825 | fi | |
4826 | fi | |
4827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
4828 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
4829 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
4830 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
4831 | fi | |
e28b3332 DJ |
4832 | |
4833 | ||
bec39cab AC |
4834 | |
4835 | ||
81ecdfbb RW |
4836 | # Check whether --with-separate-debug-dir was given. |
4837 | if test "${with_separate_debug_dir+set}" = set; then : | |
4838 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
4839 | DEBUGDIR=$withval |
4840 | else | |
4841 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
4842 | fi |
4843 | ||
20e95c23 | 4844 | |
783e057b DJ |
4845 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4846 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 4847 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 4848 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 4849 | |
783e057b DJ |
4850 | cat >>confdefs.h <<_ACEOF |
4851 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 4852 | _ACEOF |
20e95c23 | 4853 | |
20e95c23 | 4854 | |
20e95c23 | 4855 | |
0c4a4063 | 4856 | |
b14b1491 TT |
4857 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4858 | if test "x$prefix" = xNONE; then | |
4859 | test_prefix=/usr/local | |
4860 | else | |
4861 | test_prefix=$prefix | |
4862 | fi | |
783e057b | 4863 | else |
b14b1491 | 4864 | test_prefix=$exec_prefix |
783e057b | 4865 | fi |
b14b1491 TT |
4866 | value=0 |
4867 | case ${ac_define_dir} in | |
4868 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4869 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4870 | value=1 | |
4871 | ;; | |
4872 | esac | |
4873 | ||
4874 | cat >>confdefs.h <<_ACEOF | |
4875 | #define DEBUGDIR_RELOCATABLE $value | |
4876 | _ACEOF | |
4877 | ||
4878 | ||
4879 | ||
0c4a4063 | 4880 | |
f83d8a90 DE |
4881 | # We can't pass paths as command line arguments. |
4882 | # Mingw32 tries to be clever and will convert the paths for us. | |
4883 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
4884 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
4885 | # This breaks GDB's relocatable path conversions since paths passed in | |
4886 | # config.h would not get so translated, the path prefixes no longer match. | |
4887 | ||
4888 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4889 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4890 | ac_define_dir=`eval echo $bindir` | |
4891 | ac_define_dir=`eval echo $ac_define_dir` | |
4892 | ||
4893 | cat >>confdefs.h <<_ACEOF | |
4894 | #define BINDIR "$ac_define_dir" | |
4895 | _ACEOF | |
4896 | ||
4897 | ||
4898 | ||
b14b1491 TT |
4899 | # GDB's datadir relocation |
4900 | ||
4901 | ||
4902 | ||
81ecdfbb RW |
4903 | # Check whether --with-gdb-datadir was given. |
4904 | if test "${with_gdb_datadir+set}" = set; then : | |
4905 | withval=$with_gdb_datadir; | |
b14b1491 | 4906 | GDB_DATADIR=$withval |
20e95c23 | 4907 | else |
b14b1491 | 4908 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
4909 | fi |
4910 | ||
20e95c23 | 4911 | |
b14b1491 TT |
4912 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4913 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4914 | ac_define_dir=`eval echo $GDB_DATADIR` | |
4915 | ac_define_dir=`eval echo $ac_define_dir` | |
4916 | ||
4917 | cat >>confdefs.h <<_ACEOF | |
4918 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
4919 | _ACEOF |
4920 | ||
b14b1491 TT |
4921 | |
4922 | ||
0c4a4063 | 4923 | |
b14b1491 TT |
4924 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4925 | if test "x$prefix" = xNONE; then | |
4926 | test_prefix=/usr/local | |
4927 | else | |
4928 | test_prefix=$prefix | |
4929 | fi | |
4930 | else | |
4931 | test_prefix=$exec_prefix | |
4932 | fi | |
4933 | value=0 | |
4934 | case ${ac_define_dir} in | |
4935 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4936 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4937 | value=1 | |
4938 | ;; | |
4939 | esac | |
4940 | ||
4941 | cat >>confdefs.h <<_ACEOF | |
4942 | #define GDB_DATADIR_RELOCATABLE $value | |
4943 | _ACEOF | |
4944 | ||
4945 | ||
783e057b | 4946 | |
20e95c23 | 4947 | |
0c4a4063 | 4948 | |
81ecdfbb RW |
4949 | # Check whether --with-relocated-sources was given. |
4950 | if test "${with_relocated_sources+set}" = set; then : | |
4951 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
4952 | |
4953 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4954 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4955 | ac_define_dir=`eval echo $reloc_srcdir` | |
4956 | ac_define_dir=`eval echo $ac_define_dir` | |
4957 | ||
4958 | cat >>confdefs.h <<_ACEOF | |
4959 | #define RELOC_SRCDIR "$ac_define_dir" | |
4960 | _ACEOF | |
4961 | ||
4962 | ||
4963 | ||
81ecdfbb RW |
4964 | fi |
4965 | ||
29b0e8a2 | 4966 | |
7349ff92 JK |
4967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
4968 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
4969 | ||
4970 | # Check whether --with-auto-load-dir was given. | |
4971 | if test "${with_auto_load_dir+set}" = set; then : | |
4972 | withval=$with_auto_load_dir; | |
4973 | else | |
4974 | with_auto_load_dir='$ddir/auto-load' | |
4975 | fi | |
4976 | ||
4977 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]ddir\>/\\\\\\\\\\\\&/g'` | |
4978 | ||
4979 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4980 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4981 | ac_define_dir=`eval echo $escape_dir` | |
4982 | ac_define_dir=`eval echo $ac_define_dir` | |
4983 | ||
4984 | cat >>confdefs.h <<_ACEOF | |
4985 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
4986 | _ACEOF | |
4987 | ||
4988 | ||
4989 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
4990 | $as_echo "$with_auto_load_dir" >&6; } | |
4991 | ||
bccbefd2 JK |
4992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
4993 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
4994 | ||
4995 | # Check whether --with-auto-load-safe-path was given. | |
4996 | if test "${with_auto_load_safe_path+set}" = set; then : | |
4997 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
4998 | with_auto_load_safe_path="/" |
4999 | fi | |
bccbefd2 | 5000 | else |
7349ff92 | 5001 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5002 | fi |
5003 | ||
6dea1fbd | 5004 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]ddir\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5005 | |
5006 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5007 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5008 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5009 | ac_define_dir=`eval echo $ac_define_dir` |
5010 | ||
5011 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5012 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5013 | _ACEOF |
5014 | ||
5015 | ||
5016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5017 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5018 | ||
29b0e8a2 | 5019 | |
20e95c23 | 5020 | |
5ae98d25 | 5021 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5022 | |
5023 | ||
783e057b | 5024 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5025 | # Check whether --enable-targets was given. |
5026 | if test "${enable_targets+set}" = set; then : | |
5027 | enableval=$enable_targets; case "${enableval}" in | |
5028 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5029 | ;; |
5030 | no) enable_targets= ;; | |
5031 | *) enable_targets=$enableval ;; | |
5032 | esac | |
81ecdfbb RW |
5033 | fi |
5034 | ||
20e95c23 | 5035 | |
783e057b | 5036 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5037 | # Check whether --enable-64-bit-bfd was given. |
5038 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5039 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5040 | yes) want64=true ;; |
5041 | no) want64=false ;; | |
81ecdfbb | 5042 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5043 | esac |
5044 | else | |
5045 | want64=false | |
81ecdfbb RW |
5046 | fi |
5047 | ||
783e057b DJ |
5048 | # Provide defaults for some variables set by the per-host and per-target |
5049 | # configuration. | |
5050 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5051 | |
783e057b DJ |
5052 | if test "${target}" = "${host}"; then |
5053 | gdb_native=yes | |
5054 | else | |
5055 | gdb_native=no | |
5056 | fi | |
20e95c23 | 5057 | |
783e057b | 5058 | . $srcdir/configure.host |
20e95c23 | 5059 | |
783e057b | 5060 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5061 | |
783e057b DJ |
5062 | TARGET_OBS= |
5063 | all_targets= | |
20e95c23 | 5064 | |
783e057b | 5065 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5066 | do |
783e057b DJ |
5067 | if test "$targ_alias" = "all"; then |
5068 | all_targets=true | |
5069 | else | |
5070 | # Canonicalize the secondary target names. | |
5071 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5072 | if test -n "$result"; then | |
5073 | targ=$result | |
5074 | else | |
5075 | targ=$targ_alias | |
5076 | fi | |
20e95c23 | 5077 | |
783e057b | 5078 | . ${srcdir}/configure.tgt |
20e95c23 | 5079 | |
bf307134 JB |
5080 | if test -z "${gdb_target_obs}"; then : |
5081 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5082 | fi | |
5083 | ||
783e057b DJ |
5084 | # Target-specific object files |
5085 | for i in ${gdb_target_obs}; do | |
5086 | case " $TARGET_OBS " in | |
5087 | *" ${i} "*) ;; | |
5088 | *) | |
5089 | TARGET_OBS="$TARGET_OBS ${i}" | |
5090 | ;; | |
5091 | esac | |
5092 | done | |
20e95c23 | 5093 | |
783e057b DJ |
5094 | # Check whether this target needs 64-bit CORE_ADDR |
5095 | if test x${want64} = xfalse; then | |
5096 | . ${srcdir}/../bfd/config.bfd | |
5097 | fi | |
5098 | fi | |
20e95c23 DJ |
5099 | done |
5100 | ||
783e057b DJ |
5101 | if test x${all_targets} = xtrue; then |
5102 | ||
5103 | # We want all 64-bit targets if we either: | |
5104 | # - run on a 64-bit host or | |
5105 | # - already require 64-bit support for some other target or | |
5106 | # - the --enable-64-bit-bfd option was supplied | |
5107 | # Otherwise we only support all 32-bit targets. | |
5108 | # | |
5109 | # NOTE: This test must be in sync with the corresponding | |
5110 | # tests in BFD! | |
20e95c23 | 5111 | |
783e057b | 5112 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5113 | # The cast to long int works around a bug in the HP C Compiler |
5114 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5115 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5116 | # This bug is HP SR number 8606223364. | |
5117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5118 | $as_echo_n "checking size of long... " >&6; } | |
5119 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5120 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5121 | else |
81ecdfbb | 5122 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5123 | |
81ecdfbb RW |
5124 | else |
5125 | if test "$ac_cv_type_long" = yes; then | |
5126 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5127 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5128 | { as_fn_set_status 77 | |
5129 | as_fn_error "cannot compute sizeof (long) | |
5130 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5131 | else | |
5132 | ac_cv_sizeof_long=0 | |
5133 | fi | |
c0993dbe | 5134 | fi |
81ecdfbb | 5135 | |
c0993dbe | 5136 | fi |
81ecdfbb RW |
5137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5138 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5139 | |
c0993dbe | 5140 | |
c0993dbe | 5141 | |
c0993dbe UW |
5142 | cat >>confdefs.h <<_ACEOF |
5143 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5144 | _ACEOF | |
5145 | ||
5146 | ||
5147 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5148 | want64=true | |
5149 | fi | |
5150 | fi | |
5151 | if test x${want64} = xtrue; then | |
5152 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5153 | else | |
5154 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5155 | fi | |
5156 | fi | |
5157 | ||
5158 | ||
5159 | ||
5160 | # For other settings, only the main target counts. | |
5161 | gdb_sim= | |
5162 | gdb_osabi= | |
5163 | build_gdbserver= | |
5164 | targ=$target; . ${srcdir}/configure.tgt | |
5165 | ||
5166 | # Fetch the default architecture and default target vector from BFD. | |
5167 | targ=$target; . $srcdir/../bfd/config.bfd | |
5168 | ||
5169 | # We only want the first architecture, so strip off the others if | |
5170 | # there is more than one. | |
5171 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5172 | ||
5173 | if test "x$targ_archs" != x; then | |
5174 | ||
5175 | cat >>confdefs.h <<_ACEOF | |
5176 | #define DEFAULT_BFD_ARCH $targ_archs | |
5177 | _ACEOF | |
5178 | ||
5179 | fi | |
5180 | if test "x$targ_defvec" != x; then | |
5181 | ||
5182 | cat >>confdefs.h <<_ACEOF | |
5183 | #define DEFAULT_BFD_VEC $targ_defvec | |
5184 | _ACEOF | |
5185 | ||
5186 | fi | |
5187 | ||
c0993dbe UW |
5188 | # The CLI cannot be disabled yet, but may be in the future. |
5189 | ||
5190 | # Enable CLI. | |
81ecdfbb RW |
5191 | # Check whether --enable-gdbcli was given. |
5192 | if test "${enable_gdbcli+set}" = set; then : | |
5193 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5194 | yes) |
5195 | ;; | |
5196 | no) | |
81ecdfbb | 5197 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5198 | *) |
81ecdfbb | 5199 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5200 | esac |
5201 | else | |
5202 | enable_gdbcli=yes | |
81ecdfbb RW |
5203 | fi |
5204 | ||
c0993dbe UW |
5205 | if test x"$enable_gdbcli" = xyes; then |
5206 | if test -d $srcdir/cli; then | |
5207 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5208 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5209 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5210 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5211 | fi | |
5212 | fi | |
5213 | ||
5214 | # Enable MI. | |
81ecdfbb RW |
5215 | # Check whether --enable-gdbmi was given. |
5216 | if test "${enable_gdbmi+set}" = set; then : | |
5217 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5218 | yes | no) |
5219 | ;; | |
5220 | *) | |
81ecdfbb | 5221 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5222 | esac |
5223 | else | |
5224 | enable_gdbmi=yes | |
81ecdfbb RW |
5225 | fi |
5226 | ||
c0993dbe UW |
5227 | if test x"$enable_gdbmi" = xyes; then |
5228 | if test -d $srcdir/mi; then | |
5229 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5230 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5231 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5232 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5233 | fi | |
5234 | fi | |
5235 | ||
5236 | # Enable TUI. | |
81ecdfbb RW |
5237 | # Check whether --enable-tui was given. |
5238 | if test "${enable_tui+set}" = set; then : | |
5239 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5240 | yes | no | auto) |
c0993dbe UW |
5241 | ;; |
5242 | *) | |
81ecdfbb | 5243 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5244 | esac |
5245 | else | |
3ca64bd3 | 5246 | enable_tui=auto |
81ecdfbb RW |
5247 | fi |
5248 | ||
c0993dbe UW |
5249 | |
5250 | # Enable gdbtk. | |
81ecdfbb RW |
5251 | # Check whether --enable-gdbtk was given. |
5252 | if test "${enable_gdbtk+set}" = set; then : | |
5253 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5254 | yes | no) |
5255 | ;; | |
5256 | *) | |
81ecdfbb | 5257 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5258 | esac |
5259 | else | |
5062cc19 | 5260 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5261 | enable_gdbtk=yes |
5262 | else | |
5263 | enable_gdbtk=no | |
5264 | fi | |
81ecdfbb RW |
5265 | fi |
5266 | ||
c0993dbe UW |
5267 | # We unconditionally disable gdbtk tests on selected platforms. |
5268 | case $host_os in | |
5269 | go32* | windows*) | |
81ecdfbb RW |
5270 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5271 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5272 | enable_gdbtk=no ;; |
5273 | esac | |
5274 | ||
05e7c244 | 5275 | # Libunwind support for ia64. |
bec39cab | 5276 | |
05e7c244 JK |
5277 | |
5278 | # Check whether --with-libunwind-ia64 was given. | |
5279 | if test "${with_libunwind_ia64+set}" = set; then : | |
5280 | withval=$with_libunwind_ia64; | |
bec39cab | 5281 | else |
05e7c244 JK |
5282 | with_libunwind_ia64=auto |
5283 | fi | |
bec39cab | 5284 | |
05e7c244 JK |
5285 | |
5286 | # Backward compatibility option. | |
5287 | if test "${with_libunwind+set}" = set; then | |
5288 | if test x"$with_libunwind_ia64" != xauto; then | |
5289 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5290 | fi | |
5291 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5292 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5293 | with_libunwind_ia64="$with_libunwind" | |
5294 | fi | |
5295 | ||
5296 | case "$with_libunwind_ia64" in | |
5297 | yes | no) | |
5298 | ;; | |
5299 | auto) | |
5300 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5301 | do : |
b54a8fd7 PA |
5302 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5303 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5304 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5305 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5306 | _ACEOF |
5307 | ||
5308 | fi | |
5309 | ||
5310 | done | |
5311 | ||
05e7c244 JK |
5312 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5313 | ;; | |
5314 | *) | |
5315 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5316 | ;; | |
5317 | esac | |
bec39cab | 5318 | |
05e7c244 | 5319 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5320 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5321 | do : |
b54a8fd7 PA |
5322 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5323 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5324 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5325 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5326 | _ACEOF |
5327 | ||
5328 | fi | |
5329 | ||
5330 | done | |
5331 | ||
05e7c244 JK |
5332 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5333 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5334 | fi | |
5335 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5336 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5337 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5338 | fi |
5339 | ||
cb01cfba JB |
5340 | opt_curses=no |
5341 | ||
81ecdfbb RW |
5342 | # Check whether --with-curses was given. |
5343 | if test "${with_curses+set}" = set; then : | |
5344 | withval=$with_curses; opt_curses=$withval | |
5345 | fi | |
5346 | ||
cb01cfba | 5347 | |
76a39ba7 | 5348 | prefer_curses=no |
cb01cfba | 5349 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5350 | prefer_curses=yes |
cb01cfba JB |
5351 | fi |
5352 | ||
a9322a30 | 5353 | # Profiling support. |
81ecdfbb RW |
5354 | # Check whether --enable-profiling was given. |
5355 | if test "${enable_profiling+set}" = set; then : | |
5356 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5357 | yes | no) |
5358 | ;; | |
5359 | *) | |
81ecdfbb | 5360 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5361 | esac |
5362 | else | |
5363 | enable_profiling=no | |
81ecdfbb | 5364 | fi |
bec39cab | 5365 | |
a9322a30 TT |
5366 | |
5367 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5368 | do : |
5369 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5370 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5371 | eval as_val=\$$as_ac_var | |
5372 | if test "x$as_val" = x""yes; then : | |
5373 | cat >>confdefs.h <<_ACEOF | |
5374 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5375 | _ACEOF |
a9322a30 | 5376 | |
81ecdfbb RW |
5377 | fi |
5378 | done | |
a9322a30 | 5379 | |
81ecdfbb RW |
5380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5381 | $as_echo_n "checking for _etext... " >&6; } | |
5382 | if test "${ac_cv_var__etext+set}" = set; then : | |
5383 | $as_echo_n "(cached) " >&6 | |
5384 | else | |
5385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5386 | /* end confdefs.h. */ | |
5387 | #include <stdlib.h> | |
5388 | extern char _etext; | |
a9322a30 TT |
5389 | |
5390 | int | |
5391 | main () | |
5392 | { | |
5393 | free (&_etext); | |
5394 | ; | |
5395 | return 0; | |
5396 | } | |
bec39cab | 5397 | _ACEOF |
81ecdfbb | 5398 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5399 | ac_cv_var__etext=yes |
bec39cab | 5400 | else |
81ecdfbb | 5401 | ac_cv_var__etext=no |
bec39cab | 5402 | fi |
81ecdfbb RW |
5403 | rm -f core conftest.err conftest.$ac_objext \ |
5404 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5405 | fi |
81ecdfbb RW |
5406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5407 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5408 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5409 | |
81ecdfbb | 5410 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5411 | |
bec39cab | 5412 | fi |
81ecdfbb RW |
5413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5414 | $as_echo_n "checking for etext... " >&6; } | |
5415 | if test "${ac_cv_var_etext+set}" = set; then : | |
5416 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5417 | else |
81ecdfbb | 5418 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5419 | /* end confdefs.h. */ |
a9322a30 TT |
5420 | #include <stdlib.h> |
5421 | extern char etext; | |
bec39cab AC |
5422 | |
5423 | int | |
5424 | main () | |
5425 | { | |
a9322a30 | 5426 | free (&etext); |
bec39cab AC |
5427 | ; |
5428 | return 0; | |
5429 | } | |
5430 | _ACEOF | |
81ecdfbb | 5431 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5432 | ac_cv_var_etext=yes |
bec39cab | 5433 | else |
81ecdfbb | 5434 | ac_cv_var_etext=no |
bec39cab | 5435 | fi |
81ecdfbb RW |
5436 | rm -f core conftest.err conftest.$ac_objext \ |
5437 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5438 | fi |
81ecdfbb RW |
5439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5440 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5441 | if test $ac_cv_var_etext = yes; then |
5442 | ||
81ecdfbb | 5443 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5444 | |
5445 | fi | |
a9322a30 TT |
5446 | if test "$enable_profiling" = yes ; then |
5447 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5448 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5449 | fi |
5450 | PROFILE_CFLAGS=-pg | |
5451 | OLD_CFLAGS="$CFLAGS" | |
5452 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5453 | |
81ecdfbb RW |
5454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5455 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5456 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5457 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5458 | else |
81ecdfbb | 5459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5460 | /* end confdefs.h. */ |
bec39cab AC |
5461 | |
5462 | int | |
5463 | main () | |
5464 | { | |
a9322a30 | 5465 | int x; |
bec39cab AC |
5466 | ; |
5467 | return 0; | |
5468 | } | |
5469 | _ACEOF | |
81ecdfbb | 5470 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5471 | ac_cv_cc_supports_pg=yes |
bec39cab | 5472 | else |
81ecdfbb | 5473 | ac_cv_cc_supports_pg=no |
bec39cab | 5474 | fi |
81ecdfbb | 5475 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5476 | fi |
81ecdfbb RW |
5477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5478 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5479 | |
a9322a30 | 5480 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5481 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5482 | fi |
bec39cab | 5483 | |
a9322a30 | 5484 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5485 | fi |
5486 | ||
c16158bc JM |
5487 | |
5488 | ||
81ecdfbb RW |
5489 | # Check whether --with-pkgversion was given. |
5490 | if test "${with_pkgversion+set}" = set; then : | |
5491 | withval=$with_pkgversion; case "$withval" in | |
5492 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5493 | no) PKGVERSION= ;; |
5494 | *) PKGVERSION="($withval) " ;; | |
5495 | esac | |
5496 | else | |
5497 | PKGVERSION="(GDB) " | |
5498 | ||
81ecdfbb | 5499 | fi |
c16158bc JM |
5500 | |
5501 | ||
5502 | ||
5503 | ||
81ecdfbb RW |
5504 | |
5505 | # Check whether --with-bugurl was given. | |
5506 | if test "${with_bugurl+set}" = set; then : | |
5507 | withval=$with_bugurl; case "$withval" in | |
5508 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5509 | no) BUGURL= |
5510 | ;; | |
5511 | *) BUGURL="$withval" | |
5512 | ;; | |
5513 | esac | |
5514 | else | |
5515 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5516 | ||
81ecdfbb RW |
5517 | fi |
5518 | ||
c16158bc JM |
5519 | case ${BUGURL} in |
5520 | "") | |
5521 | REPORT_BUGS_TO= | |
5522 | REPORT_BUGS_TEXI= | |
5523 | ;; | |
5524 | *) | |
5525 | REPORT_BUGS_TO="<$BUGURL>" | |
5526 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5527 | ;; | |
5528 | esac; | |
5529 | ||
5530 | ||
5531 | ||
5532 | ||
5533 | cat >>confdefs.h <<_ACEOF | |
5534 | #define PKGVERSION "$PKGVERSION" | |
5535 | _ACEOF | |
5536 | ||
5537 | ||
5538 | cat >>confdefs.h <<_ACEOF | |
5539 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5540 | _ACEOF | |
5541 | ||
5542 | ||
bec39cab AC |
5543 | # --------------------- # |
5544 | # Checks for programs. # | |
5545 | # --------------------- # | |
5546 | ||
5547 | for ac_prog in gawk mawk nawk awk | |
5548 | do | |
5549 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5550 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5552 | $as_echo_n "checking for $ac_word... " >&6; } | |
5553 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5554 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5555 | else |
5556 | if test -n "$AWK"; then | |
5557 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5558 | else | |
5559 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5560 | for as_dir in $PATH | |
5561 | do | |
5562 | IFS=$as_save_IFS | |
5563 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5564 | for ac_exec_ext in '' $ac_executable_extensions; do |
5565 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5566 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5567 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5568 | break 2 |
5569 | fi | |
5570 | done | |
81ecdfbb RW |
5571 | done |
5572 | IFS=$as_save_IFS | |
bec39cab AC |
5573 | |
5574 | fi | |
5575 | fi | |
5576 | AWK=$ac_cv_prog_AWK | |
5577 | if test -n "$AWK"; then | |
81ecdfbb RW |
5578 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5579 | $as_echo "$AWK" >&6; } | |
bec39cab | 5580 | else |
81ecdfbb RW |
5581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5582 | $as_echo "no" >&6; } | |
bec39cab AC |
5583 | fi |
5584 | ||
bec39cab | 5585 | |
81ecdfbb | 5586 | test -n "$AWK" && break |
bec39cab AC |
5587 | done |
5588 | ||
c971b7fa PA |
5589 | # Find a good install program. We prefer a C program (faster), |
5590 | # so one script is as good as another. But avoid the broken or | |
5591 | # incompatible versions: | |
5592 | # SysV /etc/install, /usr/sbin/install | |
5593 | # SunOS /usr/etc/install | |
5594 | # IRIX /sbin/install | |
5595 | # AIX /bin/install | |
5596 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5597 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5598 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5599 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5600 | # OS/2's system install, which has a completely different semantic | |
5601 | # ./install, which can be erroneously created by make from ./install.sh. | |
5602 | # Reject install programs that cannot install multiple files. | |
5603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5604 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5605 | if test -z "$INSTALL"; then | |
5606 | if test "${ac_cv_path_install+set}" = set; then : | |
5607 | $as_echo_n "(cached) " >&6 | |
5608 | else | |
5609 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5610 | for as_dir in $PATH | |
5611 | do | |
5612 | IFS=$as_save_IFS | |
5613 | test -z "$as_dir" && as_dir=. | |
5614 | # Account for people who put trailing slashes in PATH elements. | |
5615 | case $as_dir/ in #(( | |
5616 | ./ | .// | /[cC]/* | \ | |
5617 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5618 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5619 | /usr/ucb/* ) ;; | |
5620 | *) | |
5621 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5622 | # Don't use installbsd from OSF since it installs stuff as root | |
5623 | # by default. | |
5624 | for ac_prog in ginstall scoinst install; do | |
5625 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5626 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5627 | if test $ac_prog = install && | |
5628 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5629 | # AIX install. It has an incompatible calling convention. | |
5630 | : | |
5631 | elif test $ac_prog = install && | |
5632 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5633 | # program-specific install script used by HP pwplus--don't use. | |
5634 | : | |
5635 | else | |
5636 | rm -rf conftest.one conftest.two conftest.dir | |
5637 | echo one > conftest.one | |
5638 | echo two > conftest.two | |
5639 | mkdir conftest.dir | |
5640 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5641 | test -s conftest.one && test -s conftest.two && | |
5642 | test -s conftest.dir/conftest.one && | |
5643 | test -s conftest.dir/conftest.two | |
5644 | then | |
5645 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5646 | break 3 | |
5647 | fi | |
5648 | fi | |
5649 | fi | |
5650 | done | |
5651 | done | |
5652 | ;; | |
5653 | esac | |
5654 | ||
5655 | done | |
5656 | IFS=$as_save_IFS | |
5657 | ||
5658 | rm -rf conftest.one conftest.two conftest.dir | |
5659 | ||
5660 | fi | |
5661 | if test "${ac_cv_path_install+set}" = set; then | |
5662 | INSTALL=$ac_cv_path_install | |
5663 | else | |
5664 | # As a last resort, use the slow shell script. Don't cache a | |
5665 | # value for INSTALL within a source directory, because that will | |
5666 | # break other packages using the cache if that directory is | |
5667 | # removed, or if the value is a relative name. | |
5668 | INSTALL=$ac_install_sh | |
5669 | fi | |
5670 | fi | |
5671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5672 | $as_echo "$INSTALL" >&6; } | |
5673 | ||
5674 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5675 | # It thinks the first close brace ends the variable substitution. | |
5676 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5677 | ||
5678 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5679 | ||
5680 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5681 | |
81ecdfbb RW |
5682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5683 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5684 | LN_S=$as_ln_s |
5685 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5687 | $as_echo "yes" >&6; } | |
bec39cab | 5688 | else |
81ecdfbb RW |
5689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5690 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5691 | fi |
5692 | ||
5693 | if test -n "$ac_tool_prefix"; then | |
5694 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5695 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5697 | $as_echo_n "checking for $ac_word... " >&6; } | |
5698 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5699 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5700 | else |
5701 | if test -n "$RANLIB"; then | |
5702 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5703 | else | |
5704 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5705 | for as_dir in $PATH | |
5706 | do | |
5707 | IFS=$as_save_IFS | |
5708 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5709 | for ac_exec_ext in '' $ac_executable_extensions; do |
5710 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5711 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5712 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5713 | break 2 |
5714 | fi | |
5715 | done | |
81ecdfbb RW |
5716 | done |
5717 | IFS=$as_save_IFS | |
bec39cab AC |
5718 | |
5719 | fi | |
5720 | fi | |
5721 | RANLIB=$ac_cv_prog_RANLIB | |
5722 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5724 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5725 | else |
81ecdfbb RW |
5726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5727 | $as_echo "no" >&6; } | |
bec39cab AC |
5728 | fi |
5729 | ||
81ecdfbb | 5730 | |
bec39cab AC |
5731 | fi |
5732 | if test -z "$ac_cv_prog_RANLIB"; then | |
5733 | ac_ct_RANLIB=$RANLIB | |
5734 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5735 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5737 | $as_echo_n "checking for $ac_word... " >&6; } | |
5738 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5739 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5740 | else |
5741 | if test -n "$ac_ct_RANLIB"; then | |
5742 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5743 | else | |
5744 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5745 | for as_dir in $PATH | |
5746 | do | |
5747 | IFS=$as_save_IFS | |
5748 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5749 | for ac_exec_ext in '' $ac_executable_extensions; do |
5750 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5751 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5752 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5753 | break 2 |
5754 | fi | |
5755 | done | |
81ecdfbb RW |
5756 | done |
5757 | IFS=$as_save_IFS | |
bec39cab | 5758 | |
bec39cab AC |
5759 | fi |
5760 | fi | |
5761 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5762 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
5763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
5764 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 5765 | else |
81ecdfbb RW |
5766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5767 | $as_echo "no" >&6; } | |
bec39cab AC |
5768 | fi |
5769 | ||
81ecdfbb RW |
5770 | if test "x$ac_ct_RANLIB" = x; then |
5771 | RANLIB=":" | |
5772 | else | |
5773 | case $cross_compiling:$ac_tool_warned in | |
5774 | yes:) | |
5775 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5776 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5777 | ac_tool_warned=yes ;; | |
5778 | esac | |
5779 | RANLIB=$ac_ct_RANLIB | |
5780 | fi | |
bec39cab AC |
5781 | else |
5782 | RANLIB="$ac_cv_prog_RANLIB" | |
5783 | fi | |
5784 | ||
5785 | for ac_prog in 'bison -y' byacc | |
5786 | do | |
5787 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5788 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5790 | $as_echo_n "checking for $ac_word... " >&6; } | |
5791 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
5792 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5793 | else |
5794 | if test -n "$YACC"; then | |
5795 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5796 | else | |
5797 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5798 | for as_dir in $PATH | |
5799 | do | |
5800 | IFS=$as_save_IFS | |
5801 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5802 | for ac_exec_ext in '' $ac_executable_extensions; do |
5803 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5804 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 5805 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5806 | break 2 |
5807 | fi | |
5808 | done | |
81ecdfbb RW |
5809 | done |
5810 | IFS=$as_save_IFS | |
bec39cab AC |
5811 | |
5812 | fi | |
5813 | fi | |
5814 | YACC=$ac_cv_prog_YACC | |
5815 | if test -n "$YACC"; then | |
81ecdfbb RW |
5816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
5817 | $as_echo "$YACC" >&6; } | |
bec39cab | 5818 | else |
81ecdfbb RW |
5819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5820 | $as_echo "no" >&6; } | |
bec39cab AC |
5821 | fi |
5822 | ||
81ecdfbb | 5823 | |
bec39cab AC |
5824 | test -n "$YACC" && break |
5825 | done | |
5826 | test -n "$YACC" || YACC="yacc" | |
5827 | ||
5828 | ||
5829 | if test -n "$ac_tool_prefix"; then | |
5830 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5831 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
5832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5833 | $as_echo_n "checking for $ac_word... " >&6; } | |
5834 | if test "${ac_cv_prog_AR+set}" = set; then : | |
5835 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5836 | else |
5837 | if test -n "$AR"; then | |
5838 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5839 | else | |
5840 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5841 | for as_dir in $PATH | |
5842 | do | |
5843 | IFS=$as_save_IFS | |
5844 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5845 | for ac_exec_ext in '' $ac_executable_extensions; do |
5846 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5847 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 5848 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5849 | break 2 |
5850 | fi | |
5851 | done | |
81ecdfbb RW |
5852 | done |
5853 | IFS=$as_save_IFS | |
bec39cab AC |
5854 | |
5855 | fi | |
5856 | fi | |
5857 | AR=$ac_cv_prog_AR | |
5858 | if test -n "$AR"; then | |
81ecdfbb RW |
5859 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
5860 | $as_echo "$AR" >&6; } | |
bec39cab | 5861 | else |
81ecdfbb RW |
5862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5863 | $as_echo "no" >&6; } | |
bec39cab AC |
5864 | fi |
5865 | ||
81ecdfbb | 5866 | |
bec39cab AC |
5867 | fi |
5868 | if test -z "$ac_cv_prog_AR"; then | |
5869 | ac_ct_AR=$AR | |
5870 | # Extract the first word of "ar", so it can be a program name with args. | |
5871 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
5872 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5873 | $as_echo_n "checking for $ac_word... " >&6; } | |
5874 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
5875 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5876 | else |
5877 | if test -n "$ac_ct_AR"; then | |
5878 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5879 | else | |
5880 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5881 | for as_dir in $PATH | |
5882 | do | |
5883 | IFS=$as_save_IFS | |
5884 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5885 | for ac_exec_ext in '' $ac_executable_extensions; do |
5886 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5887 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 5888 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5889 | break 2 |
5890 | fi | |
5891 | done | |
81ecdfbb RW |
5892 | done |
5893 | IFS=$as_save_IFS | |
bec39cab AC |
5894 | |
5895 | fi | |
5896 | fi | |
5897 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
5898 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
5899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
5900 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 5901 | else |
81ecdfbb RW |
5902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5903 | $as_echo "no" >&6; } | |
bec39cab AC |
5904 | fi |
5905 | ||
81ecdfbb RW |
5906 | if test "x$ac_ct_AR" = x; then |
5907 | AR="" | |
5908 | else | |
5909 | case $cross_compiling:$ac_tool_warned in | |
5910 | yes:) | |
5911 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5912 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5913 | ac_tool_warned=yes ;; | |
5914 | esac | |
5915 | AR=$ac_ct_AR | |
5916 | fi | |
bec39cab AC |
5917 | else |
5918 | AR="$ac_cv_prog_AR" | |
5919 | fi | |
5920 | ||
5921 | if test -n "$ac_tool_prefix"; then | |
5922 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
5923 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
5924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5925 | $as_echo_n "checking for $ac_word... " >&6; } | |
5926 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
5927 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5928 | else |
5929 | if test -n "$DLLTOOL"; then | |
5930 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
5931 | else | |
5932 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5933 | for as_dir in $PATH | |
5934 | do | |
5935 | IFS=$as_save_IFS | |
5936 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5937 | for ac_exec_ext in '' $ac_executable_extensions; do |
5938 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5939 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 5940 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5941 | break 2 |
5942 | fi | |
5943 | done | |
81ecdfbb RW |
5944 | done |
5945 | IFS=$as_save_IFS | |
bec39cab AC |
5946 | |
5947 | fi | |
5948 | fi | |
5949 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
5950 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
5951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
5952 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 5953 | else |
81ecdfbb RW |
5954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5955 | $as_echo "no" >&6; } | |
bec39cab AC |
5956 | fi |
5957 | ||
81ecdfbb | 5958 | |
bec39cab AC |
5959 | fi |
5960 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
5961 | ac_ct_DLLTOOL=$DLLTOOL | |
5962 | # Extract the first word of "dlltool", so it can be a program name with args. | |
5963 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
5964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5965 | $as_echo_n "checking for $ac_word... " >&6; } | |
5966 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
5967 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5968 | else |
5969 | if test -n "$ac_ct_DLLTOOL"; then | |
5970 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
5971 | else | |
5972 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5973 | for as_dir in $PATH | |
5974 | do | |
5975 | IFS=$as_save_IFS | |
5976 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5977 | for ac_exec_ext in '' $ac_executable_extensions; do |
5978 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5979 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 5980 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5981 | break 2 |
5982 | fi | |
5983 | done | |
81ecdfbb RW |
5984 | done |
5985 | IFS=$as_save_IFS | |
bec39cab AC |
5986 | |
5987 | fi | |
5988 | fi | |
5989 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
5990 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
5991 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
5992 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 5993 | else |
81ecdfbb RW |
5994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5995 | $as_echo "no" >&6; } | |
bec39cab AC |
5996 | fi |
5997 | ||
81ecdfbb RW |
5998 | if test "x$ac_ct_DLLTOOL" = x; then |
5999 | DLLTOOL="" | |
6000 | else | |
6001 | case $cross_compiling:$ac_tool_warned in | |
6002 | yes:) | |
6003 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6004 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6005 | ac_tool_warned=yes ;; | |
6006 | esac | |
6007 | DLLTOOL=$ac_ct_DLLTOOL | |
6008 | fi | |
bec39cab AC |
6009 | else |
6010 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6011 | fi | |
6012 | ||
6013 | if test -n "$ac_tool_prefix"; then | |
6014 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6015 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6017 | $as_echo_n "checking for $ac_word... " >&6; } | |
6018 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6019 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6020 | else |
6021 | if test -n "$WINDRES"; then | |
6022 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6023 | else | |
6024 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6025 | for as_dir in $PATH | |
6026 | do | |
6027 | IFS=$as_save_IFS | |
6028 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6029 | for ac_exec_ext in '' $ac_executable_extensions; do |
6030 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6031 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6032 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6033 | break 2 |
6034 | fi | |
6035 | done | |
81ecdfbb RW |
6036 | done |
6037 | IFS=$as_save_IFS | |
bec39cab AC |
6038 | |
6039 | fi | |
6040 | fi | |
6041 | WINDRES=$ac_cv_prog_WINDRES | |
6042 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6044 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6045 | else |
81ecdfbb RW |
6046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6047 | $as_echo "no" >&6; } | |
bec39cab AC |
6048 | fi |
6049 | ||
81ecdfbb | 6050 | |
bec39cab AC |
6051 | fi |
6052 | if test -z "$ac_cv_prog_WINDRES"; then | |
6053 | ac_ct_WINDRES=$WINDRES | |
6054 | # Extract the first word of "windres", so it can be a program name with args. | |
6055 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6057 | $as_echo_n "checking for $ac_word... " >&6; } | |
6058 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6059 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6060 | else |
6061 | if test -n "$ac_ct_WINDRES"; then | |
6062 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6063 | else | |
6064 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6065 | for as_dir in $PATH | |
6066 | do | |
6067 | IFS=$as_save_IFS | |
6068 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6069 | for ac_exec_ext in '' $ac_executable_extensions; do |
6070 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6071 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6072 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6073 | break 2 |
6074 | fi | |
6075 | done | |
81ecdfbb RW |
6076 | done |
6077 | IFS=$as_save_IFS | |
bec39cab AC |
6078 | |
6079 | fi | |
6080 | fi | |
6081 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6082 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6084 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6085 | else |
81ecdfbb RW |
6086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6087 | $as_echo "no" >&6; } | |
c906108c | 6088 | fi |
bec39cab | 6089 | |
81ecdfbb RW |
6090 | if test "x$ac_ct_WINDRES" = x; then |
6091 | WINDRES="" | |
6092 | else | |
6093 | case $cross_compiling:$ac_tool_warned in | |
6094 | yes:) | |
6095 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6096 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6097 | ac_tool_warned=yes ;; | |
6098 | esac | |
6099 | WINDRES=$ac_ct_WINDRES | |
6100 | fi | |
c906108c | 6101 | else |
bec39cab | 6102 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6103 | fi |
6104 | ||
bec39cab AC |
6105 | |
6106 | # Needed for GNU/Hurd. | |
6107 | if test -n "$ac_tool_prefix"; then | |
6108 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
6109 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6111 | $as_echo_n "checking for $ac_word... " >&6; } | |
6112 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6113 | $as_echo_n "(cached) " >&6 | |
c906108c | 6114 | else |
bec39cab AC |
6115 | if test -n "$MIG"; then |
6116 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6117 | else | |
6118 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6119 | for as_dir in $PATH | |
6120 | do | |
6121 | IFS=$as_save_IFS | |
6122 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6123 | for ac_exec_ext in '' $ac_executable_extensions; do |
6124 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6125 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6126 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6127 | break 2 |
6128 | fi | |
6129 | done | |
81ecdfbb RW |
6130 | done |
6131 | IFS=$as_save_IFS | |
bec39cab | 6132 | |
c906108c | 6133 | fi |
bec39cab AC |
6134 | fi |
6135 | MIG=$ac_cv_prog_MIG | |
6136 | if test -n "$MIG"; then | |
81ecdfbb RW |
6137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6138 | $as_echo "$MIG" >&6; } | |
c906108c | 6139 | else |
81ecdfbb RW |
6140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6141 | $as_echo "no" >&6; } | |
c906108c SS |
6142 | fi |
6143 | ||
81ecdfbb | 6144 | |
bec39cab AC |
6145 | fi |
6146 | if test -z "$ac_cv_prog_MIG"; then | |
6147 | ac_ct_MIG=$MIG | |
6148 | # Extract the first word of "mig", so it can be a program name with args. | |
6149 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6151 | $as_echo_n "checking for $ac_word... " >&6; } | |
6152 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6153 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6154 | else |
6155 | if test -n "$ac_ct_MIG"; then | |
6156 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6157 | else | |
6158 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6159 | for as_dir in $PATH | |
6160 | do | |
6161 | IFS=$as_save_IFS | |
6162 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6163 | for ac_exec_ext in '' $ac_executable_extensions; do |
6164 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6165 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6166 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6167 | break 2 |
6168 | fi | |
6169 | done | |
81ecdfbb RW |
6170 | done |
6171 | IFS=$as_save_IFS | |
c906108c | 6172 | |
bec39cab AC |
6173 | fi |
6174 | fi | |
6175 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6176 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6178 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6179 | else |
81ecdfbb RW |
6180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6181 | $as_echo "no" >&6; } | |
bec39cab | 6182 | fi |
c906108c | 6183 | |
81ecdfbb RW |
6184 | if test "x$ac_ct_MIG" = x; then |
6185 | MIG="" | |
6186 | else | |
6187 | case $cross_compiling:$ac_tool_warned in | |
6188 | yes:) | |
6189 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6190 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6191 | ac_tool_warned=yes ;; | |
6192 | esac | |
6193 | MIG=$ac_ct_MIG | |
6194 | fi | |
bec39cab AC |
6195 | else |
6196 | MIG="$ac_cv_prog_MIG" | |
6197 | fi | |
c906108c | 6198 | |
c906108c | 6199 | |
bec39cab AC |
6200 | # ---------------------- # |
6201 | # Checks for libraries. # | |
6202 | # ---------------------- # | |
c906108c | 6203 | |
bec39cab | 6204 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6206 | $as_echo_n "checking for main in -lm... " >&6; } | |
6207 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6208 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6209 | else |
6210 | ac_check_lib_save_LIBS=$LIBS | |
6211 | LIBS="-lm $LIBS" | |
81ecdfbb | 6212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6213 | /* end confdefs.h. */ |
c906108c | 6214 | |
c906108c | 6215 | |
bec39cab AC |
6216 | int |
6217 | main () | |
6218 | { | |
81ecdfbb | 6219 | return main (); |
bec39cab AC |
6220 | ; |
6221 | return 0; | |
6222 | } | |
6223 | _ACEOF | |
81ecdfbb | 6224 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6225 | ac_cv_lib_m_main=yes |
6226 | else | |
81ecdfbb | 6227 | ac_cv_lib_m_main=no |
bec39cab | 6228 | fi |
81ecdfbb RW |
6229 | rm -f core conftest.err conftest.$ac_objext \ |
6230 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6231 | LIBS=$ac_check_lib_save_LIBS |
6232 | fi | |
81ecdfbb RW |
6233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6234 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6235 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6236 | cat >>confdefs.h <<_ACEOF |
6237 | #define HAVE_LIBM 1 | |
6238 | _ACEOF | |
6239 | ||
6240 | LIBS="-lm $LIBS" | |
c906108c | 6241 | |
c906108c | 6242 | fi |
bec39cab AC |
6243 | |
6244 | ||
6245 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6246 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6247 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6248 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6249 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6250 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6251 | |
c906108c | 6252 | else |
81ecdfbb RW |
6253 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6254 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6255 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6256 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6257 | else |
6258 | ac_check_lib_save_LIBS=$LIBS | |
6259 | LIBS="-lw $LIBS" | |
81ecdfbb | 6260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6261 | /* end confdefs.h. */ |
c906108c | 6262 | |
81ecdfbb RW |
6263 | /* Override any GCC internal prototype to avoid an error. |
6264 | Use char because int might match the return type of a GCC | |
6265 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6266 | #ifdef __cplusplus |
6267 | extern "C" | |
6268 | #endif | |
bec39cab AC |
6269 | char wctype (); |
6270 | int | |
6271 | main () | |
6272 | { | |
81ecdfbb | 6273 | return wctype (); |
bec39cab AC |
6274 | ; |
6275 | return 0; | |
6276 | } | |
6277 | _ACEOF | |
81ecdfbb | 6278 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6279 | ac_cv_lib_w_wctype=yes |
6280 | else | |
81ecdfbb | 6281 | ac_cv_lib_w_wctype=no |
bec39cab | 6282 | fi |
81ecdfbb RW |
6283 | rm -f core conftest.err conftest.$ac_objext \ |
6284 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6285 | LIBS=$ac_check_lib_save_LIBS |
6286 | fi | |
81ecdfbb RW |
6287 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6288 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6289 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6290 | cat >>confdefs.h <<_ACEOF |
6291 | #define HAVE_LIBW 1 | |
6292 | _ACEOF | |
c906108c | 6293 | |
bec39cab | 6294 | LIBS="-lw $LIBS" |
c906108c | 6295 | |
bec39cab | 6296 | fi |
c906108c | 6297 | |
bec39cab | 6298 | fi |
c906108c | 6299 | |
ddc9cd0f | 6300 | |
bec39cab | 6301 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6303 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6304 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6305 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6306 | else |
6307 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6308 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6309 | /* end confdefs.h. */ |
ddc9cd0f | 6310 | |
81ecdfbb RW |
6311 | /* Override any GCC internal prototype to avoid an error. |
6312 | Use char because int might match the return type of a GCC | |
6313 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6314 | #ifdef __cplusplus |
6315 | extern "C" | |
6316 | #endif | |
bec39cab AC |
6317 | char gethostbyname (); |
6318 | int | |
6319 | main () | |
6320 | { | |
81ecdfbb | 6321 | return gethostbyname (); |
bec39cab AC |
6322 | ; |
6323 | return 0; | |
6324 | } | |
6325 | _ACEOF | |
81ecdfbb RW |
6326 | for ac_lib in '' nsl; do |
6327 | if test -z "$ac_lib"; then | |
6328 | ac_res="none required" | |
6329 | else | |
6330 | ac_res=-l$ac_lib | |
b4e70030 | 6331 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6332 | fi |
6333 | if ac_fn_c_try_link "$LINENO"; then : | |
6334 | ac_cv_search_gethostbyname=$ac_res | |
6335 | fi | |
6336 | rm -f core conftest.err conftest.$ac_objext \ | |
6337 | conftest$ac_exeext | |
6338 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6339 | break | |
6340 | fi | |
6341 | done | |
6342 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6343 | |
bec39cab | 6344 | else |
81ecdfbb | 6345 | ac_cv_search_gethostbyname=no |
bec39cab | 6346 | fi |
81ecdfbb | 6347 | rm conftest.$ac_ext |
bec39cab AC |
6348 | LIBS=$ac_func_search_save_LIBS |
6349 | fi | |
81ecdfbb RW |
6350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6351 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6352 | ac_res=$ac_cv_search_gethostbyname | |
6353 | if test "$ac_res" != no; then : | |
6354 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6355 | |
bec39cab | 6356 | fi |
96baa820 | 6357 | |
c906108c | 6358 | |
b4e70030 | 6359 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6361 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6362 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6363 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6364 | else |
6365 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6367 | /* end confdefs.h. */ |
6368 | ||
81ecdfbb RW |
6369 | /* Override any GCC internal prototype to avoid an error. |
6370 | Use char because int might match the return type of a GCC | |
6371 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6372 | #ifdef __cplusplus |
6373 | extern "C" | |
6374 | #endif | |
b4e70030 JB |
6375 | char socketpair (); |
6376 | int | |
6377 | main () | |
6378 | { | |
81ecdfbb | 6379 | return socketpair (); |
b4e70030 JB |
6380 | ; |
6381 | return 0; | |
6382 | } | |
6383 | _ACEOF | |
81ecdfbb RW |
6384 | for ac_lib in '' socket; do |
6385 | if test -z "$ac_lib"; then | |
6386 | ac_res="none required" | |
6387 | else | |
6388 | ac_res=-l$ac_lib | |
b4e70030 | 6389 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6390 | fi |
6391 | if ac_fn_c_try_link "$LINENO"; then : | |
6392 | ac_cv_search_socketpair=$ac_res | |
6393 | fi | |
6394 | rm -f core conftest.err conftest.$ac_objext \ | |
6395 | conftest$ac_exeext | |
6396 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6397 | break | |
6398 | fi | |
6399 | done | |
6400 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6401 | |
b4e70030 | 6402 | else |
81ecdfbb | 6403 | ac_cv_search_socketpair=no |
b4e70030 | 6404 | fi |
81ecdfbb | 6405 | rm conftest.$ac_ext |
b4e70030 JB |
6406 | LIBS=$ac_func_search_save_LIBS |
6407 | fi | |
81ecdfbb RW |
6408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6409 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6410 | ac_res=$ac_cv_search_socketpair | |
6411 | if test "$ac_res" != no; then : | |
6412 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6413 | |
6414 | fi | |
6415 | ||
6416 | ||
233a11ab | 6417 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6418 | |
6419 | # See if the user specified whether he wants zlib support or not. | |
6420 | ||
6421 | # Check whether --with-zlib was given. | |
6422 | if test "${with_zlib+set}" = set; then : | |
6423 | withval=$with_zlib; | |
6424 | else | |
6425 | with_zlib=auto | |
6426 | fi | |
6427 | ||
6428 | ||
6429 | if test "$with_zlib" != "no"; then | |
6430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6431 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6432 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6433 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6434 | else |
6435 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6437 | /* end confdefs.h. */ |
6438 | ||
81ecdfbb RW |
6439 | /* Override any GCC internal prototype to avoid an error. |
6440 | Use char because int might match the return type of a GCC | |
233a11ab | 6441 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6442 | #ifdef __cplusplus |
6443 | extern "C" | |
6444 | #endif | |
233a11ab CS |
6445 | char zlibVersion (); |
6446 | int | |
6447 | main () | |
6448 | { | |
81ecdfbb | 6449 | return zlibVersion (); |
233a11ab CS |
6450 | ; |
6451 | return 0; | |
6452 | } | |
6453 | _ACEOF | |
81ecdfbb RW |
6454 | for ac_lib in '' z; do |
6455 | if test -z "$ac_lib"; then | |
6456 | ac_res="none required" | |
233a11ab | 6457 | else |
81ecdfbb RW |
6458 | ac_res=-l$ac_lib |
6459 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6460 | fi |
81ecdfbb RW |
6461 | if ac_fn_c_try_link "$LINENO"; then : |
6462 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6463 | fi |
81ecdfbb RW |
6464 | rm -f core conftest.err conftest.$ac_objext \ |
6465 | conftest$ac_exeext | |
6466 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6467 | break | |
233a11ab | 6468 | fi |
81ecdfbb RW |
6469 | done |
6470 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6471 | |
233a11ab | 6472 | else |
81ecdfbb | 6473 | ac_cv_search_zlibVersion=no |
233a11ab | 6474 | fi |
81ecdfbb RW |
6475 | rm conftest.$ac_ext |
6476 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6477 | fi |
81ecdfbb RW |
6478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6479 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6480 | ac_res=$ac_cv_search_zlibVersion | |
6481 | if test "$ac_res" != no; then : | |
6482 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6483 | for ac_header in zlib.h | |
6484 | do : | |
6485 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6486 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6487 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6488 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6489 | _ACEOF |
6490 | ||
6491 | fi | |
6492 | ||
6493 | done | |
6494 | ||
6495 | fi | |
6496 | ||
b040ad30 JB |
6497 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6498 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6499 | fi | |
6500 | fi | |
6501 | ||
233a11ab | 6502 | |
77f120bf | 6503 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6504 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6505 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6506 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6507 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6508 | else |
6509 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6511 | /* end confdefs.h. */ |
c906108c | 6512 | |
81ecdfbb RW |
6513 | /* Override any GCC internal prototype to avoid an error. |
6514 | Use char because int might match the return type of a GCC | |
6515 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6516 | #ifdef __cplusplus |
6517 | extern "C" | |
6518 | #endif | |
77f120bf | 6519 | char dlgetmodinfo (); |
bec39cab AC |
6520 | int |
6521 | main () | |
6522 | { | |
81ecdfbb | 6523 | return dlgetmodinfo (); |
bec39cab AC |
6524 | ; |
6525 | return 0; | |
6526 | } | |
6527 | _ACEOF | |
81ecdfbb RW |
6528 | for ac_lib in '' dl xpdl; do |
6529 | if test -z "$ac_lib"; then | |
6530 | ac_res="none required" | |
6531 | else | |
6532 | ac_res=-l$ac_lib | |
b4e70030 | 6533 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6534 | fi |
6535 | if ac_fn_c_try_link "$LINENO"; then : | |
6536 | ac_cv_search_dlgetmodinfo=$ac_res | |
6537 | fi | |
6538 | rm -f core conftest.err conftest.$ac_objext \ | |
6539 | conftest$ac_exeext | |
6540 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6541 | break | |
6542 | fi | |
6543 | done | |
6544 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6545 | |
4e8d927d | 6546 | else |
81ecdfbb | 6547 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6548 | fi |
81ecdfbb | 6549 | rm conftest.$ac_ext |
bec39cab AC |
6550 | LIBS=$ac_func_search_save_LIBS |
6551 | fi | |
81ecdfbb RW |
6552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6553 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6554 | ac_res=$ac_cv_search_dlgetmodinfo | |
6555 | if test "$ac_res" != no; then : | |
6556 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6557 | |
8bb2c122 | 6558 | fi |
8bb2c122 | 6559 | |
8bb2c122 | 6560 | |
77f120bf | 6561 | |
77f120bf | 6562 | |
6c7a06a3 | 6563 | |
81ecdfbb RW |
6564 | # Check whether --with-libiconv-prefix was given. |
6565 | if test "${with_libiconv_prefix+set}" = set; then : | |
6566 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6567 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6568 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6569 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6570 | done |
6571 | ||
81ecdfbb RW |
6572 | fi |
6573 | ||
6c7a06a3 | 6574 | |
f18c4681 | 6575 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6576 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6577 | ||
81ecdfbb RW |
6578 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6579 | $as_echo_n "checking for iconv... " >&6; } | |
6580 | if test "${am_cv_func_iconv+set}" = set; then : | |
6581 | $as_echo_n "(cached) " >&6 | |
d542061a | 6582 | else |
6c7a06a3 TT |
6583 | |
6584 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6585 | am_cv_lib_iconv=no | |
6586 | am_cv_use_build_libiconv=no | |
f0f20949 | 6587 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6588 | |
6589 | # If libiconv is part of the build tree, then try using it over | |
6590 | # any system iconv. | |
6591 | if test -d ../libiconv; then | |
f18c4681 JB |
6592 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6593 | am_save_LIBS="$LIBS" | |
6594 | am_save_CPPFLAGS="$CPPFLAGS" | |
6595 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6596 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6598 | /* end confdefs.h. */ |
6c7a06a3 TT |
6599 | #include <stdlib.h> |
6600 | #include <iconv.h> | |
d542061a UW |
6601 | int |
6602 | main () | |
6603 | { | |
6c7a06a3 | 6604 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6605 | iconv(cd,NULL,NULL,NULL,NULL); |
6606 | iconv_close(cd); | |
d542061a UW |
6607 | ; |
6608 | return 0; | |
6609 | } | |
6610 | _ACEOF | |
81ecdfbb | 6611 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6612 | am_cv_use_build_libiconv=yes |
f0f20949 | 6613 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6614 | am_cv_lib_iconv=yes |
6615 | am_cv_func_iconv=yes | |
d542061a | 6616 | fi |
81ecdfbb RW |
6617 | rm -f core conftest.err conftest.$ac_objext \ |
6618 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6619 | LIBS="$am_save_LIBS" |
6620 | CPPFLAGS="$am_save_CPPFLAGS" | |
6621 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6622 | break |
6623 | fi | |
6624 | done | |
4edb1e84 | 6625 | fi |
94ae1714 | 6626 | |
4edb1e84 | 6627 | # Next, try to find iconv in libc. |
6c7a06a3 | 6628 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6630 | /* end confdefs.h. */ |
6c7a06a3 TT |
6631 | #include <stdlib.h> |
6632 | #include <iconv.h> | |
d542061a UW |
6633 | int |
6634 | main () | |
6635 | { | |
6c7a06a3 TT |
6636 | iconv_t cd = iconv_open("",""); |
6637 | iconv(cd,NULL,NULL,NULL,NULL); | |
6638 | iconv_close(cd); | |
d542061a UW |
6639 | ; |
6640 | return 0; | |
6641 | } | |
6642 | _ACEOF | |
81ecdfbb | 6643 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6644 | am_cv_func_iconv=yes |
d542061a | 6645 | fi |
81ecdfbb RW |
6646 | rm -f core conftest.err conftest.$ac_objext \ |
6647 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6648 | fi |
94ae1714 | 6649 | |
4edb1e84 JB |
6650 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6651 | # look in the libiconv prefix, if it was specified by the user. | |
6652 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6653 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6654 | am_save_LIBS="$LIBS" |
6655 | if test -n "$LIBICONV_INCLUDE"; then | |
6656 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6657 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6658 | fi | |
6659 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6661 | /* end confdefs.h. */ |
6c7a06a3 TT |
6662 | #include <stdlib.h> |
6663 | #include <iconv.h> | |
bec39cab AC |
6664 | int |
6665 | main () | |
6666 | { | |
6c7a06a3 TT |
6667 | iconv_t cd = iconv_open("",""); |
6668 | iconv(cd,NULL,NULL,NULL,NULL); | |
6669 | iconv_close(cd); | |
bec39cab AC |
6670 | ; |
6671 | return 0; | |
6672 | } | |
6673 | _ACEOF | |
81ecdfbb | 6674 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6675 | am_cv_lib_iconv=yes |
6c7a06a3 | 6676 | am_cv_func_iconv=yes |
627af7ea | 6677 | fi |
81ecdfbb RW |
6678 | rm -f core conftest.err conftest.$ac_objext \ |
6679 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6680 | LIBS="$am_save_LIBS" |
fc3b640d | 6681 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6682 | fi |
6683 | ||
6684 | fi | |
81ecdfbb RW |
6685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6686 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6687 | |
6688 | # Set the various flags based on the cache variables. We can't rely | |
6689 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6690 | LIBICONV= |
6691 | if test "$am_cv_lib_iconv" = yes; then | |
6692 | LIBICONV="-liconv" | |
94ae1714 TT |
6693 | else |
6694 | LIBICONV_LIBDIR= | |
6695 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6696 | fi |
6697 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6698 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6699 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6700 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6701 | fi | |
6702 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6703 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6704 | |
6c7a06a3 TT |
6705 | if test "$am_cv_func_iconv" = yes; then |
6706 | ||
81ecdfbb | 6707 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6708 | |
81ecdfbb RW |
6709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6710 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6711 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6712 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6713 | else |
6714 | ||
81ecdfbb | 6715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6716 | /* end confdefs.h. */ |
6717 | ||
6c7a06a3 TT |
6718 | #include <stdlib.h> |
6719 | #include <iconv.h> | |
6720 | extern | |
b4e70030 | 6721 | #ifdef __cplusplus |
6c7a06a3 | 6722 | "C" |
b4e70030 | 6723 | #endif |
6c7a06a3 TT |
6724 | #if defined(__STDC__) || defined(__cplusplus) |
6725 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6726 | #else | |
6727 | size_t iconv(); | |
6728 | #endif | |
6729 | ||
b4e70030 JB |
6730 | int |
6731 | main () | |
6732 | { | |
6c7a06a3 | 6733 | |
b4e70030 JB |
6734 | ; |
6735 | return 0; | |
6736 | } | |
6737 | _ACEOF | |
81ecdfbb | 6738 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6739 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6740 | else |
81ecdfbb | 6741 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6742 | fi |
81ecdfbb | 6743 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6744 | 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);" |
6745 | fi | |
6746 | ||
6747 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 6748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 6749 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
6750 | $as_echo "${ac_t:- |
6751 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
6752 | |
6753 | cat >>confdefs.h <<_ACEOF | |
6754 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6755 | _ACEOF | |
6756 | ||
6757 | fi | |
6c7a06a3 TT |
6758 | |
6759 | ||
478aac75 DE |
6760 | # GDB may fork/exec the iconv program to get the list of supported character |
6761 | # sets. Allow the user to specify where to find it. | |
6762 | # There are several factors affecting the choice of option name: | |
6763 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
6764 | # the build-time location of libiconv files. | |
6765 | # - The program we need to find is iconv, which comes with glibc. The user | |
6766 | # doesn't necessarily have libiconv installed. Therefore naming this | |
6767 | # --with-libiconv-foo feels wrong. | |
6768 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
6769 | # defined to work on directories not files (though it really doesn't know | |
6770 | # the difference). | |
6771 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
6772 | # with --with-libiconv-prefix. | |
6773 | # Putting these together is why the option name is --with-iconv-bin. | |
6774 | ||
6775 | ||
6776 | # Check whether --with-iconv-bin was given. | |
6777 | if test "${with_iconv_bin+set}" = set; then : | |
6778 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
6779 | ||
6780 | cat >>confdefs.h <<_ACEOF | |
6781 | #define ICONV_BIN "${iconv_bin}" | |
6782 | _ACEOF | |
6783 | ||
6784 | ||
6785 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6786 | if test "x$prefix" = xNONE; then | |
6787 | test_prefix=/usr/local | |
6788 | else | |
6789 | test_prefix=$prefix | |
6790 | fi | |
6791 | else | |
6792 | test_prefix=$exec_prefix | |
6793 | fi | |
6794 | value=0 | |
6795 | case ${iconv_bin} in | |
6796 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6797 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6798 | value=1 | |
6799 | ;; | |
6800 | esac | |
6801 | ||
6802 | cat >>confdefs.h <<_ACEOF | |
6803 | #define ICONV_BIN_RELOCATABLE $value | |
6804 | _ACEOF | |
6805 | ||
6806 | ||
6807 | ||
6808 | fi | |
6809 | ||
6810 | ||
6c7a06a3 TT |
6811 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
6812 | # There is a very specific comment in /usr/include/curses.h explaining that | |
6813 | # termcap routines built into libcurses must not be used. | |
6814 | # | |
6815 | # The symptoms we observed so far is GDB unexpectedly changing | |
6816 | # the terminal settings when tgetent is called - this is particularly | |
6817 | # visible as the output is missing carriage returns, and so rapidly | |
6818 | # becomes very hard to read. | |
6819 | # | |
6820 | # The readline configure script has already decided that libtermcap | |
6821 | # was enough for its purposes, and so decided to build readline using | |
6822 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
6823 | # TUI enabled results in both libraries to be used at the same time, | |
6824 | # which is not allowed. This basically means that GDB with TUI is | |
6825 | # broken on alpha-osf. | |
6826 | ||
6827 | case $host_os in | |
6bcc772d RO |
6828 | osf* ) |
6829 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6830 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 6831 | fi |
6bcc772d | 6832 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
6833 | enable_tui=no |
6834 | fi | |
6835 | ;; | |
6836 | esac | |
6837 | ||
cb01cfba | 6838 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 6839 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
6840 | prefer_curses=yes |
6841 | fi | |
6842 | ||
6843 | curses_found=no | |
6844 | if test x"$prefer_curses" = xyes; then | |
6845 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
6846 | # curses library because the latter might not provide all the | |
6847 | # functionality we need. However, this leads to problems on systems | |
6848 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
6849 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
6850 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
6851 | # a situation. | |
81ecdfbb RW |
6852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
6853 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
6854 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6855 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6856 | else |
6857 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6858 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6859 | /* end confdefs.h. */ |
6860 | ||
81ecdfbb RW |
6861 | /* Override any GCC internal prototype to avoid an error. |
6862 | Use char because int might match the return type of a GCC | |
6863 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6864 | #ifdef __cplusplus |
6865 | extern "C" | |
6866 | #endif | |
6c7a06a3 TT |
6867 | char waddstr (); |
6868 | int | |
6869 | main () | |
6870 | { | |
81ecdfbb | 6871 | return waddstr (); |
6c7a06a3 TT |
6872 | ; |
6873 | return 0; | |
6874 | } | |
6875 | _ACEOF | |
81ecdfbb RW |
6876 | for ac_lib in '' ncurses cursesX curses; do |
6877 | if test -z "$ac_lib"; then | |
6878 | ac_res="none required" | |
6879 | else | |
6880 | ac_res=-l$ac_lib | |
6881 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6882 | fi | |
6883 | if ac_fn_c_try_link "$LINENO"; then : | |
6884 | ac_cv_search_waddstr=$ac_res | |
6885 | fi | |
6886 | rm -f core conftest.err conftest.$ac_objext \ | |
6887 | conftest$ac_exeext | |
6888 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6889 | break | |
6890 | fi | |
6891 | done | |
6892 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6893 | ||
6c7a06a3 | 6894 | else |
81ecdfbb RW |
6895 | ac_cv_search_waddstr=no |
6896 | fi | |
6897 | rm conftest.$ac_ext | |
6898 | LIBS=$ac_func_search_save_LIBS | |
6899 | fi | |
6900 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
6901 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
6902 | ac_res=$ac_cv_search_waddstr | |
6903 | if test "$ac_res" != no; then : | |
6904 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
6905 | |
6906 | fi | |
6907 | ||
6908 | ||
cb01cfba JB |
6909 | if test "$ac_cv_search_waddstr" != no; then |
6910 | curses_found=yes | |
6911 | fi | |
6912 | fi | |
6913 | ||
6914 | # Check whether we should enable the TUI, but only do so if we really | |
6915 | # can. | |
6916 | if test x"$enable_tui" != xno; then | |
6917 | if test -d $srcdir/tui; then | |
6918 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
6919 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
6920 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
6921 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
6922 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
6923 | else |
6924 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6925 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 6926 | else |
81ecdfbb RW |
6927 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
6928 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
6929 | fi |
6930 | fi | |
6931 | fi | |
6932 | fi | |
6933 | ||
6934 | # Since GDB uses Readline, we need termcap functionality. In many | |
6935 | # cases this will be provided by the curses library, but some systems | |
6936 | # have a seperate termcap library, or no curses library at all. | |
6937 | ||
6938 | case $host_os in | |
6939 | cygwin*) | |
6940 | if test -d $srcdir/libtermcap; then | |
6941 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
6942 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
6943 | fi ;; | |
6944 | go32* | *djgpp*) | |
6945 | ac_cv_search_tgetent="none required" | |
6946 | ;; | |
6947 | *mingw32*) | |
6948 | ac_cv_search_tgetent="none required" | |
6949 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
6950 | ;; | |
6951 | esac | |
6952 | ||
6953 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
6954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
6955 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
6956 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6957 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6958 | else |
6959 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6961 | /* end confdefs.h. */ |
6962 | ||
81ecdfbb RW |
6963 | /* Override any GCC internal prototype to avoid an error. |
6964 | Use char because int might match the return type of a GCC | |
6965 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6966 | #ifdef __cplusplus |
6967 | extern "C" | |
6968 | #endif | |
6c7a06a3 TT |
6969 | char tgetent (); |
6970 | int | |
6971 | main () | |
6972 | { | |
81ecdfbb | 6973 | return tgetent (); |
6c7a06a3 TT |
6974 | ; |
6975 | return 0; | |
6976 | } | |
6977 | _ACEOF | |
81ecdfbb RW |
6978 | for ac_lib in '' termcap tinfo curses ncurses; do |
6979 | if test -z "$ac_lib"; then | |
6980 | ac_res="none required" | |
6981 | else | |
6982 | ac_res=-l$ac_lib | |
6c7a06a3 | 6983 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6984 | fi |
6985 | if ac_fn_c_try_link "$LINENO"; then : | |
6986 | ac_cv_search_tgetent=$ac_res | |
6987 | fi | |
6988 | rm -f core conftest.err conftest.$ac_objext \ | |
6989 | conftest$ac_exeext | |
6990 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6991 | break | |
6992 | fi | |
6993 | done | |
6994 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 6995 | |
6c7a06a3 | 6996 | else |
81ecdfbb | 6997 | ac_cv_search_tgetent=no |
6c7a06a3 | 6998 | fi |
81ecdfbb | 6999 | rm conftest.$ac_ext |
6c7a06a3 TT |
7000 | LIBS=$ac_func_search_save_LIBS |
7001 | fi | |
81ecdfbb RW |
7002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7003 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7004 | ac_res=$ac_cv_search_tgetent | |
7005 | if test "$ac_res" != no; then : | |
7006 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7007 | |
06825bd1 MK |
7008 | fi |
7009 | ||
06825bd1 | 7010 | |
bec39cab | 7011 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7012 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7013 | fi |
7014 | ||
3841debe | 7015 | |
81ecdfbb RW |
7016 | # Check whether --with-system-readline was given. |
7017 | if test "${with_system_readline+set}" = set; then : | |
7018 | withval=$with_system_readline; | |
7019 | fi | |
6a30b0a5 | 7020 | |
6a30b0a5 AS |
7021 | |
7022 | if test "$with_system_readline" = yes; then | |
7023 | READLINE=-lreadline | |
7024 | READLINE_DEPS= | |
7025 | READLINE_CFLAGS= | |
39037522 | 7026 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7027 | else |
7028 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7029 | READLINE_DEPS='$(READLINE)' | |
7030 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7031 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7032 | fi |
7033 | ||
7034 | ||
7035 | ||
7036 | ||
7037 | ||
f997c383 SD |
7038 | # Generate jit-reader.h |
7039 | ||
7040 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7041 | TARGET_PTR= | |
7042 | ||
7043 | # The cast to long int works around a bug in the HP C Compiler | |
7044 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7045 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7046 | # This bug is HP SR number 8606223364. | |
7047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7048 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7049 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7050 | $as_echo_n "(cached) " >&6 | |
7051 | else | |
7052 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7053 | ||
7054 | else | |
7055 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7056 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7057 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7058 | { as_fn_set_status 77 | |
7059 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7060 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7061 | else | |
7062 | ac_cv_sizeof_unsigned_long_long=0 | |
7063 | fi | |
7064 | fi | |
7065 | ||
7066 | fi | |
7067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7068 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7069 | ||
7070 | ||
7071 | ||
7072 | cat >>confdefs.h <<_ACEOF | |
7073 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7074 | _ACEOF | |
7075 | ||
7076 | ||
7077 | # The cast to long int works around a bug in the HP C Compiler | |
7078 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7079 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7080 | # This bug is HP SR number 8606223364. | |
7081 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7082 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7083 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7084 | $as_echo_n "(cached) " >&6 | |
7085 | else | |
7086 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7087 | ||
7088 | else | |
7089 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7090 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7091 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7092 | { as_fn_set_status 77 | |
7093 | as_fn_error "cannot compute sizeof (unsigned long) | |
7094 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7095 | else | |
7096 | ac_cv_sizeof_unsigned_long=0 | |
7097 | fi | |
7098 | fi | |
7099 | ||
7100 | fi | |
7101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7102 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7103 | ||
7104 | ||
7105 | ||
7106 | cat >>confdefs.h <<_ACEOF | |
7107 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7108 | _ACEOF | |
7109 | ||
7110 | ||
7111 | # The cast to long int works around a bug in the HP C Compiler | |
7112 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7113 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7114 | # This bug is HP SR number 8606223364. | |
7115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7116 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7117 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7118 | $as_echo_n "(cached) " >&6 | |
7119 | else | |
7120 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7121 | ||
7122 | else | |
7123 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7124 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7125 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7126 | { as_fn_set_status 77 | |
7127 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7128 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7129 | else | |
7130 | ac_cv_sizeof_unsigned___int128=0 | |
7131 | fi | |
7132 | fi | |
7133 | ||
7134 | fi | |
7135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7136 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7137 | ||
7138 | ||
7139 | ||
7140 | cat >>confdefs.h <<_ACEOF | |
7141 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7142 | _ACEOF | |
7143 | ||
7144 | ||
7145 | ||
7146 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7147 | TARGET_PTR="unsigned long" | |
7148 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7149 | TARGET_PTR="unsigned long long" | |
7150 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7151 | TARGET_PTR="unsigned __int128" | |
7152 | else | |
7153 | TARGET_PTR="unsigned long" | |
7154 | fi | |
7155 | ||
7156 | ||
7157 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7158 | ||
7159 | ||
a2d08b9e SD |
7160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7161 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7162 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7163 | $as_echo_n "(cached) " >&6 | |
7164 | else | |
7165 | ac_func_search_save_LIBS=$LIBS | |
7166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7167 | /* end confdefs.h. */ | |
7168 | ||
7169 | /* Override any GCC internal prototype to avoid an error. | |
7170 | Use char because int might match the return type of a GCC | |
7171 | builtin and then its argument prototype would still apply. */ | |
7172 | #ifdef __cplusplus | |
7173 | extern "C" | |
7174 | #endif | |
7175 | char dlopen (); | |
7176 | int | |
7177 | main () | |
7178 | { | |
7179 | return dlopen (); | |
7180 | ; | |
7181 | return 0; | |
7182 | } | |
7183 | _ACEOF | |
7184 | for ac_lib in '' dl; do | |
7185 | if test -z "$ac_lib"; then | |
7186 | ac_res="none required" | |
7187 | else | |
7188 | ac_res=-l$ac_lib | |
7189 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7190 | fi | |
7191 | if ac_fn_c_try_link "$LINENO"; then : | |
7192 | ac_cv_search_dlopen=$ac_res | |
7193 | fi | |
7194 | rm -f core conftest.err conftest.$ac_objext \ | |
7195 | conftest$ac_exeext | |
7196 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7197 | break | |
7198 | fi | |
7199 | done | |
7200 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7201 | ||
7202 | else | |
7203 | ac_cv_search_dlopen=no | |
7204 | fi | |
7205 | rm conftest.$ac_ext | |
7206 | LIBS=$ac_func_search_save_LIBS | |
7207 | fi | |
7208 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7209 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7210 | ac_res=$ac_cv_search_dlopen | |
7211 | if test "$ac_res" != no; then : | |
7212 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7213 | ||
7214 | fi | |
7215 | ||
7216 | ||
39037522 | 7217 | |
b8e0a31c SD |
7218 | |
7219 | # Check whether --with-jit-reader-dir was given. | |
7220 | if test "${with_jit_reader_dir+set}" = set; then : | |
7221 | withval=$with_jit_reader_dir; | |
7222 | JIT_READER_DIR=$withval | |
7223 | else | |
7224 | JIT_READER_DIR=${libdir}/gdb | |
7225 | fi | |
7226 | ||
7227 | ||
7228 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7229 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7230 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7231 | ac_define_dir=`eval echo $ac_define_dir` | |
7232 | ||
7233 | cat >>confdefs.h <<_ACEOF | |
7234 | #define JIT_READER_DIR "$ac_define_dir" | |
7235 | _ACEOF | |
7236 | ||
7237 | ||
7238 | ||
7239 | ||
7240 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7241 | if test "x$prefix" = xNONE; then | |
7242 | test_prefix=/usr/local | |
7243 | else | |
7244 | test_prefix=$prefix | |
7245 | fi | |
7246 | else | |
7247 | test_prefix=$exec_prefix | |
7248 | fi | |
7249 | value=0 | |
7250 | case ${ac_define_dir} in | |
7251 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7252 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7253 | value=1 | |
7254 | ;; | |
7255 | esac | |
7256 | ||
7257 | cat >>confdefs.h <<_ACEOF | |
7258 | #define JIT_READER_DIR_RELOCATABLE $value | |
7259 | _ACEOF | |
7260 | ||
7261 | ||
7262 | ||
7263 | ||
7264 | ||
81ecdfbb RW |
7265 | # Check whether --with-expat was given. |
7266 | if test "${with_expat+set}" = set; then : | |
7267 | withval=$with_expat; | |
5c39566f DJ |
7268 | else |
7269 | with_expat=auto | |
81ecdfbb RW |
7270 | fi |
7271 | ||
7272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7273 | $as_echo_n "checking whether to use expat... " >&6; } | |
7274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7275 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7276 | |
7277 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7278 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7279 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7280 | HAVE_LIBEXPAT=no |
7281 | else | |
7282 | ||
3841debe DJ |
7283 | if test "X$prefix" = "XNONE"; then |
7284 | acl_final_prefix="$ac_default_prefix" | |
7285 | else | |
7286 | acl_final_prefix="$prefix" | |
7287 | fi | |
7288 | if test "X$exec_prefix" = "XNONE"; then | |
7289 | acl_final_exec_prefix='${prefix}' | |
7290 | else | |
7291 | acl_final_exec_prefix="$exec_prefix" | |
7292 | fi | |
7293 | acl_save_prefix="$prefix" | |
7294 | prefix="$acl_final_prefix" | |
7295 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7296 | prefix="$acl_save_prefix" | |
7297 | ||
7298 | ||
81ecdfbb RW |
7299 | # Check whether --with-gnu-ld was given. |
7300 | if test "${with_gnu_ld+set}" = set; then : | |
7301 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7302 | else |
7303 | with_gnu_ld=no | |
81ecdfbb RW |
7304 | fi |
7305 | ||
3841debe DJ |
7306 | # Prepare PATH_SEPARATOR. |
7307 | # The user is always right. | |
7308 | if test "${PATH_SEPARATOR+set}" != set; then | |
7309 | echo "#! /bin/sh" >conf$$.sh | |
7310 | echo "exit 0" >>conf$$.sh | |
7311 | chmod +x conf$$.sh | |
7312 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7313 | PATH_SEPARATOR=';' | |
7314 | else | |
7315 | PATH_SEPARATOR=: | |
7316 | fi | |
7317 | rm -f conf$$.sh | |
7318 | fi | |
7319 | ac_prog=ld | |
7320 | if test "$GCC" = yes; then | |
7321 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7323 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7324 | case $host in |
7325 | *-*-mingw*) | |
7326 | # gcc leaves a trailing carriage return which upsets mingw | |
7327 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7328 | *) | |
7329 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7330 | esac | |
7331 | case $ac_prog in | |
7332 | # Accept absolute paths. | |
7333 | [\\/]* | [A-Za-z]:[\\/]*) | |
7334 | re_direlt='/[^/][^/]*/\.\./' | |
7335 | # Canonicalize the path of ld | |
7336 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7337 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7338 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7339 | done | |
7340 | test -z "$LD" && LD="$ac_prog" | |
7341 | ;; | |
7342 | "") | |
7343 | # If it fails, then pretend we aren't using GCC. | |
7344 | ac_prog=ld | |
7345 | ;; | |
7346 | *) | |
7347 | # If it is relative, then search for the first ld in PATH. | |
7348 | with_gnu_ld=unknown | |
7349 | ;; | |
7350 | esac | |
7351 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7353 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7354 | else |
81ecdfbb RW |
7355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7356 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7357 | fi |
81ecdfbb RW |
7358 | if test "${acl_cv_path_LD+set}" = set; then : |
7359 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7360 | else |
7361 | if test -z "$LD"; then | |
7362 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7363 | for ac_dir in $PATH; do | |
7364 | test -z "$ac_dir" && ac_dir=. | |
7365 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7366 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7367 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7368 | # but apparently some GNU ld's only accept -v. | |
7369 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7370 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7371 | test "$with_gnu_ld" != no && break | |
7372 | else | |
7373 | test "$with_gnu_ld" != yes && break | |
7374 | fi | |
7375 | fi | |
7376 | done | |
7377 | IFS="$ac_save_ifs" | |
7378 | else | |
7379 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7380 | fi | |
7381 | fi | |
7382 | ||
7383 | LD="$acl_cv_path_LD" | |
7384 | if test -n "$LD"; then | |
81ecdfbb RW |
7385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7386 | $as_echo "$LD" >&6; } | |
3841debe | 7387 | else |
81ecdfbb RW |
7388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7389 | $as_echo "no" >&6; } | |
3841debe | 7390 | fi |
81ecdfbb RW |
7391 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7393 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7394 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7395 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7396 | else |
7397 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7398 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7399 | acl_cv_prog_gnu_ld=yes | |
7400 | else | |
7401 | acl_cv_prog_gnu_ld=no | |
7402 | fi | |
7403 | fi | |
81ecdfbb RW |
7404 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7405 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7406 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7407 | ||
7408 | ||
7409 | ||
81ecdfbb RW |
7410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7411 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7412 | if test "${acl_cv_rpath+set}" = set; then : | |
7413 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7414 | else |
7415 | ||
7416 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7417 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7418 | . ./conftest.sh | |
7419 | rm -f ./conftest.sh | |
7420 | acl_cv_rpath=done | |
7421 | ||
7422 | fi | |
81ecdfbb RW |
7423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7424 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7425 | wl="$acl_cv_wl" |
7426 | libext="$acl_cv_libext" | |
7427 | shlibext="$acl_cv_shlibext" | |
7428 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7429 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7430 | hardcode_direct="$acl_cv_hardcode_direct" | |
7431 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7432 | # Check whether --enable-rpath was given. |
7433 | if test "${enable_rpath+set}" = set; then : | |
7434 | enableval=$enable_rpath; : | |
3841debe DJ |
7435 | else |
7436 | enable_rpath=yes | |
81ecdfbb RW |
7437 | fi |
7438 | ||
3841debe DJ |
7439 | |
7440 | ||
7441 | ||
7442 | ||
7443 | ||
7444 | ||
7445 | ||
7446 | ||
7447 | ||
7448 | use_additional=yes | |
7449 | ||
7450 | acl_save_prefix="$prefix" | |
7451 | prefix="$acl_final_prefix" | |
7452 | acl_save_exec_prefix="$exec_prefix" | |
7453 | exec_prefix="$acl_final_exec_prefix" | |
7454 | ||
7455 | eval additional_includedir=\"$includedir\" | |
7456 | eval additional_libdir=\"$libdir\" | |
7457 | ||
7458 | exec_prefix="$acl_save_exec_prefix" | |
7459 | prefix="$acl_save_prefix" | |
7460 | ||
7461 | ||
81ecdfbb RW |
7462 | # Check whether --with-libexpat-prefix was given. |
7463 | if test "${with_libexpat_prefix+set}" = set; then : | |
7464 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7465 | if test "X$withval" = "Xno"; then |
7466 | use_additional=no | |
7467 | else | |
7468 | if test "X$withval" = "X"; then | |
7469 | ||
7470 | acl_save_prefix="$prefix" | |
7471 | prefix="$acl_final_prefix" | |
7472 | acl_save_exec_prefix="$exec_prefix" | |
7473 | exec_prefix="$acl_final_exec_prefix" | |
7474 | ||
7475 | eval additional_includedir=\"$includedir\" | |
7476 | eval additional_libdir=\"$libdir\" | |
7477 | ||
7478 | exec_prefix="$acl_save_exec_prefix" | |
7479 | prefix="$acl_save_prefix" | |
7480 | ||
7481 | else | |
7482 | additional_includedir="$withval/include" | |
7483 | additional_libdir="$withval/lib" | |
7484 | fi | |
7485 | fi | |
7486 | ||
81ecdfbb RW |
7487 | fi |
7488 | ||
3841debe DJ |
7489 | LIBEXPAT= |
7490 | LTLIBEXPAT= | |
7491 | INCEXPAT= | |
7492 | rpathdirs= | |
7493 | ltrpathdirs= | |
7494 | names_already_handled= | |
7495 | names_next_round='expat ' | |
7496 | while test -n "$names_next_round"; do | |
7497 | names_this_round="$names_next_round" | |
7498 | names_next_round= | |
7499 | for name in $names_this_round; do | |
7500 | already_handled= | |
7501 | for n in $names_already_handled; do | |
7502 | if test "$n" = "$name"; then | |
7503 | already_handled=yes | |
7504 | break | |
7505 | fi | |
7506 | done | |
7507 | if test -z "$already_handled"; then | |
7508 | names_already_handled="$names_already_handled $name" | |
7509 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7510 | eval value=\"\$HAVE_LIB$uppername\" | |
7511 | if test -n "$value"; then | |
7512 | if test "$value" = yes; then | |
7513 | eval value=\"\$LIB$uppername\" | |
7514 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7515 | eval value=\"\$LTLIB$uppername\" | |
7516 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7517 | else | |
7518 | : | |
7519 | fi | |
7520 | else | |
7521 | found_dir= | |
7522 | found_la= | |
7523 | found_so= | |
7524 | found_a= | |
7525 | if test $use_additional = yes; then | |
7526 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7527 | found_dir="$additional_libdir" | |
7528 | found_so="$additional_libdir/lib$name.$shlibext" | |
7529 | if test -f "$additional_libdir/lib$name.la"; then | |
7530 | found_la="$additional_libdir/lib$name.la" | |
7531 | fi | |
7532 | else | |
7533 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7534 | found_dir="$additional_libdir" | |
7535 | found_a="$additional_libdir/lib$name.$libext" | |
7536 | if test -f "$additional_libdir/lib$name.la"; then | |
7537 | found_la="$additional_libdir/lib$name.la" | |
7538 | fi | |
7539 | fi | |
7540 | fi | |
7541 | fi | |
7542 | if test "X$found_dir" = "X"; then | |
7543 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7544 | ||
7545 | acl_save_prefix="$prefix" | |
7546 | prefix="$acl_final_prefix" | |
7547 | acl_save_exec_prefix="$exec_prefix" | |
7548 | exec_prefix="$acl_final_exec_prefix" | |
7549 | eval x=\"$x\" | |
7550 | exec_prefix="$acl_save_exec_prefix" | |
7551 | prefix="$acl_save_prefix" | |
7552 | ||
7553 | case "$x" in | |
7554 | -L*) | |
7555 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7556 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7557 | found_dir="$dir" | |
7558 | found_so="$dir/lib$name.$shlibext" | |
7559 | if test -f "$dir/lib$name.la"; then | |
7560 | found_la="$dir/lib$name.la" | |
7561 | fi | |
7562 | else | |
7563 | if test -f "$dir/lib$name.$libext"; then | |
7564 | found_dir="$dir" | |
7565 | found_a="$dir/lib$name.$libext" | |
7566 | if test -f "$dir/lib$name.la"; then | |
7567 | found_la="$dir/lib$name.la" | |
7568 | fi | |
7569 | fi | |
7570 | fi | |
7571 | ;; | |
7572 | esac | |
7573 | if test "X$found_dir" != "X"; then | |
7574 | break | |
7575 | fi | |
7576 | done | |
7577 | fi | |
7578 | if test "X$found_dir" != "X"; then | |
7579 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7580 | if test "X$found_so" != "X"; then | |
7581 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7582 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7583 | else | |
7584 | haveit= | |
7585 | for x in $ltrpathdirs; do | |
7586 | if test "X$x" = "X$found_dir"; then | |
7587 | haveit=yes | |
7588 | break | |
7589 | fi | |
7590 | done | |
7591 | if test -z "$haveit"; then | |
7592 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7593 | fi | |
7594 | if test "$hardcode_direct" = yes; then | |
7595 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7596 | else | |
7597 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7598 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7599 | haveit= | |
7600 | for x in $rpathdirs; do | |
7601 | if test "X$x" = "X$found_dir"; then | |
7602 | haveit=yes | |
7603 | break | |
7604 | fi | |
7605 | done | |
7606 | if test -z "$haveit"; then | |
7607 | rpathdirs="$rpathdirs $found_dir" | |
7608 | fi | |
7609 | else | |
7610 | haveit= | |
7611 | for x in $LDFLAGS $LIBEXPAT; do | |
7612 | ||
7613 | acl_save_prefix="$prefix" | |
7614 | prefix="$acl_final_prefix" | |
7615 | acl_save_exec_prefix="$exec_prefix" | |
7616 | exec_prefix="$acl_final_exec_prefix" | |
7617 | eval x=\"$x\" | |
7618 | exec_prefix="$acl_save_exec_prefix" | |
7619 | prefix="$acl_save_prefix" | |
7620 | ||
7621 | if test "X$x" = "X-L$found_dir"; then | |
7622 | haveit=yes | |
7623 | break | |
7624 | fi | |
7625 | done | |
7626 | if test -z "$haveit"; then | |
7627 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7628 | fi | |
7629 | if test "$hardcode_minus_L" != no; then | |
7630 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7631 | else | |
7632 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7633 | fi | |
7634 | fi | |
7635 | fi | |
7636 | fi | |
7637 | else | |
7638 | if test "X$found_a" != "X"; then | |
7639 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7640 | else | |
7641 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7642 | fi | |
7643 | fi | |
7644 | additional_includedir= | |
7645 | case "$found_dir" in | |
7646 | */lib | */lib/) | |
7647 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7648 | additional_includedir="$basedir/include" | |
7649 | ;; | |
7650 | esac | |
7651 | if test "X$additional_includedir" != "X"; then | |
7652 | if test "X$additional_includedir" != "X/usr/include"; then | |
7653 | haveit= | |
7654 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7655 | if test -n "$GCC"; then | |
7656 | case $host_os in | |
7657 | linux*) haveit=yes;; | |
7658 | esac | |
7659 | fi | |
7660 | fi | |
7661 | if test -z "$haveit"; then | |
7662 | for x in $CPPFLAGS $INCEXPAT; do | |
7663 | ||
7664 | acl_save_prefix="$prefix" | |
7665 | prefix="$acl_final_prefix" | |
7666 | acl_save_exec_prefix="$exec_prefix" | |
7667 | exec_prefix="$acl_final_exec_prefix" | |
7668 | eval x=\"$x\" | |
7669 | exec_prefix="$acl_save_exec_prefix" | |
7670 | prefix="$acl_save_prefix" | |
7671 | ||
7672 | if test "X$x" = "X-I$additional_includedir"; then | |
7673 | haveit=yes | |
7674 | break | |
7675 | fi | |
7676 | done | |
7677 | if test -z "$haveit"; then | |
7678 | if test -d "$additional_includedir"; then | |
7679 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7680 | fi | |
7681 | fi | |
7682 | fi | |
7683 | fi | |
7684 | fi | |
7685 | if test -n "$found_la"; then | |
7686 | save_libdir="$libdir" | |
7687 | case "$found_la" in | |
7688 | */* | *\\*) . "$found_la" ;; | |
7689 | *) . "./$found_la" ;; | |
7690 | esac | |
7691 | libdir="$save_libdir" | |
7692 | for dep in $dependency_libs; do | |
7693 | case "$dep" in | |
7694 | -L*) | |
7695 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7696 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7697 | haveit= | |
7698 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7699 | if test -n "$GCC"; then | |
7700 | case $host_os in | |
7701 | linux*) haveit=yes;; | |
7702 | esac | |
7703 | fi | |
7704 | fi | |
7705 | if test -z "$haveit"; then | |
7706 | haveit= | |
7707 | for x in $LDFLAGS $LIBEXPAT; do | |
7708 | ||
7709 | acl_save_prefix="$prefix" | |
7710 | prefix="$acl_final_prefix" | |
7711 | acl_save_exec_prefix="$exec_prefix" | |
7712 | exec_prefix="$acl_final_exec_prefix" | |
7713 | eval x=\"$x\" | |
7714 | exec_prefix="$acl_save_exec_prefix" | |
7715 | prefix="$acl_save_prefix" | |
7716 | ||
7717 | if test "X$x" = "X-L$additional_libdir"; then | |
7718 | haveit=yes | |
7719 | break | |
7720 | fi | |
7721 | done | |
7722 | if test -z "$haveit"; then | |
7723 | if test -d "$additional_libdir"; then | |
7724 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7725 | fi | |
7726 | fi | |
7727 | haveit= | |
7728 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7729 | ||
7730 | acl_save_prefix="$prefix" | |
7731 | prefix="$acl_final_prefix" | |
7732 | acl_save_exec_prefix="$exec_prefix" | |
7733 | exec_prefix="$acl_final_exec_prefix" | |
7734 | eval x=\"$x\" | |
7735 | exec_prefix="$acl_save_exec_prefix" | |
7736 | prefix="$acl_save_prefix" | |
7737 | ||
7738 | if test "X$x" = "X-L$additional_libdir"; then | |
7739 | haveit=yes | |
7740 | break | |
7741 | fi | |
7742 | done | |
7743 | if test -z "$haveit"; then | |
7744 | if test -d "$additional_libdir"; then | |
7745 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7746 | fi | |
7747 | fi | |
7748 | fi | |
7749 | fi | |
7750 | ;; | |
7751 | -R*) | |
7752 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7753 | if test "$enable_rpath" != no; then | |
7754 | haveit= | |
7755 | for x in $rpathdirs; do | |
7756 | if test "X$x" = "X$dir"; then | |
7757 | haveit=yes | |
7758 | break | |
7759 | fi | |
7760 | done | |
7761 | if test -z "$haveit"; then | |
7762 | rpathdirs="$rpathdirs $dir" | |
7763 | fi | |
7764 | haveit= | |
7765 | for x in $ltrpathdirs; do | |
7766 | if test "X$x" = "X$dir"; then | |
7767 | haveit=yes | |
7768 | break | |
7769 | fi | |
7770 | done | |
7771 | if test -z "$haveit"; then | |
7772 | ltrpathdirs="$ltrpathdirs $dir" | |
7773 | fi | |
7774 | fi | |
7775 | ;; | |
7776 | -l*) | |
7777 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7778 | ;; | |
7779 | *.la) | |
7780 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7781 | ;; | |
7782 | *) | |
7783 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
7784 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
7785 | ;; | |
81ecdfbb RW |
7786 | esac |
7787 | done | |
7788 | fi | |
7789 | else | |
7790 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7791 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
7792 | fi | |
7793 | fi | |
7794 | fi | |
7795 | done | |
7796 | done | |
7797 | if test "X$rpathdirs" != "X"; then | |
7798 | if test -n "$hardcode_libdir_separator"; then | |
7799 | alldirs= | |
7800 | for found_dir in $rpathdirs; do | |
7801 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7802 | done | |
7803 | acl_save_libdir="$libdir" | |
7804 | libdir="$alldirs" | |
7805 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7806 | libdir="$acl_save_libdir" | |
7807 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7808 | else | |
7809 | for found_dir in $rpathdirs; do | |
7810 | acl_save_libdir="$libdir" | |
7811 | libdir="$found_dir" | |
7812 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7813 | libdir="$acl_save_libdir" | |
7814 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7815 | done | |
7816 | fi | |
7817 | fi | |
7818 | if test "X$ltrpathdirs" != "X"; then | |
7819 | for found_dir in $ltrpathdirs; do | |
7820 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
7821 | done | |
7822 | fi | |
a9322a30 TT |
7823 | |
7824 | ||
81ecdfbb | 7825 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 7826 | |
81ecdfbb RW |
7827 | for element in $INCEXPAT; do |
7828 | haveit= | |
7829 | for x in $CPPFLAGS; do | |
a9322a30 | 7830 | |
81ecdfbb RW |
7831 | acl_save_prefix="$prefix" |
7832 | prefix="$acl_final_prefix" | |
7833 | acl_save_exec_prefix="$exec_prefix" | |
7834 | exec_prefix="$acl_final_exec_prefix" | |
7835 | eval x=\"$x\" | |
7836 | exec_prefix="$acl_save_exec_prefix" | |
7837 | prefix="$acl_save_prefix" | |
a8111142 | 7838 | |
81ecdfbb RW |
7839 | if test "X$x" = "X$element"; then |
7840 | haveit=yes | |
7841 | break | |
7842 | fi | |
7843 | done | |
7844 | if test -z "$haveit"; then | |
7845 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
7846 | fi | |
7847 | done | |
a9322a30 TT |
7848 | |
7849 | ||
81ecdfbb RW |
7850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
7851 | $as_echo_n "checking for libexpat... " >&6; } | |
7852 | if test "${ac_cv_libexpat+set}" = set; then : | |
7853 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7854 | else |
bec39cab | 7855 | |
81ecdfbb RW |
7856 | ac_save_LIBS="$LIBS" |
7857 | LIBS="$LIBS $LIBEXPAT" | |
7858 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 7859 | /* end confdefs.h. */ |
81ecdfbb RW |
7860 | #include "expat.h" |
7861 | int | |
7862 | main () | |
7863 | { | |
7864 | XML_Parser p = XML_ParserCreate (0); | |
7865 | ; | |
7866 | return 0; | |
7867 | } | |
bec39cab | 7868 | _ACEOF |
81ecdfbb RW |
7869 | if ac_fn_c_try_link "$LINENO"; then : |
7870 | ac_cv_libexpat=yes | |
c906108c | 7871 | else |
81ecdfbb | 7872 | ac_cv_libexpat=no |
bec39cab | 7873 | fi |
81ecdfbb RW |
7874 | rm -f core conftest.err conftest.$ac_objext \ |
7875 | conftest$ac_exeext conftest.$ac_ext | |
7876 | LIBS="$ac_save_LIBS" | |
c906108c | 7877 | |
95ca63c4 | 7878 | fi |
81ecdfbb RW |
7879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
7880 | $as_echo "$ac_cv_libexpat" >&6; } | |
7881 | if test "$ac_cv_libexpat" = yes; then | |
7882 | HAVE_LIBEXPAT=yes | |
bec39cab | 7883 | |
81ecdfbb | 7884 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 7885 | |
81ecdfbb RW |
7886 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
7887 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
7888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
7889 | $as_echo "$LIBEXPAT" >&6; } | |
7890 | else | |
7891 | HAVE_LIBEXPAT=no | |
7892 | CPPFLAGS="$ac_save_CPPFLAGS" | |
7893 | LIBEXPAT= | |
7894 | LTLIBEXPAT= | |
7895 | fi | |
95ca63c4 CF |
7896 | |
7897 | ||
7898 | ||
7cb9022a MK |
7899 | |
7900 | ||
bec39cab | 7901 | |
81ecdfbb RW |
7902 | if test "$HAVE_LIBEXPAT" != yes; then |
7903 | if test "$with_expat" = yes; then | |
7904 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
7905 | else | |
7906 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
7907 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
7908 | fi | |
7909 | else | |
7910 | save_LIBS=$LIBS | |
7911 | LIBS="$LIBS $LIBEXPAT" | |
7912 | for ac_func in XML_StopParser | |
7913 | do : | |
7914 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
7915 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 7916 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7917 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 7918 | _ACEOF |
95ca63c4 | 7919 | |
bec39cab | 7920 | fi |
bec39cab | 7921 | done |
95ca63c4 | 7922 | |
81ecdfbb RW |
7923 | LIBS=$save_LIBS |
7924 | fi | |
a9322a30 TT |
7925 | fi |
7926 | ||
a9322a30 | 7927 | |
a9322a30 TT |
7928 | |
7929 | ||
ec685c5e | 7930 | |
0c4a4063 | 7931 | |
81ecdfbb RW |
7932 | # Check whether --with-python was given. |
7933 | if test "${with_python+set}" = set; then : | |
7934 | withval=$with_python; | |
bec39cab | 7935 | else |
81ecdfbb | 7936 | with_python=auto |
bec39cab | 7937 | fi |
bec39cab | 7938 | |
81ecdfbb RW |
7939 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
7940 | $as_echo_n "checking whether to use python... " >&6; } | |
7941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
7942 | $as_echo "$with_python" >&6; } | |
9a156167 | 7943 | |
81ecdfbb RW |
7944 | if test "${with_python}" = no; then |
7945 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
7946 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
7947 | have_libpython=no | |
bec39cab | 7948 | else |
81ecdfbb | 7949 | case "${with_python}" in |
8c85a4e2 | 7950 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
7951 | if test -d ${with_python}; then |
7952 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 7953 | python_prog="${with_python}/bin/python" |
0c4a4063 | 7954 | python_prefix= |
9c4ea6c5 JB |
7955 | # If python does not exit ${with_python}/bin, then try in |
7956 | # ${with_python}. On Windows/MinGW, this is where the Python | |
7957 | # executable is. | |
7958 | if test ! -x "${python_prog}"; then | |
7959 | python_prog="${with_python}/python" | |
7960 | python_prefix= | |
7961 | fi | |
e7a30f46 | 7962 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
7963 | # Fall back to gdb 7.0/7.1 behaviour. |
7964 | python_prog=missing | |
0c4a4063 | 7965 | python_prefix=${with_python} |
ec685c5e | 7966 | fi |
e7a30f46 | 7967 | elif test -x "${with_python}"; then |
ec685c5e DE |
7968 | # While we can't run python compiled for $host (unless host == build), |
7969 | # the user could write a script that provides the needed information, | |
7970 | # so we support that. | |
ec685c5e | 7971 | python_prog=${with_python} |
0c4a4063 | 7972 | python_prefix= |
ec685c5e DE |
7973 | else |
7974 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
7975 | fi | |
81ecdfbb | 7976 | ;; |
ec685c5e DE |
7977 | */*) |
7978 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
7979 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
7980 | ;; | |
ec685c5e DE |
7981 | *) |
7982 | # The user has either specified auto, yes, or the name of the python | |
7983 | # program assumed to be in $PATH. | |
7984 | python_prefix= | |
7985 | case "${with_python}" in | |
7986 | yes | auto) | |
7987 | if test ${build} = ${host}; then | |
7988 | # Extract the first word of "python", so it can be a program name with args. | |
7989 | set dummy python; ac_word=$2 | |
7990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
7991 | $as_echo_n "checking for $ac_word... " >&6; } | |
7992 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
7993 | $as_echo_n "(cached) " >&6 | |
7994 | else | |
7995 | case $python_prog_path in | |
7996 | [\\/]* | ?:[\\/]*) | |
7997 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
7998 | ;; | |
7999 | *) | |
8000 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8001 | for as_dir in $PATH | |
8002 | do | |
8003 | IFS=$as_save_IFS | |
8004 | test -z "$as_dir" && as_dir=. | |
8005 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8006 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8007 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8008 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8009 | break 2 | |
8010 | fi | |
8011 | done | |
8012 | done | |
8013 | IFS=$as_save_IFS | |
8014 | ||
8015 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8016 | ;; | |
8017 | esac | |
8018 | fi | |
8019 | python_prog_path=$ac_cv_path_python_prog_path | |
8020 | if test -n "$python_prog_path"; then | |
8021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8022 | $as_echo "$python_prog_path" >&6; } | |
8023 | else | |
8024 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8025 | $as_echo "no" >&6; } | |
8026 | fi | |
8027 | ||
8028 | ||
8029 | if test "${python_prog_path}" = missing; then | |
8030 | python_prog=missing | |
8031 | else | |
8032 | python_prog=${python_prog_path} | |
8033 | fi | |
8034 | else | |
8035 | # Not much we can do except assume the cross-compiler will find the | |
8036 | # right files. | |
8037 | python_prog=missing | |
8038 | fi | |
8039 | ;; | |
8040 | *) | |
8041 | # While we can't run python compiled for $host (unless host == build), | |
8042 | # the user could write a script that provides the needed information, | |
8043 | # so we support that. | |
8044 | python_prog="${with_python}" | |
8045 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8046 | set dummy ${python_prog}; ac_word=$2 | |
8047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8048 | $as_echo_n "checking for $ac_word... " >&6; } | |
8049 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8050 | $as_echo_n "(cached) " >&6 | |
8051 | else | |
8052 | case $python_prog_path in | |
8053 | [\\/]* | ?:[\\/]*) | |
8054 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8055 | ;; | |
8056 | *) | |
8057 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8058 | for as_dir in $PATH | |
8059 | do | |
8060 | IFS=$as_save_IFS | |
8061 | test -z "$as_dir" && as_dir=. | |
8062 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8063 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8064 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8065 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8066 | break 2 | |
8067 | fi | |
8068 | done | |
8069 | done | |
8070 | IFS=$as_save_IFS | |
8071 | ||
8072 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8073 | ;; | |
8074 | esac | |
8075 | fi | |
8076 | python_prog_path=$ac_cv_path_python_prog_path | |
8077 | if test -n "$python_prog_path"; then | |
8078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8079 | $as_echo "$python_prog_path" >&6; } | |
8080 | else | |
8081 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8082 | $as_echo "no" >&6; } | |
8083 | fi | |
8084 | ||
8085 | ||
8086 | if test "${python_prog_path}" = missing; then | |
8087 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8088 | fi | |
8089 | ;; | |
8090 | esac | |
81ecdfbb RW |
8091 | esac |
8092 | ||
ec685c5e | 8093 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8094 | # We have a python program to use, but it may be too old. |
8095 | # Don't flag an error for --with-python=auto (the default). | |
8096 | have_python_config=yes | |
ec685c5e DE |
8097 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8098 | if test $? != 0; then | |
e7a30f46 DE |
8099 | have_python_config=failed |
8100 | if test "${with_python}" != auto; then | |
8101 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8102 | fi | |
ec685c5e DE |
8103 | fi |
8104 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8105 | if test $? != 0; then | |
e7a30f46 DE |
8106 | have_python_config=failed |
8107 | if test "${with_python}" != auto; then | |
8108 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8109 | fi | |
ec685c5e | 8110 | fi |
0c4a4063 DE |
8111 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8112 | if test $? != 0; then | |
e7a30f46 DE |
8113 | have_python_config=failed |
8114 | if test "${with_python}" != auto; then | |
8115 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8116 | fi | |
0c4a4063 | 8117 | fi |
ec685c5e | 8118 | else |
ac534cba JB |
8119 | # We do not have a python executable we can use to determine where |
8120 | # to find the Python headers and libs. We cannot guess the include | |
8121 | # path from the python_prefix either, because that include path | |
8122 | # depends on the Python version. So, there is nothing much we can | |
8123 | # do except assume that the compiler will be able to find those files. | |
8124 | python_includes= | |
8125 | python_libs= | |
0c4a4063 | 8126 | have_python_config=no |
ec685c5e | 8127 | fi |
bec39cab | 8128 | |
ec685c5e DE |
8129 | # If we have python-config, only try the configuration it provides. |
8130 | # Otherwise fallback on the old way of trying different versions of | |
8131 | # python in turn. | |
81ecdfbb | 8132 | |
ec685c5e DE |
8133 | have_libpython=no |
8134 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8135 | # Determine the Python version by extracting "-lpython<version>" |
8136 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8137 | # being decimal numbers, but can also be XY (seen on Windows). | |
8138 | # | |
8139 | # The extraction is performed using sed with a regular expression. | |
8140 | # Initially, the regexp used was using the '?' quantifier to make | |
8141 | # the dot in the version number optional. Unfortunately, this | |
8142 | # does not work with non-GNU versions of sed because, because of | |
8143 | # what looks like a limitation (the '?' quantifier does not work | |
8144 | # with back-references). We work around this limitation by using | |
8145 | # the '*' quantifier instead. It means that, in theory, we might | |
8146 | # match unexpected version strings such as "-lpython2..7", but | |
8147 | # this seems unlikely in practice. And even if that happens, | |
8148 | # an error will be triggered later on, when checking that version | |
8149 | # number. | |
ec685c5e | 8150 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8151 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8152 | case "${python_version}" in |
8153 | python*) | |
ec685c5e DE |
8154 | |
8155 | version=${python_version} | |
8156 | ||
8157 | new_CPPFLAGS=${python_includes} | |
8158 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8160 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8161 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8162 | save_LIBS=$LIBS |
ec685c5e DE |
8163 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8164 | LIBS="$LIBS $new_LIBS" | |
8165 | found_usable_python=no | |
81ecdfbb | 8166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8167 | /* end confdefs.h. */ |
ac534cba | 8168 | #include "Python.h" |
81ecdfbb RW |
8169 | int |
8170 | main () | |
8171 | { | |
8172 | Py_Initialize (); | |
8173 | ; | |
8174 | return 0; | |
8175 | } | |
bec39cab | 8176 | _ACEOF |
81ecdfbb | 8177 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8178 | have_libpython=${version} |
8179 | found_usable_python=yes | |
ac534cba JB |
8180 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8181 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8182 | fi |
81ecdfbb RW |
8183 | rm -f core conftest.err conftest.$ac_objext \ |
8184 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8185 | CPPFLAGS=$save_CPPFLAGS |
8186 | LIBS=$save_LIBS | |
ec685c5e DE |
8187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8188 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8189 | |
0c4a4063 DE |
8190 | ;; |
8191 | *) | |
ec685c5e | 8192 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8193 | ;; |
8194 | esac | |
e7a30f46 | 8195 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8196 | if test "${have_libpython}" = no; then |
9a156167 | 8197 | |
420697bb TT |
8198 | version=python2.7 |
8199 | ||
8200 | new_CPPFLAGS=${python_includes} | |
8201 | new_LIBS="${python_libs} -lpython2.7" | |
8202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8203 | $as_echo_n "checking for ${version}... " >&6; } | |
8204 | save_CPPFLAGS=$CPPFLAGS | |
8205 | save_LIBS=$LIBS | |
8206 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8207 | LIBS="$LIBS $new_LIBS" | |
8208 | found_usable_python=no | |
8209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8210 | /* end confdefs.h. */ | |
ac534cba | 8211 | #include "Python.h" |
420697bb TT |
8212 | int |
8213 | main () | |
8214 | { | |
8215 | Py_Initialize (); | |
8216 | ; | |
8217 | return 0; | |
8218 | } | |
8219 | _ACEOF | |
8220 | if ac_fn_c_try_link "$LINENO"; then : | |
8221 | have_libpython=${version} | |
8222 | found_usable_python=yes | |
ac534cba JB |
8223 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8224 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8225 | fi |
8226 | rm -f core conftest.err conftest.$ac_objext \ | |
8227 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8228 | CPPFLAGS=$save_CPPFLAGS |
8229 | LIBS=$save_LIBS | |
420697bb TT |
8230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8231 | $as_echo "${found_usable_python}" >&6; } | |
8232 | ||
8233 | fi | |
8234 | if test "${have_libpython}" = no; then | |
8235 | ||
ec685c5e DE |
8236 | version=python2.6 |
8237 | ||
8238 | new_CPPFLAGS=${python_includes} | |
8239 | new_LIBS="${python_libs} -lpython2.6" | |
8240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8241 | $as_echo_n "checking for ${version}... " >&6; } | |
8242 | save_CPPFLAGS=$CPPFLAGS | |
8243 | save_LIBS=$LIBS | |
8244 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8245 | LIBS="$LIBS $new_LIBS" | |
8246 | found_usable_python=no | |
8247 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8248 | /* end confdefs.h. */ | |
ac534cba | 8249 | #include "Python.h" |
ec685c5e DE |
8250 | int |
8251 | main () | |
8252 | { | |
8253 | Py_Initialize (); | |
8254 | ; | |
8255 | return 0; | |
8256 | } | |
8257 | _ACEOF | |
8258 | if ac_fn_c_try_link "$LINENO"; then : | |
8259 | have_libpython=${version} | |
8260 | found_usable_python=yes | |
ac534cba JB |
8261 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8262 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8263 | fi |
8264 | rm -f core conftest.err conftest.$ac_objext \ | |
8265 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8266 | CPPFLAGS=$save_CPPFLAGS |
8267 | LIBS=$save_LIBS | |
ec685c5e DE |
8268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8269 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8270 | |
81ecdfbb | 8271 | fi |
ec685c5e | 8272 | if test ${have_libpython} = no; then |
9a156167 | 8273 | |
81ecdfbb | 8274 | version=python2.5 |
9a156167 | 8275 | |
ec685c5e DE |
8276 | new_CPPFLAGS=${python_includes} |
8277 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8279 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8280 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8281 | save_LIBS=$LIBS |
ec685c5e DE |
8282 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8283 | LIBS="$LIBS $new_LIBS" | |
8284 | found_usable_python=no | |
81ecdfbb | 8285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8286 | /* end confdefs.h. */ |
ac534cba | 8287 | #include "Python.h" |
81ecdfbb RW |
8288 | int |
8289 | main () | |
8290 | { | |
8291 | Py_Initialize (); | |
8292 | ; | |
8293 | return 0; | |
8294 | } | |
436868fb | 8295 | _ACEOF |
81ecdfbb | 8296 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8297 | have_libpython=${version} |
8298 | found_usable_python=yes | |
ac534cba JB |
8299 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8300 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8301 | fi |
81ecdfbb RW |
8302 | rm -f core conftest.err conftest.$ac_objext \ |
8303 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8304 | CPPFLAGS=$save_CPPFLAGS |
8305 | LIBS=$save_LIBS | |
ec685c5e DE |
8306 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8307 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8308 | |
81ecdfbb | 8309 | fi |
ec685c5e | 8310 | if test ${have_libpython} = no; then |
a9322a30 | 8311 | |
81ecdfbb | 8312 | version=python2.4 |
a9322a30 | 8313 | |
ec685c5e DE |
8314 | new_CPPFLAGS=${python_includes} |
8315 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8316 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8317 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8318 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8319 | save_LIBS=$LIBS |
ec685c5e DE |
8320 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8321 | LIBS="$LIBS $new_LIBS" | |
8322 | found_usable_python=no | |
81ecdfbb | 8323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8324 | /* end confdefs.h. */ |
ac534cba | 8325 | #include "Python.h" |
a9322a30 TT |
8326 | int |
8327 | main () | |
8328 | { | |
81ecdfbb | 8329 | Py_Initialize (); |
a9322a30 TT |
8330 | ; |
8331 | return 0; | |
8332 | } | |
436868fb | 8333 | _ACEOF |
81ecdfbb | 8334 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8335 | have_libpython=${version} |
8336 | found_usable_python=yes | |
ac534cba JB |
8337 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8338 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8339 | fi |
81ecdfbb RW |
8340 | rm -f core conftest.err conftest.$ac_objext \ |
8341 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8342 | CPPFLAGS=$save_CPPFLAGS |
8343 | LIBS=$save_LIBS | |
ec685c5e DE |
8344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8345 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8346 | |
ec685c5e DE |
8347 | fi |
8348 | fi | |
9c4ea6c5 | 8349 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8350 | |
8351 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8352 | ||
9c4ea6c5 | 8353 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8354 | |
8355 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8356 | ||
9c4ea6c5 | 8357 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8358 | |
8359 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8360 | ||
9c4ea6c5 | 8361 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8362 | |
8363 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8364 | ||
81ecdfbb | 8365 | fi |
ec685c5e DE |
8366 | |
8367 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8368 | case "${with_python}" in |
8369 | yes) | |
8370 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8371 | ;; | |
8372 | auto) | |
8373 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8374 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8375 | ;; | |
8376 | *) | |
8377 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8378 | ;; | |
8379 | esac | |
0c4a4063 DE |
8380 | else |
8381 | if test -n "${python_prefix}"; then | |
8382 | ||
8383 | cat >>confdefs.h <<_ACEOF | |
8384 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8385 | _ACEOF | |
8386 | ||
8387 | ||
8388 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8389 | if test "x$prefix" = xNONE; then | |
8390 | test_prefix=/usr/local | |
8391 | else | |
8392 | test_prefix=$prefix | |
8393 | fi | |
8394 | else | |
8395 | test_prefix=$exec_prefix | |
8396 | fi | |
8397 | value=0 | |
8398 | case ${python_prefix} in | |
8399 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8400 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8401 | value=1 | |
8402 | ;; | |
8403 | esac | |
8404 | ||
8405 | cat >>confdefs.h <<_ACEOF | |
8406 | #define PYTHON_PATH_RELOCATABLE $value | |
8407 | _ACEOF | |
8408 | ||
8409 | ||
8410 | fi | |
81ecdfbb | 8411 | fi |
436868fb | 8412 | fi |
436868fb | 8413 | |
ec685c5e | 8414 | if test "${have_libpython}" != no; then |
436868fb | 8415 | |
81ecdfbb | 8416 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8417 | |
81ecdfbb RW |
8418 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8419 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8420 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8421 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8422 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8423 | |
81ecdfbb RW |
8424 | # Flags needed to compile Python code (taken from python-config --cflags). |
8425 | # We cannot call python-config directly because it will output whatever was | |
8426 | # used when compiling the Python interpreter itself, including flags which | |
8427 | # would make the python-related objects be compiled differently from the | |
8428 | # rest of GDB (e.g., -O2 and -fPIC). | |
8429 | if test "${GCC}" = yes; then | |
8430 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8431 | fi | |
436868fb | 8432 | |
81ecdfbb RW |
8433 | if test "x${tentative_python_cflags}" != x; then |
8434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8435 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8436 | for flag in ${tentative_python_cflags}; do | |
8437 | # Check that the compiler accepts it | |
8438 | saved_CFLAGS="$CFLAGS" | |
8439 | CFLAGS="$CFLAGS $flag" | |
8440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8441 | /* end confdefs.h. */ |
81ecdfbb | 8442 | |
a9322a30 TT |
8443 | int |
8444 | main () | |
8445 | { | |
a9322a30 TT |
8446 | |
8447 | ; | |
8448 | return 0; | |
8449 | } | |
bec39cab | 8450 | _ACEOF |
81ecdfbb RW |
8451 | if ac_fn_c_try_compile "$LINENO"; then : |
8452 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8453 | fi |
81ecdfbb RW |
8454 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8455 | CFLAGS="$saved_CFLAGS" | |
8456 | done | |
8457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8458 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8459 | fi | |
043b6510 JB |
8460 | |
8461 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
8462 | # #if _SGIAPI | |
8463 | # #define siginfo __siginfo | |
8464 | # #endif | |
8465 | # The problem is that including Python causes some XOPEN macros to be | |
8466 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
8467 | # to false. So, we work around this issue by defining siginfo ourself | |
8468 | # though the command-line. | |
8469 | case "$gdb_host" in | |
8470 | irix*) if test "${GCC}" = yes; then | |
8471 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
8472 | fi | |
8473 | ;; | |
8474 | esac | |
81ecdfbb RW |
8475 | else |
8476 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
8477 | # included. |
8478 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
8479 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
8480 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 8481 | fi |
9a156167 | 8482 | |
9a156167 | 8483 | |
ac534cba JB |
8484 | |
8485 | ||
81ecdfbb RW |
8486 | # ------------------------- # |
8487 | # Checks for header files. # | |
8488 | # ------------------------- # | |
c890192f | 8489 | |
81ecdfbb RW |
8490 | ac_header_dirent=no |
8491 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
8492 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
8493 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
8494 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
8495 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8496 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8497 | else |
81ecdfbb | 8498 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8499 | /* end confdefs.h. */ |
81ecdfbb RW |
8500 | #include <sys/types.h> |
8501 | #include <$ac_hdr> | |
8502 | ||
a9322a30 TT |
8503 | int |
8504 | main () | |
8505 | { | |
81ecdfbb RW |
8506 | if ((DIR *) 0) |
8507 | return 0; | |
a9322a30 TT |
8508 | ; |
8509 | return 0; | |
8510 | } | |
bec39cab | 8511 | _ACEOF |
81ecdfbb RW |
8512 | if ac_fn_c_try_compile "$LINENO"; then : |
8513 | eval "$as_ac_Header=yes" | |
bec39cab | 8514 | else |
81ecdfbb | 8515 | eval "$as_ac_Header=no" |
bec39cab | 8516 | fi |
81ecdfbb | 8517 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 8518 | fi |
81ecdfbb RW |
8519 | eval ac_res=\$$as_ac_Header |
8520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8521 | $as_echo "$ac_res" >&6; } | |
8522 | eval as_val=\$$as_ac_Header | |
8523 | if test "x$as_val" = x""yes; then : | |
8524 | cat >>confdefs.h <<_ACEOF | |
8525 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 8526 | _ACEOF |
bec39cab | 8527 | |
81ecdfbb RW |
8528 | ac_header_dirent=$ac_hdr; break |
8529 | fi | |
bec39cab | 8530 | |
81ecdfbb RW |
8531 | done |
8532 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
8533 | if test $ac_header_dirent = dirent.h; then | |
8534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
8535 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8536 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8537 | $as_echo_n "(cached) " >&6 | |
c890192f | 8538 | else |
81ecdfbb RW |
8539 | ac_func_search_save_LIBS=$LIBS |
8540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8541 | /* end confdefs.h. */ | |
8542 | ||
8543 | /* Override any GCC internal prototype to avoid an error. | |
8544 | Use char because int might match the return type of a GCC | |
8545 | builtin and then its argument prototype would still apply. */ | |
8546 | #ifdef __cplusplus | |
8547 | extern "C" | |
8548 | #endif | |
8549 | char opendir (); | |
8550 | int | |
8551 | main () | |
8552 | { | |
8553 | return opendir (); | |
8554 | ; | |
8555 | return 0; | |
8556 | } | |
bec39cab | 8557 | _ACEOF |
81ecdfbb RW |
8558 | for ac_lib in '' dir; do |
8559 | if test -z "$ac_lib"; then | |
8560 | ac_res="none required" | |
8561 | else | |
8562 | ac_res=-l$ac_lib | |
8563 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8564 | fi | |
8565 | if ac_fn_c_try_link "$LINENO"; then : | |
8566 | ac_cv_search_opendir=$ac_res | |
8567 | fi | |
8568 | rm -f core conftest.err conftest.$ac_objext \ | |
8569 | conftest$ac_exeext | |
8570 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8571 | break | |
8572 | fi | |
8573 | done | |
8574 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 8575 | |
81ecdfbb RW |
8576 | else |
8577 | ac_cv_search_opendir=no | |
8578 | fi | |
8579 | rm conftest.$ac_ext | |
8580 | LIBS=$ac_func_search_save_LIBS | |
8581 | fi | |
8582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
8583 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8584 | ac_res=$ac_cv_search_opendir | |
8585 | if test "$ac_res" != no; then : | |
8586 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8587 | |
bec39cab | 8588 | fi |
81ecdfbb | 8589 | |
bec39cab | 8590 | else |
81ecdfbb RW |
8591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
8592 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8593 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8594 | $as_echo_n "(cached) " >&6 | |
8595 | else | |
8596 | ac_func_search_save_LIBS=$LIBS | |
8597 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8598 | /* end confdefs.h. */ |
81ecdfbb RW |
8599 | |
8600 | /* Override any GCC internal prototype to avoid an error. | |
8601 | Use char because int might match the return type of a GCC | |
8602 | builtin and then its argument prototype would still apply. */ | |
8603 | #ifdef __cplusplus | |
8604 | extern "C" | |
8605 | #endif | |
8606 | char opendir (); | |
a9322a30 TT |
8607 | int |
8608 | main () | |
8609 | { | |
81ecdfbb | 8610 | return opendir (); |
a9322a30 TT |
8611 | ; |
8612 | return 0; | |
8613 | } | |
bec39cab | 8614 | _ACEOF |
81ecdfbb RW |
8615 | for ac_lib in '' x; do |
8616 | if test -z "$ac_lib"; then | |
8617 | ac_res="none required" | |
8618 | else | |
8619 | ac_res=-l$ac_lib | |
8620 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8621 | fi | |
8622 | if ac_fn_c_try_link "$LINENO"; then : | |
8623 | ac_cv_search_opendir=$ac_res | |
8624 | fi | |
8625 | rm -f core conftest.err conftest.$ac_objext \ | |
8626 | conftest$ac_exeext | |
8627 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8628 | break | |
8629 | fi | |
8630 | done | |
8631 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 8632 | |
81ecdfbb RW |
8633 | else |
8634 | ac_cv_search_opendir=no | |
bec39cab | 8635 | fi |
81ecdfbb RW |
8636 | rm conftest.$ac_ext |
8637 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 8638 | fi |
81ecdfbb RW |
8639 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
8640 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8641 | ac_res=$ac_cv_search_opendir | |
8642 | if test "$ac_res" != no; then : | |
8643 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8644 | |
81ecdfbb | 8645 | fi |
bec39cab | 8646 | |
81ecdfbb | 8647 | fi |
bec39cab | 8648 | |
81ecdfbb RW |
8649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
8650 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
8651 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
8652 | $as_echo_n "(cached) " >&6 | |
9a156167 | 8653 | else |
81ecdfbb RW |
8654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8655 | /* end confdefs.h. */ | |
8656 | #include <sys/types.h> | |
8657 | #include <sys/stat.h> | |
8658 | ||
8659 | #if defined S_ISBLK && defined S_IFDIR | |
8660 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
8661 | #endif | |
8662 | ||
8663 | #if defined S_ISBLK && defined S_IFCHR | |
8664 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
8665 | #endif | |
8666 | ||
8667 | #if defined S_ISLNK && defined S_IFREG | |
8668 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
8669 | #endif | |
8670 | ||
8671 | #if defined S_ISSOCK && defined S_IFREG | |
8672 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
8673 | #endif | |
8674 | ||
bec39cab | 8675 | _ACEOF |
81ecdfbb RW |
8676 | if ac_fn_c_try_compile "$LINENO"; then : |
8677 | ac_cv_header_stat_broken=no | |
8678 | else | |
8679 | ac_cv_header_stat_broken=yes | |
8680 | fi | |
8681 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8682 | fi | |
8683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
8684 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
8685 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 8686 | |
81ecdfbb | 8687 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 8688 | |
bec39cab | 8689 | fi |
81ecdfbb RW |
8690 | |
8691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
8692 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
8693 | if test "${ac_cv_header_stdc+set}" = set; then : | |
8694 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8695 | else |
81ecdfbb | 8696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8697 | /* end confdefs.h. */ |
81ecdfbb RW |
8698 | #include <stdlib.h> |
8699 | #include <stdarg.h> | |
8700 | #include <string.h> | |
8701 | #include <float.h> | |
8702 | ||
a9322a30 TT |
8703 | int |
8704 | main () | |
8705 | { | |
a9322a30 TT |
8706 | |
8707 | ; | |
8708 | return 0; | |
8709 | } | |
bec39cab | 8710 | _ACEOF |
81ecdfbb RW |
8711 | if ac_fn_c_try_compile "$LINENO"; then : |
8712 | ac_cv_header_stdc=yes | |
bec39cab | 8713 | else |
81ecdfbb | 8714 | ac_cv_header_stdc=no |
a9322a30 | 8715 | fi |
81ecdfbb | 8716 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8717 | |
81ecdfbb RW |
8718 | if test $ac_cv_header_stdc = yes; then |
8719 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
8720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8721 | /* end confdefs.h. */ | |
8722 | #include <string.h> | |
bec39cab | 8723 | |
81ecdfbb RW |
8724 | _ACEOF |
8725 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8726 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 8727 | |
bec39cab | 8728 | else |
81ecdfbb RW |
8729 | ac_cv_header_stdc=no |
8730 | fi | |
8731 | rm -f conftest* | |
8732 | ||
8733 | fi | |
8734 | ||
8735 | if test $ac_cv_header_stdc = yes; then | |
8736 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
8737 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8738 | /* end confdefs.h. */ | |
8739 | #include <stdlib.h> | |
8740 | ||
bec39cab | 8741 | _ACEOF |
81ecdfbb RW |
8742 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8743 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 8744 | |
81ecdfbb RW |
8745 | else |
8746 | ac_cv_header_stdc=no | |
8747 | fi | |
8748 | rm -f conftest* | |
bec39cab | 8749 | |
bec39cab | 8750 | fi |
81ecdfbb RW |
8751 | |
8752 | if test $ac_cv_header_stdc = yes; then | |
8753 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
8754 | if test "$cross_compiling" = yes; then : | |
8755 | : | |
bec39cab | 8756 | else |
81ecdfbb | 8757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8758 | /* end confdefs.h. */ |
81ecdfbb RW |
8759 | #include <ctype.h> |
8760 | #include <stdlib.h> | |
8761 | #if ((' ' & 0x0FF) == 0x020) | |
8762 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8763 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8764 | #else | |
8765 | # define ISLOWER(c) \ | |
8766 | (('a' <= (c) && (c) <= 'i') \ | |
8767 | || ('j' <= (c) && (c) <= 'r') \ | |
8768 | || ('s' <= (c) && (c) <= 'z')) | |
8769 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
8770 | #endif | |
8771 | ||
8772 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
8773 | int |
8774 | main () | |
8775 | { | |
81ecdfbb RW |
8776 | int i; |
8777 | for (i = 0; i < 256; i++) | |
8778 | if (XOR (islower (i), ISLOWER (i)) | |
8779 | || toupper (i) != TOUPPER (i)) | |
8780 | return 2; | |
a9322a30 TT |
8781 | return 0; |
8782 | } | |
bec39cab | 8783 | _ACEOF |
81ecdfbb RW |
8784 | if ac_fn_c_try_run "$LINENO"; then : |
8785 | ||
bec39cab | 8786 | else |
81ecdfbb RW |
8787 | ac_cv_header_stdc=no |
8788 | fi | |
8789 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8790 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8791 | fi | |
bec39cab | 8792 | |
bec39cab | 8793 | fi |
a9322a30 | 8794 | fi |
81ecdfbb RW |
8795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
8796 | $as_echo "$ac_cv_header_stdc" >&6; } | |
8797 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 8798 | |
81ecdfbb | 8799 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 8800 | |
81ecdfbb | 8801 | fi |
bec39cab | 8802 | |
81ecdfbb RW |
8803 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8804 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
8805 | # unconditionally, so what's the point in checking these? | |
8806 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
8807 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
8808 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
8809 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
8810 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
8811 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
8812 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
a2d08b9e | 8813 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \ |
2fa291ac | 8814 | dlfcn.h sys/socket.h sys/un.h |
81ecdfbb RW |
8815 | do : |
8816 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8817 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8818 | eval as_val=\$$as_ac_Header | |
8819 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8820 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8821 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8822 | _ACEOF |
c906108c | 8823 | |
bec39cab | 8824 | fi |
81ecdfbb RW |
8825 | |
8826 | done | |
8827 | ||
8828 | for ac_header in link.h | |
8829 | do : | |
8830 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
8831 | # include <sys/types.h> | |
8832 | #endif | |
8833 | #if HAVE_NLIST_H | |
8834 | # include <nlist.h> | |
a9322a30 TT |
8835 | #endif |
8836 | ||
81ecdfbb RW |
8837 | " |
8838 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
8839 | cat >>confdefs.h <<_ACEOF | |
8840 | #define HAVE_LINK_H 1 | |
bec39cab | 8841 | _ACEOF |
bec39cab | 8842 | |
a9322a30 | 8843 | fi |
bec39cab | 8844 | |
81ecdfbb | 8845 | done |
c906108c | 8846 | |
81ecdfbb RW |
8847 | for ac_header in sys/proc.h |
8848 | do : | |
8849 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
8850 | # include <sys/param.h> | |
8851 | #endif | |
c906108c | 8852 | |
81ecdfbb RW |
8853 | " |
8854 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 8855 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8856 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 8857 | _ACEOF |
5ee754fc | 8858 | |
bec39cab | 8859 | fi |
81ecdfbb RW |
8860 | |
8861 | done | |
8862 | ||
8863 | for ac_header in sys/user.h | |
8864 | do : | |
8865 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
8866 | # include <sys/param.h> | |
a9322a30 TT |
8867 | #endif |
8868 | ||
81ecdfbb RW |
8869 | " |
8870 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
8871 | cat >>confdefs.h <<_ACEOF | |
8872 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 8873 | _ACEOF |
bec39cab | 8874 | |
a9322a30 | 8875 | fi |
bec39cab | 8876 | |
81ecdfbb | 8877 | done |
5ee754fc | 8878 | |
5ee754fc | 8879 | |
81ecdfbb RW |
8880 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
8881 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
8882 | # think that we don't have <curses.h> if we're using GCC. | |
8883 | case $host_os in | |
8884 | solaris2.[789]) | |
8885 | if test "$GCC" = yes; then | |
8886 | ||
8887 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
8888 | ||
8889 | fi ;; | |
8890 | esac | |
8891 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
8892 | do : | |
8893 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8894 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8895 | eval as_val=\$$as_ac_Header | |
8896 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8897 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8898 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8899 | _ACEOF |
5ee754fc MK |
8900 | |
8901 | fi | |
8902 | ||
81ecdfbb | 8903 | done |
bec39cab | 8904 | |
81ecdfbb RW |
8905 | for ac_header in term.h |
8906 | do : | |
8907 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
8908 | # include <curses.h> | |
8909 | #endif | |
bec39cab | 8910 | |
81ecdfbb RW |
8911 | " |
8912 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
8913 | cat >>confdefs.h <<_ACEOF | |
8914 | #define HAVE_TERM_H 1 | |
a8111142 | 8915 | _ACEOF |
a8111142 | 8916 | |
a8111142 | 8917 | fi |
a8111142 | 8918 | |
81ecdfbb | 8919 | done |
a8111142 TT |
8920 | |
8921 | ||
81ecdfbb RW |
8922 | # ------------------------- # |
8923 | # Checks for declarations. # | |
8924 | # ------------------------- # | |
a9322a30 | 8925 | |
81ecdfbb RW |
8926 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
8927 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
8928 | ac_have_decl=1 | |
bec39cab | 8929 | else |
81ecdfbb RW |
8930 | ac_have_decl=0 |
8931 | fi | |
8932 | ||
8933 | cat >>confdefs.h <<_ACEOF | |
8934 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 8935 | _ACEOF |
81ecdfbb RW |
8936 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
8937 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
8938 | ac_have_decl=1 | |
8939 | else | |
8940 | ac_have_decl=0 | |
8941 | fi | |
8942 | ||
8943 | cat >>confdefs.h <<_ACEOF | |
8944 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 8945 | _ACEOF |
81ecdfbb RW |
8946 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
8947 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
8948 | ac_have_decl=1 | |
bec39cab | 8949 | else |
81ecdfbb RW |
8950 | ac_have_decl=0 |
8951 | fi | |
bec39cab | 8952 | |
81ecdfbb RW |
8953 | cat >>confdefs.h <<_ACEOF |
8954 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 8955 | _ACEOF |
81ecdfbb RW |
8956 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
8957 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
8958 | ac_have_decl=1 | |
8959 | else | |
8960 | ac_have_decl=0 | |
8961 | fi | |
8962 | ||
8963 | cat >>confdefs.h <<_ACEOF | |
8964 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 8965 | _ACEOF |
81ecdfbb RW |
8966 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
8967 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
8968 | ac_have_decl=1 | |
bec39cab | 8969 | else |
81ecdfbb RW |
8970 | ac_have_decl=0 |
8971 | fi | |
5ee754fc | 8972 | |
81ecdfbb RW |
8973 | cat >>confdefs.h <<_ACEOF |
8974 | #define HAVE_DECL_STRSTR $ac_have_decl | |
8975 | _ACEOF | |
8976 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
8977 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
8978 | ac_have_decl=1 | |
8979 | else | |
8980 | ac_have_decl=0 | |
5ee754fc | 8981 | fi |
81ecdfbb RW |
8982 | |
8983 | cat >>confdefs.h <<_ACEOF | |
8984 | #define HAVE_DECL_GETOPT $ac_have_decl | |
8985 | _ACEOF | |
8986 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
8987 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
8988 | ac_have_decl=1 | |
8989 | else | |
8990 | ac_have_decl=0 | |
5ee754fc | 8991 | fi |
81ecdfbb RW |
8992 | |
8993 | cat >>confdefs.h <<_ACEOF | |
8994 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
8995 | _ACEOF | |
8996 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
8997 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
8998 | ac_have_decl=1 | |
8999 | else | |
9000 | ac_have_decl=0 | |
5ee754fc MK |
9001 | fi |
9002 | ||
a9322a30 | 9003 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9004 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 9005 | _ACEOF |
5ee754fc | 9006 | |
5ee754fc | 9007 | |
81ecdfbb RW |
9008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9009 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9010 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9011 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9012 | else |
81ecdfbb | 9013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9014 | /* end confdefs.h. */ |
81ecdfbb | 9015 | #include <locale.h> |
a9322a30 TT |
9016 | int |
9017 | main () | |
9018 | { | |
81ecdfbb | 9019 | return LC_MESSAGES |
a9322a30 TT |
9020 | ; |
9021 | return 0; | |
9022 | } | |
bec39cab | 9023 | _ACEOF |
81ecdfbb RW |
9024 | if ac_fn_c_try_link "$LINENO"; then : |
9025 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9026 | else |
81ecdfbb RW |
9027 | am_cv_val_LC_MESSAGES=no |
9028 | fi | |
9029 | rm -f core conftest.err conftest.$ac_objext \ | |
9030 | conftest$ac_exeext conftest.$ac_ext | |
9031 | fi | |
9032 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9033 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9034 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9035 | |
81ecdfbb RW |
9036 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9037 | ||
9038 | fi | |
9039 | ||
9040 | ||
9041 | # ----------------------- # | |
9042 | # Checks for structures. # | |
9043 | # ----------------------- # | |
9044 | ||
9045 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9046 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9047 | ||
9048 | cat >>confdefs.h <<_ACEOF | |
9049 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9050 | _ACEOF |
7eb368b3 | 9051 | |
81ecdfbb | 9052 | |
7eb368b3 | 9053 | fi |
81ecdfbb RW |
9054 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9055 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9056 | |
a9322a30 TT |
9057 | cat >>confdefs.h <<_ACEOF |
9058 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9059 | _ACEOF |
9060 | ||
a9322a30 | 9061 | |
7eb368b3 NR |
9062 | fi |
9063 | ||
7eb368b3 | 9064 | |
a9322a30 TT |
9065 | # ------------------ # |
9066 | # Checks for types. # | |
9067 | # ------------------ # | |
7eb368b3 | 9068 | |
81ecdfbb RW |
9069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9070 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9071 | if test "${ac_cv_type_signal+set}" = set; then : | |
9072 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9073 | else |
81ecdfbb | 9074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9075 | /* end confdefs.h. */ |
a9322a30 TT |
9076 | #include <sys/types.h> |
9077 | #include <signal.h> | |
7cb9022a | 9078 | |
a9322a30 TT |
9079 | int |
9080 | main () | |
9081 | { | |
81ecdfbb | 9082 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9083 | ; |
9084 | return 0; | |
9085 | } | |
bec39cab | 9086 | _ACEOF |
81ecdfbb RW |
9087 | if ac_fn_c_try_compile "$LINENO"; then : |
9088 | ac_cv_type_signal=int | |
bec39cab | 9089 | else |
81ecdfbb | 9090 | ac_cv_type_signal=void |
bec39cab | 9091 | fi |
81ecdfbb | 9092 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9093 | fi |
81ecdfbb RW |
9094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9095 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9096 | |
a9322a30 TT |
9097 | cat >>confdefs.h <<_ACEOF |
9098 | #define RETSIGTYPE $ac_cv_type_signal | |
9099 | _ACEOF | |
5ee754fc | 9100 | |
bec39cab | 9101 | |
81ecdfbb | 9102 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9103 | #include <sys/socket.h> |
9104 | ||
81ecdfbb RW |
9105 | " |
9106 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9107 | |
a9322a30 TT |
9108 | cat >>confdefs.h <<_ACEOF |
9109 | #define HAVE_SOCKLEN_T 1 | |
9110 | _ACEOF | |
9111 | ||
9112 | ||
9113 | fi | |
9114 | ||
9115 | ||
9116 | # ------------------------------------- # | |
9117 | # Checks for compiler characteristics. # | |
9118 | # ------------------------------------- # | |
9119 | ||
81ecdfbb RW |
9120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9121 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9122 | if test "${ac_cv_c_const+set}" = set; then : | |
9123 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9124 | else |
81ecdfbb | 9125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9126 | /* end confdefs.h. */ |
a9322a30 TT |
9127 | |
9128 | int | |
9129 | main () | |
9130 | { | |
9131 | /* FIXME: Include the comments suggested by Paul. */ | |
9132 | #ifndef __cplusplus | |
9133 | /* Ultrix mips cc rejects this. */ | |
9134 | typedef int charset[2]; | |
81ecdfbb | 9135 | const charset cs; |
a9322a30 | 9136 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9137 | char const *const *pcpcc; |
9138 | char **ppc; | |
a9322a30 TT |
9139 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9140 | struct point {int x, y;}; | |
9141 | static struct point const zero = {0,0}; | |
9142 | /* AIX XL C 1.02.0.0 rejects this. | |
9143 | It does not let you subtract one const X* pointer from another in | |
9144 | an arm of an if-expression whose if-part is not a constant | |
9145 | expression */ | |
9146 | const char *g = "string"; | |
81ecdfbb | 9147 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9148 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9149 | ++pcpcc; |
9150 | ppc = (char**) pcpcc; | |
9151 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9152 | { /* SCO 3.2v4 cc rejects this. */ |
9153 | char *t; | |
9154 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9155 | ||
9156 | *t++ = 0; | |
81ecdfbb | 9157 | if (s) return 0; |
a9322a30 TT |
9158 | } |
9159 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9160 | int x[] = {25, 17}; | |
9161 | const int *foo = &x[0]; | |
9162 | ++foo; | |
9163 | } | |
9164 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9165 | typedef const int *iptr; | |
9166 | iptr p = 0; | |
9167 | ++p; | |
9168 | } | |
9169 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9170 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9171 | struct s { int j; const int *ap[3]; }; | |
9172 | struct s *b; b->j = 5; | |
9173 | } | |
9174 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9175 | const int foo = 10; | |
81ecdfbb | 9176 | if (!foo) return 0; |
a9322a30 | 9177 | } |
81ecdfbb | 9178 | return !cs[0] && !zero.x; |
a9322a30 TT |
9179 | #endif |
9180 | ||
9181 | ; | |
9182 | return 0; | |
9183 | } | |
bec39cab | 9184 | _ACEOF |
81ecdfbb | 9185 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9186 | ac_cv_c_const=yes |
5ee754fc | 9187 | else |
81ecdfbb | 9188 | ac_cv_c_const=no |
5ee754fc | 9189 | fi |
81ecdfbb | 9190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9191 | fi |
81ecdfbb RW |
9192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9193 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9194 | if test $ac_cv_c_const = no; then |
bec39cab | 9195 | |
81ecdfbb | 9196 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9197 | |
5ee754fc | 9198 | fi |
bec39cab | 9199 | |
81ecdfbb RW |
9200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9201 | $as_echo_n "checking for inline... " >&6; } | |
9202 | if test "${ac_cv_c_inline+set}" = set; then : | |
9203 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9204 | else |
a9322a30 TT |
9205 | ac_cv_c_inline=no |
9206 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9208 | /* end confdefs.h. */ |
a9322a30 TT |
9209 | #ifndef __cplusplus |
9210 | typedef int foo_t; | |
9211 | static $ac_kw foo_t static_foo () {return 0; } | |
9212 | $ac_kw foo_t foo () {return 0; } | |
9213 | #endif | |
9214 | ||
bec39cab | 9215 | _ACEOF |
81ecdfbb RW |
9216 | if ac_fn_c_try_compile "$LINENO"; then : |
9217 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9218 | fi |
81ecdfbb RW |
9219 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9220 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9221 | done |
bec39cab | 9222 | |
5ee754fc | 9223 | fi |
81ecdfbb RW |
9224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9225 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9226 | |
a9322a30 TT |
9227 | case $ac_cv_c_inline in |
9228 | inline | yes) ;; | |
9229 | *) | |
9230 | case $ac_cv_c_inline in | |
9231 | no) ac_val=;; | |
9232 | *) ac_val=$ac_cv_c_inline;; | |
9233 | esac | |
9234 | cat >>confdefs.h <<_ACEOF | |
9235 | #ifndef __cplusplus | |
9236 | #define inline $ac_val | |
9237 | #endif | |
9238 | _ACEOF | |
bec39cab AC |
9239 | ;; |
9240 | esac | |
bec39cab | 9241 | |
81ecdfbb RW |
9242 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9243 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9244 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9245 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9246 | else |
81ecdfbb RW |
9247 | ac_cv_c_bigendian=unknown |
9248 | # See if we're dealing with a universal compiler. | |
9249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9250 | /* end confdefs.h. */ | |
9251 | #ifndef __APPLE_CC__ | |
9252 | not a universal capable compiler | |
9253 | #endif | |
9254 | typedef int dummy; | |
9255 | ||
9256 | _ACEOF | |
9257 | if ac_fn_c_try_compile "$LINENO"; then : | |
9258 | ||
9259 | # Check for potential -arch flags. It is not universal unless | |
9260 | # there are at least two -arch flags with different values. | |
9261 | ac_arch= | |
9262 | ac_prev= | |
9263 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9264 | if test -n "$ac_prev"; then | |
9265 | case $ac_word in | |
9266 | i?86 | x86_64 | ppc | ppc64) | |
9267 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9268 | ac_arch=$ac_word | |
9269 | else | |
9270 | ac_cv_c_bigendian=universal | |
9271 | break | |
9272 | fi | |
9273 | ;; | |
9274 | esac | |
9275 | ac_prev= | |
9276 | elif test "x$ac_word" = "x-arch"; then | |
9277 | ac_prev=arch | |
9278 | fi | |
9279 | done | |
9280 | fi | |
9281 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9282 | if test $ac_cv_c_bigendian = unknown; then | |
9283 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9285 | /* end confdefs.h. */ |
a9322a30 | 9286 | #include <sys/types.h> |
81ecdfbb | 9287 | #include <sys/param.h> |
a9322a30 TT |
9288 | |
9289 | int | |
9290 | main () | |
9291 | { | |
81ecdfbb RW |
9292 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9293 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9294 | && LITTLE_ENDIAN) | |
9295 | bogus endian macros | |
9296 | #endif | |
a9322a30 TT |
9297 | |
9298 | ; | |
9299 | return 0; | |
9300 | } | |
bec39cab | 9301 | _ACEOF |
81ecdfbb | 9302 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9303 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9305 | /* end confdefs.h. */ |
a9322a30 | 9306 | #include <sys/types.h> |
81ecdfbb | 9307 | #include <sys/param.h> |
a9322a30 TT |
9308 | |
9309 | int | |
9310 | main () | |
9311 | { | |
9312 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9313 | not big endian |
9314 | #endif | |
a9322a30 TT |
9315 | |
9316 | ; | |
9317 | return 0; | |
9318 | } | |
bec39cab | 9319 | _ACEOF |
81ecdfbb | 9320 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9321 | ac_cv_c_bigendian=yes |
5ee754fc | 9322 | else |
81ecdfbb | 9323 | ac_cv_c_bigendian=no |
5ee754fc | 9324 | fi |
81ecdfbb RW |
9325 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9326 | fi | |
9327 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9328 | fi | |
9329 | if test $ac_cv_c_bigendian = unknown; then | |
9330 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9332 | /* end confdefs.h. */ | |
9333 | #include <limits.h> | |
bec39cab | 9334 | |
81ecdfbb RW |
9335 | int |
9336 | main () | |
9337 | { | |
9338 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9339 | bogus endian macros | |
9340 | #endif | |
9341 | ||
9342 | ; | |
9343 | return 0; | |
9344 | } | |
7eb368b3 | 9345 | _ACEOF |
81ecdfbb RW |
9346 | if ac_fn_c_try_compile "$LINENO"; then : |
9347 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9349 | /* end confdefs.h. */ |
81ecdfbb RW |
9350 | #include <limits.h> |
9351 | ||
7eb368b3 NR |
9352 | int |
9353 | main () | |
9354 | { | |
81ecdfbb RW |
9355 | #ifndef _BIG_ENDIAN |
9356 | not big endian | |
9357 | #endif | |
9358 | ||
7eb368b3 NR |
9359 | ; |
9360 | return 0; | |
9361 | } | |
9362 | _ACEOF | |
81ecdfbb | 9363 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9364 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9365 | else |
9366 | ac_cv_c_bigendian=no | |
a9322a30 | 9367 | fi |
81ecdfbb | 9368 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9369 | fi |
81ecdfbb RW |
9370 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9371 | fi | |
9372 | if test $ac_cv_c_bigendian = unknown; then | |
9373 | # Compile a test program. | |
9374 | if test "$cross_compiling" = yes; then : | |
9375 | # Try to guess by grepping values from an object file. | |
9376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9377 | /* end confdefs.h. */ | |
9378 | short int ascii_mm[] = | |
9379 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9380 | short int ascii_ii[] = | |
9381 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9382 | int use_ascii (int i) { | |
9383 | return ascii_mm[i] + ascii_ii[i]; | |
9384 | } | |
9385 | short int ebcdic_ii[] = | |
9386 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9387 | short int ebcdic_mm[] = | |
9388 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9389 | int use_ebcdic (int i) { | |
9390 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9391 | } | |
9392 | extern int foo; | |
7eb368b3 | 9393 | |
81ecdfbb RW |
9394 | int |
9395 | main () | |
9396 | { | |
9397 | return use_ascii (foo) == use_ebcdic (foo); | |
9398 | ; | |
9399 | return 0; | |
9400 | } | |
9401 | _ACEOF | |
9402 | if ac_fn_c_try_compile "$LINENO"; then : | |
9403 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9404 | ac_cv_c_bigendian=yes | |
9405 | fi | |
9406 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9407 | if test "$ac_cv_c_bigendian" = unknown; then | |
9408 | ac_cv_c_bigendian=no | |
9409 | else | |
9410 | # finding both strings is unlikely to happen, but who knows? | |
9411 | ac_cv_c_bigendian=unknown | |
9412 | fi | |
9413 | fi | |
7eb368b3 | 9414 | fi |
81ecdfbb | 9415 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9416 | else |
81ecdfbb | 9417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9418 | /* end confdefs.h. */ |
81ecdfbb | 9419 | $ac_includes_default |
d3ea6809 MM |
9420 | int |
9421 | main () | |
9422 | { | |
81ecdfbb RW |
9423 | |
9424 | /* Are we little or big endian? From Harbison&Steele. */ | |
9425 | union | |
9426 | { | |
9427 | long int l; | |
9428 | char c[sizeof (long int)]; | |
9429 | } u; | |
9430 | u.l = 1; | |
9431 | return u.c[sizeof (long int) - 1] == 1; | |
9432 | ||
9433 | ; | |
9434 | return 0; | |
d3ea6809 MM |
9435 | } |
9436 | _ACEOF | |
81ecdfbb | 9437 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9438 | ac_cv_c_bigendian=no |
d3ea6809 | 9439 | else |
81ecdfbb | 9440 | ac_cv_c_bigendian=yes |
d3ea6809 | 9441 | fi |
81ecdfbb RW |
9442 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9443 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9444 | fi |
a9322a30 | 9445 | |
81ecdfbb RW |
9446 | fi |
9447 | fi | |
9448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9449 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9450 | case $ac_cv_c_bigendian in #( | |
9451 | yes) | |
9452 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9453 | ;; #( | |
9454 | no) | |
9455 | ;; #( | |
9456 | universal) | |
9457 | ||
9458 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9459 | ||
9460 | ;; #( | |
9461 | *) | |
9462 | as_fn_error "unknown endianness | |
9463 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
9464 | esac | |
d3ea6809 MM |
9465 | |
9466 | ||
a9322a30 TT |
9467 | # ------------------------------ # |
9468 | # Checks for library functions. # | |
9469 | # ------------------------------ # | |
d3ea6809 | 9470 | |
a9322a30 TT |
9471 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
9472 | # for constant arguments. Useless! | |
81ecdfbb RW |
9473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
9474 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9475 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
9476 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 9477 | else |
81ecdfbb | 9478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 9479 | /* end confdefs.h. */ |
a9322a30 | 9480 | #include <alloca.h> |
bec39cab AC |
9481 | int |
9482 | main () | |
9483 | { | |
a9322a30 | 9484 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 9485 | if (p) return 0; |
bec39cab AC |
9486 | ; |
9487 | return 0; | |
9488 | } | |
9489 | _ACEOF | |
81ecdfbb | 9490 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9491 | ac_cv_working_alloca_h=yes |
bec39cab | 9492 | else |
81ecdfbb | 9493 | ac_cv_working_alloca_h=no |
bec39cab | 9494 | fi |
81ecdfbb RW |
9495 | rm -f core conftest.err conftest.$ac_objext \ |
9496 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9497 | fi |
81ecdfbb RW |
9498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
9499 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
9500 | if test $ac_cv_working_alloca_h = yes; then |
9501 | ||
81ecdfbb | 9502 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 9503 | |
c906108c | 9504 | fi |
bec39cab | 9505 | |
81ecdfbb RW |
9506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9507 | $as_echo_n "checking for alloca... " >&6; } | |
9508 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
9509 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9510 | else |
81ecdfbb | 9511 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9512 | /* end confdefs.h. */ |
a9322a30 TT |
9513 | #ifdef __GNUC__ |
9514 | # define alloca __builtin_alloca | |
b4e70030 | 9515 | #else |
a9322a30 TT |
9516 | # ifdef _MSC_VER |
9517 | # include <malloc.h> | |
9518 | # define alloca _alloca | |
9519 | # else | |
81ecdfbb | 9520 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
9521 | # include <alloca.h> |
9522 | # else | |
9523 | # ifdef _AIX | |
9524 | #pragma alloca | |
9525 | # else | |
9526 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9527 | char *alloca (); | |
9528 | # endif | |
9529 | # endif | |
9530 | # endif | |
9531 | # endif | |
c906108c | 9532 | #endif |
97bf5e38 | 9533 | |
bec39cab AC |
9534 | int |
9535 | main () | |
9536 | { | |
a9322a30 | 9537 | char *p = (char *) alloca (1); |
81ecdfbb | 9538 | if (p) return 0; |
bec39cab AC |
9539 | ; |
9540 | return 0; | |
9541 | } | |
9542 | _ACEOF | |
81ecdfbb | 9543 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9544 | ac_cv_func_alloca_works=yes |
bec39cab | 9545 | else |
81ecdfbb | 9546 | ac_cv_func_alloca_works=no |
bec39cab | 9547 | fi |
81ecdfbb RW |
9548 | rm -f core conftest.err conftest.$ac_objext \ |
9549 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9550 | fi |
81ecdfbb RW |
9551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
9552 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
9553 | |
9554 | if test $ac_cv_func_alloca_works = yes; then | |
9555 | ||
81ecdfbb | 9556 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 9557 | |
a9322a30 TT |
9558 | else |
9559 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
9560 | # that cause trouble. Some versions do not even contain alloca or | |
9561 | # contain a buggy version. If you still want to use their alloca, | |
9562 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
9563 | ||
81ecdfbb | 9564 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 9565 | |
81ecdfbb | 9566 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 9567 | |
bec39cab | 9568 | |
81ecdfbb RW |
9569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
9570 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9571 | if test "${ac_cv_os_cray+set}" = set; then : | |
9572 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9573 | else |
81ecdfbb | 9574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 9575 | /* end confdefs.h. */ |
81ecdfbb | 9576 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
9577 | webecray |
9578 | #else | |
9579 | wenotbecray | |
9580 | #endif | |
9581 | ||
9582 | _ACEOF | |
9583 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 9584 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
9585 | ac_cv_os_cray=yes |
9586 | else | |
81ecdfbb | 9587 | ac_cv_os_cray=no |
bec39cab | 9588 | fi |
81ecdfbb RW |
9589 | rm -f conftest* |
9590 | ||
bec39cab | 9591 | fi |
81ecdfbb RW |
9592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
9593 | $as_echo "$ac_cv_os_cray" >&6; } | |
9594 | if test $ac_cv_os_cray = yes; then | |
9595 | for ac_func in _getb67 GETB67 getb67; do | |
9596 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9597 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9598 | eval as_val=\$$as_ac_var | |
9599 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
9600 | |
9601 | cat >>confdefs.h <<_ACEOF | |
9602 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 9603 | _ACEOF |
c906108c | 9604 | |
a9322a30 | 9605 | break |
c906108c SS |
9606 | fi |
9607 | ||
a9322a30 TT |
9608 | done |
9609 | fi | |
bec39cab | 9610 | |
81ecdfbb RW |
9611 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
9612 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9613 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
9614 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9615 | else |
81ecdfbb | 9616 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9617 | ac_cv_c_stack_direction=0 |
bec39cab | 9618 | else |
81ecdfbb | 9619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9620 | /* end confdefs.h. */ |
81ecdfbb | 9621 | $ac_includes_default |
a9322a30 TT |
9622 | int |
9623 | find_stack_direction () | |
b4e70030 | 9624 | { |
a9322a30 TT |
9625 | static char *addr = 0; |
9626 | auto char dummy; | |
9627 | if (addr == 0) | |
9628 | { | |
9629 | addr = &dummy; | |
9630 | return find_stack_direction (); | |
9631 | } | |
9632 | else | |
9633 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 9634 | } |
b757528f | 9635 | |
bec39cab AC |
9636 | int |
9637 | main () | |
9638 | { | |
81ecdfbb | 9639 | return find_stack_direction () < 0; |
bec39cab AC |
9640 | } |
9641 | _ACEOF | |
81ecdfbb | 9642 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9643 | ac_cv_c_stack_direction=1 |
9644 | else | |
81ecdfbb | 9645 | ac_cv_c_stack_direction=-1 |
a9322a30 | 9646 | fi |
81ecdfbb RW |
9647 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9648 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9649 | fi |
a9322a30 | 9650 | |
81ecdfbb RW |
9651 | fi |
9652 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
9653 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
9654 | cat >>confdefs.h <<_ACEOF |
9655 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
9656 | _ACEOF | |
9657 | ||
9658 | ||
9659 | fi | |
9660 | ||
a9322a30 | 9661 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
9662 | do : |
9663 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9664 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9665 | eval as_val=\$$as_ac_Header | |
9666 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9667 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9668 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9669 | _ACEOF |
b757528f | 9670 | |
b757528f | 9671 | fi |
bec39cab | 9672 | |
a9322a30 | 9673 | done |
a3828db0 | 9674 | |
a9322a30 | 9675 | for ac_func in getpagesize |
81ecdfbb RW |
9676 | do : |
9677 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9678 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 9679 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9680 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 9681 | _ACEOF |
bcb3dc3d | 9682 | |
bcb3dc3d MK |
9683 | fi |
9684 | done | |
9685 | ||
81ecdfbb RW |
9686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
9687 | $as_echo_n "checking for working mmap... " >&6; } | |
9688 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
9689 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9690 | else |
81ecdfbb | 9691 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9692 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 9693 | else |
81ecdfbb | 9694 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9695 | /* end confdefs.h. */ |
a9322a30 TT |
9696 | $ac_includes_default |
9697 | /* malloc might have been renamed as rpl_malloc. */ | |
9698 | #undef malloc | |
bec39cab | 9699 | |
a9322a30 TT |
9700 | /* Thanks to Mike Haertel and Jim Avera for this test. |
9701 | Here is a matrix of mmap possibilities: | |
9702 | mmap private not fixed | |
9703 | mmap private fixed at somewhere currently unmapped | |
9704 | mmap private fixed at somewhere already mapped | |
9705 | mmap shared not fixed | |
9706 | mmap shared fixed at somewhere currently unmapped | |
9707 | mmap shared fixed at somewhere already mapped | |
9708 | For private mappings, we should verify that changes cannot be read() | |
9709 | back from the file, nor mmap's back from the file at a different | |
9710 | address. (There have been systems where private was not correctly | |
9711 | implemented like the infamous i386 svr4.0, and systems where the | |
9712 | VM page cache was not coherent with the file system buffer cache | |
9713 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9714 | For shared mappings, we should conversely verify that changes get | |
9715 | propagated back to all the places they're supposed to be. | |
bec39cab | 9716 | |
a9322a30 TT |
9717 | Grep wants private fixed already mapped. |
9718 | The main things grep needs to know about mmap are: | |
9719 | * does it exist and is it safe to write into the mmap'd area | |
9720 | * how to use it (BSD variants) */ | |
8b9cf735 | 9721 | |
a9322a30 TT |
9722 | #include <fcntl.h> |
9723 | #include <sys/mman.h> | |
8b9cf735 | 9724 | |
81ecdfbb | 9725 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 9726 | char *malloc (); |
a3828db0 MK |
9727 | #endif |
9728 | ||
a9322a30 | 9729 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 9730 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 9731 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 9732 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
9733 | # define HAVE_SYS_PARAM_H 1 |
9734 | # endif | |
9735 | ||
9736 | # ifdef _SC_PAGESIZE | |
9737 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9738 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 9739 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
9740 | # include <sys/param.h> |
9741 | # ifdef EXEC_PAGESIZE | |
9742 | # define getpagesize() EXEC_PAGESIZE | |
9743 | # else /* no EXEC_PAGESIZE */ | |
9744 | # ifdef NBPG | |
9745 | # define getpagesize() NBPG * CLSIZE | |
9746 | # ifndef CLSIZE | |
9747 | # define CLSIZE 1 | |
9748 | # endif /* no CLSIZE */ | |
9749 | # else /* no NBPG */ | |
9750 | # ifdef NBPC | |
9751 | # define getpagesize() NBPC | |
9752 | # else /* no NBPC */ | |
9753 | # ifdef PAGESIZE | |
9754 | # define getpagesize() PAGESIZE | |
9755 | # endif /* PAGESIZE */ | |
9756 | # endif /* no NBPC */ | |
9757 | # endif /* no NBPG */ | |
9758 | # endif /* no EXEC_PAGESIZE */ | |
9759 | # else /* no HAVE_SYS_PARAM_H */ | |
9760 | # define getpagesize() 8192 /* punt totally */ | |
9761 | # endif /* no HAVE_SYS_PARAM_H */ | |
9762 | # endif /* no _SC_PAGESIZE */ | |
9763 | ||
9764 | #endif /* no HAVE_GETPAGESIZE */ | |
9765 | ||
bec39cab AC |
9766 | int |
9767 | main () | |
9768 | { | |
a9322a30 TT |
9769 | char *data, *data2, *data3; |
9770 | int i, pagesize; | |
9771 | int fd; | |
9772 | ||
9773 | pagesize = getpagesize (); | |
9774 | ||
9775 | /* First, make a file with some known garbage in it. */ | |
9776 | data = (char *) malloc (pagesize); | |
9777 | if (!data) | |
81ecdfbb | 9778 | return 1; |
a9322a30 TT |
9779 | for (i = 0; i < pagesize; ++i) |
9780 | *(data + i) = rand (); | |
9781 | umask (0); | |
9782 | fd = creat ("conftest.mmap", 0600); | |
9783 | if (fd < 0) | |
81ecdfbb | 9784 | return 1; |
a9322a30 | 9785 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 9786 | return 1; |
a9322a30 TT |
9787 | close (fd); |
9788 | ||
9789 | /* Next, try to mmap the file at a fixed address which already has | |
9790 | something else allocated at it. If we can, also make sure that | |
9791 | we see the same garbage. */ | |
9792 | fd = open ("conftest.mmap", O_RDWR); | |
9793 | if (fd < 0) | |
81ecdfbb | 9794 | return 1; |
a9322a30 TT |
9795 | data2 = (char *) malloc (2 * pagesize); |
9796 | if (!data2) | |
81ecdfbb RW |
9797 | return 1; |
9798 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
9799 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
9800 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 9801 | return 1; |
a9322a30 TT |
9802 | for (i = 0; i < pagesize; ++i) |
9803 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 9804 | return 1; |
a9322a30 TT |
9805 | |
9806 | /* Finally, make sure that changes to the mapped area do not | |
9807 | percolate back to the file as seen by read(). (This is a bug on | |
9808 | some variants of i386 svr4.0.) */ | |
9809 | for (i = 0; i < pagesize; ++i) | |
9810 | *(data2 + i) = *(data2 + i) + 1; | |
9811 | data3 = (char *) malloc (pagesize); | |
9812 | if (!data3) | |
81ecdfbb | 9813 | return 1; |
a9322a30 | 9814 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 9815 | return 1; |
a9322a30 TT |
9816 | for (i = 0; i < pagesize; ++i) |
9817 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 9818 | return 1; |
a9322a30 | 9819 | close (fd); |
81ecdfbb | 9820 | return 0; |
bec39cab AC |
9821 | } |
9822 | _ACEOF | |
81ecdfbb | 9823 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9824 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 9825 | else |
81ecdfbb | 9826 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 9827 | fi |
81ecdfbb RW |
9828 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9829 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 9830 | fi |
81ecdfbb | 9831 | |
a9322a30 | 9832 | fi |
81ecdfbb RW |
9833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
9834 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
9835 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
9836 | ||
81ecdfbb | 9837 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 9838 | |
086ec9eb | 9839 | fi |
a9322a30 | 9840 | rm -f conftest.mmap |
a3828db0 | 9841 | |
81ecdfbb RW |
9842 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
9843 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 9844 | |
a9322a30 TT |
9845 | else |
9846 | ||
9847 | cat >>confdefs.h <<_ACEOF | |
9848 | #define pid_t int | |
bec39cab | 9849 | _ACEOF |
086ec9eb MK |
9850 | |
9851 | fi | |
9852 | ||
81ecdfbb RW |
9853 | for ac_header in vfork.h |
9854 | do : | |
9855 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9856 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 9857 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9858 | #define HAVE_VFORK_H 1 |
bec39cab | 9859 | _ACEOF |
c906108c SS |
9860 | |
9861 | fi | |
a9322a30 | 9862 | |
a3828db0 | 9863 | done |
c906108c | 9864 | |
a9322a30 | 9865 | for ac_func in fork vfork |
81ecdfbb RW |
9866 | do : |
9867 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9868 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9869 | eval as_val=\$$as_ac_var | |
9870 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 9871 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9872 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 9873 | _ACEOF |
b83266a0 | 9874 | |
97bf5e38 | 9875 | fi |
a3828db0 | 9876 | done |
b83266a0 | 9877 | |
a9322a30 | 9878 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
9879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
9880 | $as_echo_n "checking for working fork... " >&6; } | |
9881 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
9882 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9883 | else |
81ecdfbb | 9884 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9885 | ac_cv_func_fork_works=cross |
9886 | else | |
81ecdfbb RW |
9887 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9888 | /* end confdefs.h. */ | |
9889 | $ac_includes_default | |
9890 | int | |
9891 | main () | |
9892 | { | |
9893 | ||
9894 | /* By Ruediger Kuhlmann. */ | |
9895 | return fork () < 0; | |
9896 | ||
9897 | ; | |
9898 | return 0; | |
9899 | } | |
a9322a30 | 9900 | _ACEOF |
81ecdfbb | 9901 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9902 | ac_cv_func_fork_works=yes |
9903 | else | |
81ecdfbb | 9904 | ac_cv_func_fork_works=no |
a9322a30 | 9905 | fi |
81ecdfbb RW |
9906 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9907 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9908 | fi |
81ecdfbb | 9909 | |
a9322a30 | 9910 | fi |
81ecdfbb RW |
9911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
9912 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
9913 | |
9914 | else | |
9915 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9916 | fi | |
9917 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9918 | case $host in | |
9919 | *-*-amigaos* | *-*-msdosdjgpp*) | |
9920 | # Override, as these systems have only a dummy fork() stub | |
9921 | ac_cv_func_fork_works=no | |
9922 | ;; | |
9923 | *) | |
9924 | ac_cv_func_fork_works=yes | |
9925 | ;; | |
9926 | esac | |
81ecdfbb RW |
9927 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
9928 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
9929 | fi |
9930 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9931 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
9932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
9933 | $as_echo_n "checking for working vfork... " >&6; } | |
9934 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
9935 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9936 | else |
81ecdfbb | 9937 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9938 | ac_cv_func_vfork_works=cross |
9939 | else | |
81ecdfbb | 9940 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
9941 | /* end confdefs.h. */ |
9942 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 9943 | $ac_includes_default |
a9322a30 | 9944 | #include <sys/wait.h> |
81ecdfbb | 9945 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
9946 | # include <vfork.h> |
9947 | #endif | |
9948 | /* On some sparc systems, changes by the child to local and incoming | |
9949 | argument registers are propagated back to the parent. The compiler | |
9950 | is told about this with #include <vfork.h>, but some compilers | |
9951 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
9952 | static variable whose address is put into a register that is | |
9953 | clobbered by the vfork. */ | |
9954 | static void | |
9955 | #ifdef __cplusplus | |
9956 | sparc_address_test (int arg) | |
9957 | # else | |
9958 | sparc_address_test (arg) int arg; | |
9959 | #endif | |
9960 | { | |
9961 | static pid_t child; | |
9962 | if (!child) { | |
9963 | child = vfork (); | |
9964 | if (child < 0) { | |
9965 | perror ("vfork"); | |
9966 | _exit(2); | |
9967 | } | |
9968 | if (!child) { | |
9969 | arg = getpid(); | |
9970 | write(-1, "", 0); | |
9971 | _exit (arg); | |
9972 | } | |
9973 | } | |
9974 | } | |
9975 | ||
9976 | int | |
9977 | main () | |
9978 | { | |
9979 | pid_t parent = getpid (); | |
9980 | pid_t child; | |
9981 | ||
9982 | sparc_address_test (0); | |
9983 | ||
9984 | child = vfork (); | |
9985 | ||
9986 | if (child == 0) { | |
9987 | /* Here is another test for sparc vfork register problems. This | |
9988 | test uses lots of local variables, at least as many local | |
9989 | variables as main has allocated so far including compiler | |
9990 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
9991 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
9992 | reuse the register of parent for one of the local variables, | |
9993 | since it will think that parent can't possibly be used any more | |
9994 | in this routine. Assigning to the local variable will thus | |
9995 | munge parent in the parent process. */ | |
9996 | pid_t | |
9997 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
9998 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
9999 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10000 | use the same hardware register for all 8 local variables. */ | |
10001 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10002 | || p != p5 || p != p6 || p != p7) | |
10003 | _exit(1); | |
10004 | ||
10005 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10006 | from child file descriptors. If the child closes a descriptor | |
10007 | before it execs or exits, this munges the parent's descriptor | |
10008 | as well. Test for this by closing stdout in the child. */ | |
10009 | _exit(close(fileno(stdout)) != 0); | |
10010 | } else { | |
10011 | int status; | |
10012 | struct stat st; | |
10013 | ||
10014 | while (wait(&status) != child) | |
10015 | ; | |
81ecdfbb | 10016 | return ( |
a9322a30 TT |
10017 | /* Was there some problem with vforking? */ |
10018 | child < 0 | |
10019 | ||
10020 | /* Did the child fail? (This shouldn't happen.) */ | |
10021 | || status | |
10022 | ||
10023 | /* Did the vfork/compiler bug occur? */ | |
10024 | || parent != getpid() | |
10025 | ||
10026 | /* Did the file descriptor bug occur? */ | |
10027 | || fstat(fileno(stdout), &st) != 0 | |
10028 | ); | |
10029 | } | |
10030 | } | |
10031 | _ACEOF | |
81ecdfbb | 10032 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10033 | ac_cv_func_vfork_works=yes |
10034 | else | |
81ecdfbb | 10035 | ac_cv_func_vfork_works=no |
a9322a30 | 10036 | fi |
81ecdfbb RW |
10037 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10038 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10039 | fi |
81ecdfbb | 10040 | |
a9322a30 | 10041 | fi |
81ecdfbb RW |
10042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10043 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10044 | |
10045 | fi; | |
10046 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10047 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10048 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10049 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10050 | fi |
10051 | ||
10052 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10053 | ||
81ecdfbb | 10054 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10055 | |
10056 | else | |
10057 | ||
81ecdfbb | 10058 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10059 | |
10060 | fi | |
10061 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10062 | ||
81ecdfbb | 10063 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10064 | |
10065 | fi | |
10066 | ||
7313baad | 10067 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 10068 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 10069 | sbrk setpgid setpgrp setsid \ |
a9322a30 | 10070 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 10071 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
1db33378 | 10072 | setrlimit getrlimit posix_madvise waitpid lstat |
81ecdfbb RW |
10073 | do : |
10074 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10075 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10076 | eval as_val=\$$as_ac_var | |
10077 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10078 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10079 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10080 | _ACEOF |
10081 | ||
10082 | fi | |
10083 | done | |
10084 | ||
10085 | ||
81ecdfbb RW |
10086 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10087 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10088 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10089 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10090 | else |
81ecdfbb | 10091 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10092 | /* end confdefs.h. */ |
10093 | #include <langinfo.h> | |
10094 | int | |
10095 | main () | |
10096 | { | |
10097 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10098 | ; |
10099 | return 0; | |
10100 | } | |
10101 | _ACEOF | |
81ecdfbb | 10102 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10103 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10104 | else |
81ecdfbb | 10105 | am_cv_langinfo_codeset=no |
a4db0f07 | 10106 | fi |
81ecdfbb RW |
10107 | rm -f core conftest.err conftest.$ac_objext \ |
10108 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10109 | |
a4db0f07 | 10110 | fi |
81ecdfbb RW |
10111 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10112 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10113 | if test $am_cv_langinfo_codeset = yes; then |
10114 | ||
81ecdfbb | 10115 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10116 | |
6c7a06a3 | 10117 | fi |
c906108c | 10118 | |
06825bd1 | 10119 | |
a3828db0 MK |
10120 | # Check the return and argument types of ptrace. No canned test for |
10121 | # this, so roll our own. | |
10122 | gdb_ptrace_headers=' | |
10123 | #if HAVE_SYS_TYPES_H | |
10124 | # include <sys/types.h> | |
10125 | #endif | |
10126 | #if HAVE_SYS_PTRACE_H | |
10127 | # include <sys/ptrace.h> | |
10128 | #endif | |
10129 | #if HAVE_UNISTD_H | |
10130 | # include <unistd.h> | |
10131 | #endif | |
10132 | ' | |
10133 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
10134 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
10135 | " | |
10136 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
10137 | ac_have_decl=1 | |
06825bd1 | 10138 | else |
81ecdfbb | 10139 | ac_have_decl=0 |
06825bd1 | 10140 | fi |
06825bd1 | 10141 | |
a3828db0 | 10142 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10143 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 10144 | _ACEOF |
81ecdfbb | 10145 | if test $ac_have_decl = 1; then : |
bec39cab | 10146 | |
a3828db0 | 10147 | else |
a3828db0 MK |
10148 | |
10149 | : ${gdb_cv_func_ptrace_ret='int'} | |
10150 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10151 | ||
06825bd1 MK |
10152 | fi |
10153 | ||
064ef605 DJ |
10154 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
10155 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
10156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
10157 | $as_echo_n "checking return type of ptrace... " >&6; } | |
10158 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
10159 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10160 | else |
81ecdfbb | 10161 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10162 | /* end confdefs.h. */ |
a3828db0 | 10163 | $gdb_ptrace_headers |
bec39cab AC |
10164 | int |
10165 | main () | |
10166 | { | |
064ef605 DJ |
10167 | extern long ptrace (enum __ptrace_request, ...); |
10168 | ; | |
10169 | return 0; | |
10170 | } | |
10171 | _ACEOF | |
81ecdfbb | 10172 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10173 | gdb_cv_func_ptrace_ret='long' |
10174 | else | |
81ecdfbb | 10175 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10176 | /* end confdefs.h. */ |
10177 | $gdb_ptrace_headers | |
10178 | int | |
10179 | main () | |
10180 | { | |
a3828db0 | 10181 | extern int ptrace (); |
bec39cab AC |
10182 | ; |
10183 | return 0; | |
10184 | } | |
10185 | _ACEOF | |
81ecdfbb | 10186 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10187 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 10188 | else |
81ecdfbb | 10189 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 10190 | fi |
81ecdfbb | 10191 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 10192 | fi |
81ecdfbb | 10193 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 10194 | fi |
81ecdfbb RW |
10195 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
10196 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 10197 | |
a3828db0 MK |
10198 | cat >>confdefs.h <<_ACEOF |
10199 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 10200 | _ACEOF |
70f9f479 | 10201 | |
a3828db0 | 10202 | # Check argument types. |
81ecdfbb RW |
10203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
10204 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
10205 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
10206 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10207 | else |
a3828db0 | 10208 | |
81ecdfbb | 10209 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10210 | /* end confdefs.h. */ |
10211 | $gdb_ptrace_headers | |
10212 | int | |
10213 | main () | |
10214 | { | |
10215 | extern long ptrace (enum __ptrace_request, ...); | |
10216 | ; | |
10217 | return 0; | |
10218 | } | |
10219 | _ACEOF | |
81ecdfbb | 10220 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10221 | gdb_cv_func_ptrace_args='int,int,long,long' |
10222 | else | |
064ef605 | 10223 | |
a3828db0 MK |
10224 | for gdb_arg1 in 'int' 'long'; do |
10225 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 10226 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 10227 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 10228 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10229 | /* end confdefs.h. */ |
a3828db0 | 10230 | $gdb_ptrace_headers |
bec39cab AC |
10231 | int |
10232 | main () | |
10233 | { | |
a3828db0 MK |
10234 | |
10235 | extern $gdb_cv_func_ptrace_ret | |
10236 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
10237 | ||
bec39cab AC |
10238 | ; |
10239 | return 0; | |
10240 | } | |
10241 | _ACEOF | |
81ecdfbb | 10242 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10243 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
10244 | break 4; | |
5c7f2947 | 10245 | fi |
81ecdfbb | 10246 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 10247 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 10248 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10249 | /* end confdefs.h. */ |
a3828db0 | 10250 | $gdb_ptrace_headers |
bec39cab AC |
10251 | int |
10252 | main () | |
10253 | { | |
a3828db0 MK |
10254 | |
10255 | extern $gdb_cv_func_ptrace_ret | |
10256 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
10257 | ||
bec39cab AC |
10258 | ; |
10259 | return 0; | |
10260 | } | |
10261 | _ACEOF | |
81ecdfbb | 10262 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10263 | |
10264 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
10265 | break 5; | |
78434e59 | 10266 | fi |
81ecdfbb | 10267 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
10268 | done |
10269 | done | |
10270 | done | |
10271 | done | |
10272 | done | |
10273 | # Provide a safe default value. | |
10274 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10275 | ||
064ef605 | 10276 | fi |
81ecdfbb | 10277 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 10278 | fi |
81ecdfbb RW |
10279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
10280 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
10281 | ac_save_IFS=$IFS; IFS=',' |
10282 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10283 | IFS=$ac_save_IFS | |
10284 | shift | |
bec39cab | 10285 | |
a3828db0 MK |
10286 | cat >>confdefs.h <<_ACEOF |
10287 | #define PTRACE_TYPE_ARG3 $3 | |
10288 | _ACEOF | |
10289 | ||
10290 | if test -n "$5"; then | |
10291 | ||
10292 | cat >>confdefs.h <<_ACEOF | |
10293 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 10294 | _ACEOF |
78434e59 MK |
10295 | |
10296 | fi | |
10297 | ||
a3828db0 | 10298 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
10299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10300 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10301 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10302 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 10303 | else |
81ecdfbb RW |
10304 | if test "$cross_compiling" = yes; then : |
10305 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 10306 | else |
81ecdfbb | 10307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10308 | /* end confdefs.h. */ |
81ecdfbb | 10309 | $ac_includes_default |
bec39cab AC |
10310 | int |
10311 | main () | |
10312 | { | |
a3828db0 MK |
10313 | /* If this system has a BSD-style setpgrp which takes arguments, |
10314 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
10315 | exit successfully. */ | |
81ecdfbb | 10316 | return setpgrp (1,1) != -1; |
bec39cab AC |
10317 | ; |
10318 | return 0; | |
10319 | } | |
10320 | _ACEOF | |
81ecdfbb | 10321 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 10322 | ac_cv_func_setpgrp_void=no |
c906108c | 10323 | else |
81ecdfbb | 10324 | ac_cv_func_setpgrp_void=yes |
c906108c | 10325 | fi |
81ecdfbb RW |
10326 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10327 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 10328 | fi |
81ecdfbb | 10329 | |
a3828db0 | 10330 | fi |
81ecdfbb RW |
10331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10332 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
10333 | if test $ac_cv_func_setpgrp_void = yes; then |
10334 | ||
81ecdfbb | 10335 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
10336 | |
10337 | fi | |
a3828db0 MK |
10338 | |
10339 | else | |
81ecdfbb RW |
10340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10341 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10342 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10343 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 10344 | else |
81ecdfbb | 10345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10346 | /* end confdefs.h. */ |
a3828db0 MK |
10347 | |
10348 | #include <unistd.h> | |
10349 | ||
bec39cab AC |
10350 | int |
10351 | main () | |
10352 | { | |
a3828db0 MK |
10353 | |
10354 | if (setpgrp(1,1) == -1) | |
10355 | exit (0); | |
10356 | else | |
10357 | exit (1); | |
10358 | ||
bec39cab AC |
10359 | ; |
10360 | return 0; | |
10361 | } | |
10362 | _ACEOF | |
81ecdfbb | 10363 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10364 | ac_cv_func_setpgrp_void=no |
c906108c | 10365 | else |
81ecdfbb | 10366 | ac_cv_func_setpgrp_void=yes |
c906108c | 10367 | fi |
81ecdfbb | 10368 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10369 | fi |
81ecdfbb RW |
10370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10371 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 10372 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 10373 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 10374 | |
a3828db0 | 10375 | fi |
c906108c SS |
10376 | fi |
10377 | ||
a3828db0 MK |
10378 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
10379 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
10380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
10381 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
10382 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
10383 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10384 | else |
81ecdfbb | 10385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10386 | /* end confdefs.h. */ |
a3828db0 MK |
10387 | |
10388 | #include <setjmp.h> | |
10389 | ||
bec39cab AC |
10390 | int |
10391 | main () | |
10392 | { | |
a3828db0 | 10393 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
10394 | ; |
10395 | return 0; | |
10396 | } | |
10397 | _ACEOF | |
81ecdfbb | 10398 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10399 | gdb_cv_func_sigsetjmp=yes |
c906108c | 10400 | else |
81ecdfbb | 10401 | gdb_cv_func_sigsetjmp=no |
c906108c | 10402 | fi |
81ecdfbb | 10403 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10404 | fi |
81ecdfbb RW |
10405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
10406 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 10407 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 10408 | |
81ecdfbb | 10409 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 10410 | |
97bf5e38 | 10411 | fi |
c906108c | 10412 | |
a3828db0 MK |
10413 | # Assume we'll default to using the included libiberty regex. |
10414 | gdb_use_included_regex=yes | |
10415 | ||
10416 | # However, if the system regex is GNU regex, then default to *not* | |
10417 | # using the included regex. | |
81ecdfbb RW |
10418 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
10419 | $as_echo_n "checking for GNU regex... " >&6; } | |
10420 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
10421 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10422 | else |
81ecdfbb | 10423 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10424 | /* end confdefs.h. */ |
a3828db0 | 10425 | #include <gnu-versions.h> |
bec39cab AC |
10426 | int |
10427 | main () | |
10428 | { | |
81ecdfbb RW |
10429 | #define REGEX_INTERFACE_VERSION 1 |
10430 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
10431 | # error "Version mismatch" | |
10432 | #endif | |
5c45e068 MK |
10433 | ; |
10434 | return 0; | |
10435 | } | |
10436 | _ACEOF | |
81ecdfbb RW |
10437 | if ac_fn_c_try_compile "$LINENO"; then : |
10438 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 10439 | else |
81ecdfbb RW |
10440 | gdb_cv_have_gnu_regex=no |
10441 | fi | |
10442 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10443 | fi | |
10444 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
10445 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
10446 | if test $gdb_cv_have_gnu_regex = yes; then | |
10447 | gdb_use_included_regex=no | |
5c45e068 | 10448 | fi |
81ecdfbb RW |
10449 | |
10450 | ||
10451 | # Check whether --with-included-regex was given. | |
10452 | if test "${with_included_regex+set}" = set; then : | |
10453 | withval=$with_included_regex; gdb_with_regex=$withval | |
10454 | else | |
10455 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 10456 | fi |
81ecdfbb RW |
10457 | |
10458 | if test "$gdb_with_regex" = yes; then | |
10459 | ||
10460 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
10461 | ||
c906108c | 10462 | fi |
81ecdfbb RW |
10463 | |
10464 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
10465 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
10466 | #include <sys/proc.h> | |
10467 | ||
10468 | " | |
10469 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 10470 | |
5c45e068 | 10471 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 10472 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 10473 | _ACEOF |
c906108c | 10474 | |
5c45e068 | 10475 | |
97bf5e38 | 10476 | fi |
c906108c | 10477 | |
5c45e068 | 10478 | |
a3828db0 | 10479 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
10480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
10481 | $as_echo_n "checking for struct lwp... " >&6; } | |
10482 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
10483 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10484 | else |
81ecdfbb | 10485 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10486 | /* end confdefs.h. */ |
a3828db0 MK |
10487 | #include <sys/param.h> |
10488 | #include <sys/lwp.h> | |
bec39cab AC |
10489 | int |
10490 | main () | |
10491 | { | |
a3828db0 | 10492 | struct lwp l; |
bec39cab AC |
10493 | ; |
10494 | return 0; | |
10495 | } | |
10496 | _ACEOF | |
81ecdfbb | 10497 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10498 | gdb_cv_struct_lwp=yes |
c906108c | 10499 | else |
81ecdfbb | 10500 | gdb_cv_struct_lwp=no |
c906108c | 10501 | fi |
81ecdfbb | 10502 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10503 | fi |
81ecdfbb RW |
10504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
10505 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 10506 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 10507 | |
81ecdfbb | 10508 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 10509 | |
97bf5e38 | 10510 | fi |
c906108c | 10511 | |
a3828db0 | 10512 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
10513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
10514 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
10515 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
10516 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10517 | else |
81ecdfbb | 10518 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10519 | /* end confdefs.h. */ |
a3828db0 MK |
10520 | #include <sys/types.h> |
10521 | #include <machine/reg.h> | |
bec39cab AC |
10522 | int |
10523 | main () | |
10524 | { | |
a3828db0 | 10525 | struct reg r; |
bec39cab AC |
10526 | ; |
10527 | return 0; | |
10528 | } | |
10529 | _ACEOF | |
81ecdfbb | 10530 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10531 | gdb_cv_struct_reg=yes |
27ca5dad | 10532 | else |
81ecdfbb | 10533 | gdb_cv_struct_reg=no |
27ca5dad | 10534 | fi |
81ecdfbb | 10535 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 10536 | fi |
81ecdfbb RW |
10537 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
10538 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 10539 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 10540 | |
81ecdfbb | 10541 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
10542 | |
10543 | fi | |
97bf5e38 | 10544 | |
a3828db0 MK |
10545 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
10546 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
10547 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
10548 | " | |
10549 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
10550 | |
10551 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10552 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 10553 | _ACEOF |
3862412b | 10554 | |
5c45e068 | 10555 | |
97bf5e38 | 10556 | fi |
81ecdfbb RW |
10557 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
10558 | " | |
10559 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
10560 | |
10561 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10562 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 10563 | _ACEOF |
3862412b | 10564 | |
5c45e068 | 10565 | |
97bf5e38 | 10566 | fi |
3862412b | 10567 | |
5c45e068 | 10568 | |
a3828db0 | 10569 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
10570 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10571 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
10572 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
10573 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10574 | else |
81ecdfbb | 10575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10576 | /* end confdefs.h. */ |
a3828db0 | 10577 | #include <sys/ptrace.h> |
bec39cab AC |
10578 | int |
10579 | main () | |
10580 | { | |
a3828db0 | 10581 | PTRACE_GETREGS; |
bec39cab AC |
10582 | ; |
10583 | return 0; | |
10584 | } | |
10585 | _ACEOF | |
81ecdfbb | 10586 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10587 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 10588 | else |
81ecdfbb | 10589 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 10590 | fi |
81ecdfbb | 10591 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10592 | fi |
10593 | ||
81ecdfbb RW |
10594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
10595 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 10596 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 10597 | |
81ecdfbb | 10598 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 10599 | |
97bf5e38 | 10600 | fi |
451928c5 | 10601 | |
a3828db0 | 10602 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
10603 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10604 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
10605 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
10606 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10607 | else |
81ecdfbb | 10608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10609 | /* end confdefs.h. */ |
a3828db0 | 10610 | #include <sys/ptrace.h> |
bec39cab AC |
10611 | int |
10612 | main () | |
10613 | { | |
a3828db0 | 10614 | PTRACE_GETFPXREGS; |
bec39cab AC |
10615 | ; |
10616 | return 0; | |
10617 | } | |
10618 | _ACEOF | |
81ecdfbb | 10619 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10620 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 10621 | else |
81ecdfbb | 10622 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 10623 | fi |
81ecdfbb | 10624 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10625 | fi |
10626 | ||
81ecdfbb RW |
10627 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
10628 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 10629 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 10630 | |
81ecdfbb | 10631 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 10632 | |
97bf5e38 | 10633 | fi |
451928c5 | 10634 | |
a3828db0 | 10635 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
10636 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
10637 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
10638 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
10639 | $as_echo_n "(cached) " >&6 | |
3862412b | 10640 | else |
81ecdfbb | 10641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10642 | /* end confdefs.h. */ |
a3828db0 MK |
10643 | #include <sys/types.h> |
10644 | #include <sys/ptrace.h> | |
bec39cab AC |
10645 | int |
10646 | main () | |
10647 | { | |
a3828db0 | 10648 | PT_GETDBREGS; |
bec39cab AC |
10649 | ; |
10650 | return 0; | |
10651 | } | |
10652 | _ACEOF | |
81ecdfbb | 10653 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10654 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 10655 | else |
81ecdfbb | 10656 | gdb_cv_have_pt_getdbregs=no |
3862412b | 10657 | fi |
81ecdfbb | 10658 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10659 | fi |
10660 | ||
81ecdfbb RW |
10661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
10662 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 10663 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 10664 | |
81ecdfbb | 10665 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 10666 | |
97bf5e38 | 10667 | fi |
3862412b | 10668 | |
a3828db0 | 10669 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
10670 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
10671 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
10672 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
10673 | $as_echo_n "(cached) " >&6 | |
3862412b | 10674 | else |
81ecdfbb | 10675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10676 | /* end confdefs.h. */ |
a3828db0 MK |
10677 | #include <sys/types.h> |
10678 | #include <sys/ptrace.h> | |
bec39cab AC |
10679 | int |
10680 | main () | |
10681 | { | |
a3828db0 | 10682 | PT_GETXMMREGS; |
bec39cab AC |
10683 | ; |
10684 | return 0; | |
10685 | } | |
10686 | _ACEOF | |
81ecdfbb | 10687 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10688 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 10689 | else |
81ecdfbb | 10690 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 10691 | fi |
81ecdfbb | 10692 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10693 | fi |
10694 | ||
81ecdfbb RW |
10695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
10696 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 10697 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 10698 | |
81ecdfbb | 10699 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 10700 | |
97bf5e38 | 10701 | fi |
3862412b | 10702 | |
eb368090 | 10703 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
10704 | |
10705 | if test "${target}" = "${host}"; then | |
10706 | case "${host}" in | |
97bf5e38 | 10707 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 10708 | |
81ecdfbb | 10709 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
10710 | |
10711 | ;; | |
c162e8c9 | 10712 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 10713 | |
81ecdfbb | 10714 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
10715 | |
10716 | ;; | |
10717 | mips-sgi-irix5*) | |
10718 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 10719 | |
81ecdfbb | 10720 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
10721 | |
10722 | ;; | |
10723 | esac | |
10724 | fi | |
10725 | ||
10726 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
10727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
10728 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
10729 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
10730 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10731 | else |
81ecdfbb | 10732 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10733 | /* end confdefs.h. */ |
596c9d4b KB |
10734 | |
10735 | #define _SYSCALL32 | |
d30c5336 JK |
10736 | /* Needed for new procfs interface on sparc-solaris. */ |
10737 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10738 | #include <sys/procfs.h> |
bec39cab AC |
10739 | int |
10740 | main () | |
10741 | { | |
97bf5e38 | 10742 | pstatus_t avar |
bec39cab AC |
10743 | ; |
10744 | return 0; | |
10745 | } | |
10746 | _ACEOF | |
81ecdfbb | 10747 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10748 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 10749 | else |
81ecdfbb | 10750 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 10751 | |
596c9d4b | 10752 | fi |
81ecdfbb | 10753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10754 | fi |
10755 | ||
97bf5e38 | 10756 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 10757 | |
81ecdfbb | 10758 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
10759 | |
10760 | fi | |
81ecdfbb RW |
10761 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
10762 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 10763 | |
81ecdfbb RW |
10764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
10765 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
10766 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
10767 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10768 | else |
81ecdfbb | 10769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10770 | /* end confdefs.h. */ |
596c9d4b KB |
10771 | |
10772 | #define _SYSCALL32 | |
d30c5336 JK |
10773 | /* Needed for new procfs interface on sparc-solaris. */ |
10774 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10775 | #include <sys/procfs.h> |
bec39cab AC |
10776 | int |
10777 | main () | |
10778 | { | |
97bf5e38 | 10779 | prrun_t avar |
bec39cab AC |
10780 | ; |
10781 | return 0; | |
10782 | } | |
10783 | _ACEOF | |
81ecdfbb | 10784 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10785 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 10786 | else |
81ecdfbb | 10787 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 10788 | |
596c9d4b | 10789 | fi |
81ecdfbb | 10790 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10791 | fi |
10792 | ||
97bf5e38 | 10793 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 10794 | |
81ecdfbb | 10795 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
10796 | |
10797 | fi | |
81ecdfbb RW |
10798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
10799 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 10800 | |
81ecdfbb RW |
10801 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
10802 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
10803 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
10804 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10805 | else |
81ecdfbb | 10806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10807 | /* end confdefs.h. */ |
596c9d4b KB |
10808 | |
10809 | #define _SYSCALL32 | |
d30c5336 JK |
10810 | /* Needed for new procfs interface on sparc-solaris. */ |
10811 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10812 | #include <sys/procfs.h> |
bec39cab AC |
10813 | int |
10814 | main () | |
10815 | { | |
97bf5e38 | 10816 | gregset_t avar |
bec39cab AC |
10817 | ; |
10818 | return 0; | |
10819 | } | |
10820 | _ACEOF | |
81ecdfbb | 10821 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10822 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 10823 | else |
81ecdfbb | 10824 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 10825 | |
596c9d4b | 10826 | fi |
81ecdfbb | 10827 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10828 | fi |
10829 | ||
97bf5e38 | 10830 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 10831 | |
81ecdfbb | 10832 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
10833 | |
10834 | fi | |
81ecdfbb RW |
10835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
10836 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 10837 | |
81ecdfbb RW |
10838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
10839 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
10840 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
10841 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 10842 | else |
81ecdfbb | 10843 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10844 | /* end confdefs.h. */ |
97bf5e38 MK |
10845 | |
10846 | #define _SYSCALL32 | |
d30c5336 JK |
10847 | /* Needed for new procfs interface on sparc-solaris. */ |
10848 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 10849 | #include <sys/procfs.h> |
bec39cab AC |
10850 | int |
10851 | main () | |
10852 | { | |
97bf5e38 | 10853 | fpregset_t avar |
bec39cab AC |
10854 | ; |
10855 | return 0; | |
10856 | } | |
10857 | _ACEOF | |
81ecdfbb | 10858 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10859 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 10860 | else |
81ecdfbb | 10861 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 10862 | |
d84dd0c5 | 10863 | fi |
81ecdfbb | 10864 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
10865 | fi |
10866 | ||
97bf5e38 | 10867 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 10868 | |
81ecdfbb | 10869 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 10870 | |
97bf5e38 | 10871 | fi |
81ecdfbb RW |
10872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
10873 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 10874 | |
81ecdfbb RW |
10875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
10876 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
10877 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
10878 | $as_echo_n "(cached) " >&6 | |
c906108c | 10879 | else |
81ecdfbb | 10880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10881 | /* end confdefs.h. */ |
c906108c | 10882 | |
97bf5e38 | 10883 | #define _SYSCALL32 |
d30c5336 JK |
10884 | /* Needed for new procfs interface on sparc-solaris. */ |
10885 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10886 | #include <sys/procfs.h> |
bec39cab AC |
10887 | int |
10888 | main () | |
10889 | { | |
97bf5e38 | 10890 | prgregset_t avar |
bec39cab AC |
10891 | ; |
10892 | return 0; | |
10893 | } | |
10894 | _ACEOF | |
81ecdfbb | 10895 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10896 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 10897 | else |
81ecdfbb | 10898 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 10899 | |
c906108c | 10900 | fi |
81ecdfbb | 10901 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
10902 | fi |
10903 | ||
97bf5e38 | 10904 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 10905 | |
81ecdfbb | 10906 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 10907 | |
97bf5e38 | 10908 | fi |
81ecdfbb RW |
10909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
10910 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 10911 | |
81ecdfbb RW |
10912 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
10913 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
10914 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
10915 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10916 | else |
81ecdfbb | 10917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10918 | /* end confdefs.h. */ |
97bf5e38 MK |
10919 | |
10920 | #define _SYSCALL32 | |
d30c5336 JK |
10921 | /* Needed for new procfs interface on sparc-solaris. */ |
10922 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10923 | #include <sys/procfs.h> |
bec39cab AC |
10924 | int |
10925 | main () | |
10926 | { | |
97bf5e38 | 10927 | prfpregset_t avar |
bec39cab AC |
10928 | ; |
10929 | return 0; | |
10930 | } | |
10931 | _ACEOF | |
81ecdfbb | 10932 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10933 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 10934 | else |
81ecdfbb | 10935 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 10936 | |
d45fe813 | 10937 | fi |
81ecdfbb | 10938 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
10939 | fi |
10940 | ||
97bf5e38 | 10941 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 10942 | |
81ecdfbb | 10943 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 10944 | |
97bf5e38 | 10945 | fi |
81ecdfbb RW |
10946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
10947 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 10948 | |
81ecdfbb RW |
10949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
10950 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
10951 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
10952 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10953 | else |
81ecdfbb | 10954 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10955 | /* end confdefs.h. */ |
97bf5e38 MK |
10956 | |
10957 | #define _SYSCALL32 | |
d30c5336 JK |
10958 | /* Needed for new procfs interface on sparc-solaris. */ |
10959 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10960 | #include <sys/procfs.h> |
bec39cab AC |
10961 | int |
10962 | main () | |
10963 | { | |
97bf5e38 | 10964 | prgregset32_t avar |
bec39cab AC |
10965 | ; |
10966 | return 0; | |
10967 | } | |
10968 | _ACEOF | |
81ecdfbb | 10969 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10970 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 10971 | else |
81ecdfbb | 10972 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 10973 | |
d45fe813 | 10974 | fi |
81ecdfbb | 10975 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
10976 | fi |
10977 | ||
97bf5e38 | 10978 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 10979 | |
81ecdfbb | 10980 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 10981 | |
97bf5e38 | 10982 | fi |
81ecdfbb RW |
10983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
10984 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 10985 | |
81ecdfbb RW |
10986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
10987 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
10988 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
10989 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10990 | else |
81ecdfbb | 10991 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10992 | /* end confdefs.h. */ |
97bf5e38 MK |
10993 | |
10994 | #define _SYSCALL32 | |
d30c5336 JK |
10995 | /* Needed for new procfs interface on sparc-solaris. */ |
10996 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10997 | #include <sys/procfs.h> |
bec39cab AC |
10998 | int |
10999 | main () | |
11000 | { | |
97bf5e38 | 11001 | prfpregset32_t avar |
bec39cab AC |
11002 | ; |
11003 | return 0; | |
11004 | } | |
11005 | _ACEOF | |
81ecdfbb | 11006 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11007 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 11008 | else |
81ecdfbb | 11009 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 11010 | |
d45fe813 | 11011 | fi |
81ecdfbb | 11012 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11013 | fi |
11014 | ||
97bf5e38 | 11015 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 11016 | |
81ecdfbb | 11017 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 11018 | |
97bf5e38 | 11019 | fi |
81ecdfbb RW |
11020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
11021 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 11022 | |
81ecdfbb RW |
11023 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11024 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11025 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11026 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11027 | else |
81ecdfbb | 11028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11029 | /* end confdefs.h. */ |
97bf5e38 | 11030 | |
d45fe813 | 11031 | #define _SYSCALL32 |
d30c5336 JK |
11032 | /* Needed for new procfs interface on sparc-solaris. */ |
11033 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11034 | #include <sys/procfs.h> |
bec39cab AC |
11035 | int |
11036 | main () | |
11037 | { | |
97bf5e38 | 11038 | lwpid_t avar |
bec39cab AC |
11039 | ; |
11040 | return 0; | |
11041 | } | |
11042 | _ACEOF | |
81ecdfbb | 11043 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11044 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11045 | else |
81ecdfbb | 11046 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11047 | |
d45fe813 | 11048 | fi |
81ecdfbb | 11049 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11050 | fi |
11051 | ||
97bf5e38 | 11052 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11053 | |
81ecdfbb | 11054 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11055 | |
97bf5e38 | 11056 | fi |
81ecdfbb RW |
11057 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11058 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11059 | |
81ecdfbb RW |
11060 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11061 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11062 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11063 | $as_echo_n "(cached) " >&6 | |
c906108c | 11064 | else |
81ecdfbb | 11065 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11066 | /* end confdefs.h. */ |
c906108c | 11067 | |
97bf5e38 | 11068 | #define _SYSCALL32 |
d30c5336 JK |
11069 | /* Needed for new procfs interface on sparc-solaris. */ |
11070 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11071 | #include <sys/procfs.h> |
bec39cab AC |
11072 | int |
11073 | main () | |
11074 | { | |
97bf5e38 | 11075 | psaddr_t avar |
bec39cab AC |
11076 | ; |
11077 | return 0; | |
11078 | } | |
11079 | _ACEOF | |
81ecdfbb | 11080 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11081 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11082 | else |
81ecdfbb | 11083 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11084 | |
c906108c | 11085 | fi |
81ecdfbb | 11086 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11087 | fi |
11088 | ||
97bf5e38 | 11089 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11090 | |
81ecdfbb | 11091 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11092 | |
97bf5e38 | 11093 | fi |
81ecdfbb RW |
11094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11095 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11096 | |
81ecdfbb RW |
11097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11098 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11099 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11100 | $as_echo_n "(cached) " >&6 | |
c906108c | 11101 | else |
81ecdfbb | 11102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11103 | /* end confdefs.h. */ |
c906108c | 11104 | |
97bf5e38 | 11105 | #define _SYSCALL32 |
d30c5336 JK |
11106 | /* Needed for new procfs interface on sparc-solaris. */ |
11107 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11108 | #include <sys/procfs.h> |
bec39cab AC |
11109 | int |
11110 | main () | |
11111 | { | |
97bf5e38 | 11112 | prsysent_t avar |
bec39cab AC |
11113 | ; |
11114 | return 0; | |
11115 | } | |
11116 | _ACEOF | |
81ecdfbb | 11117 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11118 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11119 | else |
81ecdfbb | 11120 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11121 | |
c906108c | 11122 | fi |
81ecdfbb | 11123 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11124 | fi |
11125 | ||
97bf5e38 | 11126 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11127 | |
81ecdfbb | 11128 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11129 | |
97bf5e38 | 11130 | fi |
81ecdfbb RW |
11131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11132 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11133 | |
81ecdfbb RW |
11134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11135 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11136 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11137 | $as_echo_n "(cached) " >&6 | |
c906108c | 11138 | else |
81ecdfbb | 11139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11140 | /* end confdefs.h. */ |
c906108c | 11141 | |
97bf5e38 | 11142 | #define _SYSCALL32 |
d30c5336 JK |
11143 | /* Needed for new procfs interface on sparc-solaris. */ |
11144 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11145 | #include <sys/procfs.h> |
bec39cab AC |
11146 | int |
11147 | main () | |
11148 | { | |
97bf5e38 | 11149 | pr_sigset_t avar |
bec39cab AC |
11150 | ; |
11151 | return 0; | |
11152 | } | |
11153 | _ACEOF | |
81ecdfbb | 11154 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11155 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11156 | else |
81ecdfbb | 11157 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11158 | |
c906108c | 11159 | fi |
81ecdfbb | 11160 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11161 | fi |
11162 | ||
97bf5e38 | 11163 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11164 | |
81ecdfbb | 11165 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11166 | |
97bf5e38 | 11167 | fi |
81ecdfbb RW |
11168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11169 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11170 | |
81ecdfbb RW |
11171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11172 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11173 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11174 | $as_echo_n "(cached) " >&6 | |
c906108c | 11175 | else |
81ecdfbb | 11176 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11177 | /* end confdefs.h. */ |
c906108c | 11178 | |
97bf5e38 | 11179 | #define _SYSCALL32 |
d30c5336 JK |
11180 | /* Needed for new procfs interface on sparc-solaris. */ |
11181 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11182 | #include <sys/procfs.h> |
bec39cab AC |
11183 | int |
11184 | main () | |
11185 | { | |
97bf5e38 | 11186 | pr_sigaction64_t avar |
bec39cab AC |
11187 | ; |
11188 | return 0; | |
11189 | } | |
11190 | _ACEOF | |
81ecdfbb | 11191 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11192 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11193 | else |
81ecdfbb | 11194 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11195 | |
c906108c | 11196 | fi |
81ecdfbb | 11197 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11198 | fi |
11199 | ||
97bf5e38 | 11200 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11201 | |
81ecdfbb | 11202 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11203 | |
97bf5e38 | 11204 | fi |
81ecdfbb RW |
11205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11206 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11207 | |
81ecdfbb RW |
11208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
11209 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
11210 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
11211 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11212 | else |
81ecdfbb | 11213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11214 | /* end confdefs.h. */ |
97bf5e38 MK |
11215 | |
11216 | #define _SYSCALL32 | |
d30c5336 JK |
11217 | /* Needed for new procfs interface on sparc-solaris. */ |
11218 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11219 | #include <sys/procfs.h> |
bec39cab AC |
11220 | int |
11221 | main () | |
11222 | { | |
97bf5e38 | 11223 | pr_siginfo64_t avar |
bec39cab AC |
11224 | ; |
11225 | return 0; | |
11226 | } | |
11227 | _ACEOF | |
81ecdfbb | 11228 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11229 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
11230 | else | |
81ecdfbb | 11231 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 11232 | |
97bf5e38 | 11233 | fi |
81ecdfbb | 11234 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11235 | fi |
c906108c | 11236 | |
97bf5e38 | 11237 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 11238 | |
81ecdfbb | 11239 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 11240 | |
97bf5e38 | 11241 | fi |
81ecdfbb RW |
11242 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
11243 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
11244 | |
11245 | ||
97bf5e38 MK |
11246 | |
11247 | ||
11248 | ||
97bf5e38 | 11249 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
11250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
11251 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
11252 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
11253 | $as_echo_n "(cached) " >&6 | |
c906108c | 11254 | else |
81ecdfbb | 11255 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 11256 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 11257 | else |
81ecdfbb | 11258 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11259 | /* end confdefs.h. */ |
97bf5e38 MK |
11260 | #include <sys/procfs.h> |
11261 | int main () | |
11262 | { | |
11263 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
11264 | return 1; | |
11265 | return 0; | |
11266 | } | |
bec39cab | 11267 | _ACEOF |
81ecdfbb | 11268 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11269 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
11270 | else |
11271 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 11272 | fi |
81ecdfbb RW |
11273 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11274 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11275 | fi |
81ecdfbb | 11276 | |
c906108c SS |
11277 | fi |
11278 | ||
81ecdfbb RW |
11279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
11280 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 11281 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 11282 | |
81ecdfbb | 11283 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 11284 | |
97bf5e38 MK |
11285 | fi |
11286 | fi | |
c906108c | 11287 | |
bec39cab | 11288 | |
81ecdfbb RW |
11289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
11290 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
11291 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
11292 | $as_echo_n "(cached) " >&6 | |
c906108c | 11293 | else |
81ecdfbb | 11294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11295 | /* end confdefs.h. */ |
97bf5e38 MK |
11296 | #include <unistd.h> |
11297 | #include <sys/types.h> | |
11298 | #include <sys/procfs.h> | |
11299 | ||
bec39cab AC |
11300 | int |
11301 | main () | |
11302 | { | |
97bf5e38 MK |
11303 | |
11304 | int dummy;; | |
11305 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
11306 | |
11307 | ; | |
11308 | return 0; | |
11309 | } | |
11310 | _ACEOF | |
81ecdfbb | 11311 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11312 | gdb_cv_have_procfs_piocset=yes |
c906108c | 11313 | else |
81ecdfbb | 11314 | gdb_cv_have_procfs_piocset=no |
c906108c | 11315 | fi |
81ecdfbb | 11316 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11317 | fi |
97bf5e38 | 11318 | |
81ecdfbb RW |
11319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
11320 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 11321 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 11322 | |
81ecdfbb | 11323 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
11324 | |
11325 | fi | |
c906108c | 11326 | fi |
c906108c | 11327 | |
97bf5e38 | 11328 | if test ${host} = ${target} ; then |
bec39cab | 11329 | |
81ecdfbb RW |
11330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
11331 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
11332 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
11333 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11334 | else |
81ecdfbb | 11335 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11336 | /* end confdefs.h. */ |
97bf5e38 | 11337 | #include <link.h> |
bec39cab AC |
11338 | int |
11339 | main () | |
11340 | { | |
97bf5e38 | 11341 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
11342 | ; |
11343 | return 0; | |
11344 | } | |
11345 | _ACEOF | |
81ecdfbb | 11346 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11347 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 11348 | else |
81ecdfbb | 11349 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 11350 | fi |
81ecdfbb | 11351 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11352 | fi |
11353 | ||
81ecdfbb RW |
11354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
11355 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 11356 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 11357 | |
81ecdfbb | 11358 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11359 | |
11360 | fi | |
11361 | ||
bec39cab | 11362 | |
81ecdfbb RW |
11363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
11364 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
11365 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
11366 | $as_echo_n "(cached) " >&6 | |
c906108c | 11367 | else |
81ecdfbb | 11368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11369 | /* end confdefs.h. */ |
97bf5e38 MK |
11370 | #include <sys/types.h> |
11371 | #include <link.h> | |
bec39cab AC |
11372 | int |
11373 | main () | |
11374 | { | |
97bf5e38 | 11375 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
11376 | ; |
11377 | return 0; | |
11378 | } | |
11379 | _ACEOF | |
81ecdfbb | 11380 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11381 | gdb_cv_have_struct_link_map_with_lm_members=yes |
11382 | else | |
81ecdfbb | 11383 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 11384 | fi |
81ecdfbb | 11385 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11386 | fi |
c906108c | 11387 | |
81ecdfbb RW |
11388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
11389 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 11390 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 11391 | |
81ecdfbb | 11392 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11393 | |
11394 | fi | |
11395 | ||
bec39cab | 11396 | |
81ecdfbb RW |
11397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
11398 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
11399 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
11400 | $as_echo_n "(cached) " >&6 | |
c906108c | 11401 | else |
81ecdfbb | 11402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11403 | /* end confdefs.h. */ |
97bf5e38 MK |
11404 | #include <sys/types.h> |
11405 | #ifdef HAVE_NLIST_H | |
11406 | #include <nlist.h> | |
11407 | #endif | |
11408 | #include <link.h> | |
bec39cab AC |
11409 | int |
11410 | main () | |
11411 | { | |
97bf5e38 | 11412 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
11413 | ; |
11414 | return 0; | |
11415 | } | |
11416 | _ACEOF | |
81ecdfbb | 11417 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11418 | gdb_cv_have_struct_so_map_with_som_members=yes |
11419 | else | |
81ecdfbb | 11420 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 11421 | fi |
81ecdfbb | 11422 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11423 | fi |
c906108c | 11424 | |
81ecdfbb RW |
11425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
11426 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 11427 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 11428 | |
81ecdfbb | 11429 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 11430 | |
97bf5e38 | 11431 | fi |
c906108c | 11432 | |
bec39cab | 11433 | |
81ecdfbb RW |
11434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
11435 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
11436 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
11437 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11438 | else |
81ecdfbb | 11439 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11440 | /* end confdefs.h. */ |
97bf5e38 MK |
11441 | #define _SYSCALL32 |
11442 | #include <sys/link.h> | |
bec39cab AC |
11443 | int |
11444 | main () | |
11445 | { | |
97bf5e38 | 11446 | struct link_map32 l; |
bec39cab AC |
11447 | ; |
11448 | return 0; | |
11449 | } | |
11450 | _ACEOF | |
81ecdfbb | 11451 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11452 | gdb_cv_have_struct_link_map32=yes |
11453 | else | |
81ecdfbb | 11454 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 11455 | fi |
81ecdfbb | 11456 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11457 | fi |
c906108c | 11458 | |
81ecdfbb RW |
11459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
11460 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 11461 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 11462 | |
81ecdfbb | 11463 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 11464 | |
60ca704f | 11465 | |
81ecdfbb | 11466 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 11467 | |
97bf5e38 MK |
11468 | fi |
11469 | fi | |
c906108c | 11470 | |
bc8bcb4b | 11471 | # Check if the compiler supports the `long long' type. |
c906108c | 11472 | |
81ecdfbb RW |
11473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
11474 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
11475 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
11476 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11477 | else |
81ecdfbb | 11478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11479 | /* end confdefs.h. */ |
bc8bcb4b | 11480 | extern long long foo; |
bec39cab AC |
11481 | int |
11482 | main () | |
11483 | { | |
bc8bcb4b | 11484 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
11485 | ; |
11486 | return 0; | |
11487 | } | |
11488 | _ACEOF | |
81ecdfbb | 11489 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11490 | gdb_cv_c_long_long=yes |
11491 | else | |
81ecdfbb | 11492 | gdb_cv_c_long_long=no |
97bf5e38 | 11493 | fi |
81ecdfbb | 11494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11495 | fi |
81ecdfbb RW |
11496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
11497 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 11498 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 11499 | |
81ecdfbb | 11500 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11501 | |
11502 | fi | |
11503 | ||
bc8bcb4b | 11504 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 11505 | |
81ecdfbb RW |
11506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
11507 | $as_echo_n "checking for long long support in printf... " >&6; } | |
11508 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
11509 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11510 | else |
81ecdfbb | 11511 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11512 | gdb_cv_printf_has_long_long=no |
11513 | else | |
81ecdfbb | 11514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11515 | /* end confdefs.h. */ |
bc8bcb4b MK |
11516 | $ac_includes_default |
11517 | int | |
11518 | main () | |
11519 | { | |
11520 | char buf[32]; | |
97bf5e38 MK |
11521 | long long l = 0; |
11522 | l = (l << 16) + 0x0123; | |
11523 | l = (l << 16) + 0x4567; | |
11524 | l = (l << 16) + 0x89ab; | |
11525 | l = (l << 16) + 0xcdef; | |
11526 | sprintf (buf, "0x%016llx", l); | |
11527 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
11528 | ; |
11529 | return 0; | |
c906108c | 11530 | } |
bec39cab | 11531 | _ACEOF |
81ecdfbb | 11532 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11533 | gdb_cv_printf_has_long_long=yes |
11534 | else | |
81ecdfbb | 11535 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 11536 | fi |
81ecdfbb RW |
11537 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11538 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11539 | fi |
81ecdfbb | 11540 | |
97bf5e38 | 11541 | fi |
81ecdfbb RW |
11542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
11543 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 11544 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 11545 | |
81ecdfbb | 11546 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11547 | |
11548 | fi | |
97bf5e38 | 11549 | |
1a619819 LM |
11550 | # Check if the compiler and runtime support printing decfloats. |
11551 | ||
81ecdfbb RW |
11552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
11553 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
11554 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
11555 | $as_echo_n "(cached) " >&6 | |
1a619819 | 11556 | else |
81ecdfbb | 11557 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
11558 | gdb_cv_printf_has_decfloat=no |
11559 | else | |
81ecdfbb | 11560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
11561 | /* end confdefs.h. */ |
11562 | $ac_includes_default | |
11563 | int | |
11564 | main () | |
11565 | { | |
11566 | char buf[64]; | |
11567 | _Decimal32 d32 = 1.2345df; | |
11568 | _Decimal64 d64 = 1.2345dd; | |
11569 | _Decimal128 d128 = 1.2345dl; | |
11570 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
11571 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
11572 | ; | |
11573 | return 0; | |
11574 | } | |
11575 | _ACEOF | |
81ecdfbb | 11576 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
11577 | gdb_cv_printf_has_decfloat=yes |
11578 | else | |
81ecdfbb | 11579 | gdb_cv_printf_has_decfloat=no |
1a619819 | 11580 | fi |
81ecdfbb RW |
11581 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11582 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 11583 | fi |
81ecdfbb | 11584 | |
1a619819 | 11585 | fi |
81ecdfbb RW |
11586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
11587 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
11588 | if test $gdb_cv_printf_has_decfloat = yes; then |
11589 | ||
81ecdfbb | 11590 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
11591 | |
11592 | fi | |
11593 | ||
bc8bcb4b MK |
11594 | # Check if the compiler supports the `long double' type. We can't use |
11595 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
11596 | # constants defined in <float.h> that fail on some systems, | |
11597 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 11598 | |
81ecdfbb RW |
11599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
11600 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
11601 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
11602 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11603 | else |
81ecdfbb | 11604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11605 | /* end confdefs.h. */ |
97bf5e38 | 11606 | long double foo; |
bec39cab | 11607 | _ACEOF |
81ecdfbb | 11608 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 11609 | gdb_cv_c_long_double=yes |
97bf5e38 | 11610 | else |
81ecdfbb | 11611 | gdb_cv_c_long_double=no |
97bf5e38 | 11612 | fi |
81ecdfbb | 11613 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11614 | fi |
81ecdfbb RW |
11615 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
11616 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 11617 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 11618 | |
81ecdfbb | 11619 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11620 | |
11621 | fi | |
11622 | ||
bc8bcb4b | 11623 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 11624 | |
81ecdfbb RW |
11625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
11626 | $as_echo_n "checking for long double support in printf... " >&6; } | |
11627 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
11628 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11629 | else |
81ecdfbb | 11630 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11631 | gdb_cv_printf_has_long_double=no |
11632 | else | |
81ecdfbb | 11633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11634 | /* end confdefs.h. */ |
bc8bcb4b MK |
11635 | $ac_includes_default |
11636 | int | |
11637 | main () | |
11638 | { | |
11639 | char buf[16]; | |
97bf5e38 MK |
11640 | long double f = 3.141592653; |
11641 | sprintf (buf, "%Lg", f); | |
11642 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
11643 | ; |
11644 | return 0; | |
97bf5e38 | 11645 | } |
bec39cab | 11646 | _ACEOF |
81ecdfbb | 11647 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11648 | gdb_cv_printf_has_long_double=yes |
c906108c | 11649 | else |
81ecdfbb | 11650 | gdb_cv_printf_has_long_double=no |
c906108c | 11651 | fi |
81ecdfbb RW |
11652 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11653 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11654 | fi |
81ecdfbb | 11655 | |
c906108c | 11656 | fi |
81ecdfbb RW |
11657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
11658 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 11659 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 11660 | |
81ecdfbb | 11661 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11662 | |
11663 | fi | |
97bf5e38 | 11664 | |
bc8bcb4b | 11665 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 11666 | |
81ecdfbb RW |
11667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
11668 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
11669 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
11670 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11671 | else |
81ecdfbb | 11672 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11673 | gdb_cv_scanf_has_long_double=no |
11674 | else | |
81ecdfbb | 11675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11676 | /* end confdefs.h. */ |
bc8bcb4b MK |
11677 | #include <stdio.h> |
11678 | int | |
11679 | main () | |
11680 | { | |
11681 | char *buf = "3.141592653"; | |
97bf5e38 MK |
11682 | long double f = 0; |
11683 | sscanf (buf, "%Lg", &f); | |
11684 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
11685 | ; |
11686 | return 0; | |
97bf5e38 | 11687 | } |
bec39cab | 11688 | _ACEOF |
81ecdfbb | 11689 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11690 | gdb_cv_scanf_has_long_double=yes |
11691 | else | |
81ecdfbb | 11692 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 11693 | fi |
81ecdfbb RW |
11694 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11695 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11696 | fi |
81ecdfbb | 11697 | |
c906108c | 11698 | fi |
81ecdfbb RW |
11699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
11700 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 11701 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 11702 | |
81ecdfbb | 11703 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11704 | |
11705 | fi | |
c906108c | 11706 | |
438013df AO |
11707 | case ${host_os} in |
11708 | aix*) | |
81ecdfbb RW |
11709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
11710 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
11711 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
11712 | $as_echo_n "(cached) " >&6 | |
438013df | 11713 | else |
bec39cab | 11714 | |
438013df AO |
11715 | SAVE_LDFLAGS=$LDFLAGS |
11716 | ||
11717 | case $GCC in | |
11718 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
11719 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
11720 | esac | |
11721 | ||
11722 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 11723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11724 | /* end confdefs.h. */ |
438013df | 11725 | |
bec39cab AC |
11726 | int |
11727 | main () | |
11728 | { | |
438013df | 11729 | int i; |
bec39cab AC |
11730 | ; |
11731 | return 0; | |
11732 | } | |
11733 | _ACEOF | |
81ecdfbb | 11734 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 11735 | |
81ecdfbb RW |
11736 | else |
11737 | gdb_cv_bigtoc= | |
438013df | 11738 | fi |
81ecdfbb RW |
11739 | rm -f core conftest.err conftest.$ac_objext \ |
11740 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 11741 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 11742 | |
bec39cab | 11743 | fi |
81ecdfbb RW |
11744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
11745 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
11746 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
11747 | ;; | |
11748 | esac | |
11749 | ||
38f6b338 | 11750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 11751 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
11752 | dynamic_list=false |
11753 | if test "${gdb_native}" = yes; then | |
11754 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
11755 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
11756 | # may not be supported there. | |
11757 | old_LDFLAGS="$LDFLAGS" | |
11758 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
11759 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
11760 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
11761 | if test "${have_libpython}" = no; then | |
11762 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
11763 | /* end confdefs.h. */ |
11764 | ||
11765 | int | |
11766 | main () | |
11767 | { | |
11768 | ||
11769 | ; | |
11770 | return 0; | |
11771 | } | |
11772 | _ACEOF | |
11773 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
11774 | dynamic_list=true |
11775 | fi | |
11776 | rm -f core conftest.err conftest.$ac_objext \ | |
11777 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
11778 | else |
11779 | # Workaround http://bugs.python.org/issue4434 where static | |
11780 | # libpythonX.Y.a would get its symbols required for | |
11781 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
11782 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
11783 | old_CFLAGS="$CFLAGS" | |
11784 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
11785 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 11786 | true |
f6528abd | 11787 | else |
3bebe2f2 JK |
11788 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11789 | /* end confdefs.h. */ | |
11790 | #include "${have_libpython}/Python.h" | |
11791 | int | |
11792 | main () | |
11793 | { | |
11794 | int err; | |
38f6b338 JK |
11795 | Py_Initialize (); |
11796 | err = PyRun_SimpleString ("import itertools\n"); | |
11797 | Py_Finalize (); | |
11798 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
11799 | ; |
11800 | return 0; | |
11801 | } | |
11802 | _ACEOF | |
11803 | if ac_fn_c_try_run "$LINENO"; then : | |
11804 | dynamic_list=true | |
11805 | fi | |
11806 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11807 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11808 | fi | |
11809 | ||
38f6b338 JK |
11810 | CFLAGS="$old_CFLAGS" |
11811 | fi | |
11812 | LDFLAGS="$old_LDFLAGS" | |
11813 | fi | |
11814 | if $dynamic_list; then | |
11815 | found="-Wl,--dynamic-list" | |
11816 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 11817 | else |
38f6b338 JK |
11818 | found="-rdynamic" |
11819 | RDYNAMIC="-rdynamic" | |
f6528abd | 11820 | fi |
f6528abd | 11821 | |
38f6b338 | 11822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 11823 | $as_echo "$found" >&6; } |
0407b3f1 | 11824 | |
f6528abd | 11825 | |
0407b3f1 | 11826 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 11827 | case ${host_os} in |
c906108c | 11828 | solaris*) |
d92419e5 JB |
11829 | # See if thread_db library is around for Solaris thread debugging. |
11830 | # Note that we must explicitly test for version 1 of the library | |
11831 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
11832 | # the same API. | |
81ecdfbb RW |
11833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
11834 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 11835 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
11836 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11837 | $as_echo "yes" >&6; } | |
60ca704f | 11838 | |
81ecdfbb | 11839 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 11840 | |
3483b318 | 11841 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 11842 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
11843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
11844 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
11845 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
11846 | $as_echo_n "(cached) " >&6 | |
c906108c | 11847 | else |
bec39cab | 11848 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 11849 | LIBS="-ldl $LIBS" |
81ecdfbb | 11850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
11851 | /* end confdefs.h. */ |
11852 | ||
81ecdfbb RW |
11853 | /* Override any GCC internal prototype to avoid an error. |
11854 | Use char because int might match the return type of a GCC | |
11855 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
11856 | #ifdef __cplusplus |
11857 | extern "C" | |
11858 | #endif | |
bec39cab AC |
11859 | char dlopen (); |
11860 | int | |
11861 | main () | |
11862 | { | |
81ecdfbb | 11863 | return dlopen (); |
bec39cab AC |
11864 | ; |
11865 | return 0; | |
11866 | } | |
11867 | _ACEOF | |
81ecdfbb | 11868 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
11869 | ac_cv_lib_dl_dlopen=yes |
11870 | else | |
81ecdfbb | 11871 | ac_cv_lib_dl_dlopen=no |
bec39cab | 11872 | fi |
81ecdfbb RW |
11873 | rm -f core conftest.err conftest.$ac_objext \ |
11874 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
11875 | LIBS=$ac_check_lib_save_LIBS |
11876 | fi | |
81ecdfbb RW |
11877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
11878 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
11879 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
11880 | cat >>confdefs.h <<_ACEOF |
11881 | #define HAVE_LIBDL 1 | |
11882 | _ACEOF | |
c906108c SS |
11883 | |
11884 | LIBS="-ldl $LIBS" | |
11885 | ||
c906108c SS |
11886 | fi |
11887 | ||
f6528abd | 11888 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
11889 | # Sun randomly tweaked the prototypes in <proc_service.h> |
11890 | # at one point. | |
81ecdfbb RW |
11891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
11892 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
11893 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
11894 | $as_echo_n "(cached) " >&6 | |
c906108c | 11895 | else |
bec39cab | 11896 | |
81ecdfbb | 11897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11898 | /* end confdefs.h. */ |
c906108c SS |
11899 | |
11900 | #include <proc_service.h> | |
11901 | ps_err_e ps_pdwrite | |
11902 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 11903 | |
bec39cab AC |
11904 | int |
11905 | main () | |
11906 | { | |
11907 | ||
11908 | ; | |
11909 | return 0; | |
11910 | } | |
11911 | _ACEOF | |
81ecdfbb | 11912 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
11913 | gdb_cv_proc_service_is_old=no |
11914 | else | |
81ecdfbb | 11915 | gdb_cv_proc_service_is_old=yes |
c906108c | 11916 | fi |
81ecdfbb | 11917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11918 | |
c906108c SS |
11919 | fi |
11920 | ||
81ecdfbb RW |
11921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
11922 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 11923 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 11924 | |
81ecdfbb | 11925 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
11926 | |
11927 | fi | |
11928 | else | |
81ecdfbb RW |
11929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11930 | $as_echo "no" >&6; } | |
c906108c SS |
11931 | fi |
11932 | ;; | |
d92419e5 | 11933 | aix*) |
81ecdfbb RW |
11934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
11935 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
11936 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
11937 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11938 | else |
81ecdfbb | 11939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11940 | /* end confdefs.h. */ |
d92419e5 | 11941 | #include <sys/pthdebug.h> |
bec39cab AC |
11942 | int |
11943 | main () | |
11944 | { | |
d92419e5 JB |
11945 | #ifndef PTHDB_VERSION_3 |
11946 | #error | |
11947 | #endif | |
bec39cab AC |
11948 | ; |
11949 | return 0; | |
11950 | } | |
11951 | _ACEOF | |
81ecdfbb | 11952 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
11953 | gdb_cv_have_aix_thread_debug=yes |
11954 | else | |
81ecdfbb | 11955 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 11956 | fi |
81ecdfbb | 11957 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
11958 | fi |
11959 | ||
81ecdfbb RW |
11960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
11961 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
11962 | if test $gdb_cv_have_aix_thread_debug = yes; then |
11963 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 11964 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 11965 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
11966 | |
11967 | # Older versions of AIX do not provide the declaration for | |
11968 | # the getthrds function (it appears that it was introduced | |
11969 | # with AIX 6.x). | |
11970 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
11971 | " | |
11972 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
11973 | ac_have_decl=1 | |
11974 | else | |
11975 | ac_have_decl=0 | |
11976 | fi | |
11977 | ||
11978 | cat >>confdefs.h <<_ACEOF | |
11979 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
11980 | _ACEOF | |
11981 | ||
d92419e5 JB |
11982 | fi |
11983 | ;; | |
c906108c | 11984 | esac |
bec39cab | 11985 | |
c906108c SS |
11986 | fi |
11987 | ||
3f47be5c | 11988 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
11989 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
11990 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
11991 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
11992 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11993 | else |
81ecdfbb | 11994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11995 | /* end confdefs.h. */ |
3f47be5c | 11996 | #include <thread_db.h> |
bec39cab AC |
11997 | int |
11998 | main () | |
11999 | { | |
3f47be5c | 12000 | int i = TD_NOTALLOC; |
bec39cab AC |
12001 | ; |
12002 | return 0; | |
12003 | } | |
12004 | _ACEOF | |
81ecdfbb | 12005 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12006 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12007 | else | |
81ecdfbb | 12008 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12009 | |
3f47be5c | 12010 | fi |
81ecdfbb | 12011 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12012 | |
bec39cab | 12013 | fi |
81ecdfbb RW |
12014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12015 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12016 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12017 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12018 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12019 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12020 | else |
81ecdfbb | 12021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12022 | /* end confdefs.h. */ |
12023 | #include <thread_db.h> | |
12024 | int | |
12025 | main () | |
12026 | { | |
12027 | int i = TD_VERSION; | |
12028 | ; | |
12029 | return 0; | |
12030 | } | |
12031 | _ACEOF | |
81ecdfbb | 12032 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12033 | gdb_cv_thread_db_h_has_td_version=yes |
12034 | else | |
81ecdfbb | 12035 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12036 | |
12037 | fi | |
81ecdfbb | 12038 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12039 | |
12040 | fi | |
81ecdfbb RW |
12041 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12042 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12044 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12045 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12046 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12047 | else |
81ecdfbb | 12048 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12049 | /* end confdefs.h. */ |
12050 | #include <thread_db.h> | |
12051 | int | |
12052 | main () | |
12053 | { | |
12054 | int i = TD_NOTLS; | |
12055 | ; | |
12056 | return 0; | |
12057 | } | |
12058 | _ACEOF | |
81ecdfbb | 12059 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12060 | gdb_cv_thread_db_h_has_td_notls=yes |
12061 | else | |
81ecdfbb | 12062 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12063 | |
12064 | fi | |
81ecdfbb | 12065 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12066 | |
12067 | fi | |
81ecdfbb RW |
12068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12069 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12070 | fi |
12071 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12072 | |
81ecdfbb | 12073 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12074 | |
59f80f10 DJ |
12075 | fi |
12076 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12077 | ||
81ecdfbb | 12078 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12079 | |
12080 | fi | |
12081 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12082 | ||
81ecdfbb | 12083 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12084 | |
3f47be5c EZ |
12085 | fi |
12086 | ||
b757528f | 12087 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12088 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12089 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12090 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12091 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12092 | else |
81ecdfbb | 12093 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12094 | /* end confdefs.h. */ |
b757528f | 12095 | #include <sys/syscall.h> |
bec39cab AC |
12096 | int |
12097 | main () | |
12098 | { | |
b757528f | 12099 | int i = __NR_tkill; |
bec39cab AC |
12100 | ; |
12101 | return 0; | |
12102 | } | |
12103 | _ACEOF | |
81ecdfbb | 12104 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12105 | gdb_cv_sys_syscall_h_has_tkill=yes |
12106 | else | |
81ecdfbb | 12107 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12108 | |
b757528f | 12109 | fi |
81ecdfbb | 12110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12111 | |
bec39cab | 12112 | fi |
81ecdfbb RW |
12113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12114 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
12115 | fi |
12116 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 12117 | |
81ecdfbb | 12118 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
12119 | |
12120 | fi | |
12121 | ||
81ecdfbb RW |
12122 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12123 | " | |
12124 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12125 | ac_have_decl=1 | |
10568435 | 12126 | else |
81ecdfbb | 12127 | ac_have_decl=0 |
10568435 | 12128 | fi |
10568435 JK |
12129 | |
12130 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12131 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12132 | _ACEOF |
12133 | ||
12134 | ||
81ecdfbb RW |
12135 | if test "$cross_compiling" = yes; then : |
12136 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12137 | /* end confdefs.h. */ |
12138 | #include <sys/personality.h> | |
12139 | int | |
12140 | main () | |
12141 | { | |
12142 | ||
12143 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12144 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12145 | # endif | |
12146 | /* Test the flag could be set and stays set. */ | |
12147 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12148 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12149 | return 1 | |
12150 | ; | |
12151 | return 0; | |
12152 | } | |
12153 | _ACEOF | |
81ecdfbb | 12154 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12155 | have_personality=true |
12156 | else | |
81ecdfbb | 12157 | have_personality=false |
10568435 | 12158 | fi |
81ecdfbb RW |
12159 | rm -f core conftest.err conftest.$ac_objext \ |
12160 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12161 | else |
81ecdfbb | 12162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12163 | /* end confdefs.h. */ |
12164 | #include <sys/personality.h> | |
12165 | int | |
12166 | main () | |
12167 | { | |
12168 | ||
12169 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12170 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12171 | # endif | |
12172 | /* Test the flag could be set and stays set. */ | |
12173 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12174 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12175 | return 1 | |
12176 | ; | |
12177 | return 0; | |
12178 | } | |
12179 | _ACEOF | |
81ecdfbb | 12180 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12181 | have_personality=true |
12182 | else | |
81ecdfbb | 12183 | have_personality=false |
10568435 | 12184 | fi |
81ecdfbb RW |
12185 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12186 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12187 | fi |
81ecdfbb | 12188 | |
10568435 JK |
12189 | if $have_personality |
12190 | then | |
12191 | ||
81ecdfbb | 12192 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12193 | |
12194 | fi | |
12195 | ||
fb40c209 | 12196 | |
f83d8a90 DE |
12197 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12198 | # except that the argument to --with-sysroot is optional. | |
12199 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12200 | if test "x$with_sysroot" = xyes; then | |
12201 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12202 | fi | |
bec39cab | 12203 | |
81ecdfbb RW |
12204 | # Check whether --with-sysroot was given. |
12205 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12206 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12207 | else | |
12208 | TARGET_SYSTEM_ROOT= | |
12209 | fi | |
030292b7 | 12210 | |
030292b7 | 12211 | |
f83d8a90 DE |
12212 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12213 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12214 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12215 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12216 | |
f83d8a90 DE |
12217 | cat >>confdefs.h <<_ACEOF |
12218 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12219 | _ACEOF | |
bec39cab | 12220 | |
030292b7 | 12221 | |
b14b1491 | 12222 | |
f83d8a90 DE |
12223 | |
12224 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12225 | if test "x$prefix" = xNONE; then | |
12226 | test_prefix=/usr/local | |
12227 | else | |
12228 | test_prefix=$prefix | |
12229 | fi | |
12230 | else | |
12231 | test_prefix=$exec_prefix | |
12232 | fi | |
12233 | value=0 | |
12234 | case ${ac_define_dir} in | |
12235 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12236 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12237 | value=1 | |
12238 | ;; | |
12239 | esac | |
12240 | ||
12241 | cat >>confdefs.h <<_ACEOF | |
12242 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12243 | _ACEOF | |
030292b7 DJ |
12244 | |
12245 | ||
12246 | ||
16e7150e | 12247 | |
16e7150e | 12248 | |
81ecdfbb RW |
12249 | # Check whether --with-system-gdbinit was given. |
12250 | if test "${with_system_gdbinit+set}" = set; then : | |
12251 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12252 | SYSTEM_GDBINIT=$withval |
12253 | else | |
12254 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12255 | fi |
12256 | ||
16e7150e JG |
12257 | |
12258 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12259 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12260 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12261 | ac_define_dir=`eval echo $ac_define_dir` |
12262 | ||
12263 | cat >>confdefs.h <<_ACEOF | |
12264 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12265 | _ACEOF | |
12266 | ||
12267 | ||
12268 | ||
0c4a4063 | 12269 | |
b14b1491 TT |
12270 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12271 | if test "x$prefix" = xNONE; then | |
12272 | test_prefix=/usr/local | |
12273 | else | |
12274 | test_prefix=$prefix | |
12275 | fi | |
12276 | else | |
12277 | test_prefix=$exec_prefix | |
12278 | fi | |
12279 | value=0 | |
12280 | case ${ac_define_dir} in | |
12281 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12282 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12283 | value=1 | |
12284 | ;; | |
12285 | esac | |
16e7150e | 12286 | |
b14b1491 TT |
12287 | cat >>confdefs.h <<_ACEOF |
12288 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12289 | _ACEOF |
12290 | ||
b14b1491 | 12291 | |
16e7150e | 12292 | |
0c4a4063 | 12293 | |
81ecdfbb RW |
12294 | # Check whether --enable-werror was given. |
12295 | if test "${enable_werror+set}" = set; then : | |
12296 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12297 | yes | y) ERROR_ON_WARNING="yes" ;; |
12298 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12299 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12300 | esac |
81ecdfbb RW |
12301 | fi |
12302 | ||
094a342e MK |
12303 | |
12304 | # Enable -Werror by default when using gcc | |
12305 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
12306 | ERROR_ON_WARNING=yes | |
12307 | fi | |
12308 | ||
12309 | WERROR_CFLAGS="" | |
12310 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12311 | WERROR_CFLAGS="-Werror" | |
12312 | fi | |
12313 | ||
aa79a185 DJ |
12314 | # The entries after -Wno-pointer-sign are disabled warnings which may |
12315 | # be enabled in the future, which can not currently be used to build | |
12316 | # GDB. | |
12317 | # NOTE: If you change this list, remember to update | |
3b851bce | 12318 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
12319 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
12320 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 | 12321 | -Wno-unused -Wunused-value -Wunused-function \ |
b03a2011 | 12322 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes" |
a3b362c4 | 12323 | |
3526781e DJ |
12324 | # Enable -Wno-format by default when using gcc on mingw since many |
12325 | # GCC versions complain about %I64. | |
12326 | case "${host}" in | |
12327 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
12328 | esac | |
12329 | ||
81ecdfbb RW |
12330 | # Check whether --enable-build-warnings was given. |
12331 | if test "${enable_build_warnings+set}" = set; then : | |
12332 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12333 | yes) ;; |
12334 | no) build_warnings="-w";; | |
12335 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12336 | build_warnings="${build_warnings} ${t}";; | |
12337 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12338 | build_warnings="${t} ${build_warnings}";; | |
12339 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12340 | esac | |
d4f3574e | 12341 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12342 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12343 | fi |
81ecdfbb RW |
12344 | fi |
12345 | # Check whether --enable-gdb-build-warnings was given. | |
12346 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12347 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12348 | yes) ;; |
12349 | no) build_warnings="-w";; | |
12350 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12351 | build_warnings="${build_warnings} ${t}";; | |
12352 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12353 | build_warnings="${t} ${build_warnings}";; | |
12354 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12355 | esac | |
12356 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12357 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12358 | fi | |
81ecdfbb RW |
12359 | fi |
12360 | WARN_CFLAGS="" | |
c906108c SS |
12361 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12362 | then | |
81ecdfbb RW |
12363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12364 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12365 | # Separate out the -Werror flag as some files just cannot be |
12366 | # compiled with it enabled. | |
12367 | for w in ${build_warnings}; do | |
12368 | case $w in | |
12369 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12370 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12371 | saved_CFLAGS="$CFLAGS" |
12372 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 12373 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12374 | /* end confdefs.h. */ |
4536bbc6 | 12375 | |
bec39cab AC |
12376 | int |
12377 | main () | |
12378 | { | |
4536bbc6 | 12379 | |
bec39cab AC |
12380 | ; |
12381 | return 0; | |
12382 | } | |
12383 | _ACEOF | |
81ecdfbb | 12384 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 12385 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 12386 | fi |
81ecdfbb | 12387 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 12388 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
12389 | esac |
12390 | done | |
81ecdfbb RW |
12391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
12392 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
12393 | fi |
12394 | ||
12395 | ||
104c1213 | 12396 | |
7a292a7a | 12397 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
12398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
12399 | $as_echo_n "checking for cygwin... " >&6; } | |
12400 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
12401 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12402 | else |
81ecdfbb | 12403 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12404 | /* end confdefs.h. */ |
7a292a7a SS |
12405 | |
12406 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
12407 | lose | |
12408 | #endif | |
bec39cab | 12409 | _ACEOF |
7a292a7a | 12410 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 12411 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
12412 | gdb_cv_os_cygwin=yes |
12413 | else | |
7a292a7a SS |
12414 | gdb_cv_os_cygwin=no |
12415 | fi | |
12416 | rm -f conftest* | |
12417 | ||
12418 | fi | |
81ecdfbb RW |
12419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
12420 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 12421 | |
aff38e61 | 12422 | |
3eb25fda | 12423 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 12424 | case ${host} in |
95cbc983 AC |
12425 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
12426 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 12427 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
12428 | esac |
12429 | ||
12430 | ||
cd0fc7c3 SS |
12431 | # libreadline needs libuser32.a in a cygwin environment |
12432 | WIN32LIBS= | |
12433 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
12434 | WIN32LIBS="-luser32" |
12435 | case "${target}" in | |
12436 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
12437 | ;; | |
12438 | esac | |
cd0fc7c3 | 12439 | fi |
c906108c | 12440 | |
b4505029 MM |
12441 | # The ser-tcp.c module requires sockets. |
12442 | case ${host} in | |
12443 | *mingw32*) | |
12444 | ||
81ecdfbb | 12445 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
12446 | |
12447 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
12448 | ;; | |
12449 | esac | |
12450 | ||
7a292a7a | 12451 | |
31d99776 DJ |
12452 | # Add ELF support to GDB, but only if BFD includes ELF support. |
12453 | OLD_CFLAGS=$CFLAGS | |
12454 | OLD_LDFLAGS=$LDFLAGS | |
12455 | OLD_LIBS=$LIBS | |
12cd34f3 PA |
12456 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
12457 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12458 | # always want our bfd. | |
12459 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5579a92e | 12460 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" |
7b3200f9 | 12461 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
12462 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12463 | if test "$plugins" = "yes"; then | |
12464 | LIBS="-ldl $LIBS" | |
12465 | fi | |
0f72fb1c | 12466 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
12467 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
12468 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
12469 | if test "${gdb_cv_var_elf+set}" = set; then : | |
12470 | $as_echo_n "(cached) " >&6 | |
31d99776 | 12471 | else |
81ecdfbb | 12472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
12473 | /* end confdefs.h. */ |
12474 | #include <stdlib.h> | |
12475 | #include "bfd.h" | |
12476 | #include "elf-bfd.h" | |
12477 | ||
12478 | int | |
12479 | main () | |
12480 | { | |
12481 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
12482 | ; | |
12483 | return 0; | |
12484 | } | |
12485 | _ACEOF | |
81ecdfbb | 12486 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
12487 | gdb_cv_var_elf=yes |
12488 | else | |
81ecdfbb | 12489 | gdb_cv_var_elf=no |
31d99776 | 12490 | fi |
81ecdfbb RW |
12491 | rm -f core conftest.err conftest.$ac_objext \ |
12492 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 12493 | fi |
81ecdfbb RW |
12494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
12495 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 | 12496 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 12497 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 12498 | |
81ecdfbb | 12499 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 12500 | |
075ff26d JK |
12501 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12502 | if test "$plugins" = "yes"; then | |
12503 | OLD_LIBS="-ldl $OLD_LIBS" | |
12504 | fi | |
31d99776 DJ |
12505 | fi |
12506 | CFLAGS=$OLD_CFLAGS | |
12507 | LDFLAGS=$OLD_LDFLAGS | |
12508 | LIBS=$OLD_LIBS | |
12509 | ||
121ce6e5 DJ |
12510 | # Add any host-specific objects to GDB. |
12511 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
12512 | ||
3fc11d3e JM |
12513 | LIBGUI="../libgui/src/libgui.a" |
12514 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
12515 | ||
12516 | ||
7a292a7a | 12517 | |
3fc11d3e JM |
12518 | WIN32LDAPP= |
12519 | ||
12520 | ||
12521 | ||
d91670b9 | 12522 | case "${host}" in |
686a5eed | 12523 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
12524 | configdir="win" |
12525 | ;; | |
12526 | *) | |
12527 | configdir="unix" | |
12528 | ;; | |
12529 | esac | |
3fc11d3e JM |
12530 | |
12531 | GDBTKLIBS= | |
12532 | if test "${enable_gdbtk}" = "yes"; then | |
12533 | ||
d1c3b63a KS |
12534 | # Gdbtk must have an absolute path to srcdir in order to run |
12535 | # properly when not installed. | |
12536 | here=`pwd` | |
12537 | cd ${srcdir} | |
12538 | GDBTK_SRC_DIR=`pwd` | |
12539 | cd $here | |
12540 | ||
bec39cab | 12541 | |
5062cc19 KS |
12542 | # |
12543 | # Ok, lets find the tcl configuration | |
12544 | # First, look for one uninstalled. | |
12545 | # the alternative search directory is invoked by --with-tcl | |
12546 | # | |
3fc11d3e | 12547 | |
5062cc19 KS |
12548 | if test x"${no_tcl}" = x ; then |
12549 | # we reset no_tcl in case something fails here | |
12550 | no_tcl=true | |
bec39cab | 12551 | |
81ecdfbb RW |
12552 | # Check whether --with-tcl was given. |
12553 | if test "${with_tcl+set}" = set; then : | |
12554 | withval=$with_tcl; with_tclconfig=${withval} | |
12555 | fi | |
12556 | ||
12557 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
12558 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
12559 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
12560 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 12561 | else |
bec39cab | 12562 | |
3fc11d3e | 12563 | |
5062cc19 KS |
12564 | # First check to see if --with-tcl was specified. |
12565 | case "${host}" in | |
12566 | *-*-cygwin*) platDir="win" ;; | |
12567 | *) platDir="unix" ;; | |
12568 | esac | |
12569 | if test x"${with_tclconfig}" != x ; then | |
12570 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
12571 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
12572 | else | |
81ecdfbb | 12573 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
12574 | fi |
12575 | fi | |
12576 | ||
12577 | # then check for a private Tcl installation | |
12578 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12579 | for i in \ | |
12580 | ../tcl \ | |
12581 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12582 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
12583 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
12584 | ../../tcl \ | |
12585 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12586 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
12587 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
12588 | ../../../tcl \ | |
12589 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12590 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
12591 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
12592 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
12593 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
12594 | break | |
12595 | fi | |
12596 | done | |
12597 | fi | |
12598 | ||
12599 | # on Darwin, check in Framework installation locations | |
12600 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
12601 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
12602 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
12603 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
12604 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
12605 | ; do | |
12606 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
12607 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
12608 | break | |
12609 | fi | |
12610 | done | |
12611 | fi | |
12612 | ||
12613 | # check in a few common install locations | |
12614 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12615 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
12616 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
12617 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
12618 | `ls -d /usr/local/lib 2>/dev/null` \ | |
12619 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
12620 | `ls -d /usr/lib 2>/dev/null` \ | |
12621 | ; do | |
12622 | if test -f "$i/tclConfig.sh" ; then | |
12623 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
12624 | break | |
12625 | fi | |
12626 | done | |
12627 | fi | |
3fc11d3e | 12628 | |
5062cc19 KS |
12629 | # check in a few other private locations |
12630 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12631 | for i in \ | |
12632 | ${srcdir}/../tcl \ | |
12633 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12634 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
12635 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
12636 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
12637 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
12638 | break | |
12639 | fi | |
12640 | done | |
12641 | fi | |
bec39cab | 12642 | |
3fc11d3e JM |
12643 | fi |
12644 | ||
5062cc19 KS |
12645 | |
12646 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12647 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
12648 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
12649 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
12650 | else |
12651 | no_tcl= | |
12652 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
12653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12654 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
12655 | fi |
12656 | fi | |
3fc11d3e | 12657 | |
bec39cab | 12658 | |
85541719 DE |
12659 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
12660 | # point to doing Tcl. | |
bec39cab | 12661 | |
5062cc19 KS |
12662 | # |
12663 | # Ok, lets find the tk configuration | |
12664 | # First, look for one uninstalled. | |
12665 | # the alternative search directory is invoked by --with-tk | |
12666 | # | |
3fc11d3e | 12667 | |
5062cc19 KS |
12668 | if test x"${no_tk}" = x ; then |
12669 | # we reset no_tk in case something fails here | |
12670 | no_tk=true | |
bec39cab | 12671 | |
81ecdfbb RW |
12672 | # Check whether --with-tk was given. |
12673 | if test "${with_tk+set}" = set; then : | |
12674 | withval=$with_tk; with_tkconfig=${withval} | |
12675 | fi | |
12676 | ||
12677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
12678 | $as_echo_n "checking for Tk configuration... " >&6; } | |
12679 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
12680 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12681 | else |
3fc11d3e JM |
12682 | |
12683 | ||
5062cc19 KS |
12684 | # First check to see if --with-tkconfig was specified. |
12685 | if test x"${with_tkconfig}" != x ; then | |
12686 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
12687 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
12688 | else | |
81ecdfbb | 12689 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
12690 | fi |
12691 | fi | |
3fc11d3e | 12692 | |
5062cc19 KS |
12693 | # then check for a private Tk library |
12694 | case "${host}" in | |
12695 | *-*-cygwin*) platDir="win" ;; | |
12696 | *) platDir="unix" ;; | |
12697 | esac | |
12698 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12699 | for i in \ | |
12700 | ../tk \ | |
12701 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12702 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
12703 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
12704 | ../../tk \ | |
12705 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12706 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
12707 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
12708 | ../../../tk \ | |
12709 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12710 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
12711 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
12712 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
12713 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
12714 | break | |
12715 | fi | |
12716 | done | |
12717 | fi | |
12718 | ||
12719 | # on Darwin, check in Framework installation locations | |
12720 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
12721 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
12722 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
12723 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
12724 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
12725 | ; do | |
12726 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
12727 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
12728 | break | |
12729 | fi | |
12730 | done | |
12731 | fi | |
12732 | ||
12733 | # check in a few common install locations | |
12734 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12735 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
12736 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
12737 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
12738 | `ls -d /usr/local/lib 2>/dev/null` \ | |
12739 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
12740 | `ls -d /usr/lib 2>/dev/null` \ | |
12741 | ; do | |
12742 | if test -f "$i/tkConfig.sh" ; then | |
12743 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
12744 | break | |
12745 | fi | |
12746 | done | |
12747 | fi | |
12748 | # check in a few other private locations | |
12749 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12750 | for i in \ | |
12751 | ${srcdir}/../tk \ | |
12752 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12753 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
12754 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
12755 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
12756 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
12757 | break | |
12758 | fi | |
12759 | done | |
12760 | fi | |
3fc11d3e | 12761 | |
3fc11d3e JM |
12762 | fi |
12763 | ||
12764 | ||
5062cc19 KS |
12765 | if test x"${ac_cv_c_tkconfig}" = x ; then |
12766 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
12767 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
12768 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
12769 | else |
12770 | no_tk= | |
12771 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
12772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12773 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 12774 | fi |
3fc11d3e | 12775 | fi |
dd2504ab | 12776 | |
dd2504ab | 12777 | |
85541719 DE |
12778 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
12779 | ||
81ecdfbb RW |
12780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12781 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
12782 | |
12783 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
12784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
12785 | $as_echo "loading" >&6; } | |
85541719 DE |
12786 | . ${TCL_BIN_DIR}/tclConfig.sh |
12787 | else | |
81ecdfbb RW |
12788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12789 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
12790 | fi |
12791 | ||
12792 | # eval is required to do the TCL_DBGX substitution | |
12793 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
12794 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
12795 | ||
12796 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
12797 | # then set the common variable name to the value of the build variables. | |
12798 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
12799 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
12800 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
12801 | # installed and uninstalled version of Tcl. | |
12802 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
12803 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
12804 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
12805 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
12806 | elif test "`uname -s`" = "Darwin"; then | |
12807 | # If Tcl was built as a framework, attempt to use the libraries | |
12808 | # from the framework at the given location so that linking works | |
12809 | # against Tcl.framework installed in an arbitary location. | |
12810 | case ${TCL_DEFS} in | |
12811 | *TCL_FRAMEWORK*) | |
12812 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
12813 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
12814 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
12815 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
12816 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
12817 | break | |
12818 | fi | |
12819 | done | |
12820 | fi | |
12821 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
12822 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
12823 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
12824 | fi | |
12825 | ;; | |
12826 | esac | |
12827 | fi | |
12828 | ||
12829 | # eval is required to do the TCL_DBGX substitution | |
12830 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
12831 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
12832 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
12833 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
12834 | ||
12835 | ||
12836 | ||
12837 | ||
12838 | ||
12839 | ||
12840 | ||
12841 | ||
12842 | ||
12843 | ||
12844 | ||
12845 | ||
12846 | ||
12847 | ||
12848 | ||
12849 | # Check for in-tree tcl | |
12850 | here=`pwd` | |
12851 | cd ${srcdir}/.. | |
12852 | topdir=`pwd` | |
12853 | cd ${here} | |
12854 | ||
12855 | intree="no" | |
12856 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
12857 | intree="yes" | |
12858 | fi | |
12859 | ||
12860 | # Find Tcl private headers | |
12861 | if test x"${intree}" = xno; then | |
12862 | ||
81ecdfbb RW |
12863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
12864 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
12865 | private_dir="" |
12866 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
12867 | if test -f ${dir}/tclInt.h ; then | |
12868 | private_dir=${dir} | |
12869 | fi | |
12870 | ||
12871 | if test x"${private_dir}" = x; then | |
81ecdfbb | 12872 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
12873 | else |
12874 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
12875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
12876 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
12877 | fi |
12878 | ||
12879 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
12880 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
12881 | TCL_DEPS="" | |
12882 | else | |
12883 | # If building tcl in the same src tree, private headers | |
12884 | # are not needed, but we need to be sure to use the right | |
12885 | # headers library | |
12886 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
12887 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
12888 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
12889 | fi | |
12890 | ||
12891 | ||
12892 | ||
12893 | ||
12894 | ||
81ecdfbb RW |
12895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12896 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 12897 | |
5062cc19 | 12898 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
12899 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
12900 | $as_echo "loading" >&6; } | |
5062cc19 | 12901 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 12902 | else |
81ecdfbb RW |
12903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12904 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 12905 | fi |
bec39cab | 12906 | |
5062cc19 KS |
12907 | # eval is required to do the TK_DBGX substitution |
12908 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
12909 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
12910 | ||
12911 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
12912 | # then set the common variable name to the value of the build variables. | |
12913 | # For example, the variable TK_LIB_SPEC will be set to the value | |
12914 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
12915 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
12916 | # installed and uninstalled version of Tcl. | |
85541719 | 12917 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
12918 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
12919 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
12920 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
12921 | elif test "`uname -s`" = "Darwin"; then | |
12922 | # If Tk was built as a framework, attempt to use the libraries | |
12923 | # from the framework at the given location so that linking works | |
12924 | # against Tk.framework installed in an arbitary location. | |
12925 | case ${TK_DEFS} in | |
12926 | *TK_FRAMEWORK*) | |
85541719 | 12927 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
12928 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
12929 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
12930 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
12931 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
12932 | break | |
12933 | fi | |
12934 | done | |
12935 | fi | |
85541719 | 12936 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
12937 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
12938 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
12939 | fi | |
12940 | ;; | |
12941 | esac | |
3fc11d3e JM |
12942 | fi |
12943 | ||
5062cc19 KS |
12944 | # eval is required to do the TK_DBGX substitution |
12945 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
12946 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
12947 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
12948 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 12949 | |
3fc11d3e JM |
12950 | |
12951 | ||
bec39cab AC |
12952 | |
12953 | ||
12954 | ||
12955 | ||
12956 | ||
12957 | ||
12958 | ||
3fc11d3e | 12959 | |
3fc11d3e | 12960 | |
bec39cab | 12961 | |
bec39cab | 12962 | |
85541719 DE |
12963 | # Check for in-tree Tk |
12964 | intree="no" | |
12965 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
12966 | intree="yes" | |
12967 | fi | |
3fc11d3e | 12968 | |
85541719 DE |
12969 | # Find Tk private headers |
12970 | if test x"${intree}" = xno; then | |
3fc11d3e | 12971 | |
81ecdfbb RW |
12972 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
12973 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
12974 | private_dir="" |
12975 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
12976 | if test -f ${dir}/tkInt.h; then | |
12977 | private_dir=${dir} | |
3fc11d3e | 12978 | fi |
bec39cab | 12979 | |
5062cc19 | 12980 | if test x"${private_dir}" = x; then |
81ecdfbb | 12981 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 12982 | else |
5062cc19 | 12983 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
12984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
12985 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 12986 | fi |
3fc11d3e | 12987 | |
85541719 DE |
12988 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
12989 | TK_LIBRARY=${TK_LIB_SPEC} | |
12990 | TK_DEPS="" | |
12991 | else | |
12992 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
12993 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
12994 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
12995 | fi | |
3fc11d3e JM |
12996 | |
12997 | ||
3fc11d3e JM |
12998 | |
12999 | ||
3fc11d3e | 13000 | |
85541719 | 13001 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 13002 | |
85541719 DE |
13003 | # Include some libraries that Tcl and Tk want. |
13004 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
13005 | # Yes, the ordering seems wrong here. But it isn't. | |
13006 | # TK_LIBS is the list of libraries that need to be linked | |
13007 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
13008 | # were in LIBS then any link tests after this point would | |
13009 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
13010 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 13011 | |
85541719 DE |
13012 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
13013 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
13014 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
13015 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
13016 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
13017 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
13018 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 13019 | |
85541719 DE |
13020 | if test x$gdb_cv_os_cygwin = xyes; then |
13021 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
13022 | WIN32LDAPP="-Wl,--subsystem,console" | |
13023 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 13024 | fi |
ffc6a242 | 13025 | |
81ecdfbb | 13026 | subdirs="$subdirs gdbtk" |
3ace7edb | 13027 | |
85541719 | 13028 | fi |
3fc11d3e JM |
13029 | fi |
13030 | ||
13031 | ||
13032 | ||
13033 | ||
13034 | ||
13035 | ||
13036 | ||
13037 | ||
81ecdfbb RW |
13038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
13039 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 13040 | |
c906108c | 13041 | |
81ecdfbb RW |
13042 | # Check whether --with-x was given. |
13043 | if test "${with_x+set}" = set; then : | |
13044 | withval=$with_x; | |
13045 | fi | |
c906108c SS |
13046 | |
13047 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
13048 | if test "x$with_x" = xno; then | |
13049 | # The user explicitly disabled X. | |
13050 | have_x=disabled | |
13051 | else | |
81ecdfbb RW |
13052 | case $x_includes,$x_libraries in #( |
13053 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
13054 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
13055 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
13056 | else |
13057 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 13058 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 13059 | rm -f -r conftest.dir |
bec39cab AC |
13060 | if mkdir conftest.dir; then |
13061 | cd conftest.dir | |
bec39cab | 13062 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
13063 | incroot: |
13064 | @echo incroot='${INCROOT}' | |
13065 | usrlibdir: | |
13066 | @echo usrlibdir='${USRLIBDIR}' | |
13067 | libdir: | |
13068 | @echo libdir='${LIBDIR}' | |
13069 | _ACEOF | |
13070 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 13071 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
13072 | for ac_var in incroot usrlibdir libdir; do |
13073 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
13074 | done | |
c906108c | 13075 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
13076 | for ac_extension in a so sl dylib la dll; do |
13077 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
13078 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 13079 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
13080 | fi |
13081 | done | |
13082 | # Screen out bogus values from the imake configuration. They are | |
13083 | # bogus both because they are the default anyway, and because | |
13084 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 13085 | case $ac_im_incroot in |
81ecdfbb | 13086 | /usr/include) ac_x_includes= ;; |
bec39cab | 13087 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 13088 | esac |
bec39cab | 13089 | case $ac_im_usrlibdir in |
81ecdfbb | 13090 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 13091 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
13092 | esac |
13093 | fi | |
13094 | cd .. | |
81ecdfbb | 13095 | rm -f -r conftest.dir |
c906108c SS |
13096 | fi |
13097 | ||
bec39cab AC |
13098 | # Standard set of common directories for X headers. |
13099 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
13100 | ac_x_header_dirs=' | |
13101 | /usr/X11/include | |
81ecdfbb | 13102 | /usr/X11R7/include |
bec39cab AC |
13103 | /usr/X11R6/include |
13104 | /usr/X11R5/include | |
13105 | /usr/X11R4/include | |
13106 | ||
13107 | /usr/include/X11 | |
81ecdfbb | 13108 | /usr/include/X11R7 |
bec39cab AC |
13109 | /usr/include/X11R6 |
13110 | /usr/include/X11R5 | |
13111 | /usr/include/X11R4 | |
13112 | ||
13113 | /usr/local/X11/include | |
81ecdfbb | 13114 | /usr/local/X11R7/include |
bec39cab AC |
13115 | /usr/local/X11R6/include |
13116 | /usr/local/X11R5/include | |
13117 | /usr/local/X11R4/include | |
13118 | ||
13119 | /usr/local/include/X11 | |
81ecdfbb | 13120 | /usr/local/include/X11R7 |
bec39cab AC |
13121 | /usr/local/include/X11R6 |
13122 | /usr/local/include/X11R5 | |
13123 | /usr/local/include/X11R4 | |
13124 | ||
13125 | /usr/X386/include | |
13126 | /usr/x386/include | |
13127 | /usr/XFree86/include/X11 | |
13128 | ||
13129 | /usr/include | |
13130 | /usr/local/include | |
13131 | /usr/unsupported/include | |
13132 | /usr/athena/include | |
13133 | /usr/local/x11r5/include | |
13134 | /usr/lpp/Xamples/include | |
13135 | ||
13136 | /usr/openwin/include | |
13137 | /usr/openwin/share/include' | |
13138 | ||
13139 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 13140 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 13141 | # First, try using that file with no special directory specified. |
81ecdfbb | 13142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13143 | /* end confdefs.h. */ |
81ecdfbb | 13144 | #include <X11/Xlib.h> |
bec39cab | 13145 | _ACEOF |
81ecdfbb | 13146 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
13147 | # We can compile using X headers with no special include directory. |
13148 | ac_x_includes= | |
13149 | else | |
bec39cab | 13150 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 13151 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
13152 | ac_x_includes=$ac_dir |
13153 | break | |
13154 | fi | |
13155 | done | |
c906108c | 13156 | fi |
bec39cab AC |
13157 | rm -f conftest.err conftest.$ac_ext |
13158 | fi # $ac_x_includes = no | |
c906108c | 13159 | |
bec39cab | 13160 | if test "$ac_x_libraries" = no; then |
c906108c | 13161 | # Check for the libraries. |
c906108c SS |
13162 | # See if we find them without any special options. |
13163 | # Don't add to $LIBS permanently. | |
bec39cab | 13164 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
13165 | LIBS="-lX11 $LIBS" |
13166 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 13167 | /* end confdefs.h. */ |
81ecdfbb | 13168 | #include <X11/Xlib.h> |
bec39cab AC |
13169 | int |
13170 | main () | |
13171 | { | |
81ecdfbb | 13172 | XrmInitialize () |
bec39cab AC |
13173 | ; |
13174 | return 0; | |
13175 | } | |
13176 | _ACEOF | |
81ecdfbb | 13177 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13178 | LIBS=$ac_save_LIBS |
c906108c SS |
13179 | # We can link X programs with no special library path. |
13180 | ac_x_libraries= | |
13181 | else | |
81ecdfbb RW |
13182 | LIBS=$ac_save_LIBS |
13183 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 13184 | do |
bec39cab | 13185 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
13186 | for ac_extension in a so sl dylib la dll; do |
13187 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
13188 | ac_x_libraries=$ac_dir |
13189 | break 2 | |
13190 | fi | |
13191 | done | |
13192 | done | |
13193 | fi | |
81ecdfbb RW |
13194 | rm -f core conftest.err conftest.$ac_objext \ |
13195 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13196 | fi # $ac_x_libraries = no |
c906108c | 13197 | |
81ecdfbb RW |
13198 | case $ac_x_includes,$ac_x_libraries in #( |
13199 | no,* | *,no | *\'*) | |
13200 | # Didn't find X, or a directory has "'" in its name. | |
13201 | ac_cv_have_x="have_x=no";; #( | |
13202 | *) | |
13203 | # Record where we found X for the cache. | |
13204 | ac_cv_have_x="have_x=yes\ | |
13205 | ac_x_includes='$ac_x_includes'\ | |
13206 | ac_x_libraries='$ac_x_libraries'" | |
13207 | esac | |
c906108c | 13208 | fi |
81ecdfbb RW |
13209 | ;; #( |
13210 | *) have_x=yes;; | |
13211 | esac | |
c906108c SS |
13212 | eval "$ac_cv_have_x" |
13213 | fi # $with_x != no | |
13214 | ||
13215 | if test "$have_x" != yes; then | |
81ecdfbb RW |
13216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
13217 | $as_echo "$have_x" >&6; } | |
c906108c SS |
13218 | no_x=yes |
13219 | else | |
13220 | # If each of the values was on the command line, it overrides each guess. | |
13221 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
13222 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
13223 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
13224 | ac_cv_have_x="have_x=yes\ |
13225 | ac_x_includes='$x_includes'\ | |
13226 | ac_x_libraries='$x_libraries'" | |
13227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
13228 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
13229 | fi |
13230 | ||
13231 | ||
bec39cab | 13232 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 13233 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
13234 | # This code just checks for a few cases where we'd like to ignore those |
13235 | # definitions, even when they're present in the '.mt' file. These cases | |
13236 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 13237 | # not part of the source tree. |
7a292a7a | 13238 | # |
81ecdfbb RW |
13239 | # Check whether --enable-sim was given. |
13240 | if test "${enable_sim+set}" = set; then : | |
13241 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
13242 | echo "enableval = ${enableval}"; |
13243 | case "${enableval}" in | |
13244 | yes) ignore_sim=false ;; | |
13245 | no) ignore_sim=true ;; | |
13246 | *) ignore_sim=false ;; | |
13247 | esac | |
13248 | else | |
13249 | ignore_sim=false | |
81ecdfbb RW |
13250 | fi |
13251 | ||
7a292a7a SS |
13252 | |
13253 | if test ! -d "${srcdir}/../sim"; then | |
13254 | ignore_sim=true | |
13255 | fi | |
13256 | ||
9b624dbe UW |
13257 | SIM= |
13258 | SIM_OBS= | |
13259 | if test "${ignore_sim}" = "false"; then | |
13260 | if test x"${gdb_sim}" != x ; then | |
13261 | SIM="${gdb_sim}" | |
13262 | SIM_OBS="remote-sim.o" | |
60ca704f | 13263 | |
81ecdfbb | 13264 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 13265 | |
9b624dbe | 13266 | fi |
7a292a7a SS |
13267 | fi |
13268 | ||
13269 | ||
13270 | ||
c906108c SS |
13271 | |
13272 | ||
13273 | ||
13274 | ||
13275 | ||
13276 | ||
dfcd3bfb | 13277 | |
e56ac5c3 AC |
13278 | |
13279 | ||
b3a90332 AC |
13280 | |
13281 | ||
c35f4ffc | 13282 | # List of host floatformats. |
bec39cab AC |
13283 | |
13284 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13285 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 13286 | _ACEOF |
c35f4ffc | 13287 | |
bec39cab AC |
13288 | |
13289 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13290 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
13291 | _ACEOF |
13292 | ||
c35f4ffc | 13293 | |
bec39cab | 13294 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 13295 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 13296 | _ACEOF |
c35f4ffc AC |
13297 | |
13298 | ||
c906108c SS |
13299 | # target_subdir is used by the testsuite to find the target libraries. |
13300 | target_subdir= | |
13301 | if test "${host}" != "${target}"; then | |
13302 | target_subdir="${target_alias}/" | |
13303 | fi | |
13304 | ||
13305 | ||
13306 | frags= | |
771b4502 | 13307 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
13308 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
13309 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 13310 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
13311 | fi |
13312 | frags="$frags $host_makefile_frag" | |
13313 | else | |
13314 | host_makefile_frag=/dev/null | |
c906108c | 13315 | fi |
c906108c | 13316 | |
c906108c SS |
13317 | |
13318 | ||
13319 | ||
771b4502 | 13320 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
13321 | # We pick this up from the host configuration file (.mh) because we |
13322 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
13323 | nativefile=`sed -n ' |
13324 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
13325 | ' ${host_makefile_frag}` | |
c906108c SS |
13326 | fi |
13327 | ||
13328 | ||
b00a8037 | 13329 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
13330 | |
13331 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 13332 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 13333 | _ACEOF |
b00a8037 DJ |
13334 | |
13335 | fi | |
13336 | ||
8dcde887 | 13337 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
13338 | # Check whether --enable-multi-ice was given. |
13339 | if test "${enable_multi_ice+set}" = set; then : | |
13340 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
13341 | yes | no) |
13342 | ;; | |
81ecdfbb | 13343 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 13344 | esac |
81ecdfbb | 13345 | fi |
b4e70030 | 13346 | |
81ecdfbb RW |
13347 | if test "x$enable_multi_ice" = xyes; then |
13348 | subdirs="$subdirs multi-ice" | |
3ace7edb | 13349 | |
a85f51e7 DJ |
13350 | fi |
13351 | ||
496c0e1b JB |
13352 | # Check whether --enable-gdbserver was given. |
13353 | if test "${enable_gdbserver+set}" = set; then : | |
13354 | enableval=$enable_gdbserver; case "${enableval}" in | |
13355 | yes| no|auto) ;; | |
13356 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
13357 | esac | |
13358 | else | |
13359 | enable_gdbserver=auto | |
13360 | fi | |
13361 | ||
13362 | ||
13363 | # We only build gdbserver automatically in a native configuration, and | |
13364 | # only if the user did not explicitly disable its build. | |
13365 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
13366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
13367 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 13368 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
13369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13370 | $as_echo "yes" >&6; } | |
13371 | subdirs="$subdirs gdbserver" | |
3ace7edb | 13372 | |
496c0e1b | 13373 | gdbserver_build_enabled=yes |
8dcde887 | 13374 | else |
81ecdfbb RW |
13375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13376 | $as_echo "no" >&6; } | |
8dcde887 MK |
13377 | fi |
13378 | fi | |
13379 | ||
496c0e1b JB |
13380 | # If the user explicitly request the gdbserver to be built, verify that |
13381 | # we were in fact able to enable it. | |
13382 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
13383 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
13384 | fi | |
13385 | ||
db985757 | 13386 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 13387 | # to an empty version. |
c906108c SS |
13388 | |
13389 | files= | |
13390 | links= | |
5a2402b8 | 13391 | |
c906108c SS |
13392 | rm -f nm.h |
13393 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
13394 | case "${nativefile}" in |
13395 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
13396 | * ) GDB_NM_FILE="${nativefile}" | |
13397 | esac | |
5a2402b8 AC |
13398 | files="${files} ${GDB_NM_FILE}" |
13399 | links="${links} nm.h" | |
60ca704f SE |
13400 | |
13401 | cat >>confdefs.h <<_ACEOF | |
b78960be | 13402 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 13403 | _ACEOF |
5a2402b8 | 13404 | |
c906108c | 13405 | fi |
5a2402b8 AC |
13406 | |
13407 | ||
bec39cab AC |
13408 | ac_sources="$files" |
13409 | ac_dests="$links" | |
13410 | while test -n "$ac_sources"; do | |
13411 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
13412 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
13413 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
13414 | done | |
81ecdfbb | 13415 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
13416 | |
13417 | ||
c906108c SS |
13418 | |
13419 | ||
c906108c | 13420 | |
81ecdfbb | 13421 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 13422 | |
bec39cab | 13423 | |
c971b7fa | 13424 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
13425 | |
13426 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 13427 | |
bec39cab AC |
13428 | cat >confcache <<\_ACEOF |
13429 | # This file is a shell script that caches the results of configure | |
13430 | # tests run on this system so they can be shared between configure | |
13431 | # scripts and configure runs, see configure's option --config-cache. | |
13432 | # It is not useful on other systems. If it contains results you don't | |
13433 | # want to keep, you may remove or edit it. | |
13434 | # | |
13435 | # config.status only pays attention to the cache file if you give it | |
13436 | # the --recheck option to rerun configure. | |
13437 | # | |
13438 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
13439 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
13440 | # following values. | |
13441 | ||
13442 | _ACEOF | |
13443 | ||
13444 | # The following way of writing the cache mishandles newlines in values, | |
13445 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 13446 | # So, we kill variables containing newlines. |
bec39cab AC |
13447 | # Ultrix sh set writes to stderr and can't be redirected directly, |
13448 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
13449 | ( |
13450 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
13451 | eval ac_val=\$$ac_var | |
13452 | case $ac_val in #( | |
13453 | *${as_nl}*) | |
13454 | case $ac_var in #( | |
13455 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
13456 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
13457 | esac | |
13458 | case $ac_var in #( | |
13459 | _ | IFS | as_nl) ;; #( | |
13460 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
13461 | *) { eval $ac_var=; unset $ac_var;} ;; | |
13462 | esac ;; | |
13463 | esac | |
13464 | done | |
13465 | ||
bec39cab | 13466 | (set) 2>&1 | |
81ecdfbb RW |
13467 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
13468 | *${as_nl}ac_space=\ *) | |
13469 | # `set' does not quote correctly, so add quotes: double-quote | |
13470 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
13471 | sed -n \ |
13472 | "s/'/'\\\\''/g; | |
13473 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 13474 | ;; #( |
bec39cab AC |
13475 | *) |
13476 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 13477 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 13478 | ;; |
81ecdfbb RW |
13479 | esac | |
13480 | sort | |
13481 | ) | | |
bec39cab | 13482 | sed ' |
81ecdfbb | 13483 | /^ac_cv_env_/b end |
bec39cab | 13484 | t clear |
81ecdfbb | 13485 | :clear |
bec39cab AC |
13486 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
13487 | t end | |
81ecdfbb RW |
13488 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
13489 | :end' >>confcache | |
13490 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
13491 | if test -w "$cache_file"; then | |
13492 | test "x$cache_file" != "x/dev/null" && | |
13493 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
13494 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
13495 | cat confcache >$cache_file |
13496 | else | |
81ecdfbb RW |
13497 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
13498 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
13499 | fi |
13500 | fi | |
13501 | rm -f confcache | |
13502 | ||
13503 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
13504 | # Let make expand exec_prefix. | |
13505 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
13506 | ||
bec39cab AC |
13507 | DEFS=-DHAVE_CONFIG_H |
13508 | ||
13509 | ac_libobjs= | |
13510 | ac_ltlibobjs= | |
13511 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
13512 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
13513 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
13514 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
13515 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
13516 | # will be set to the directory where LIBOBJS objects are built. | |
13517 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
13518 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
13519 | done |
13520 | LIBOBJS=$ac_libobjs | |
13521 | ||
13522 | LTLIBOBJS=$ac_ltlibobjs | |
13523 | ||
13524 | ||
85981d60 | 13525 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
13526 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
13527 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 13528 | fi |
a417dc56 | 13529 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
13530 | as_fn_error "conditional \"GMAKE\" was never defined. |
13531 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 13532 | fi |
81ecdfbb RW |
13533 | |
13534 | ||
bec39cab | 13535 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 13536 | ac_write_fail=0 |
bec39cab AC |
13537 | ac_clean_files_save=$ac_clean_files |
13538 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
13539 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
13540 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
13541 | as_write_fail=0 | |
13542 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
13543 | #! $SHELL |
13544 | # Generated by $as_me. | |
13545 | # Run this file to recreate the current configuration. | |
13546 | # Compiler output produced by configure, useful for debugging | |
13547 | # configure, is in config.log if it exists. | |
13548 | ||
13549 | debug=false | |
13550 | ac_cs_recheck=false | |
13551 | ac_cs_silent=false | |
bec39cab | 13552 | |
81ecdfbb RW |
13553 | SHELL=\${CONFIG_SHELL-$SHELL} |
13554 | export SHELL | |
13555 | _ASEOF | |
13556 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
13557 | ## -------------------- ## | |
13558 | ## M4sh Initialization. ## | |
13559 | ## -------------------- ## | |
13560 | ||
13561 | # Be more Bourne compatible | |
13562 | DUALCASE=1; export DUALCASE # for MKS sh | |
13563 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
13564 | emulate sh |
13565 | NULLCMD=: | |
81ecdfbb | 13566 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
13567 | # is contrary to our usage. Disable this feature. |
13568 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
13569 | setopt NO_GLOB_SUBST |
13570 | else | |
13571 | case `(set -o) 2>/dev/null` in #( | |
13572 | *posix*) : | |
13573 | set -o posix ;; #( | |
13574 | *) : | |
13575 | ;; | |
13576 | esac | |
bec39cab | 13577 | fi |
bec39cab | 13578 | |
81ecdfbb RW |
13579 | |
13580 | as_nl=' | |
13581 | ' | |
13582 | export as_nl | |
13583 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
13584 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
13585 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
13586 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
13587 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
13588 | # but without wasting forks for bash or zsh. | |
13589 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
13590 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
13591 | as_echo='print -r --' | |
13592 | as_echo_n='print -rn --' | |
13593 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
13594 | as_echo='printf %s\n' | |
13595 | as_echo_n='printf %s' | |
13596 | else | |
13597 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
13598 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
13599 | as_echo_n='/usr/ucb/echo -n' | |
13600 | else | |
13601 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
13602 | as_echo_n_body='eval | |
13603 | arg=$1; | |
13604 | case $arg in #( | |
13605 | *"$as_nl"*) | |
13606 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
13607 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
13608 | esac; | |
13609 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
13610 | ' | |
13611 | export as_echo_n_body | |
13612 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
13613 | fi | |
13614 | export as_echo_body | |
13615 | as_echo='sh -c $as_echo_body as_echo' | |
13616 | fi | |
13617 | ||
13618 | # The user is always right. | |
13619 | if test "${PATH_SEPARATOR+set}" != set; then | |
13620 | PATH_SEPARATOR=: | |
13621 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
13622 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
13623 | PATH_SEPARATOR=';' | |
13624 | } | |
bec39cab AC |
13625 | fi |
13626 | ||
13627 | ||
81ecdfbb RW |
13628 | # IFS |
13629 | # We need space, tab and new line, in precisely that order. Quoting is | |
13630 | # there to prevent editors from complaining about space-tab. | |
13631 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
13632 | # splitting by setting IFS to empty value.) | |
13633 | IFS=" "" $as_nl" | |
13634 | ||
13635 | # Find who we are. Look in the path if we contain no directory separator. | |
13636 | case $0 in #(( | |
13637 | *[\\/]* ) as_myself=$0 ;; | |
13638 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13639 | for as_dir in $PATH | |
13640 | do | |
13641 | IFS=$as_save_IFS | |
13642 | test -z "$as_dir" && as_dir=. | |
13643 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
13644 | done | |
13645 | IFS=$as_save_IFS | |
13646 | ||
13647 | ;; | |
13648 | esac | |
13649 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
13650 | # in which case we are not to be found in the path. | |
13651 | if test "x$as_myself" = x; then | |
13652 | as_myself=$0 | |
13653 | fi | |
13654 | if test ! -f "$as_myself"; then | |
13655 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
13656 | exit 1 | |
13657 | fi | |
13658 | ||
13659 | # Unset variables that we do not need and which cause bugs (e.g. in | |
13660 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
13661 | # suppresses any "Segmentation fault" message there. '((' could | |
13662 | # trigger a bug in pdksh 5.2.14. | |
13663 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
13664 | do eval test x\${$as_var+set} = xset \ | |
13665 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
13666 | done | |
bec39cab AC |
13667 | PS1='$ ' |
13668 | PS2='> ' | |
13669 | PS4='+ ' | |
13670 | ||
13671 | # NLS nuisances. | |
81ecdfbb RW |
13672 | LC_ALL=C |
13673 | export LC_ALL | |
13674 | LANGUAGE=C | |
13675 | export LANGUAGE | |
13676 | ||
13677 | # CDPATH. | |
13678 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
13679 | ||
13680 | ||
13681 | # as_fn_error ERROR [LINENO LOG_FD] | |
13682 | # --------------------------------- | |
13683 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
13684 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
13685 | # script with status $?, using 1 if that was 0. | |
13686 | as_fn_error () | |
13687 | { | |
13688 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
13689 | if test "$3"; then | |
13690 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
13691 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
13692 | fi | |
13693 | $as_echo "$as_me: error: $1" >&2 | |
13694 | as_fn_exit $as_status | |
13695 | } # as_fn_error | |
13696 | ||
13697 | ||
13698 | # as_fn_set_status STATUS | |
13699 | # ----------------------- | |
13700 | # Set $? to STATUS, without forking. | |
13701 | as_fn_set_status () | |
13702 | { | |
13703 | return $1 | |
13704 | } # as_fn_set_status | |
13705 | ||
13706 | # as_fn_exit STATUS | |
13707 | # ----------------- | |
13708 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
13709 | as_fn_exit () | |
13710 | { | |
13711 | set +e | |
13712 | as_fn_set_status $1 | |
13713 | exit $1 | |
13714 | } # as_fn_exit | |
13715 | ||
13716 | # as_fn_unset VAR | |
13717 | # --------------- | |
13718 | # Portably unset VAR. | |
13719 | as_fn_unset () | |
13720 | { | |
13721 | { eval $1=; unset $1;} | |
13722 | } | |
13723 | as_unset=as_fn_unset | |
13724 | # as_fn_append VAR VALUE | |
13725 | # ---------------------- | |
13726 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
13727 | # advantage of any shell optimizations that allow amortized linear growth over | |
13728 | # repeated appends, instead of the typical quadratic growth present in naive | |
13729 | # implementations. | |
13730 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
13731 | eval 'as_fn_append () | |
13732 | { | |
13733 | eval $1+=\$2 | |
13734 | }' | |
13735 | else | |
13736 | as_fn_append () | |
13737 | { | |
13738 | eval $1=\$$1\$2 | |
13739 | } | |
13740 | fi # as_fn_append | |
13741 | ||
13742 | # as_fn_arith ARG... | |
13743 | # ------------------ | |
13744 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
13745 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
13746 | # must be portable across $(()) and expr. | |
13747 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
13748 | eval 'as_fn_arith () | |
13749 | { | |
13750 | as_val=$(( $* )) | |
13751 | }' | |
13752 | else | |
13753 | as_fn_arith () | |
13754 | { | |
13755 | as_val=`expr "$@" || test $? -eq 1` | |
13756 | } | |
13757 | fi # as_fn_arith | |
bec39cab | 13758 | |
81ecdfbb RW |
13759 | |
13760 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
13761 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
13762 | as_expr=expr |
13763 | else | |
13764 | as_expr=false | |
13765 | fi | |
13766 | ||
81ecdfbb | 13767 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
13768 | as_basename=basename |
13769 | else | |
13770 | as_basename=false | |
13771 | fi | |
13772 | ||
81ecdfbb RW |
13773 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
13774 | as_dirname=dirname | |
13775 | else | |
13776 | as_dirname=false | |
13777 | fi | |
bec39cab | 13778 | |
81ecdfbb | 13779 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
13780 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
13781 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
13782 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
13783 | $as_echo X/"$0" | | |
13784 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
13785 | s//\1/ | |
13786 | q | |
13787 | } | |
13788 | /^X\/\(\/\/\)$/{ | |
13789 | s//\1/ | |
13790 | q | |
13791 | } | |
13792 | /^X\/\(\/\).*/{ | |
13793 | s//\1/ | |
13794 | q | |
13795 | } | |
13796 | s/.*/./; q'` | |
b4e70030 | 13797 | |
b4e70030 JB |
13798 | # Avoid depending upon Character Ranges. |
13799 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
13800 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
13801 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
13802 | as_cr_digits='0123456789' | |
13803 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
13804 | ||
81ecdfbb RW |
13805 | ECHO_C= ECHO_N= ECHO_T= |
13806 | case `echo -n x` in #((((( | |
13807 | -n*) | |
13808 | case `echo 'xy\c'` in | |
13809 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
13810 | xy) ECHO_C='\c';; | |
13811 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
13812 | ECHO_T=' ';; | |
13813 | esac;; | |
13814 | *) | |
13815 | ECHO_N='-n';; | |
bec39cab AC |
13816 | esac |
13817 | ||
81ecdfbb RW |
13818 | rm -f conf$$ conf$$.exe conf$$.file |
13819 | if test -d conf$$.dir; then | |
13820 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 13821 | else |
81ecdfbb RW |
13822 | rm -f conf$$.dir |
13823 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 13824 | fi |
81ecdfbb RW |
13825 | if (echo >conf$$.file) 2>/dev/null; then |
13826 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 13827 | as_ln_s='ln -s' |
81ecdfbb RW |
13828 | # ... but there are two gotchas: |
13829 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
13830 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
13831 | # In both cases, we have to default to `cp -p'. | |
13832 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
13833 | as_ln_s='cp -p' | |
13834 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
13835 | as_ln_s=ln | |
13836 | else | |
13837 | as_ln_s='cp -p' | |
b4e70030 | 13838 | fi |
bec39cab AC |
13839 | else |
13840 | as_ln_s='cp -p' | |
13841 | fi | |
81ecdfbb RW |
13842 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
13843 | rmdir conf$$.dir 2>/dev/null | |
13844 | ||
13845 | ||
13846 | # as_fn_mkdir_p | |
13847 | # ------------- | |
13848 | # Create "$as_dir" as a directory, including parents if necessary. | |
13849 | as_fn_mkdir_p () | |
13850 | { | |
13851 | ||
13852 | case $as_dir in #( | |
13853 | -*) as_dir=./$as_dir;; | |
13854 | esac | |
13855 | test -d "$as_dir" || eval $as_mkdir_p || { | |
13856 | as_dirs= | |
13857 | while :; do | |
13858 | case $as_dir in #( | |
13859 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
13860 | *) as_qdir=$as_dir;; | |
13861 | esac | |
13862 | as_dirs="'$as_qdir' $as_dirs" | |
13863 | as_dir=`$as_dirname -- "$as_dir" || | |
13864 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
13865 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
13866 | X"$as_dir" : 'X\(//\)$' \| \ | |
13867 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
13868 | $as_echo X"$as_dir" | | |
13869 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
13870 | s//\1/ | |
13871 | q | |
13872 | } | |
13873 | /^X\(\/\/\)[^/].*/{ | |
13874 | s//\1/ | |
13875 | q | |
13876 | } | |
13877 | /^X\(\/\/\)$/{ | |
13878 | s//\1/ | |
13879 | q | |
13880 | } | |
13881 | /^X\(\/\).*/{ | |
13882 | s//\1/ | |
13883 | q | |
13884 | } | |
13885 | s/.*/./; q'` | |
13886 | test -d "$as_dir" && break | |
13887 | done | |
13888 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
13889 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
13890 | ||
bec39cab | 13891 | |
81ecdfbb | 13892 | } # as_fn_mkdir_p |
bec39cab | 13893 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 13894 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
13895 | else |
13896 | test -d ./-p && rmdir ./-p | |
13897 | as_mkdir_p=false | |
13898 | fi | |
13899 | ||
81ecdfbb RW |
13900 | if test -x / >/dev/null 2>&1; then |
13901 | as_test_x='test -x' | |
13902 | else | |
13903 | if ls -dL / >/dev/null 2>&1; then | |
13904 | as_ls_L_option=L | |
13905 | else | |
13906 | as_ls_L_option= | |
13907 | fi | |
13908 | as_test_x=' | |
13909 | eval sh -c '\'' | |
13910 | if test -d "$1"; then | |
13911 | test -d "$1/."; | |
13912 | else | |
13913 | case $1 in #( | |
13914 | -*)set "./$1";; | |
13915 | esac; | |
13916 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
13917 | ???[sx]*):;;*)false;;esac;fi | |
13918 | '\'' sh | |
13919 | ' | |
13920 | fi | |
13921 | as_executable_p=$as_test_x | |
bec39cab AC |
13922 | |
13923 | # Sed expression to map a string onto a valid CPP name. | |
13924 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
13925 | ||
13926 | # Sed expression to map a string onto a valid variable name. | |
13927 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
13928 | ||
13929 | ||
bec39cab | 13930 | exec 6>&1 |
81ecdfbb RW |
13931 | ## ----------------------------------- ## |
13932 | ## Main body of $CONFIG_STATUS script. ## | |
13933 | ## ----------------------------------- ## | |
13934 | _ASEOF | |
13935 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
13936 | ||
13937 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
13938 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 13939 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
13940 | # values after options handling. |
13941 | ac_log=" | |
bec39cab | 13942 | This file was extended by $as_me, which was |
81ecdfbb | 13943 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
13944 | |
13945 | CONFIG_FILES = $CONFIG_FILES | |
13946 | CONFIG_HEADERS = $CONFIG_HEADERS | |
13947 | CONFIG_LINKS = $CONFIG_LINKS | |
13948 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
13949 | $ $0 $@ | |
13950 | ||
81ecdfbb RW |
13951 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
13952 | " | |
13953 | ||
bec39cab AC |
13954 | _ACEOF |
13955 | ||
81ecdfbb RW |
13956 | case $ac_config_files in *" |
13957 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
13958 | esac | |
234b45d4 | 13959 | |
81ecdfbb RW |
13960 | case $ac_config_headers in *" |
13961 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
13962 | esac | |
b4e70030 | 13963 | |
b4e70030 | 13964 | |
81ecdfbb RW |
13965 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
13966 | # Files that config.status was made for. | |
13967 | config_files="$ac_config_files" | |
13968 | config_headers="$ac_config_headers" | |
13969 | config_links="$ac_config_links" | |
13970 | config_commands="$ac_config_commands" | |
234b45d4 | 13971 | |
81ecdfbb | 13972 | _ACEOF |
b4e70030 | 13973 | |
81ecdfbb | 13974 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 13975 | ac_cs_usage="\ |
81ecdfbb RW |
13976 | \`$as_me' instantiates files and other configuration actions |
13977 | from templates according to the current configuration. Unless the files | |
13978 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 13979 | |
81ecdfbb | 13980 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 13981 | |
bec39cab | 13982 | -h, --help print this help, then exit |
81ecdfbb RW |
13983 | -V, --version print version number and configuration settings, then exit |
13984 | -q, --quiet, --silent | |
13985 | do not print progress messages | |
bec39cab AC |
13986 | -d, --debug don't remove temporary files |
13987 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
13988 | --file=FILE[:TEMPLATE] |
13989 | instantiate the configuration file FILE | |
13990 | --header=FILE[:TEMPLATE] | |
13991 | instantiate the configuration header FILE | |
234b45d4 | 13992 | |
bec39cab AC |
13993 | Configuration files: |
13994 | $config_files | |
234b45d4 | 13995 | |
bec39cab AC |
13996 | Configuration headers: |
13997 | $config_headers | |
234b45d4 | 13998 | |
bec39cab AC |
13999 | Configuration links: |
14000 | $config_links | |
234b45d4 | 14001 | |
bec39cab AC |
14002 | Configuration commands: |
14003 | $config_commands | |
14004 | ||
81ecdfbb | 14005 | Report bugs to the package provider." |
b4e70030 | 14006 | |
81ecdfbb RW |
14007 | _ACEOF |
14008 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
14009 | ac_cs_version="\\ |
14010 | config.status | |
81ecdfbb RW |
14011 | configured by $0, generated by GNU Autoconf 2.64, |
14012 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 14013 | |
81ecdfbb | 14014 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
14015 | This config.status script is free software; the Free Software Foundation |
14016 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
14017 | |
14018 | ac_pwd='$ac_pwd' | |
14019 | srcdir='$srcdir' | |
14020 | INSTALL='$INSTALL' | |
81ecdfbb RW |
14021 | AWK='$AWK' |
14022 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
14023 | _ACEOF |
14024 | ||
81ecdfbb RW |
14025 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14026 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
14027 | ac_need_defaults=: |
14028 | while test $# != 0 | |
14029 | do | |
14030 | case $1 in | |
14031 | --*=*) | |
81ecdfbb RW |
14032 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
14033 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 14034 | ac_shift=: |
c906108c | 14035 | ;; |
81ecdfbb | 14036 | *) |
bec39cab AC |
14037 | ac_option=$1 |
14038 | ac_optarg=$2 | |
14039 | ac_shift=shift | |
c906108c | 14040 | ;; |
bec39cab | 14041 | esac |
c906108c | 14042 | |
bec39cab AC |
14043 | case $ac_option in |
14044 | # Handling of the options. | |
bec39cab AC |
14045 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
14046 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
14047 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
14048 | $as_echo "$ac_cs_version"; exit ;; | |
14049 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
14050 | debug=: ;; |
14051 | --file | --fil | --fi | --f ) | |
14052 | $ac_shift | |
81ecdfbb RW |
14053 | case $ac_optarg in |
14054 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14055 | esac | |
14056 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
14057 | ac_need_defaults=false;; |
14058 | --header | --heade | --head | --hea ) | |
14059 | $ac_shift | |
81ecdfbb RW |
14060 | case $ac_optarg in |
14061 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14062 | esac | |
14063 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 14064 | ac_need_defaults=false;; |
81ecdfbb RW |
14065 | --he | --h) |
14066 | # Conflict between --help and --header | |
14067 | as_fn_error "ambiguous option: \`$1' | |
14068 | Try \`$0 --help' for more information.";; | |
14069 | --help | --hel | -h ) | |
14070 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
14071 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
14072 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
14073 | ac_cs_silent=: ;; | |
c906108c | 14074 | |
bec39cab | 14075 | # This is an error. |
81ecdfbb RW |
14076 | -*) as_fn_error "unrecognized option: \`$1' |
14077 | Try \`$0 --help' for more information." ;; | |
c906108c | 14078 | |
81ecdfbb RW |
14079 | *) as_fn_append ac_config_targets " $1" |
14080 | ac_need_defaults=false ;; | |
c906108c | 14081 | |
bec39cab AC |
14082 | esac |
14083 | shift | |
14084 | done | |
c906108c | 14085 | |
bec39cab | 14086 | ac_configure_extra_args= |
c906108c | 14087 | |
bec39cab AC |
14088 | if $ac_cs_silent; then |
14089 | exec 6>/dev/null | |
14090 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
14091 | fi | |
c906108c | 14092 | |
bec39cab | 14093 | _ACEOF |
81ecdfbb | 14094 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 14095 | if \$ac_cs_recheck; then |
81ecdfbb RW |
14096 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
14097 | shift | |
14098 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
14099 | CONFIG_SHELL='$SHELL' | |
14100 | export CONFIG_SHELL | |
14101 | exec "\$@" | |
bec39cab AC |
14102 | fi |
14103 | ||
14104 | _ACEOF | |
81ecdfbb RW |
14105 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14106 | exec 5>>config.log | |
14107 | { | |
14108 | echo | |
14109 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
14110 | ## Running $as_me. ## | |
14111 | _ASBOX | |
14112 | $as_echo "$ac_log" | |
14113 | } >&5 | |
bec39cab | 14114 | |
81ecdfbb RW |
14115 | _ACEOF |
14116 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 14117 | # |
81ecdfbb | 14118 | # INIT-COMMANDS |
c906108c | 14119 | # |
a417dc56 | 14120 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 14121 | |
bec39cab AC |
14122 | _ACEOF |
14123 | ||
81ecdfbb | 14124 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 14125 | |
81ecdfbb | 14126 | # Handling of arguments. |
bec39cab | 14127 | for ac_config_target in $ac_config_targets |
c906108c | 14128 | do |
81ecdfbb RW |
14129 | case $ac_config_target in |
14130 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
14131 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 14132 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb RW |
14133 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
14134 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
e2207b9a | 14135 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 14136 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 14137 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
14138 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
14139 | ||
14140 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
14141 | esac |
14142 | done | |
14143 | ||
81ecdfbb | 14144 | |
bec39cab AC |
14145 | # If the user did not use the arguments to specify the items to instantiate, |
14146 | # then the envvar interface is used. Set only those that are not. | |
14147 | # We use the long form for the default assignment because of an extremely | |
14148 | # bizarre bug on SunOS 4.1.3. | |
14149 | if $ac_need_defaults; then | |
14150 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
14151 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
14152 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
14153 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
14154 | fi | |
14155 | ||
b4e70030 | 14156 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 14157 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 14158 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
14159 | # Hook for its removal unless debugging. |
14160 | # Note that there is a small window in which the directory will not be cleaned: | |
14161 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
14162 | $debug || |
14163 | { | |
81ecdfbb RW |
14164 | tmp= |
14165 | trap 'exit_status=$? | |
14166 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
14167 | ' 0 | |
14168 | trap 'as_fn_exit 1' 1 2 13 15 | |
14169 | } | |
14170 | # Create a (secure) tmp directory for tmp files. | |
14171 | ||
14172 | { | |
14173 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
14174 | test -n "$tmp" && test -d "$tmp" | |
14175 | } || | |
14176 | { | |
14177 | tmp=./conf$$-$RANDOM | |
14178 | (umask 077 && mkdir "$tmp") | |
14179 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
14180 | ||
14181 | # Set up the scripts for CONFIG_FILES section. | |
14182 | # No need to generate them if there are no CONFIG_FILES. | |
14183 | # This happens for instance with `./config.status config.h'. | |
14184 | if test -n "$CONFIG_FILES"; then | |
14185 | ||
14186 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
14187 | ac_cs_awk_getline=: | |
14188 | ac_cs_awk_pipe_init= | |
14189 | ac_cs_awk_read_file=' | |
14190 | while ((getline aline < (F[key])) > 0) | |
14191 | print(aline) | |
14192 | close(F[key])' | |
14193 | ac_cs_awk_pipe_fini= | |
14194 | else | |
14195 | ac_cs_awk_getline=false | |
14196 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
14197 | ac_cs_awk_read_file=' | |
14198 | print "|#_!!_#|" | |
14199 | print "cat " F[key] " &&" | |
14200 | '$ac_cs_awk_pipe_init | |
14201 | # The final `:' finishes the AND list. | |
14202 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
14203 | fi | |
14204 | ac_cr=`echo X | tr X '\015'` | |
14205 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
14206 | # But we know of no other shell where ac_cr would be empty at this | |
14207 | # point, so we can use a bashism as a fallback. | |
14208 | if test "x$ac_cr" = x; then | |
14209 | eval ac_cr=\$\'\\r\' | |
14210 | fi | |
14211 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
14212 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
14213 | ac_cs_awk_cr='\r' | |
14214 | else | |
14215 | ac_cs_awk_cr=$ac_cr | |
14216 | fi | |
14217 | ||
14218 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
14219 | _ACEOF | |
14220 | ||
14221 | # Create commands to substitute file output variables. | |
14222 | { | |
14223 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
14224 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
14225 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
14226 | echo "_ACAWK" && | |
14227 | echo "_ACEOF" | |
14228 | } >conf$$files.sh && | |
14229 | . ./conf$$files.sh || | |
14230 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14231 | rm -f conf$$files.sh | |
14232 | ||
14233 | { | |
14234 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
14235 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
14236 | echo "_ACEOF" | |
14237 | } >conf$$subs.sh || | |
14238 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14239 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
14240 | ac_delim='%!_!# ' | |
14241 | for ac_last_try in false false false false false :; do | |
14242 | . ./conf$$subs.sh || | |
14243 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14244 | ||
14245 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
14246 | if test $ac_delim_n = $ac_delim_num; then | |
14247 | break | |
14248 | elif $ac_last_try; then | |
14249 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14250 | else | |
14251 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14252 | fi | |
14253 | done | |
14254 | rm -f conf$$subs.sh | |
14255 | ||
14256 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14257 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
14258 | _ACEOF | |
14259 | sed -n ' | |
14260 | h | |
14261 | s/^/S["/; s/!.*/"]=/ | |
14262 | p | |
14263 | g | |
14264 | s/^[^!]*!// | |
14265 | :repl | |
14266 | t repl | |
14267 | s/'"$ac_delim"'$// | |
14268 | t delim | |
14269 | :nl | |
14270 | h | |
14271 | s/\(.\{148\}\).*/\1/ | |
14272 | t more1 | |
14273 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
14274 | p | |
14275 | n | |
14276 | b repl | |
14277 | :more1 | |
14278 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14279 | p | |
14280 | g | |
14281 | s/.\{148\}// | |
14282 | t nl | |
14283 | :delim | |
14284 | h | |
14285 | s/\(.\{148\}\).*/\1/ | |
14286 | t more2 | |
14287 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
14288 | p | |
14289 | b | |
14290 | :more2 | |
14291 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14292 | p | |
14293 | g | |
14294 | s/.\{148\}// | |
14295 | t delim | |
14296 | ' <conf$$subs.awk | sed ' | |
14297 | /^[^""]/{ | |
14298 | N | |
14299 | s/\n// | |
14300 | } | |
14301 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
14302 | rm -f conf$$subs.awk | |
14303 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14304 | _ACAWK | |
14305 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
14306 | for (key in S) S_is_set[key] = 1 | |
14307 | FS = "\a" | |
14308 | \$ac_cs_awk_pipe_init | |
14309 | } | |
14310 | { | |
14311 | line = $ 0 | |
14312 | nfields = split(line, field, "@") | |
14313 | substed = 0 | |
14314 | len = length(field[1]) | |
14315 | for (i = 2; i < nfields; i++) { | |
14316 | key = field[i] | |
14317 | keylen = length(key) | |
14318 | if (S_is_set[key]) { | |
14319 | value = S[key] | |
14320 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
14321 | len += length(value) + length(field[++i]) | |
14322 | substed = 1 | |
14323 | } else | |
14324 | len += 1 + keylen | |
14325 | } | |
14326 | if (nfields == 3 && !substed) { | |
14327 | key = field[2] | |
14328 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
14329 | \$ac_cs_awk_read_file | |
14330 | next | |
14331 | } | |
14332 | } | |
14333 | print line | |
b4e70030 | 14334 | } |
81ecdfbb RW |
14335 | \$ac_cs_awk_pipe_fini |
14336 | _ACAWK | |
14337 | _ACEOF | |
14338 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14339 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
14340 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
14341 | else | |
14342 | cat | |
14343 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
14344 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
14345 | _ACEOF | |
14346 | ||
14347 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
14348 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
14349 | # trailing colons and then remove the whole line if VPATH becomes empty | |
14350 | # (actually we leave an empty line to preserve line numbers). | |
14351 | if test "x$srcdir" = x.; then | |
14352 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
14353 | s/:*\$(srcdir):*/:/ | |
14354 | s/:*\${srcdir}:*/:/ | |
14355 | s/:*@srcdir@:*/:/ | |
14356 | s/^\([^=]*=[ ]*\):*/\1/ | |
14357 | s/:*$// | |
14358 | s/^[^=]*=[ ]*$// | |
14359 | }' | |
14360 | fi | |
14361 | ||
14362 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14363 | fi # test -n "$CONFIG_FILES" | |
14364 | ||
14365 | # Set up the scripts for CONFIG_HEADERS section. | |
14366 | # No need to generate them if there are no CONFIG_HEADERS. | |
14367 | # This happens for instance with `./config.status Makefile'. | |
14368 | if test -n "$CONFIG_HEADERS"; then | |
14369 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
14370 | BEGIN { | |
14371 | _ACEOF | |
14372 | ||
14373 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
14374 | # here-document in config.status, that substitutes the proper values into | |
14375 | # config.h.in to produce config.h. | |
4e8d927d | 14376 | |
81ecdfbb RW |
14377 | # Create a delimiter string that does not exist in confdefs.h, to ease |
14378 | # handling of long lines. | |
14379 | ac_delim='%!_!# ' | |
14380 | for ac_last_try in false false :; do | |
14381 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
14382 | if test -z "$ac_t"; then | |
14383 | break | |
14384 | elif $ac_last_try; then | |
14385 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
14386 | else | |
14387 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14388 | fi | |
14389 | done | |
4e8d927d | 14390 | |
81ecdfbb RW |
14391 | # For the awk script, D is an array of macro values keyed by name, |
14392 | # likewise P contains macro parameters if any. Preserve backslash | |
14393 | # newline sequences. | |
14394 | ||
14395 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
14396 | sed -n ' | |
14397 | s/.\{148\}/&'"$ac_delim"'/g | |
14398 | t rset | |
14399 | :rset | |
14400 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
14401 | t def | |
14402 | d | |
14403 | :def | |
14404 | s/\\$// | |
14405 | t bsnl | |
14406 | s/["\\]/\\&/g | |
14407 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
14408 | D["\1"]=" \3"/p | |
14409 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
14410 | d | |
14411 | :bsnl | |
14412 | s/["\\]/\\&/g | |
14413 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
14414 | D["\1"]=" \3\\\\\\n"\\/p | |
14415 | t cont | |
14416 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
14417 | t cont | |
14418 | d | |
14419 | :cont | |
14420 | n | |
14421 | s/.\{148\}/&'"$ac_delim"'/g | |
14422 | t clear | |
14423 | :clear | |
14424 | s/\\$// | |
14425 | t bsnlc | |
14426 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
14427 | d | |
14428 | :bsnlc | |
14429 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
14430 | b cont | |
14431 | ' <confdefs.h | sed ' | |
14432 | s/'"$ac_delim"'/"\\\ | |
14433 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
14434 | ||
14435 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14436 | for (key in D) D_is_set[key] = 1 | |
14437 | FS = "\a" | |
14438 | } | |
14439 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
14440 | line = \$ 0 | |
14441 | split(line, arg, " ") | |
14442 | if (arg[1] == "#") { | |
14443 | defundef = arg[2] | |
14444 | mac1 = arg[3] | |
14445 | } else { | |
14446 | defundef = substr(arg[1], 2) | |
14447 | mac1 = arg[2] | |
14448 | } | |
14449 | split(mac1, mac2, "(") #) | |
14450 | macro = mac2[1] | |
14451 | prefix = substr(line, 1, index(line, defundef) - 1) | |
14452 | if (D_is_set[macro]) { | |
14453 | # Preserve the white space surrounding the "#". | |
14454 | print prefix "define", macro P[macro] D[macro] | |
14455 | next | |
14456 | } else { | |
14457 | # Replace #undef with comments. This is necessary, for example, | |
14458 | # in the case of _POSIX_SOURCE, which is predefined and required | |
14459 | # on some systems where configure will not decide to define it. | |
14460 | if (defundef == "undef") { | |
14461 | print "/*", prefix defundef, macro, "*/" | |
14462 | next | |
14463 | } | |
14464 | } | |
b4e70030 | 14465 | } |
81ecdfbb RW |
14466 | { print } |
14467 | _ACAWK | |
b4e70030 | 14468 | _ACEOF |
81ecdfbb RW |
14469 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14470 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
14471 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 14472 | |
4e8d927d | 14473 | |
81ecdfbb RW |
14474 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
14475 | shift | |
14476 | for ac_tag | |
14477 | do | |
14478 | case $ac_tag in | |
14479 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
14480 | esac | |
14481 | case $ac_mode$ac_tag in | |
14482 | :[FHL]*:*);; | |
14483 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
14484 | :[FH]-) ac_tag=-:-;; | |
14485 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
14486 | esac | |
14487 | ac_save_IFS=$IFS | |
14488 | IFS=: | |
14489 | set x $ac_tag | |
14490 | IFS=$ac_save_IFS | |
14491 | shift | |
14492 | ac_file=$1 | |
14493 | shift | |
4e8d927d | 14494 | |
81ecdfbb RW |
14495 | case $ac_mode in |
14496 | :L) ac_source=$1;; | |
14497 | :[FH]) | |
14498 | ac_file_inputs= | |
14499 | for ac_f | |
14500 | do | |
14501 | case $ac_f in | |
14502 | -) ac_f="$tmp/stdin";; | |
14503 | *) # Look for the file first in the build tree, then in the source tree | |
14504 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
14505 | # because $ac_f cannot contain `:'. | |
14506 | test -f "$ac_f" || | |
14507 | case $ac_f in | |
14508 | [\\/$]*) false;; | |
14509 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
14510 | esac || | |
14511 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
14512 | esac | |
14513 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
14514 | as_fn_append ac_file_inputs " '$ac_f'" | |
14515 | done | |
14516 | ||
14517 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
14518 | # use $as_me), people would be surprised to read: | |
14519 | # /* config.h. Generated by config.status. */ | |
14520 | configure_input='Generated from '` | |
14521 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
14522 | `' by configure.' | |
14523 | if test x"$ac_file" != x-; then | |
14524 | configure_input="$ac_file. $configure_input" | |
14525 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
14526 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 14527 | fi |
81ecdfbb RW |
14528 | # Neutralize special characters interpreted by sed in replacement strings. |
14529 | case $configure_input in #( | |
14530 | *\&* | *\|* | *\\* ) | |
14531 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
14532 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
14533 | *) ac_sed_conf_input=$configure_input;; | |
14534 | esac | |
4e8d927d | 14535 | |
81ecdfbb RW |
14536 | case $ac_tag in |
14537 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
14538 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
14539 | esac | |
14540 | ;; | |
c906108c SS |
14541 | esac |
14542 | ||
81ecdfbb | 14543 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
14544 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
14545 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
14546 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
14547 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
14548 | $as_echo X"$ac_file" | | |
14549 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14550 | s//\1/ | |
14551 | q | |
14552 | } | |
14553 | /^X\(\/\/\)[^/].*/{ | |
14554 | s//\1/ | |
14555 | q | |
14556 | } | |
14557 | /^X\(\/\/\)$/{ | |
14558 | s//\1/ | |
14559 | q | |
14560 | } | |
14561 | /^X\(\/\).*/{ | |
14562 | s//\1/ | |
14563 | q | |
14564 | } | |
14565 | s/.*/./; q'` | |
14566 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
14567 | ac_builddir=. |
14568 | ||
81ecdfbb RW |
14569 | case "$ac_dir" in |
14570 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14571 | *) | |
14572 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
14573 | # A ".." for each directory in $ac_dir_suffix. | |
14574 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
14575 | case $ac_top_builddir_sub in | |
14576 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14577 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
14578 | esac ;; | |
14579 | esac | |
14580 | ac_abs_top_builddir=$ac_pwd | |
14581 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
14582 | # for backward compatibility: | |
14583 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
14584 | |
14585 | case $srcdir in | |
81ecdfbb | 14586 | .) # We are building in place. |
bec39cab | 14587 | ac_srcdir=. |
81ecdfbb RW |
14588 | ac_top_srcdir=$ac_top_builddir_sub |
14589 | ac_abs_top_srcdir=$ac_pwd ;; | |
14590 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 14591 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
14592 | ac_top_srcdir=$srcdir |
14593 | ac_abs_top_srcdir=$srcdir ;; | |
14594 | *) # Relative name. | |
14595 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
14596 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
14597 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 14598 | esac |
81ecdfbb | 14599 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 14600 | |
c906108c | 14601 | |
81ecdfbb RW |
14602 | case $ac_mode in |
14603 | :F) | |
14604 | # | |
14605 | # CONFIG_FILE | |
14606 | # | |
c906108c | 14607 | |
bec39cab AC |
14608 | case $INSTALL in |
14609 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 14610 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 14611 | esac |
81ecdfbb | 14612 | _ACEOF |
121ce6e5 | 14613 | |
81ecdfbb RW |
14614 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14615 | # If the template does not know about datarootdir, expand it. | |
14616 | # FIXME: This hack should be removed a few years after 2.60. | |
14617 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
14618 | ac_sed_dataroot=' | |
14619 | /datarootdir/ { | |
14620 | p | |
14621 | q | |
14622 | } | |
14623 | /@datadir@/p | |
14624 | /@docdir@/p | |
14625 | /@infodir@/p | |
14626 | /@localedir@/p | |
14627 | /@mandir@/p' | |
14628 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
14629 | *datarootdir*) ac_datarootdir_seen=yes;; | |
14630 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
14631 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
14632 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
14633 | _ACEOF | |
14634 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14635 | ac_datarootdir_hack=' | |
14636 | s&@datadir@&$datadir&g | |
14637 | s&@docdir@&$docdir&g | |
14638 | s&@infodir@&$infodir&g | |
14639 | s&@localedir@&$localedir&g | |
14640 | s&@mandir@&$mandir&g | |
14641 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
14642 | esac | |
4e8d927d | 14643 | _ACEOF |
81ecdfbb RW |
14644 | |
14645 | # Neutralize VPATH when `$srcdir' = `.'. | |
14646 | # Shell code in configure.ac might set extrasub. | |
14647 | # FIXME: do we really want to maintain this feature? | |
14648 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14649 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
14650 | $extrasub |
14651 | _ACEOF | |
81ecdfbb | 14652 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
14653 | :t |
14654 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
14655 | s|@configure_input@|$ac_sed_conf_input|;t t |
14656 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
14657 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
14658 | s&@srcdir@&$ac_srcdir&;t t | |
14659 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
14660 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
14661 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
14662 | s&@builddir@&$ac_builddir&;t t | |
14663 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
14664 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
14665 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
14666 | $ac_datarootdir_hack |
14667 | " | |
14668 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
14669 | if $ac_cs_awk_getline; then | |
14670 | $AWK -f "$tmp/subs.awk" | |
14671 | else | |
14672 | $AWK -f "$tmp/subs.awk" | $SHELL | |
14673 | fi >$tmp/out \ | |
14674 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14675 | ||
14676 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
14677 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
14678 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
14679 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
14680 | which seems to be undefined. Please make sure it is defined." >&5 | |
14681 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
14682 | which seems to be undefined. Please make sure it is defined." >&2;} | |
14683 | ||
14684 | rm -f "$tmp/stdin" | |
bec39cab | 14685 | case $ac_file in |
81ecdfbb RW |
14686 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
14687 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
14688 | esac \ | |
14689 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14690 | ;; | |
14691 | :H) | |
14692 | # | |
14693 | # CONFIG_HEADER | |
14694 | # | |
bec39cab | 14695 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
14696 | { |
14697 | $as_echo "/* $configure_input */" \ | |
14698 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
14699 | } >"$tmp/config.h" \ | |
14700 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14701 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
14702 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
14703 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 14704 | else |
81ecdfbb RW |
14705 | rm -f "$ac_file" |
14706 | mv "$tmp/config.h" "$ac_file" \ | |
14707 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
14708 | fi |
14709 | else | |
81ecdfbb RW |
14710 | $as_echo "/* $configure_input */" \ |
14711 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
14712 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 14713 | fi |
81ecdfbb RW |
14714 | ;; |
14715 | :L) | |
14716 | # | |
14717 | # CONFIG_LINK | |
14718 | # | |
c906108c | 14719 | |
81ecdfbb RW |
14720 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
14721 | : | |
b4e70030 | 14722 | else |
81ecdfbb RW |
14723 | # Prefer the file from the source tree if names are identical. |
14724 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
14725 | ac_source=$srcdir/$ac_source | |
14726 | fi | |
b4e70030 | 14727 | |
81ecdfbb RW |
14728 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
14729 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 14730 | |
81ecdfbb RW |
14731 | if test ! -r "$ac_source"; then |
14732 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
14733 | fi | |
14734 | rm -f "$ac_file" | |
bec39cab | 14735 | |
81ecdfbb RW |
14736 | # Try a relative symlink, then a hard link, then a copy. |
14737 | case $srcdir in | |
14738 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
14739 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
14740 | esac | |
14741 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
14742 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
14743 | cp -p "$ac_source" "$ac_file" || | |
14744 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
14745 | fi | |
14746 | ;; | |
14747 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
14748 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
14749 | ;; | |
c906108c | 14750 | esac |
b4e70030 | 14751 | |
bec39cab | 14752 | |
81ecdfbb RW |
14753 | case $ac_file$ac_mode in |
14754 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
81ecdfbb | 14755 | "default":C) |
c906108c SS |
14756 | case x$CONFIG_HEADERS in |
14757 | xconfig.h:config.in) | |
14758 | echo > stamp-h ;; | |
14759 | esac | |
bec39cab | 14760 | ;; |
81ecdfbb | 14761 | |
bec39cab | 14762 | esac |
81ecdfbb | 14763 | done # for ac_tag |
c906108c | 14764 | |
bec39cab | 14765 | |
81ecdfbb | 14766 | as_fn_exit 0 |
bec39cab | 14767 | _ACEOF |
bec39cab AC |
14768 | ac_clean_files=$ac_clean_files_save |
14769 | ||
81ecdfbb RW |
14770 | test $ac_write_fail = 0 || |
14771 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
14772 | ||
bec39cab AC |
14773 | |
14774 | # configure is writing to config.log, and then calls config.status. | |
14775 | # config.status does its own redirection, appending to config.log. | |
14776 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
14777 | # by configure, so config.status won't be able to write to it; its | |
14778 | # output is simply discarded. So we exec the FD to /dev/null, | |
14779 | # effectively closing config.log, so it can be properly (re)opened and | |
14780 | # appended to by config.status. When coming back to configure, we | |
14781 | # need to make the FD available again. | |
14782 | if test "$no_create" != yes; then | |
14783 | ac_cs_success=: | |
14784 | ac_config_status_args= | |
14785 | test "$silent" = yes && | |
14786 | ac_config_status_args="$ac_config_status_args --quiet" | |
14787 | exec 5>/dev/null | |
14788 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
14789 | exec 5>>config.log | |
14790 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
14791 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 14792 | $ac_cs_success || as_fn_exit $? |
bec39cab | 14793 | fi |
c906108c | 14794 | |
bec39cab | 14795 | # |
81ecdfbb | 14796 | # CONFIG_SUBDIRS section. |
bec39cab | 14797 | # |
c906108c SS |
14798 | if test "$no_recursion" != yes; then |
14799 | ||
81ecdfbb RW |
14800 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
14801 | # so they do not pile up. | |
c906108c SS |
14802 | ac_sub_configure_args= |
14803 | ac_prev= | |
fdc59709 PB |
14804 | eval "set x $ac_configure_args" |
14805 | shift | |
14806 | for ac_arg | |
14807 | do | |
c906108c SS |
14808 | if test -n "$ac_prev"; then |
14809 | ac_prev= | |
14810 | continue | |
14811 | fi | |
bec39cab | 14812 | case $ac_arg in |
c906108c SS |
14813 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
14814 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
14815 | ac_prev=cache_file ;; | |
14816 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
14817 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
14818 | | --c=*) | |
14819 | ;; | |
14820 | --config-cache | -C) | |
c906108c SS |
14821 | ;; |
14822 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
14823 | ac_prev=srcdir ;; | |
14824 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
14825 | ;; | |
bec39cab AC |
14826 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
14827 | ac_prev=prefix ;; | |
14828 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
14829 | ;; | |
81ecdfbb RW |
14830 | --disable-option-checking) |
14831 | ;; | |
fdc59709 PB |
14832 | *) |
14833 | case $ac_arg in | |
81ecdfbb | 14834 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 14835 | esac |
81ecdfbb | 14836 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
14837 | esac |
14838 | done | |
14839 | ||
bec39cab AC |
14840 | # Always prepend --prefix to ensure using the same prefix |
14841 | # in subdir configurations. | |
fdc59709 PB |
14842 | ac_arg="--prefix=$prefix" |
14843 | case $ac_arg in | |
81ecdfbb | 14844 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 14845 | esac |
81ecdfbb RW |
14846 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
14847 | ||
14848 | # Pass --silent | |
14849 | if test "$silent" = yes; then | |
14850 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
14851 | fi | |
14852 | ||
14853 | # Always prepend --disable-option-checking to silence warnings, since | |
14854 | # different subdirs can have different --enable and --with options. | |
14855 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 14856 | |
b4e70030 | 14857 | ac_popdir=`pwd` |
bec39cab | 14858 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
14859 | |
14860 | # Do not complain, so a configure script can configure whichever | |
14861 | # parts of a large source tree are present. | |
fdc59709 | 14862 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 14863 | |
81ecdfbb RW |
14864 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
14865 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
14866 | $as_echo "$ac_msg" >&6 | |
14867 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
14868 | ac_builddir=. |
14869 | ||
81ecdfbb RW |
14870 | case "$ac_dir" in |
14871 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14872 | *) | |
14873 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
14874 | # A ".." for each directory in $ac_dir_suffix. | |
14875 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
14876 | case $ac_top_builddir_sub in | |
14877 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14878 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
14879 | esac ;; | |
14880 | esac | |
14881 | ac_abs_top_builddir=$ac_pwd | |
14882 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
14883 | # for backward compatibility: | |
14884 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
14885 | |
14886 | case $srcdir in | |
81ecdfbb | 14887 | .) # We are building in place. |
bec39cab | 14888 | ac_srcdir=. |
81ecdfbb RW |
14889 | ac_top_srcdir=$ac_top_builddir_sub |
14890 | ac_abs_top_srcdir=$ac_pwd ;; | |
14891 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 14892 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
14893 | ac_top_srcdir=$srcdir |
14894 | ac_abs_top_srcdir=$srcdir ;; | |
14895 | *) # Relative name. | |
14896 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
14897 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
14898 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 14899 | esac |
81ecdfbb | 14900 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 14901 | |
c906108c | 14902 | |
fdc59709 | 14903 | cd "$ac_dir" |
c906108c SS |
14904 | |
14905 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
14906 | if test -f "$ac_srcdir/configure.gnu"; then |
14907 | ac_sub_configure=$ac_srcdir/configure.gnu | |
14908 | elif test -f "$ac_srcdir/configure"; then | |
14909 | ac_sub_configure=$ac_srcdir/configure | |
14910 | elif test -f "$ac_srcdir/configure.in"; then | |
14911 | # This should be Cygnus configure. | |
14912 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 14913 | else |
81ecdfbb RW |
14914 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
14915 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
14916 | ac_sub_configure= |
14917 | fi | |
14918 | ||
14919 | # The recursion is here. | |
14920 | if test -n "$ac_sub_configure"; then | |
c906108c | 14921 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
14922 | case $cache_file in |
14923 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
14924 | *) # Relative name. |
14925 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 14926 | esac |
c906108c | 14927 | |
81ecdfbb RW |
14928 | { $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 |
14929 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 14930 | # The eval makes quoting arguments work. |
fdc59709 PB |
14931 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
14932 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 14933 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
14934 | fi |
14935 | ||
fdc59709 | 14936 | cd "$ac_popdir" |
c906108c SS |
14937 | done |
14938 | fi | |
81ecdfbb RW |
14939 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
14940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
14941 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
14942 | fi | |
c906108c SS |
14943 | |
14944 | ||
14945 | exit 0 |