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 | 593 | LIBOBJS |
b292c783 JK |
594 | GCORE_TRANSFORM_NAME |
595 | GDB_TRANSFORM_NAME | |
81ecdfbb | 596 | GDB_NM_FILE |
393fd4c3 YQ |
597 | LTLIBBABELTRACE |
598 | LIBBABELTRACE | |
599 | HAVE_LIBBABELTRACE | |
81ecdfbb RW |
600 | frags |
601 | target_subdir | |
602 | CONFIG_UNINSTALL | |
603 | CONFIG_INSTALL | |
604 | CONFIG_CLEAN | |
605 | CONFIG_ALL | |
606 | CONFIG_SRCS | |
607 | CONFIG_DEPS | |
608 | CONFIG_OBS | |
609 | PROFILE_CFLAGS | |
610 | ENABLE_CFLAGS | |
611 | SIM_OBS | |
612 | SIM | |
613 | XMKMF | |
614 | GDBTK_SRC_DIR | |
615 | GDBTK_CFLAGS | |
616 | GDBTKLIBS | |
617 | X_LIBS | |
618 | X_LDFLAGS | |
619 | X_CFLAGS | |
620 | TK_XINCLUDES | |
621 | TK_DEPS | |
622 | TK_LIBRARY | |
623 | TK_INCLUDE | |
624 | TK_STUB_LIB_SPEC | |
625 | TK_STUB_LIB_FLAG | |
626 | TK_STUB_LIB_FILE | |
627 | TK_LIB_SPEC | |
628 | TK_LIB_FLAG | |
629 | TK_LIB_FILE | |
630 | TK_SRC_DIR | |
631 | TK_BIN_DIR | |
632 | TK_VERSION | |
633 | TCL_DEPS | |
634 | TCL_LIBRARY | |
635 | TCL_INCLUDE | |
636 | TCL_STUB_LIB_SPEC | |
637 | TCL_STUB_LIB_FLAG | |
638 | TCL_STUB_LIB_FILE | |
639 | TCL_LIB_SPEC | |
640 | TCL_LIB_FLAG | |
641 | TCL_LIB_FILE | |
642 | TCL_SRC_DIR | |
643 | TCL_BIN_DIR | |
644 | TCL_PATCH_LEVEL | |
645 | TCL_VERSION | |
646 | WIN32LDAPP | |
647 | GUI_CFLAGS_X | |
648 | LIBGUI | |
608e2dbb TT |
649 | LTLIBLZMA |
650 | LIBLZMA | |
651 | HAVE_LIBLZMA | |
81ecdfbb RW |
652 | WIN32LIBS |
653 | SER_HARDWIRE | |
654 | WERROR_CFLAGS | |
655 | WARN_CFLAGS | |
656 | SYSTEM_GDBINIT | |
81ecdfbb RW |
657 | TARGET_SYSTEM_ROOT |
658 | CONFIG_LDFLAGS | |
f6528abd | 659 | RDYNAMIC |
81ecdfbb | 660 | ALLOCA |
ac534cba JB |
661 | PYTHON_LIBS |
662 | PYTHON_CPPFLAGS | |
81ecdfbb | 663 | PYTHON_CFLAGS |
ec685c5e | 664 | python_prog_path |
81ecdfbb RW |
665 | LTLIBEXPAT |
666 | LIBEXPAT | |
667 | HAVE_LIBEXPAT | |
b8e0a31c | 668 | JIT_READER_DIR |
f997c383 | 669 | TARGET_PTR |
39037522 | 670 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
671 | READLINE_CFLAGS |
672 | READLINE_DEPS | |
673 | READLINE | |
674 | MIG | |
675 | WINDRES | |
676 | DLLTOOL | |
c971b7fa | 677 | AR |
81ecdfbb RW |
678 | YFLAGS |
679 | YACC | |
c971b7fa | 680 | RANLIB |
81ecdfbb | 681 | LN_S |
c971b7fa PA |
682 | INSTALL_DATA |
683 | INSTALL_SCRIPT | |
684 | INSTALL_PROGRAM | |
685 | AWK | |
81ecdfbb RW |
686 | REPORT_BUGS_TEXI |
687 | REPORT_BUGS_TO | |
688 | PKGVERSION | |
b292c783 | 689 | HAVE_NATIVE_GCORE_TARGET |
81ecdfbb RW |
690 | TARGET_OBS |
691 | subdirs | |
692 | GDB_DATADIR | |
693 | DEBUGDIR | |
5048e516 JK |
694 | MAKEINFO_EXTRA_FLAGS |
695 | MAKEINFOFLAGS | |
696 | MAKEINFO | |
81ecdfbb RW |
697 | PACKAGE |
698 | GNULIB_STDINT_H | |
81ecdfbb RW |
699 | CATOBJEXT |
700 | GENCAT | |
701 | INSTOBJEXT | |
702 | DATADIRNAME | |
703 | CATALOGS | |
704 | POSUB | |
705 | GMSGFMT | |
706 | XGETTEXT | |
707 | INCINTL | |
708 | LIBINTL_DEP | |
709 | LIBINTL | |
710 | USE_NLS | |
711 | SET_MAKE | |
712 | GMAKE_FALSE | |
713 | GMAKE_TRUE | |
714 | MAKE | |
715 | CCDEPMODE | |
716 | DEPDIR | |
717 | am__leading_dot | |
718 | target_os | |
719 | target_vendor | |
720 | target_cpu | |
721 | target | |
722 | host_os | |
723 | host_vendor | |
724 | host_cpu | |
725 | host | |
726 | build_os | |
727 | build_vendor | |
728 | build_cpu | |
729 | build | |
c971b7fa PA |
730 | EGREP |
731 | GREP | |
732 | CPP | |
81ecdfbb RW |
733 | OBJEXT |
734 | EXEEXT | |
735 | ac_ct_CC | |
736 | CPPFLAGS | |
737 | LDFLAGS | |
738 | CFLAGS | |
739 | CC | |
740 | MAINT | |
741 | MAINTAINER_MODE_FALSE | |
742 | MAINTAINER_MODE_TRUE | |
743 | target_alias | |
744 | host_alias | |
745 | build_alias | |
746 | LIBS | |
747 | ECHO_T | |
748 | ECHO_N | |
749 | ECHO_C | |
750 | DEFS | |
751 | mandir | |
752 | localedir | |
753 | libdir | |
754 | psdir | |
755 | pdfdir | |
756 | dvidir | |
757 | htmldir | |
758 | infodir | |
759 | docdir | |
760 | oldincludedir | |
761 | includedir | |
762 | localstatedir | |
763 | sharedstatedir | |
764 | sysconfdir | |
765 | datadir | |
766 | datarootdir | |
767 | libexecdir | |
768 | sbindir | |
769 | bindir | |
770 | program_transform_name | |
771 | prefix | |
772 | exec_prefix | |
773 | PACKAGE_URL | |
774 | PACKAGE_BUGREPORT | |
775 | PACKAGE_STRING | |
776 | PACKAGE_VERSION | |
777 | PACKAGE_TARNAME | |
778 | PACKAGE_NAME | |
779 | PATH_SEPARATOR | |
780 | SHELL' | |
a4ce5b0d | 781 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
782 | ac_user_opts=' |
783 | enable_option_checking | |
784 | enable_maintainer_mode | |
da2f07f1 JK |
785 | enable_plugins |
786 | enable_largefile | |
81ecdfbb RW |
787 | with_separate_debug_dir |
788 | with_gdb_datadir | |
789 | with_relocated_sources | |
7349ff92 | 790 | with_auto_load_dir |
bccbefd2 | 791 | with_auto_load_safe_path |
81ecdfbb RW |
792 | enable_targets |
793 | enable_64_bit_bfd | |
794 | enable_gdbcli | |
795 | enable_gdbmi | |
796 | enable_tui | |
797 | enable_gdbtk | |
05e7c244 | 798 | with_libunwind_ia64 |
81ecdfbb RW |
799 | with_curses |
800 | enable_profiling | |
801 | with_pkgversion | |
802 | with_bugurl | |
b040ad30 | 803 | with_zlib |
81ecdfbb | 804 | with_libiconv_prefix |
478aac75 | 805 | with_iconv_bin |
81ecdfbb | 806 | with_system_readline |
b8e0a31c | 807 | with_jit_reader_dir |
81ecdfbb RW |
808 | with_expat |
809 | with_gnu_ld | |
810 | enable_rpath | |
811 | with_libexpat_prefix | |
812 | with_python | |
a8db4212 | 813 | enable_libmcheck |
81ecdfbb RW |
814 | with_included_regex |
815 | with_sysroot | |
816 | with_system_gdbinit | |
817 | enable_werror | |
818 | enable_build_warnings | |
819 | enable_gdb_build_warnings | |
608e2dbb TT |
820 | with_lzma |
821 | with_liblzma_prefix | |
81ecdfbb RW |
822 | with_tcl |
823 | with_tk | |
824 | with_x | |
825 | enable_sim | |
826 | enable_multi_ice | |
496c0e1b | 827 | enable_gdbserver |
393fd4c3 YQ |
828 | with_babeltrace |
829 | with_libbabeltrace_prefix | |
81ecdfbb RW |
830 | ' |
831 | ac_precious_vars='build_alias | |
832 | host_alias | |
833 | target_alias | |
834 | CC | |
835 | CFLAGS | |
836 | LDFLAGS | |
837 | LIBS | |
838 | CPPFLAGS | |
839 | CPP | |
f06e05e0 JK |
840 | MAKEINFO |
841 | MAKEINFOFLAGS | |
81ecdfbb RW |
842 | YACC |
843 | YFLAGS | |
844 | XMKMF' | |
5ae98d25 | 845 | ac_subdirs_all='testsuite |
81ecdfbb RW |
846 | gdbtk |
847 | multi-ice | |
848 | gdbserver' | |
c906108c SS |
849 | |
850 | # Initialize some variables set by options. | |
bec39cab AC |
851 | ac_init_help= |
852 | ac_init_version=false | |
81ecdfbb RW |
853 | ac_unrecognized_opts= |
854 | ac_unrecognized_sep= | |
c906108c SS |
855 | # The variables have the same names as the options, with |
856 | # dashes changed to underlines. | |
bec39cab | 857 | cache_file=/dev/null |
c906108c | 858 | exec_prefix=NONE |
c906108c | 859 | no_create= |
c906108c SS |
860 | no_recursion= |
861 | prefix=NONE | |
862 | program_prefix=NONE | |
863 | program_suffix=NONE | |
864 | program_transform_name=s,x,x, | |
865 | silent= | |
866 | site= | |
867 | srcdir= | |
c906108c SS |
868 | verbose= |
869 | x_includes=NONE | |
870 | x_libraries=NONE | |
bec39cab AC |
871 | |
872 | # Installation directory options. | |
873 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
874 | # and all the variables that are supposed to be based on exec_prefix | |
875 | # by default will actually change. | |
876 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 877 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
878 | bindir='${exec_prefix}/bin' |
879 | sbindir='${exec_prefix}/sbin' | |
880 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
881 | datarootdir='${prefix}/share' |
882 | datadir='${datarootdir}' | |
c906108c SS |
883 | sysconfdir='${prefix}/etc' |
884 | sharedstatedir='${prefix}/com' | |
885 | localstatedir='${prefix}/var' | |
c906108c SS |
886 | includedir='${prefix}/include' |
887 | oldincludedir='/usr/include' | |
81ecdfbb RW |
888 | docdir='${datarootdir}/doc/${PACKAGE}' |
889 | infodir='${datarootdir}/info' | |
890 | htmldir='${docdir}' | |
891 | dvidir='${docdir}' | |
892 | pdfdir='${docdir}' | |
893 | psdir='${docdir}' | |
894 | libdir='${exec_prefix}/lib' | |
895 | localedir='${datarootdir}/locale' | |
896 | mandir='${datarootdir}/man' | |
c906108c | 897 | |
c906108c | 898 | ac_prev= |
81ecdfbb | 899 | ac_dashdash= |
c906108c SS |
900 | for ac_option |
901 | do | |
c906108c SS |
902 | # If the previous option needs an argument, assign it. |
903 | if test -n "$ac_prev"; then | |
81ecdfbb | 904 | eval $ac_prev=\$ac_option |
c906108c SS |
905 | ac_prev= |
906 | continue | |
907 | fi | |
908 | ||
81ecdfbb RW |
909 | case $ac_option in |
910 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
911 | *) ac_optarg=yes ;; | |
912 | esac | |
c906108c SS |
913 | |
914 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
915 | ||
81ecdfbb RW |
916 | case $ac_dashdash$ac_option in |
917 | --) | |
918 | ac_dashdash=yes ;; | |
c906108c SS |
919 | |
920 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
921 | ac_prev=bindir ;; | |
922 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 923 | bindir=$ac_optarg ;; |
c906108c SS |
924 | |
925 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 926 | ac_prev=build_alias ;; |
c906108c | 927 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 928 | build_alias=$ac_optarg ;; |
c906108c SS |
929 | |
930 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
931 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
932 | ac_prev=cache_file ;; | |
933 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
934 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
935 | cache_file=$ac_optarg ;; |
936 | ||
937 | --config-cache | -C) | |
938 | cache_file=config.cache ;; | |
c906108c | 939 | |
81ecdfbb | 940 | -datadir | --datadir | --datadi | --datad) |
c906108c | 941 | ac_prev=datadir ;; |
81ecdfbb | 942 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 943 | datadir=$ac_optarg ;; |
c906108c | 944 | |
81ecdfbb RW |
945 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
946 | | --dataroo | --dataro | --datar) | |
947 | ac_prev=datarootdir ;; | |
948 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
949 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
950 | datarootdir=$ac_optarg ;; | |
951 | ||
c906108c | 952 | -disable-* | --disable-*) |
81ecdfbb | 953 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 954 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
955 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
956 | as_fn_error "invalid feature name: $ac_useropt" | |
957 | ac_useropt_orig=$ac_useropt | |
958 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
959 | case $ac_user_opts in | |
960 | *" | |
961 | "enable_$ac_useropt" | |
962 | "*) ;; | |
963 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
964 | ac_unrecognized_sep=', ';; | |
965 | esac | |
966 | eval enable_$ac_useropt=no ;; | |
967 | ||
968 | -docdir | --docdir | --docdi | --doc | --do) | |
969 | ac_prev=docdir ;; | |
970 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
971 | docdir=$ac_optarg ;; | |
972 | ||
973 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
974 | ac_prev=dvidir ;; | |
975 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
976 | dvidir=$ac_optarg ;; | |
c906108c SS |
977 | |
978 | -enable-* | --enable-*) | |
81ecdfbb | 979 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 980 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
981 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
982 | as_fn_error "invalid feature name: $ac_useropt" | |
983 | ac_useropt_orig=$ac_useropt | |
984 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
985 | case $ac_user_opts in | |
986 | *" | |
987 | "enable_$ac_useropt" | |
988 | "*) ;; | |
989 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
990 | ac_unrecognized_sep=', ';; | |
b4e70030 | 991 | esac |
81ecdfbb | 992 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
993 | |
994 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
995 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
996 | | --exec | --exe | --ex) | |
997 | ac_prev=exec_prefix ;; | |
998 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
999 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
1000 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 1001 | exec_prefix=$ac_optarg ;; |
c906108c SS |
1002 | |
1003 | -gas | --gas | --ga | --g) | |
1004 | # Obsolete; use --with-gas. | |
1005 | with_gas=yes ;; | |
1006 | ||
bec39cab AC |
1007 | -help | --help | --hel | --he | -h) |
1008 | ac_init_help=long ;; | |
1009 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
1010 | ac_init_help=recursive ;; | |
1011 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
1012 | ac_init_help=short ;; | |
c906108c SS |
1013 | |
1014 | -host | --host | --hos | --ho) | |
bec39cab | 1015 | ac_prev=host_alias ;; |
c906108c | 1016 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1017 | host_alias=$ac_optarg ;; |
c906108c | 1018 | |
81ecdfbb RW |
1019 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1020 | ac_prev=htmldir ;; | |
1021 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1022 | | --ht=*) | |
1023 | htmldir=$ac_optarg ;; | |
1024 | ||
c906108c SS |
1025 | -includedir | --includedir | --includedi | --included | --include \ |
1026 | | --includ | --inclu | --incl | --inc) | |
1027 | ac_prev=includedir ;; | |
1028 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1029 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1030 | includedir=$ac_optarg ;; |
c906108c SS |
1031 | |
1032 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1033 | ac_prev=infodir ;; | |
1034 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1035 | infodir=$ac_optarg ;; |
c906108c SS |
1036 | |
1037 | -libdir | --libdir | --libdi | --libd) | |
1038 | ac_prev=libdir ;; | |
1039 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1040 | libdir=$ac_optarg ;; |
c906108c SS |
1041 | |
1042 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1043 | | --libexe | --libex | --libe) | |
1044 | ac_prev=libexecdir ;; | |
1045 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1046 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1047 | libexecdir=$ac_optarg ;; |
c906108c | 1048 | |
81ecdfbb RW |
1049 | -localedir | --localedir | --localedi | --localed | --locale) |
1050 | ac_prev=localedir ;; | |
1051 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1052 | localedir=$ac_optarg ;; | |
1053 | ||
c906108c | 1054 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1055 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1056 | ac_prev=localstatedir ;; |
1057 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1058 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1059 | localstatedir=$ac_optarg ;; |
c906108c SS |
1060 | |
1061 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1062 | ac_prev=mandir ;; | |
1063 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1064 | mandir=$ac_optarg ;; |
c906108c SS |
1065 | |
1066 | -nfp | --nfp | --nf) | |
1067 | # Obsolete; use --without-fp. | |
1068 | with_fp=no ;; | |
1069 | ||
1070 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1071 | | --no-cr | --no-c | -n) |
c906108c SS |
1072 | no_create=yes ;; |
1073 | ||
1074 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1075 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1076 | no_recursion=yes ;; | |
1077 | ||
1078 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1079 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1080 | | --oldin | --oldi | --old | --ol | --o) | |
1081 | ac_prev=oldincludedir ;; | |
1082 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1083 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1084 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1085 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1086 | |
1087 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1088 | ac_prev=prefix ;; | |
1089 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1090 | prefix=$ac_optarg ;; |
c906108c SS |
1091 | |
1092 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1093 | | --program-pre | --program-pr | --program-p) | |
1094 | ac_prev=program_prefix ;; | |
1095 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1096 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1097 | program_prefix=$ac_optarg ;; |
c906108c SS |
1098 | |
1099 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1100 | | --program-suf | --program-su | --program-s) | |
1101 | ac_prev=program_suffix ;; | |
1102 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1103 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1104 | program_suffix=$ac_optarg ;; |
c906108c SS |
1105 | |
1106 | -program-transform-name | --program-transform-name \ | |
1107 | | --program-transform-nam | --program-transform-na \ | |
1108 | | --program-transform-n | --program-transform- \ | |
1109 | | --program-transform | --program-transfor \ | |
1110 | | --program-transfo | --program-transf \ | |
1111 | | --program-trans | --program-tran \ | |
1112 | | --progr-tra | --program-tr | --program-t) | |
1113 | ac_prev=program_transform_name ;; | |
1114 | -program-transform-name=* | --program-transform-name=* \ | |
1115 | | --program-transform-nam=* | --program-transform-na=* \ | |
1116 | | --program-transform-n=* | --program-transform-=* \ | |
1117 | | --program-transform=* | --program-transfor=* \ | |
1118 | | --program-transfo=* | --program-transf=* \ | |
1119 | | --program-trans=* | --program-tran=* \ | |
1120 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1121 | program_transform_name=$ac_optarg ;; |
c906108c | 1122 | |
81ecdfbb RW |
1123 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1124 | ac_prev=pdfdir ;; | |
1125 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1126 | pdfdir=$ac_optarg ;; | |
1127 | ||
1128 | -psdir | --psdir | --psdi | --psd | --ps) | |
1129 | ac_prev=psdir ;; | |
1130 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1131 | psdir=$ac_optarg ;; | |
1132 | ||
c906108c SS |
1133 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1134 | | -silent | --silent | --silen | --sile | --sil) | |
1135 | silent=yes ;; | |
1136 | ||
1137 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1138 | ac_prev=sbindir ;; | |
1139 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1140 | | --sbi=* | --sb=*) | |
bec39cab | 1141 | sbindir=$ac_optarg ;; |
c906108c SS |
1142 | |
1143 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1144 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1145 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1146 | | --sha | --sh) | |
1147 | ac_prev=sharedstatedir ;; | |
1148 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1149 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1150 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1151 | | --sha=* | --sh=*) | |
bec39cab | 1152 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1153 | |
1154 | -site | --site | --sit) | |
1155 | ac_prev=site ;; | |
1156 | -site=* | --site=* | --sit=*) | |
bec39cab | 1157 | site=$ac_optarg ;; |
3ace7edb | 1158 | |
c906108c SS |
1159 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1160 | ac_prev=srcdir ;; | |
1161 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1162 | srcdir=$ac_optarg ;; |
c906108c SS |
1163 | |
1164 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1165 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1166 | ac_prev=sysconfdir ;; | |
1167 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1168 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1169 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1170 | |
1171 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1172 | ac_prev=target_alias ;; |
c906108c | 1173 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1174 | target_alias=$ac_optarg ;; |
c906108c SS |
1175 | |
1176 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1177 | verbose=yes ;; | |
1178 | ||
bec39cab AC |
1179 | -version | --version | --versio | --versi | --vers | -V) |
1180 | ac_init_version=: ;; | |
c906108c SS |
1181 | |
1182 | -with-* | --with-*) | |
81ecdfbb | 1183 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1184 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1185 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1186 | as_fn_error "invalid package name: $ac_useropt" | |
1187 | ac_useropt_orig=$ac_useropt | |
1188 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1189 | case $ac_user_opts in | |
1190 | *" | |
1191 | "with_$ac_useropt" | |
1192 | "*) ;; | |
1193 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1194 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1195 | esac |
81ecdfbb | 1196 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1197 | |
1198 | -without-* | --without-*) | |
81ecdfbb | 1199 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1200 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1201 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1202 | as_fn_error "invalid package name: $ac_useropt" | |
1203 | ac_useropt_orig=$ac_useropt | |
1204 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1205 | case $ac_user_opts in | |
1206 | *" | |
1207 | "with_$ac_useropt" | |
1208 | "*) ;; | |
1209 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1210 | ac_unrecognized_sep=', ';; | |
1211 | esac | |
1212 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1213 | |
1214 | --x) | |
1215 | # Obsolete; use --with-x. | |
1216 | with_x=yes ;; | |
1217 | ||
1218 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1219 | | --x-incl | --x-inc | --x-in | --x-i) | |
1220 | ac_prev=x_includes ;; | |
1221 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1222 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1223 | x_includes=$ac_optarg ;; |
c906108c SS |
1224 | |
1225 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1226 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1227 | ac_prev=x_libraries ;; | |
1228 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1229 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1230 | x_libraries=$ac_optarg ;; |
c906108c | 1231 | |
81ecdfbb RW |
1232 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1233 | Try \`$0 --help' for more information." | |
c906108c SS |
1234 | ;; |
1235 | ||
bec39cab AC |
1236 | *=*) |
1237 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1238 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1239 | case $ac_envvar in #( |
1240 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1241 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1242 | esac | |
1243 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1244 | export $ac_envvar ;; |
1245 | ||
c906108c | 1246 | *) |
bec39cab | 1247 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1248 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1249 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1250 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1251 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1252 | ;; |
1253 | ||
1254 | esac | |
1255 | done | |
1256 | ||
1257 | if test -n "$ac_prev"; then | |
bec39cab | 1258 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1259 | as_fn_error "missing argument to $ac_option" |
c906108c | 1260 | fi |
c906108c | 1261 | |
81ecdfbb RW |
1262 | if test -n "$ac_unrecognized_opts"; then |
1263 | case $enable_option_checking in | |
1264 | no) ;; | |
1265 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1266 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1267 | esac |
81ecdfbb | 1268 | fi |
b4e70030 | 1269 | |
81ecdfbb RW |
1270 | # Check all directory arguments for consistency. |
1271 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1272 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1273 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1274 | libdir localedir mandir | |
b4e70030 | 1275 | do |
81ecdfbb RW |
1276 | eval ac_val=\$$ac_var |
1277 | # Remove trailing slashes. | |
1278 | case $ac_val in | |
1279 | */ ) | |
1280 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1281 | eval $ac_var=\$ac_val;; | |
1282 | esac | |
1283 | # Be sure to have absolute directory names. | |
b4e70030 | 1284 | case $ac_val in |
81ecdfbb RW |
1285 | [\\/$]* | ?:[\\/]* ) continue;; |
1286 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1287 | esac |
81ecdfbb | 1288 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1289 | done |
1290 | ||
bec39cab AC |
1291 | # There might be people who depend on the old broken behavior: `$host' |
1292 | # used to hold the argument of --host etc. | |
1293 | # FIXME: To remove some day. | |
1294 | build=$build_alias | |
1295 | host=$host_alias | |
1296 | target=$target_alias | |
1297 | ||
1298 | # FIXME: To remove some day. | |
1299 | if test "x$host_alias" != x; then | |
1300 | if test "x$build_alias" = x; then | |
1301 | cross_compiling=maybe | |
81ecdfbb | 1302 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1303 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1304 | elif test "x$build_alias" != "x$host_alias"; then | |
1305 | cross_compiling=yes | |
1306 | fi | |
1307 | fi | |
c906108c | 1308 | |
bec39cab AC |
1309 | ac_tool_prefix= |
1310 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1311 | ||
1312 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1313 | |
c906108c | 1314 | |
81ecdfbb RW |
1315 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1316 | ac_ls_di=`ls -di .` && | |
1317 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1318 | as_fn_error "working directory cannot be determined" | |
1319 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1320 | as_fn_error "pwd does not report name of working directory" | |
1321 | ||
1322 | ||
c906108c SS |
1323 | # Find the source files, if location was not specified. |
1324 | if test -z "$srcdir"; then | |
1325 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1326 | # Try the directory containing this script, then the parent directory. |
1327 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1328 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1329 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1330 | X"$as_myself" : 'X\(//\)$' \| \ | |
1331 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1332 | $as_echo X"$as_myself" | | |
1333 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1334 | s//\1/ | |
1335 | q | |
1336 | } | |
1337 | /^X\(\/\/\)[^/].*/{ | |
1338 | s//\1/ | |
1339 | q | |
1340 | } | |
1341 | /^X\(\/\/\)$/{ | |
1342 | s//\1/ | |
1343 | q | |
1344 | } | |
1345 | /^X\(\/\).*/{ | |
1346 | s//\1/ | |
1347 | q | |
1348 | } | |
1349 | s/.*/./; q'` | |
c906108c | 1350 | srcdir=$ac_confdir |
81ecdfbb | 1351 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1352 | srcdir=.. |
1353 | fi | |
1354 | else | |
1355 | ac_srcdir_defaulted=no | |
1356 | fi | |
81ecdfbb RW |
1357 | if test ! -r "$srcdir/$ac_unique_file"; then |
1358 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1359 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1360 | fi | |
1361 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1362 | ac_abs_confdir=`( | |
1363 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1364 | pwd)` | |
1365 | # When building in place, set srcdir=. | |
1366 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1367 | srcdir=. | |
1368 | fi | |
1369 | # Remove unnecessary trailing slashes from srcdir. | |
1370 | # Double slashes in file names in object file debugging info | |
1371 | # mess up M-x gdb in Emacs. | |
1372 | case $srcdir in | |
1373 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1374 | esac | |
1375 | for ac_var in $ac_precious_vars; do | |
1376 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1377 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1378 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1379 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1380 | done | |
c906108c | 1381 | |
bec39cab AC |
1382 | # |
1383 | # Report the --help message. | |
1384 | # | |
1385 | if test "$ac_init_help" = "long"; then | |
1386 | # Omit some internal or obsolete options to make the list less imposing. | |
1387 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1388 | cat <<_ACEOF | |
1389 | \`configure' configures this package to adapt to many kinds of systems. | |
1390 | ||
1391 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1392 | ||
1393 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1394 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1395 | ||
1396 | Defaults for the options are specified in brackets. | |
1397 | ||
1398 | Configuration: | |
1399 | -h, --help display this help and exit | |
1400 | --help=short display options specific to this package | |
1401 | --help=recursive display the short help of all the included packages | |
1402 | -V, --version display version information and exit | |
1403 | -q, --quiet, --silent do not print \`checking...' messages | |
1404 | --cache-file=FILE cache test results in FILE [disabled] | |
1405 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1406 | -n, --no-create do not create output files | |
1407 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1408 | ||
bec39cab AC |
1409 | Installation directories: |
1410 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1411 | [$ac_default_prefix] |
bec39cab | 1412 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1413 | [PREFIX] |
bec39cab AC |
1414 | |
1415 | By default, \`make install' will install all the files in | |
1416 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1417 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1418 | for instance \`--prefix=\$HOME'. | |
1419 | ||
1420 | For better control, use the options below. | |
1421 | ||
1422 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1423 | --bindir=DIR user executables [EPREFIX/bin] |
1424 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1425 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1426 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1427 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1428 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1429 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1430 | --includedir=DIR C header files [PREFIX/include] | |
1431 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1432 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1433 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1434 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1435 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1436 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1437 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1438 | --htmldir=DIR html documentation [DOCDIR] | |
1439 | --dvidir=DIR dvi documentation [DOCDIR] | |
1440 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1441 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1442 | _ACEOF |
1443 | ||
1444 | cat <<\_ACEOF | |
1445 | ||
9009e1ae MR |
1446 | Program names: |
1447 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1448 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1449 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1450 | ||
bec39cab AC |
1451 | X features: |
1452 | --x-includes=DIR X include files are in DIR | |
1453 | --x-libraries=DIR X library files are in DIR | |
1454 | ||
1455 | System types: | |
1456 | --build=BUILD configure for building on BUILD [guessed] | |
1457 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1458 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1459 | _ACEOF | |
1460 | fi | |
1461 | ||
1462 | if test -n "$ac_init_help"; then | |
1463 | ||
1464 | cat <<\_ACEOF | |
1465 | ||
1466 | Optional Features: | |
81ecdfbb | 1467 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1468 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1469 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1470 | --enable-maintainer-mode enable make rules and dependencies not useful |
1471 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1472 | --enable-plugins Enable support for plugins (defaults no) |
1473 | --disable-largefile omit support for large files | |
a1220294 TT |
1474 | --enable-targets=TARGETS |
1475 | alternative target configurations | |
c0993dbe | 1476 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1477 | --disable-gdbcli disable command-line interface (CLI) |
1478 | --disable-gdbmi disable machine-interface (MI) | |
1479 | --enable-tui enable full-screen terminal user interface (TUI) | |
1480 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1481 | --enable-profiling enable profiling of GDB | |
3841debe | 1482 | --disable-rpath do not hardcode runtime library paths |
17ef446e | 1483 | --enable-libmcheck Try linking with -lmcheck if available |
a1220294 | 1484 | --enable-werror treat compile warnings as errors |
32c1c914 | 1485 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1486 | --enable-gdb-build-warnings |
32c1c914 | 1487 | enable GDB specific build-time compiler warnings if |
a1220294 | 1488 | gcc is used |
32c1c914 | 1489 | --enable-sim link gdb with simulator |
bec39cab | 1490 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1491 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1492 | is auto) | |
bec39cab AC |
1493 | |
1494 | Optional Packages: | |
1495 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1496 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1497 | --with-separate-debug-dir=PATH |
32c1c914 | 1498 | look for global separate debug info in this path |
62e4f60c | 1499 | [LIBDIR/debug] |
b14b1491 TT |
1500 | --with-gdb-datadir=PATH look for global separate data files in this path |
1501 | [DATADIR/gdb] | |
29b0e8a2 | 1502 | --with-relocated-sources=PATH |
32c1c914 | 1503 | automatically relocate this path for source files |
7349ff92 | 1504 | --with-auto-load-dir=PATH |
aff139ff | 1505 | directories from which to load auto-loaded scripts |
1564a261 | 1506 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1507 | --with-auto-load-safe-path=PATH |
aff139ff | 1508 | directories safe to hold auto-loaded files |
7349ff92 | 1509 | [--with-auto-load-dir] |
bccbefd2 JK |
1510 | --without-auto-load-safe-path |
1511 | do not restrict auto-loaded files locations | |
05e7c244 | 1512 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1513 | --with-curses use the curses library instead of the termcap |
1514 | library | |
c16158bc JM |
1515 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1516 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1517 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1518 | --with-libiconv-prefix=DIR |
1519 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1520 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1521 | --with-system-readline use installed readline library |
b8e0a31c SD |
1522 | --with-jit-reader-dir=PATH |
1523 | directory to load the JIT readers from | |
5c39566f | 1524 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1525 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1526 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1527 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1528 | --with-python[=PYTHON] include python support |
1529 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1530 | --without-included-regex |
1531 | don't use included regex; this is the default on | |
1532 | systems with version 2 of the GNU C library (use | |
1533 | with caution on other system) | |
81ecdfbb | 1534 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1535 | --with-system-gdbinit=PATH |
32c1c914 | 1536 | automatically load a system-wide gdbinit file |
608e2dbb TT |
1537 | --with-lzma support lzma compression (auto/yes/no) |
1538 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib | |
1539 | --without-liblzma-prefix don't search for liblzma in includedir and libdir | |
5062cc19 KS |
1540 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1541 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1542 | --with-x use the X Window System |
393fd4c3 YQ |
1543 | --with-babeltrace include babeltrace support (auto/yes/no) |
1544 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib | |
1545 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir | |
bec39cab AC |
1546 | |
1547 | Some influential environment variables: | |
1548 | CC C compiler command | |
1549 | CFLAGS C compiler flags | |
1550 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1551 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1552 | LIBS libraries to pass to the linker, e.g. -l<library> |
1553 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1554 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1555 | CPP C preprocessor |
f06e05e0 JK |
1556 | MAKEINFO Parent configure detects if it is of sufficient version. |
1557 | MAKEINFOFLAGS | |
1558 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1559 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1560 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1561 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1562 | This script will default YFLAGS to the empty string to avoid a | |
1563 | default value of `-d' given by some make applications. | |
1564 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1565 | |
1566 | Use these variables to override the choices made by `configure' or to help | |
1567 | it to find libraries and programs with nonstandard names/locations. | |
1568 | ||
81ecdfbb | 1569 | Report bugs to the package provider. |
bec39cab | 1570 | _ACEOF |
81ecdfbb | 1571 | ac_status=$? |
bec39cab AC |
1572 | fi |
1573 | ||
1574 | if test "$ac_init_help" = "recursive"; then | |
1575 | # If there are subdirs, report their specific --help. | |
bec39cab | 1576 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1577 | test -d "$ac_dir" || |
1578 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1579 | continue | |
bec39cab AC |
1580 | ac_builddir=. |
1581 | ||
81ecdfbb RW |
1582 | case "$ac_dir" in |
1583 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1584 | *) | |
1585 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1586 | # A ".." for each directory in $ac_dir_suffix. | |
1587 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1588 | case $ac_top_builddir_sub in | |
1589 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1590 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1591 | esac ;; | |
1592 | esac | |
1593 | ac_abs_top_builddir=$ac_pwd | |
1594 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1595 | # for backward compatibility: | |
1596 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1597 | |
1598 | case $srcdir in | |
81ecdfbb | 1599 | .) # We are building in place. |
bec39cab | 1600 | ac_srcdir=. |
81ecdfbb RW |
1601 | ac_top_srcdir=$ac_top_builddir_sub |
1602 | ac_abs_top_srcdir=$ac_pwd ;; | |
1603 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1604 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1605 | ac_top_srcdir=$srcdir |
1606 | ac_abs_top_srcdir=$srcdir ;; | |
1607 | *) # Relative name. | |
1608 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1609 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1610 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1611 | esac |
81ecdfbb | 1612 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1613 | |
81ecdfbb RW |
1614 | cd "$ac_dir" || { ac_status=$?; continue; } |
1615 | # Check for guested configure. | |
1616 | if test -f "$ac_srcdir/configure.gnu"; then | |
1617 | echo && | |
1618 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1619 | elif test -f "$ac_srcdir/configure"; then | |
1620 | echo && | |
1621 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1622 | else |
81ecdfbb RW |
1623 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1624 | fi || ac_status=$? | |
1625 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1626 | done |
1627 | fi | |
1628 | ||
81ecdfbb | 1629 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1630 | if $ac_init_version; then |
1631 | cat <<\_ACEOF | |
81ecdfbb RW |
1632 | configure |
1633 | generated by GNU Autoconf 2.64 | |
bec39cab | 1634 | |
81ecdfbb | 1635 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1636 | This configure script is free software; the Free Software Foundation |
1637 | gives unlimited permission to copy, distribute and modify it. | |
1638 | _ACEOF | |
81ecdfbb | 1639 | exit |
bec39cab | 1640 | fi |
bec39cab | 1641 | |
81ecdfbb RW |
1642 | ## ------------------------ ## |
1643 | ## Autoconf initialization. ## | |
1644 | ## ------------------------ ## | |
bec39cab | 1645 | |
81ecdfbb RW |
1646 | # ac_fn_c_try_compile LINENO |
1647 | # -------------------------- | |
1648 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1649 | ac_fn_c_try_compile () | |
1650 | { | |
1651 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1652 | rm -f conftest.$ac_objext | |
1653 | if { { ac_try="$ac_compile" | |
1654 | case "(($ac_try" in | |
1655 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1656 | *) ac_try_echo=$ac_try;; | |
1657 | esac | |
1658 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1659 | $as_echo "$ac_try_echo"; } >&5 | |
1660 | (eval "$ac_compile") 2>conftest.err | |
1661 | ac_status=$? | |
1662 | if test -s conftest.err; then | |
1663 | grep -v '^ *+' conftest.err >conftest.er1 | |
1664 | cat conftest.er1 >&5 | |
1665 | mv -f conftest.er1 conftest.err | |
1666 | fi | |
1667 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1668 | test $ac_status = 0; } && { | |
1669 | test -z "$ac_c_werror_flag" || | |
1670 | test ! -s conftest.err | |
1671 | } && test -s conftest.$ac_objext; then : | |
1672 | ac_retval=0 | |
1673 | else | |
1674 | $as_echo "$as_me: failed program was:" >&5 | |
1675 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1676 | |
81ecdfbb RW |
1677 | ac_retval=1 |
1678 | fi | |
1679 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1680 | return $ac_retval | |
1681 | ||
1682 | } # ac_fn_c_try_compile | |
1683 | ||
1684 | # ac_fn_c_try_cpp LINENO | |
1685 | # ---------------------- | |
1686 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1687 | ac_fn_c_try_cpp () | |
bec39cab | 1688 | { |
81ecdfbb RW |
1689 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1690 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1691 | case "(($ac_try" in | |
1692 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1693 | *) ac_try_echo=$ac_try;; | |
1694 | esac | |
1695 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1696 | $as_echo "$ac_try_echo"; } >&5 | |
1697 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1698 | ac_status=$? | |
1699 | if test -s conftest.err; then | |
1700 | grep -v '^ *+' conftest.err >conftest.er1 | |
1701 | cat conftest.er1 >&5 | |
1702 | mv -f conftest.er1 conftest.err | |
1703 | fi | |
1704 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1705 | test $ac_status = 0; } >/dev/null && { | |
1706 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1707 | test ! -s conftest.err | |
1708 | }; then : | |
1709 | ac_retval=0 | |
1710 | else | |
1711 | $as_echo "$as_me: failed program was:" >&5 | |
1712 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1713 | |
81ecdfbb RW |
1714 | ac_retval=1 |
1715 | fi | |
1716 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1717 | return $ac_retval | |
bec39cab | 1718 | |
81ecdfbb | 1719 | } # ac_fn_c_try_cpp |
bec39cab | 1720 | |
81ecdfbb RW |
1721 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1722 | # ------------------------------------------------------- | |
1723 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1724 | # the include files in INCLUDES and setting the cache variable VAR | |
1725 | # accordingly. | |
1726 | ac_fn_c_check_header_mongrel () | |
1727 | { | |
1728 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1729 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1731 | $as_echo_n "checking for $2... " >&6; } | |
1732 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1733 | $as_echo_n "(cached) " >&6 | |
1734 | fi | |
1735 | eval ac_res=\$$3 | |
1736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1737 | $as_echo "$ac_res" >&6; } | |
1738 | else | |
1739 | # Is the header compilable? | |
1740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1741 | $as_echo_n "checking $2 usability... " >&6; } | |
1742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1743 | /* end confdefs.h. */ | |
1744 | $4 | |
1745 | #include <$2> | |
1746 | _ACEOF | |
1747 | if ac_fn_c_try_compile "$LINENO"; then : | |
1748 | ac_header_compiler=yes | |
1749 | else | |
1750 | ac_header_compiler=no | |
1751 | fi | |
1752 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1754 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1755 | |
81ecdfbb RW |
1756 | # Is the header present? |
1757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1758 | $as_echo_n "checking $2 presence... " >&6; } | |
1759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1760 | /* end confdefs.h. */ | |
1761 | #include <$2> | |
1762 | _ACEOF | |
1763 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1764 | ac_header_preproc=yes | |
1765 | else | |
1766 | ac_header_preproc=no | |
1767 | fi | |
1768 | rm -f conftest.err conftest.$ac_ext | |
1769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1770 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1771 | |
81ecdfbb RW |
1772 | # So? What about this header? |
1773 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1774 | yes:no: ) | |
1775 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1776 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1777 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1778 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1779 | ;; | |
1780 | no:yes:* ) | |
1781 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1782 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1783 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1784 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1785 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1786 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1787 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1788 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1789 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1790 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1791 | ;; | |
1792 | esac | |
1793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1794 | $as_echo_n "checking for $2... " >&6; } | |
1795 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1796 | $as_echo_n "(cached) " >&6 | |
1797 | else | |
1798 | eval "$3=\$ac_header_compiler" | |
1799 | fi | |
1800 | eval ac_res=\$$3 | |
1801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1802 | $as_echo "$ac_res" >&6; } | |
1803 | fi | |
1804 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1805 | |
81ecdfbb | 1806 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1807 | |
81ecdfbb RW |
1808 | # ac_fn_c_try_run LINENO |
1809 | # ---------------------- | |
1810 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1811 | # that executables *can* be run. | |
1812 | ac_fn_c_try_run () | |
1813 | { | |
1814 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1815 | if { { ac_try="$ac_link" | |
1816 | case "(($ac_try" in | |
1817 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1818 | *) ac_try_echo=$ac_try;; | |
1819 | esac | |
1820 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1821 | $as_echo "$ac_try_echo"; } >&5 | |
1822 | (eval "$ac_link") 2>&5 | |
1823 | ac_status=$? | |
1824 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1825 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1826 | { { case "(($ac_try" in | |
1827 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1828 | *) ac_try_echo=$ac_try;; | |
1829 | esac | |
1830 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1831 | $as_echo "$ac_try_echo"; } >&5 | |
1832 | (eval "$ac_try") 2>&5 | |
1833 | ac_status=$? | |
1834 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1835 | test $ac_status = 0; }; }; then : | |
1836 | ac_retval=0 | |
1837 | else | |
1838 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1839 | $as_echo "$as_me: failed program was:" >&5 | |
1840 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1841 | |
81ecdfbb RW |
1842 | ac_retval=$ac_status |
1843 | fi | |
1844 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1845 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1846 | return $ac_retval | |
bec39cab | 1847 | |
81ecdfbb | 1848 | } # ac_fn_c_try_run |
bec39cab | 1849 | |
81ecdfbb RW |
1850 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1851 | # ------------------------------------------------------- | |
1852 | # Tests whether HEADER exists and can be compiled using the include files in | |
1853 | # INCLUDES, setting the cache variable VAR accordingly. | |
1854 | ac_fn_c_check_header_compile () | |
1855 | { | |
1856 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1858 | $as_echo_n "checking for $2... " >&6; } | |
1859 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1860 | $as_echo_n "(cached) " >&6 | |
1861 | else | |
1862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1863 | /* end confdefs.h. */ | |
1864 | $4 | |
1865 | #include <$2> | |
bec39cab | 1866 | _ACEOF |
81ecdfbb RW |
1867 | if ac_fn_c_try_compile "$LINENO"; then : |
1868 | eval "$3=yes" | |
1869 | else | |
1870 | eval "$3=no" | |
1871 | fi | |
1872 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1873 | fi | |
1874 | eval ac_res=\$$3 | |
1875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1876 | $as_echo "$ac_res" >&6; } | |
1877 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1878 | |
81ecdfbb | 1879 | } # ac_fn_c_check_header_compile |
bec39cab | 1880 | |
81ecdfbb RW |
1881 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1882 | # -------------------------------------------- | |
1883 | # Tries to find the compile-time value of EXPR in a program that includes | |
1884 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1885 | # computed | |
1886 | ac_fn_c_compute_int () | |
1887 | { | |
1888 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1889 | if test "$cross_compiling" = yes; then | |
1890 | # Depending upon the size, compute the lo and hi bounds. | |
1891 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1892 | /* end confdefs.h. */ | |
1893 | $4 | |
1894 | int | |
1895 | main () | |
1896 | { | |
1897 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1898 | test_array [0] = 0 | |
bec39cab | 1899 | |
81ecdfbb RW |
1900 | ; |
1901 | return 0; | |
1902 | } | |
1903 | _ACEOF | |
1904 | if ac_fn_c_try_compile "$LINENO"; then : | |
1905 | ac_lo=0 ac_mid=0 | |
1906 | while :; do | |
1907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1908 | /* end confdefs.h. */ | |
1909 | $4 | |
1910 | int | |
1911 | main () | |
1912 | { | |
1913 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1914 | test_array [0] = 0 | |
bec39cab | 1915 | |
81ecdfbb RW |
1916 | ; |
1917 | return 0; | |
1918 | } | |
1919 | _ACEOF | |
1920 | if ac_fn_c_try_compile "$LINENO"; then : | |
1921 | ac_hi=$ac_mid; break | |
1922 | else | |
1923 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1924 | if test $ac_lo -le $ac_mid; then | |
1925 | ac_lo= ac_hi= | |
1926 | break | |
1927 | fi | |
1928 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1929 | fi |
81ecdfbb RW |
1930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1931 | done | |
c906108c | 1932 | else |
81ecdfbb RW |
1933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1934 | /* end confdefs.h. */ | |
1935 | $4 | |
1936 | int | |
1937 | main () | |
1938 | { | |
1939 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1940 | test_array [0] = 0 | |
bec39cab | 1941 | |
81ecdfbb RW |
1942 | ; |
1943 | return 0; | |
1944 | } | |
1945 | _ACEOF | |
1946 | if ac_fn_c_try_compile "$LINENO"; then : | |
1947 | ac_hi=-1 ac_mid=-1 | |
1948 | while :; do | |
1949 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1950 | /* end confdefs.h. */ | |
1951 | $4 | |
1952 | int | |
1953 | main () | |
1954 | { | |
1955 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1956 | test_array [0] = 0 | |
bec39cab | 1957 | |
81ecdfbb RW |
1958 | ; |
1959 | return 0; | |
1960 | } | |
1961 | _ACEOF | |
1962 | if ac_fn_c_try_compile "$LINENO"; then : | |
1963 | ac_lo=$ac_mid; break | |
1964 | else | |
1965 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1966 | if test $ac_mid -le $ac_hi; then | |
1967 | ac_lo= ac_hi= | |
1968 | break | |
1969 | fi | |
1970 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1971 | fi | |
1972 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1973 | done | |
1974 | else | |
1975 | ac_lo= ac_hi= | |
1976 | fi | |
1977 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1978 | fi | |
1979 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1980 | # Binary search between lo and hi bounds. | |
1981 | while test "x$ac_lo" != "x$ac_hi"; do | |
1982 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1984 | /* end confdefs.h. */ | |
1985 | $4 | |
1986 | int | |
1987 | main () | |
1988 | { | |
1989 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1990 | test_array [0] = 0 | |
bec39cab | 1991 | |
81ecdfbb RW |
1992 | ; |
1993 | return 0; | |
1994 | } | |
1995 | _ACEOF | |
1996 | if ac_fn_c_try_compile "$LINENO"; then : | |
1997 | ac_hi=$ac_mid | |
1998 | else | |
1999 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
2000 | fi | |
2001 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2002 | done | |
2003 | case $ac_lo in #(( | |
2004 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
2005 | '') ac_retval=1 ;; | |
2006 | esac | |
2007 | else | |
2008 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2009 | /* end confdefs.h. */ | |
2010 | $4 | |
2011 | static long int longval () { return $2; } | |
2012 | static unsigned long int ulongval () { return $2; } | |
2013 | #include <stdio.h> | |
2014 | #include <stdlib.h> | |
2015 | int | |
2016 | main () | |
2017 | { | |
bec39cab | 2018 | |
81ecdfbb RW |
2019 | FILE *f = fopen ("conftest.val", "w"); |
2020 | if (! f) | |
2021 | return 1; | |
2022 | if (($2) < 0) | |
2023 | { | |
2024 | long int i = longval (); | |
2025 | if (i != ($2)) | |
2026 | return 1; | |
2027 | fprintf (f, "%ld", i); | |
2028 | } | |
2029 | else | |
2030 | { | |
2031 | unsigned long int i = ulongval (); | |
2032 | if (i != ($2)) | |
2033 | return 1; | |
2034 | fprintf (f, "%lu", i); | |
2035 | } | |
2036 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2037 | on some platforms. */ | |
2038 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2039 | |
81ecdfbb RW |
2040 | ; |
2041 | return 0; | |
2042 | } | |
2043 | _ACEOF | |
2044 | if ac_fn_c_try_run "$LINENO"; then : | |
2045 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2046 | else | |
2047 | ac_retval=1 | |
2048 | fi | |
2049 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2050 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2051 | rm -f conftest.val | |
bec39cab | 2052 | |
81ecdfbb RW |
2053 | fi |
2054 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2055 | return $ac_retval | |
bec39cab | 2056 | |
81ecdfbb | 2057 | } # ac_fn_c_compute_int |
bec39cab | 2058 | |
c971b7fa PA |
2059 | # ac_fn_c_try_link LINENO |
2060 | # ----------------------- | |
2061 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2062 | ac_fn_c_try_link () | |
2063 | { | |
2064 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2065 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2066 | if { { ac_try="$ac_link" | |
2067 | case "(($ac_try" in | |
2068 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2069 | *) ac_try_echo=$ac_try;; | |
2070 | esac | |
2071 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2072 | $as_echo "$ac_try_echo"; } >&5 | |
2073 | (eval "$ac_link") 2>conftest.err | |
2074 | ac_status=$? | |
2075 | if test -s conftest.err; then | |
2076 | grep -v '^ *+' conftest.err >conftest.er1 | |
2077 | cat conftest.er1 >&5 | |
2078 | mv -f conftest.er1 conftest.err | |
2079 | fi | |
2080 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2081 | test $ac_status = 0; } && { | |
2082 | test -z "$ac_c_werror_flag" || | |
2083 | test ! -s conftest.err | |
2084 | } && test -s conftest$ac_exeext && { | |
2085 | test "$cross_compiling" = yes || | |
2086 | $as_test_x conftest$ac_exeext | |
2087 | }; then : | |
2088 | ac_retval=0 | |
2089 | else | |
2090 | $as_echo "$as_me: failed program was:" >&5 | |
2091 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2092 | ||
2093 | ac_retval=1 | |
2094 | fi | |
2095 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2096 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2097 | # interfere with the next link command; also delete a directory that is | |
2098 | # left behind by Apple's compiler. We do this before executing the actions. | |
2099 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2100 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2101 | return $ac_retval | |
2102 | ||
2103 | } # ac_fn_c_try_link | |
2104 | ||
55a8c076 YQ |
2105 | # ac_fn_c_check_func LINENO FUNC VAR |
2106 | # ---------------------------------- | |
2107 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2108 | ac_fn_c_check_func () | |
81ecdfbb RW |
2109 | { |
2110 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2112 | $as_echo_n "checking for $2... " >&6; } | |
2113 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2114 | $as_echo_n "(cached) " >&6 | |
2115 | else | |
81ecdfbb RW |
2116 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2117 | /* end confdefs.h. */ | |
55a8c076 YQ |
2118 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2119 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2120 | #define $2 innocuous_$2 | |
2121 | ||
2122 | /* System header to define __stub macros and hopefully few prototypes, | |
2123 | which can conflict with char $2 (); below. | |
2124 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2125 | <limits.h> exists even on freestanding compilers. */ | |
2126 | ||
2127 | #ifdef __STDC__ | |
2128 | # include <limits.h> | |
2129 | #else | |
2130 | # include <assert.h> | |
2131 | #endif | |
2132 | ||
2133 | #undef $2 | |
2134 | ||
2135 | /* Override any GCC internal prototype to avoid an error. | |
2136 | Use char because int might match the return type of a GCC | |
2137 | builtin and then its argument prototype would still apply. */ | |
2138 | #ifdef __cplusplus | |
2139 | extern "C" | |
2140 | #endif | |
2141 | char $2 (); | |
2142 | /* The GNU C library defines this for functions which it implements | |
2143 | to always fail with ENOSYS. Some functions are actually named | |
2144 | something starting with __ and the normal name is an alias. */ | |
2145 | #if defined __stub_$2 || defined __stub___$2 | |
2146 | choke me | |
2147 | #endif | |
2148 | ||
2149 | int | |
2150 | main () | |
2151 | { | |
2152 | return $2 (); | |
2153 | ; | |
2154 | return 0; | |
2155 | } | |
2156 | _ACEOF | |
2157 | if ac_fn_c_try_link "$LINENO"; then : | |
2158 | eval "$3=yes" | |
2159 | else | |
2160 | eval "$3=no" | |
2161 | fi | |
2162 | rm -f core conftest.err conftest.$ac_objext \ | |
2163 | conftest$ac_exeext conftest.$ac_ext | |
2164 | fi | |
2165 | eval ac_res=\$$3 | |
2166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2167 | $as_echo "$ac_res" >&6; } | |
2168 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2169 | ||
2170 | } # ac_fn_c_check_func | |
2171 | ||
770d76d7 PA |
2172 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2173 | # ------------------------------------ | |
2174 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2175 | ac_fn_c_check_decl () | |
2176 | { | |
2177 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2178 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2179 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2181 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2182 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2183 | $as_echo_n "(cached) " >&6 | |
2184 | else | |
2185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2186 | /* end confdefs.h. */ | |
2187 | $4 | |
2188 | int | |
2189 | main () | |
2190 | { | |
2191 | #ifndef $as_decl_name | |
2192 | #ifdef __cplusplus | |
2193 | (void) $as_decl_use; | |
2194 | #else | |
2195 | (void) $as_decl_name; | |
2196 | #endif | |
2197 | #endif | |
2198 | ||
2199 | ; | |
2200 | return 0; | |
2201 | } | |
2202 | _ACEOF | |
2203 | if ac_fn_c_try_compile "$LINENO"; then : | |
2204 | eval "$3=yes" | |
2205 | else | |
2206 | eval "$3=no" | |
2207 | fi | |
2208 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2209 | fi | |
2210 | eval ac_res=\$$3 | |
2211 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2212 | $as_echo "$ac_res" >&6; } | |
2213 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2214 | ||
2215 | } # ac_fn_c_check_decl | |
2216 | ||
55a8c076 YQ |
2217 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2218 | # ---------------------------------------------------- | |
2219 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2220 | # INCLUDES, setting cache variable VAR accordingly. | |
2221 | ac_fn_c_check_member () | |
2222 | { | |
2223 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2224 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2225 | $as_echo_n "checking for $2.$3... " >&6; } | |
2226 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2227 | $as_echo_n "(cached) " >&6 | |
2228 | else | |
2229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2230 | /* end confdefs.h. */ | |
2231 | $5 | |
2232 | int | |
2233 | main () | |
2234 | { | |
2235 | static $2 ac_aggr; | |
2236 | if (ac_aggr.$3) | |
2237 | return 0; | |
2238 | ; | |
2239 | return 0; | |
2240 | } | |
2241 | _ACEOF | |
2242 | if ac_fn_c_try_compile "$LINENO"; then : | |
2243 | eval "$4=yes" | |
2244 | else | |
2245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2246 | /* end confdefs.h. */ | |
2247 | $5 | |
2248 | int | |
2249 | main () | |
2250 | { | |
2251 | static $2 ac_aggr; | |
2252 | if (sizeof ac_aggr.$3) | |
2253 | return 0; | |
2254 | ; | |
2255 | return 0; | |
2256 | } | |
2257 | _ACEOF | |
2258 | if ac_fn_c_try_compile "$LINENO"; then : | |
2259 | eval "$4=yes" | |
2260 | else | |
2261 | eval "$4=no" | |
2262 | fi | |
2263 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2264 | fi | |
2265 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2266 | fi | |
2267 | eval ac_res=\$$4 | |
2268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2269 | $as_echo "$ac_res" >&6; } | |
2270 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2271 | ||
2272 | } # ac_fn_c_check_member | |
2273 | ||
2274 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2275 | # ------------------------------------------- | |
2276 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2277 | # variable VAR accordingly. | |
2278 | ac_fn_c_check_type () | |
2279 | { | |
2280 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2282 | $as_echo_n "checking for $2... " >&6; } | |
2283 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2284 | $as_echo_n "(cached) " >&6 | |
2285 | else | |
2286 | eval "$3=no" | |
2287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2288 | /* end confdefs.h. */ | |
2289 | $4 | |
2290 | int | |
2291 | main () | |
2292 | { | |
2293 | if (sizeof ($2)) | |
2294 | return 0; | |
2295 | ; | |
2296 | return 0; | |
2297 | } | |
2298 | _ACEOF | |
2299 | if ac_fn_c_try_compile "$LINENO"; then : | |
2300 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2301 | /* end confdefs.h. */ | |
2302 | $4 | |
2303 | int | |
2304 | main () | |
2305 | { | |
2306 | if (sizeof (($2))) | |
2307 | return 0; | |
2308 | ; | |
2309 | return 0; | |
2310 | } | |
2311 | _ACEOF | |
2312 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2313 | |
81ecdfbb RW |
2314 | else |
2315 | eval "$3=yes" | |
2316 | fi | |
2317 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2318 | fi | |
2319 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2320 | fi | |
2321 | eval ac_res=\$$3 | |
2322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2323 | $as_echo "$ac_res" >&6; } | |
2324 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2325 | |
81ecdfbb RW |
2326 | } # ac_fn_c_check_type |
2327 | cat >config.log <<_ACEOF | |
2328 | This file contains any messages produced by compilers while | |
2329 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2330 | |
81ecdfbb RW |
2331 | It was created by $as_me, which was |
2332 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2333 | |
81ecdfbb | 2334 | $ $0 $@ |
413ccac7 | 2335 | |
81ecdfbb RW |
2336 | _ACEOF |
2337 | exec 5>>config.log | |
2338 | { | |
2339 | cat <<_ASUNAME | |
2340 | ## --------- ## | |
2341 | ## Platform. ## | |
2342 | ## --------- ## | |
413ccac7 | 2343 | |
81ecdfbb RW |
2344 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2345 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2346 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2347 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2348 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2349 | |
81ecdfbb RW |
2350 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2351 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2352 | |
81ecdfbb RW |
2353 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2354 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2355 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2356 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2357 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2358 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2359 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2360 | |
81ecdfbb | 2361 | _ASUNAME |
bec39cab | 2362 | |
bec39cab AC |
2363 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2364 | for as_dir in $PATH | |
2365 | do | |
2366 | IFS=$as_save_IFS | |
2367 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2368 | $as_echo "PATH: $as_dir" |
2369 | done | |
2370 | IFS=$as_save_IFS | |
bec39cab | 2371 | |
81ecdfbb | 2372 | } >&5 |
bec39cab | 2373 | |
81ecdfbb | 2374 | cat >&5 <<_ACEOF |
bec39cab | 2375 | |
bec39cab | 2376 | |
81ecdfbb RW |
2377 | ## ----------- ## |
2378 | ## Core tests. ## | |
2379 | ## ----------- ## | |
2380 | ||
2381 | _ACEOF | |
2382 | ||
2383 | ||
2384 | # Keep a trace of the command line. | |
2385 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2386 | # Strip out --silent because we don't want to record it for future runs. | |
2387 | # Also quote any args containing shell meta-characters. | |
2388 | # Make two passes to allow for proper duplicate-argument suppression. | |
2389 | ac_configure_args= | |
2390 | ac_configure_args0= | |
2391 | ac_configure_args1= | |
2392 | ac_must_keep_next=false | |
2393 | for ac_pass in 1 2 | |
2394 | do | |
2395 | for ac_arg | |
2396 | do | |
2397 | case $ac_arg in | |
2398 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2399 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2400 | | -silent | --silent | --silen | --sile | --sil) | |
2401 | continue ;; | |
2402 | *\'*) | |
2403 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2404 | esac | |
2405 | case $ac_pass in | |
2406 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2407 | 2) | |
2408 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2409 | if test $ac_must_keep_next = true; then | |
2410 | ac_must_keep_next=false # Got value, back to normal. | |
2411 | else | |
2412 | case $ac_arg in | |
2413 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2414 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2415 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2416 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2417 | case "$ac_configure_args0 " in | |
2418 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2419 | esac | |
2420 | ;; | |
2421 | -* ) ac_must_keep_next=true ;; | |
2422 | esac | |
2423 | fi | |
2424 | as_fn_append ac_configure_args " '$ac_arg'" | |
2425 | ;; | |
2426 | esac | |
2427 | done | |
2428 | done | |
2429 | { ac_configure_args0=; unset ac_configure_args0;} | |
2430 | { ac_configure_args1=; unset ac_configure_args1;} | |
2431 | ||
2432 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2433 | # config.log. We remove comments because anyway the quotes in there | |
2434 | # would cause problems or look ugly. | |
2435 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2436 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2437 | trap 'exit_status=$? | |
2438 | # Save into config.log some information that might help in debugging. | |
2439 | { | |
2440 | echo | |
2441 | ||
2442 | cat <<\_ASBOX | |
2443 | ## ---------------- ## | |
2444 | ## Cache variables. ## | |
2445 | ## ---------------- ## | |
2446 | _ASBOX | |
2447 | echo | |
2448 | # The following way of writing the cache mishandles newlines in values, | |
2449 | ( | |
2450 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2451 | eval ac_val=\$$ac_var | |
2452 | case $ac_val in #( | |
2453 | *${as_nl}*) | |
2454 | case $ac_var in #( | |
2455 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2456 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2457 | esac | |
2458 | case $ac_var in #( | |
2459 | _ | IFS | as_nl) ;; #( | |
2460 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2461 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2462 | esac ;; | |
2463 | esac | |
2464 | done | |
2465 | (set) 2>&1 | | |
2466 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2467 | *${as_nl}ac_space=\ *) | |
2468 | sed -n \ | |
2469 | "s/'\''/'\''\\\\'\'''\''/g; | |
2470 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2471 | ;; #( | |
2472 | *) | |
2473 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2474 | ;; | |
2475 | esac | | |
2476 | sort | |
2477 | ) | |
2478 | echo | |
2479 | ||
2480 | cat <<\_ASBOX | |
2481 | ## ----------------- ## | |
2482 | ## Output variables. ## | |
2483 | ## ----------------- ## | |
2484 | _ASBOX | |
2485 | echo | |
2486 | for ac_var in $ac_subst_vars | |
2487 | do | |
2488 | eval ac_val=\$$ac_var | |
2489 | case $ac_val in | |
2490 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2491 | esac | |
2492 | $as_echo "$ac_var='\''$ac_val'\''" | |
2493 | done | sort | |
2494 | echo | |
2495 | ||
2496 | if test -n "$ac_subst_files"; then | |
2497 | cat <<\_ASBOX | |
2498 | ## ------------------- ## | |
2499 | ## File substitutions. ## | |
2500 | ## ------------------- ## | |
2501 | _ASBOX | |
2502 | echo | |
2503 | for ac_var in $ac_subst_files | |
2504 | do | |
2505 | eval ac_val=\$$ac_var | |
2506 | case $ac_val in | |
2507 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2508 | esac | |
2509 | $as_echo "$ac_var='\''$ac_val'\''" | |
2510 | done | sort | |
2511 | echo | |
2512 | fi | |
2513 | ||
2514 | if test -s confdefs.h; then | |
2515 | cat <<\_ASBOX | |
2516 | ## ----------- ## | |
2517 | ## confdefs.h. ## | |
2518 | ## ----------- ## | |
2519 | _ASBOX | |
2520 | echo | |
2521 | cat confdefs.h | |
2522 | echo | |
2523 | fi | |
2524 | test "$ac_signal" != 0 && | |
2525 | $as_echo "$as_me: caught signal $ac_signal" | |
2526 | $as_echo "$as_me: exit $exit_status" | |
2527 | } >&5 | |
2528 | rm -f core *.core core.conftest.* && | |
2529 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2530 | exit $exit_status | |
2531 | ' 0 | |
2532 | for ac_signal in 1 2 13 15; do | |
2533 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2534 | done | |
2535 | ac_signal=0 | |
2536 | ||
2537 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2538 | rm -f -r conftest* confdefs.h | |
2539 | ||
2540 | $as_echo "/* confdefs.h */" > confdefs.h | |
2541 | ||
2542 | # Predefined preprocessor variables. | |
2543 | ||
2544 | cat >>confdefs.h <<_ACEOF | |
2545 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2546 | _ACEOF | |
2547 | ||
2548 | cat >>confdefs.h <<_ACEOF | |
2549 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2550 | _ACEOF | |
2551 | ||
2552 | cat >>confdefs.h <<_ACEOF | |
2553 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2554 | _ACEOF | |
2555 | ||
2556 | cat >>confdefs.h <<_ACEOF | |
2557 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2558 | _ACEOF | |
2559 | ||
2560 | cat >>confdefs.h <<_ACEOF | |
2561 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2562 | _ACEOF | |
2563 | ||
2564 | cat >>confdefs.h <<_ACEOF | |
2565 | #define PACKAGE_URL "$PACKAGE_URL" | |
2566 | _ACEOF | |
2567 | ||
2568 | ||
2569 | # Let the site file select an alternate cache file if it wants to. | |
2570 | # Prefer an explicitly selected file to automatically selected ones. | |
2571 | ac_site_file1=NONE | |
2572 | ac_site_file2=NONE | |
2573 | if test -n "$CONFIG_SITE"; then | |
2574 | ac_site_file1=$CONFIG_SITE | |
2575 | elif test "x$prefix" != xNONE; then | |
2576 | ac_site_file1=$prefix/share/config.site | |
2577 | ac_site_file2=$prefix/etc/config.site | |
2578 | else | |
2579 | ac_site_file1=$ac_default_prefix/share/config.site | |
2580 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2581 | fi | |
2582 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2583 | do | |
2584 | test "x$ac_site_file" = xNONE && continue | |
2585 | if test -r "$ac_site_file"; then | |
2586 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2587 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2588 | sed 's/^/| /' "$ac_site_file" >&5 | |
2589 | . "$ac_site_file" | |
2590 | fi | |
2591 | done | |
2592 | ||
2593 | if test -r "$cache_file"; then | |
2594 | # Some versions of bash will fail to source /dev/null (special | |
2595 | # files actually), so we avoid doing that. | |
2596 | if test -f "$cache_file"; then | |
2597 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2598 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2599 | case $cache_file in | |
2600 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2601 | *) . "./$cache_file";; | |
2602 | esac | |
2603 | fi | |
2604 | else | |
2605 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2606 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2607 | >$cache_file | |
bec39cab AC |
2608 | fi |
2609 | ||
81ecdfbb RW |
2610 | # Check that the precious variables saved in the cache have kept the same |
2611 | # value. | |
2612 | ac_cache_corrupted=false | |
2613 | for ac_var in $ac_precious_vars; do | |
2614 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2615 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2616 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2617 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2618 | case $ac_old_set,$ac_new_set in | |
2619 | set,) | |
2620 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2621 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2622 | ac_cache_corrupted=: ;; | |
2623 | ,set) | |
2624 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2625 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2626 | ac_cache_corrupted=: ;; | |
2627 | ,);; | |
2628 | *) | |
2629 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2630 | # differences in whitespace do not lead to failure. | |
2631 | ac_old_val_w=`echo x $ac_old_val` | |
2632 | ac_new_val_w=`echo x $ac_new_val` | |
2633 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2634 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2635 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2636 | ac_cache_corrupted=: | |
2637 | else | |
2638 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2639 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2640 | eval $ac_var=\$ac_old_val | |
2641 | fi | |
2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2643 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2644 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2645 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2646 | fi;; | |
2647 | esac | |
2648 | # Pass precious variables to config.status. | |
2649 | if test "$ac_new_set" = set; then | |
2650 | case $ac_new_val in | |
2651 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2652 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2653 | esac | |
2654 | case " $ac_configure_args " in | |
2655 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2656 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2657 | esac | |
2658 | fi | |
2659 | done | |
2660 | if $ac_cache_corrupted; then | |
2661 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2662 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2663 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2664 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2665 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2666 | fi | |
2667 | ## -------------------- ## | |
2668 | ## Main body of script. ## | |
2669 | ## -------------------- ## | |
2670 | ||
2671 | ac_ext=c | |
2672 | ac_cpp='$CPP $CPPFLAGS' | |
2673 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2674 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2675 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2676 | ||
2677 | ||
2678 | ||
2679 | ||
2680 | ||
2681 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2682 | ||
2683 | ||
2684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2685 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2686 | # Check whether --enable-maintainer-mode was given. | |
2687 | if test "${enable_maintainer_mode+set}" = set; then : | |
2688 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2689 | else | |
2690 | USE_MAINTAINER_MODE=no | |
2691 | fi | |
2692 | ||
2693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2694 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2695 | if test $USE_MAINTAINER_MODE = yes; then | |
2696 | MAINTAINER_MODE_TRUE= | |
2697 | MAINTAINER_MODE_FALSE='#' | |
2698 | else | |
2699 | MAINTAINER_MODE_TRUE='#' | |
2700 | MAINTAINER_MODE_FALSE= | |
2701 | fi | |
2702 | ||
2703 | MAINT=$MAINTAINER_MODE_TRUE | |
2704 | ||
2705 | ||
2706 | ||
17ef446e PA |
2707 | # Set the 'development' global. |
2708 | . $srcdir/development.sh | |
f5f1cdb6 | 2709 | |
81ecdfbb RW |
2710 | ac_ext=c |
2711 | ac_cpp='$CPP $CPPFLAGS' | |
2712 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2713 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2714 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2715 | if test -n "$ac_tool_prefix"; then | |
2716 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2717 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2719 | $as_echo_n "checking for $ac_word... " >&6; } | |
2720 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2721 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2722 | else |
2723 | if test -n "$CC"; then | |
2724 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2725 | else | |
bec39cab AC |
2726 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2727 | for as_dir in $PATH | |
2728 | do | |
2729 | IFS=$as_save_IFS | |
2730 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2731 | for ac_exec_ext in '' $ac_executable_extensions; do |
2732 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2733 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2734 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2735 | break 2 |
2736 | fi | |
2737 | done | |
81ecdfbb RW |
2738 | done |
2739 | IFS=$as_save_IFS | |
bec39cab | 2740 | |
c906108c SS |
2741 | fi |
2742 | fi | |
bec39cab | 2743 | CC=$ac_cv_prog_CC |
c906108c | 2744 | if test -n "$CC"; then |
81ecdfbb RW |
2745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2746 | $as_echo "$CC" >&6; } | |
c906108c | 2747 | else |
81ecdfbb RW |
2748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2749 | $as_echo "no" >&6; } | |
c906108c SS |
2750 | fi |
2751 | ||
81ecdfbb | 2752 | |
b4e70030 JB |
2753 | fi |
2754 | if test -z "$ac_cv_prog_CC"; then | |
2755 | ac_ct_CC=$CC | |
81ecdfbb RW |
2756 | # Extract the first word of "gcc", so it can be a program name with args. |
2757 | set dummy gcc; ac_word=$2 | |
2758 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2759 | $as_echo_n "checking for $ac_word... " >&6; } | |
2760 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2761 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2762 | else |
2763 | if test -n "$ac_ct_CC"; then | |
2764 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2765 | else | |
2766 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2767 | for as_dir in $PATH | |
2768 | do | |
2769 | IFS=$as_save_IFS | |
2770 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2771 | for ac_exec_ext in '' $ac_executable_extensions; do |
2772 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2773 | ac_cv_prog_ac_ct_CC="gcc" | |
2774 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2775 | break 2 |
4e8d927d | 2776 | fi |
b4e70030 | 2777 | done |
81ecdfbb RW |
2778 | done |
2779 | IFS=$as_save_IFS | |
b4e70030 JB |
2780 | |
2781 | fi | |
2782 | fi | |
2783 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2784 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2785 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2786 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2787 | else |
81ecdfbb RW |
2788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2789 | $as_echo "no" >&6; } | |
b4e70030 JB |
2790 | fi |
2791 | ||
81ecdfbb RW |
2792 | if test "x$ac_ct_CC" = x; then |
2793 | CC="" | |
2794 | else | |
2795 | case $cross_compiling:$ac_tool_warned in | |
2796 | yes:) | |
2797 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2798 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2799 | ac_tool_warned=yes ;; | |
2800 | esac | |
2801 | CC=$ac_ct_CC | |
2802 | fi | |
b4e70030 JB |
2803 | else |
2804 | CC="$ac_cv_prog_CC" | |
2805 | fi | |
2806 | ||
c906108c | 2807 | if test -z "$CC"; then |
81ecdfbb RW |
2808 | if test -n "$ac_tool_prefix"; then |
2809 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2810 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2812 | $as_echo_n "checking for $ac_word... " >&6; } | |
2813 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2814 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2815 | else |
2816 | if test -n "$CC"; then | |
2817 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2818 | else | |
bec39cab AC |
2819 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2820 | for as_dir in $PATH | |
2821 | do | |
2822 | IFS=$as_save_IFS | |
2823 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2824 | for ac_exec_ext in '' $ac_executable_extensions; do |
2825 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2826 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2827 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2828 | break 2 |
2829 | fi | |
2830 | done | |
81ecdfbb RW |
2831 | done |
2832 | IFS=$as_save_IFS | |
2833 | ||
2834 | fi | |
2835 | fi | |
2836 | CC=$ac_cv_prog_CC | |
2837 | if test -n "$CC"; then | |
2838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2839 | $as_echo "$CC" >&6; } | |
2840 | else | |
2841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2842 | $as_echo "no" >&6; } | |
2843 | fi | |
2844 | ||
2845 | ||
2846 | fi | |
2847 | fi | |
2848 | if test -z "$CC"; then | |
2849 | # Extract the first word of "cc", so it can be a program name with args. | |
2850 | set dummy cc; ac_word=$2 | |
2851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2852 | $as_echo_n "checking for $ac_word... " >&6; } | |
2853 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2854 | $as_echo_n "(cached) " >&6 | |
2855 | else | |
2856 | if test -n "$CC"; then | |
2857 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2858 | else | |
2859 | ac_prog_rejected=no | |
2860 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2861 | for as_dir in $PATH | |
2862 | do | |
2863 | IFS=$as_save_IFS | |
2864 | test -z "$as_dir" && as_dir=. | |
2865 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2866 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2867 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2868 | ac_prog_rejected=yes | |
2869 | continue | |
2870 | fi | |
2871 | ac_cv_prog_CC="cc" | |
2872 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2873 | break 2 | |
2874 | fi | |
2875 | done | |
2876 | done | |
2877 | IFS=$as_save_IFS | |
bec39cab | 2878 | |
c906108c SS |
2879 | if test $ac_prog_rejected = yes; then |
2880 | # We found a bogon in the path, so make sure we never use it. | |
2881 | set dummy $ac_cv_prog_CC | |
2882 | shift | |
bec39cab | 2883 | if test $# != 0; then |
c906108c SS |
2884 | # We chose a different compiler from the bogus one. |
2885 | # However, it has the same basename, so the bogon will be chosen | |
2886 | # first if we set CC to just the basename; use the full file name. | |
2887 | shift | |
bec39cab | 2888 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2889 | fi |
2890 | fi | |
2891 | fi | |
2892 | fi | |
bec39cab | 2893 | CC=$ac_cv_prog_CC |
c906108c | 2894 | if test -n "$CC"; then |
81ecdfbb RW |
2895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2896 | $as_echo "$CC" >&6; } | |
c906108c | 2897 | else |
81ecdfbb RW |
2898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2899 | $as_echo "no" >&6; } | |
c906108c SS |
2900 | fi |
2901 | ||
81ecdfbb | 2902 | |
bec39cab AC |
2903 | fi |
2904 | if test -z "$CC"; then | |
2905 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2906 | for ac_prog in cl.exe |
bec39cab AC |
2907 | do |
2908 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2909 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2911 | $as_echo_n "checking for $ac_word... " >&6; } | |
2912 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2913 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2914 | else |
2915 | if test -n "$CC"; then | |
2916 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2917 | else | |
bec39cab AC |
2918 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2919 | for as_dir in $PATH | |
2920 | do | |
2921 | IFS=$as_save_IFS | |
2922 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2923 | for ac_exec_ext in '' $ac_executable_extensions; do |
2924 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2925 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2926 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2927 | break 2 |
2928 | fi | |
2929 | done | |
81ecdfbb RW |
2930 | done |
2931 | IFS=$as_save_IFS | |
bec39cab | 2932 | |
c906108c SS |
2933 | fi |
2934 | fi | |
bec39cab | 2935 | CC=$ac_cv_prog_CC |
c906108c | 2936 | if test -n "$CC"; then |
81ecdfbb RW |
2937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2938 | $as_echo "$CC" >&6; } | |
c906108c | 2939 | else |
81ecdfbb RW |
2940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2941 | $as_echo "no" >&6; } | |
c906108c | 2942 | fi |
bec39cab | 2943 | |
81ecdfbb | 2944 | |
bec39cab AC |
2945 | test -n "$CC" && break |
2946 | done | |
2947 | fi | |
2948 | if test -z "$CC"; then | |
2949 | ac_ct_CC=$CC | |
81ecdfbb | 2950 | for ac_prog in cl.exe |
bec39cab AC |
2951 | do |
2952 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2953 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2955 | $as_echo_n "checking for $ac_word... " >&6; } | |
2956 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2957 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2958 | else |
2959 | if test -n "$ac_ct_CC"; then | |
2960 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2961 | else | |
2962 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2963 | for as_dir in $PATH | |
2964 | do | |
2965 | IFS=$as_save_IFS | |
2966 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2967 | for ac_exec_ext in '' $ac_executable_extensions; do |
2968 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2969 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2970 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2971 | break 2 |
c906108c | 2972 | fi |
bec39cab | 2973 | done |
81ecdfbb RW |
2974 | done |
2975 | IFS=$as_save_IFS | |
bec39cab AC |
2976 | |
2977 | fi | |
2978 | fi | |
2979 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2980 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2981 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2982 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2983 | else |
81ecdfbb RW |
2984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2985 | $as_echo "no" >&6; } | |
c906108c SS |
2986 | fi |
2987 | ||
81ecdfbb | 2988 | |
bec39cab AC |
2989 | test -n "$ac_ct_CC" && break |
2990 | done | |
c906108c | 2991 | |
81ecdfbb RW |
2992 | if test "x$ac_ct_CC" = x; then |
2993 | CC="" | |
2994 | else | |
2995 | case $cross_compiling:$ac_tool_warned in | |
2996 | yes:) | |
2997 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2998 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2999 | ac_tool_warned=yes ;; | |
3000 | esac | |
3001 | CC=$ac_ct_CC | |
3002 | fi | |
bec39cab AC |
3003 | fi |
3004 | ||
3005 | fi | |
3006 | ||
3007 | ||
81ecdfbb RW |
3008 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3009 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3010 | as_fn_error "no acceptable C compiler found in \$PATH | |
3011 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
3012 | |
3013 | # Provide some information about the compiler. | |
81ecdfbb RW |
3014 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
3015 | set X $ac_compile | |
3016 | ac_compiler=$2 | |
3017 | for ac_option in --version -v -V -qversion; do | |
3018 | { { ac_try="$ac_compiler $ac_option >&5" | |
3019 | case "(($ac_try" in | |
3020 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3021 | *) ac_try_echo=$ac_try;; | |
3022 | esac | |
3023 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3024 | $as_echo "$ac_try_echo"; } >&5 | |
3025 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3026 | ac_status=$? |
81ecdfbb RW |
3027 | if test -s conftest.err; then |
3028 | sed '10a\ | |
3029 | ... rest of stderr output deleted ... | |
3030 | 10q' conftest.err >conftest.er1 | |
3031 | cat conftest.er1 >&5 | |
3032 | rm -f conftest.er1 conftest.err | |
3033 | fi | |
3034 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3035 | test $ac_status = 0; } | |
3036 | done | |
bec39cab | 3037 | |
81ecdfbb | 3038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3039 | /* end confdefs.h. */ |
3040 | ||
3041 | int | |
3042 | main () | |
3043 | { | |
3044 | ||
3045 | ; | |
3046 | return 0; | |
3047 | } | |
3048 | _ACEOF | |
3049 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3050 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3051 | # Try to create an executable without -o first, disregard a.out. |
3052 | # It will help us diagnose broken compilers, and finding out an intuition | |
3053 | # of exeext. | |
81ecdfbb RW |
3054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3055 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3056 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3057 | ||
3058 | # The possible output files: | |
3059 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3060 | ||
3061 | ac_rmfiles= | |
3062 | for ac_file in $ac_files | |
3063 | do | |
3064 | case $ac_file in | |
3065 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3066 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3067 | esac | |
3068 | done | |
3069 | rm -f $ac_rmfiles | |
3070 | ||
3071 | if { { ac_try="$ac_link_default" | |
3072 | case "(($ac_try" in | |
3073 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3074 | *) ac_try_echo=$ac_try;; | |
3075 | esac | |
3076 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3077 | $as_echo "$ac_try_echo"; } >&5 | |
3078 | (eval "$ac_link_default") 2>&5 | |
3079 | ac_status=$? | |
3080 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3081 | test $ac_status = 0; }; then : | |
3082 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3083 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3084 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3085 | # so that the user can short-circuit this test for compilers unknown to | |
3086 | # Autoconf. | |
3087 | for ac_file in $ac_files '' | |
bec39cab AC |
3088 | do |
3089 | test -f "$ac_file" || continue | |
3090 | case $ac_file in | |
81ecdfbb | 3091 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3092 | ;; |
3093 | [ab].out ) | |
3094 | # We found the default executable, but exeext='' is most | |
3095 | # certainly right. | |
3096 | break;; | |
3097 | *.* ) | |
81ecdfbb RW |
3098 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3099 | then :; else | |
3100 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3101 | fi | |
3102 | # We set ac_cv_exeext here because the later test for it is not | |
3103 | # safe: cross compilers may not add the suffix if given an `-o' | |
3104 | # argument, so we may need to know it at that point already. | |
3105 | # Even if this section looks crufty: it has the advantage of | |
3106 | # actually working. | |
b4e70030 JB |
3107 | break;; |
3108 | * ) | |
3109 | break;; | |
bec39cab AC |
3110 | esac |
3111 | done | |
81ecdfbb RW |
3112 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3113 | ||
bec39cab | 3114 | else |
81ecdfbb RW |
3115 | ac_file='' |
3116 | fi | |
3117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3118 | $as_echo "$ac_file" >&6; } | |
3119 | if test -z "$ac_file"; then : | |
3120 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3121 | sed 's/^/| /' conftest.$ac_ext >&5 |
3122 | ||
81ecdfbb RW |
3123 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3124 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3125 | { as_fn_set_status 77 | |
3126 | as_fn_error "C compiler cannot create executables | |
3127 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3128 | fi |
b4e70030 | 3129 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3130 | |
81ecdfbb | 3131 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3132 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3134 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3135 | # If not cross compiling, check that we can run a simple program. |
3136 | if test "$cross_compiling" != yes; then | |
3137 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3138 | { { case "(($ac_try" in |
3139 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3140 | *) ac_try_echo=$ac_try;; | |
3141 | esac | |
3142 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3143 | $as_echo "$ac_try_echo"; } >&5 | |
3144 | (eval "$ac_try") 2>&5 | |
bec39cab | 3145 | ac_status=$? |
81ecdfbb RW |
3146 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3147 | test $ac_status = 0; }; }; then | |
bec39cab | 3148 | cross_compiling=no |
c906108c | 3149 | else |
bec39cab AC |
3150 | if test "$cross_compiling" = maybe; then |
3151 | cross_compiling=yes | |
3152 | else | |
81ecdfbb RW |
3153 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3154 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3155 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3156 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3157 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3158 | fi |
c906108c | 3159 | fi |
bec39cab | 3160 | fi |
81ecdfbb RW |
3161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3162 | $as_echo "yes" >&6; } | |
bec39cab | 3163 | |
81ecdfbb | 3164 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3165 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3166 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3167 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3169 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3171 | $as_echo "$cross_compiling" >&6; } | |
3172 | ||
3173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3174 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3175 | if { { ac_try="$ac_link" | |
3176 | case "(($ac_try" in | |
3177 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3178 | *) ac_try_echo=$ac_try;; | |
3179 | esac | |
3180 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3181 | $as_echo "$ac_try_echo"; } >&5 | |
3182 | (eval "$ac_link") 2>&5 | |
bec39cab | 3183 | ac_status=$? |
81ecdfbb RW |
3184 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3185 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3186 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3187 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3188 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3189 | # `rm'. | |
3190 | for ac_file in conftest.exe conftest conftest.*; do | |
3191 | test -f "$ac_file" || continue | |
3192 | case $ac_file in | |
81ecdfbb | 3193 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3194 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3195 | break;; |
3196 | * ) break;; | |
3197 | esac | |
3198 | done | |
c906108c | 3199 | else |
81ecdfbb RW |
3200 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3201 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3202 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3203 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3204 | fi |
b4e70030 | 3205 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3207 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3208 | |
b4e70030 | 3209 | rm -f conftest.$ac_ext |
bec39cab AC |
3210 | EXEEXT=$ac_cv_exeext |
3211 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3213 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3214 | if test "${ac_cv_objext+set}" = set; then : | |
3215 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3216 | else |
81ecdfbb | 3217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3218 | /* end confdefs.h. */ |
3219 | ||
3220 | int | |
3221 | main () | |
3222 | { | |
3223 | ||
3224 | ; | |
3225 | return 0; | |
3226 | } | |
3227 | _ACEOF | |
3228 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3229 | if { { ac_try="$ac_compile" |
3230 | case "(($ac_try" in | |
3231 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3232 | *) ac_try_echo=$ac_try;; | |
3233 | esac | |
3234 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3235 | $as_echo "$ac_try_echo"; } >&5 | |
3236 | (eval "$ac_compile") 2>&5 | |
3237 | ac_status=$? | |
3238 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3239 | test $ac_status = 0; }; then : | |
3240 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3241 | test -f "$ac_file" || continue; | |
bec39cab | 3242 | case $ac_file in |
81ecdfbb | 3243 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3244 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3245 | break;; | |
3246 | esac | |
3247 | done | |
c906108c | 3248 | else |
81ecdfbb | 3249 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3250 | sed 's/^/| /' conftest.$ac_ext >&5 |
3251 | ||
81ecdfbb RW |
3252 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3253 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3254 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3255 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3256 | fi |
b4e70030 | 3257 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3258 | fi |
81ecdfbb RW |
3259 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3260 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3261 | OBJEXT=$ac_cv_objext |
3262 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3264 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3265 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3266 | $as_echo_n "(cached) " >&6 | |
c906108c | 3267 | else |
81ecdfbb | 3268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3269 | /* end confdefs.h. */ |
3270 | ||
3271 | int | |
3272 | main () | |
3273 | { | |
3274 | #ifndef __GNUC__ | |
3275 | choke me | |
3276 | #endif | |
3277 | ||
3278 | ; | |
3279 | return 0; | |
3280 | } | |
3281 | _ACEOF | |
81ecdfbb | 3282 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3283 | ac_compiler_gnu=yes |
3284 | else | |
81ecdfbb | 3285 | ac_compiler_gnu=no |
bec39cab | 3286 | fi |
81ecdfbb | 3287 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3288 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3289 | ||
3290 | fi | |
81ecdfbb RW |
3291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3292 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3293 | if test $ac_compiler_gnu = yes; then | |
3294 | GCC=yes | |
3295 | else | |
3296 | GCC= | |
3297 | fi | |
bec39cab AC |
3298 | ac_test_CFLAGS=${CFLAGS+set} |
3299 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3301 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3302 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3303 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3304 | else |
81ecdfbb RW |
3305 | ac_save_c_werror_flag=$ac_c_werror_flag |
3306 | ac_c_werror_flag=yes | |
3307 | ac_cv_prog_cc_g=no | |
3308 | CFLAGS="-g" | |
3309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3310 | /* end confdefs.h. */ |
3311 | ||
3312 | int | |
3313 | main () | |
3314 | { | |
3315 | ||
3316 | ; | |
3317 | return 0; | |
3318 | } | |
3319 | _ACEOF | |
81ecdfbb | 3320 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3321 | ac_cv_prog_cc_g=yes |
3322 | else | |
81ecdfbb RW |
3323 | CFLAGS="" |
3324 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3325 | /* end confdefs.h. */ | |
3326 | ||
3327 | int | |
3328 | main () | |
3329 | { | |
3330 | ||
3331 | ; | |
3332 | return 0; | |
3333 | } | |
3334 | _ACEOF | |
3335 | if ac_fn_c_try_compile "$LINENO"; then : | |
3336 | ||
3337 | else | |
3338 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3339 | CFLAGS="-g" | |
3340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3341 | /* end confdefs.h. */ | |
3342 | ||
3343 | int | |
3344 | main () | |
3345 | { | |
c906108c | 3346 | |
81ecdfbb RW |
3347 | ; |
3348 | return 0; | |
3349 | } | |
3350 | _ACEOF | |
3351 | if ac_fn_c_try_compile "$LINENO"; then : | |
3352 | ac_cv_prog_cc_g=yes | |
3353 | fi | |
3354 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3355 | fi | |
3356 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3357 | fi |
81ecdfbb RW |
3358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3359 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3360 | fi |
81ecdfbb RW |
3361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3362 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3363 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3364 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3365 | elif test $ac_cv_prog_cc_g = yes; then |
3366 | if test "$GCC" = yes; then | |
3367 | CFLAGS="-g -O2" | |
3368 | else | |
3369 | CFLAGS="-g" | |
3370 | fi | |
3371 | else | |
3372 | if test "$GCC" = yes; then | |
3373 | CFLAGS="-O2" | |
3374 | else | |
3375 | CFLAGS= | |
3376 | fi | |
3377 | fi | |
81ecdfbb RW |
3378 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3379 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3380 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3381 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3382 | else |
81ecdfbb | 3383 | ac_cv_prog_cc_c89=no |
bec39cab | 3384 | ac_save_CC=$CC |
81ecdfbb | 3385 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3386 | /* end confdefs.h. */ |
c906108c SS |
3387 | #include <stdarg.h> |
3388 | #include <stdio.h> | |
3389 | #include <sys/types.h> | |
3390 | #include <sys/stat.h> | |
3391 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3392 | struct buf { int x; }; | |
3393 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3394 | static char *e (p, i) | |
3395 | char **p; | |
3396 | int i; | |
3397 | { | |
3398 | return p[i]; | |
3399 | } | |
3400 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3401 | { | |
3402 | char *s; | |
3403 | va_list v; | |
3404 | va_start (v,p); | |
3405 | s = g (p, va_arg (v,int)); | |
3406 | va_end (v); | |
3407 | return s; | |
3408 | } | |
bec39cab AC |
3409 | |
3410 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3411 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3412 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3413 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3414 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3415 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3416 | that's true only with -std. */ |
bec39cab AC |
3417 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3418 | ||
81ecdfbb RW |
3419 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3420 | inside strings and character constants. */ | |
3421 | #define FOO(x) 'x' | |
3422 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3423 | ||
c906108c SS |
3424 | int test (int i, double x); |
3425 | struct s1 {int (*f) (int a);}; | |
3426 | struct s2 {int (*f) (double a);}; | |
3427 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3428 | int argc; | |
3429 | char **argv; | |
bec39cab AC |
3430 | int |
3431 | main () | |
3432 | { | |
c906108c | 3433 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3434 | ; |
3435 | return 0; | |
3436 | } | |
3437 | _ACEOF | |
81ecdfbb RW |
3438 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3439 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3440 | do |
3441 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3442 | if ac_fn_c_try_compile "$LINENO"; then : |
3443 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3444 | fi |
81ecdfbb RW |
3445 | rm -f core conftest.err conftest.$ac_objext |
3446 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3447 | done |
81ecdfbb | 3448 | rm -f conftest.$ac_ext |
bec39cab | 3449 | CC=$ac_save_CC |
c906108c SS |
3450 | |
3451 | fi | |
81ecdfbb RW |
3452 | # AC_CACHE_VAL |
3453 | case "x$ac_cv_prog_cc_c89" in | |
3454 | x) | |
3455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3456 | $as_echo "none needed" >&6; } ;; | |
3457 | xno) | |
3458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3459 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3460 | *) |
81ecdfbb RW |
3461 | CC="$CC $ac_cv_prog_cc_c89" |
3462 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3463 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3464 | esac |
81ecdfbb | 3465 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3466 | |
b4e70030 JB |
3467 | fi |
3468 | ||
bec39cab AC |
3469 | ac_ext=c |
3470 | ac_cpp='$CPP $CPPFLAGS' | |
3471 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3472 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3473 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3474 | |
60ca704f | 3475 | |
bec39cab AC |
3476 | ac_ext=c |
3477 | ac_cpp='$CPP $CPPFLAGS' | |
3478 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3479 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3480 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3482 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3483 | # On Suns, sometimes $CPP names a directory. |
3484 | if test -n "$CPP" && test -d "$CPP"; then | |
3485 | CPP= | |
8bb2c122 | 3486 | fi |
bec39cab | 3487 | if test -z "$CPP"; then |
81ecdfbb RW |
3488 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3489 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3490 | else |
3491 | # Double quotes because CPP needs to be expanded | |
3492 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3493 | do | |
3494 | ac_preproc_ok=false | |
3495 | for ac_c_preproc_warn_flag in '' yes | |
3496 | do | |
3497 | # Use a header file that comes with gcc, so configuring glibc | |
3498 | # with a fresh cross-compiler works. | |
3499 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3500 | # <limits.h> exists even on freestanding compilers. | |
3501 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3502 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3504 | /* end confdefs.h. */ |
3505 | #ifdef __STDC__ | |
3506 | # include <limits.h> | |
3507 | #else | |
3508 | # include <assert.h> | |
3509 | #endif | |
3510 | Syntax error | |
3511 | _ACEOF | |
81ecdfbb | 3512 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3513 | |
81ecdfbb | 3514 | else |
bec39cab AC |
3515 | # Broken: fails on valid input. |
3516 | continue | |
3517 | fi | |
3518 | rm -f conftest.err conftest.$ac_ext | |
3519 | ||
81ecdfbb | 3520 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3521 | # can be detected and how. |
81ecdfbb | 3522 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3523 | /* end confdefs.h. */ |
3524 | #include <ac_nonexistent.h> | |
3525 | _ACEOF | |
81ecdfbb | 3526 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3527 | # Broken: success on invalid input. |
3528 | continue | |
8bb2c122 | 3529 | else |
bec39cab AC |
3530 | # Passes both tests. |
3531 | ac_preproc_ok=: | |
3532 | break | |
8bb2c122 | 3533 | fi |
bec39cab | 3534 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3535 | |
bec39cab AC |
3536 | done |
3537 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3538 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3539 | if $ac_preproc_ok; then : |
bec39cab AC |
3540 | break |
3541 | fi | |
8bb2c122 | 3542 | |
bec39cab AC |
3543 | done |
3544 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3545 | |
c906108c | 3546 | fi |
bec39cab AC |
3547 | CPP=$ac_cv_prog_CPP |
3548 | else | |
3549 | ac_cv_prog_CPP=$CPP | |
c906108c | 3550 | fi |
81ecdfbb RW |
3551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3552 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3553 | ac_preproc_ok=false |
3554 | for ac_c_preproc_warn_flag in '' yes | |
3555 | do | |
3556 | # Use a header file that comes with gcc, so configuring glibc | |
3557 | # with a fresh cross-compiler works. | |
3558 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3559 | # <limits.h> exists even on freestanding compilers. | |
3560 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3561 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3563 | /* end confdefs.h. */ |
3564 | #ifdef __STDC__ | |
3565 | # include <limits.h> | |
3566 | #else | |
3567 | # include <assert.h> | |
3568 | #endif | |
3569 | Syntax error | |
3570 | _ACEOF | |
81ecdfbb | 3571 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3572 | |
81ecdfbb | 3573 | else |
bec39cab AC |
3574 | # Broken: fails on valid input. |
3575 | continue | |
3576 | fi | |
3577 | rm -f conftest.err conftest.$ac_ext | |
3578 | ||
81ecdfbb | 3579 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3580 | # can be detected and how. |
81ecdfbb | 3581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3582 | /* end confdefs.h. */ |
3583 | #include <ac_nonexistent.h> | |
3584 | _ACEOF | |
81ecdfbb | 3585 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3586 | # Broken: success on invalid input. |
3587 | continue | |
c906108c | 3588 | else |
bec39cab AC |
3589 | # Passes both tests. |
3590 | ac_preproc_ok=: | |
3591 | break | |
c906108c | 3592 | fi |
bec39cab | 3593 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3594 | |
bec39cab AC |
3595 | done |
3596 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3597 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3598 | if $ac_preproc_ok; then : |
3599 | ||
c906108c | 3600 | else |
81ecdfbb RW |
3601 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3602 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3603 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3604 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3605 | fi |
c906108c | 3606 | |
bec39cab AC |
3607 | ac_ext=c |
3608 | ac_cpp='$CPP $CPPFLAGS' | |
3609 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3610 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3611 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3612 | ||
3613 | ||
81ecdfbb RW |
3614 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3615 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3616 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3617 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3618 | else |
81ecdfbb RW |
3619 | if test -z "$GREP"; then |
3620 | ac_path_GREP_found=false | |
3621 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3622 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3623 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3624 | do | |
3625 | IFS=$as_save_IFS | |
3626 | test -z "$as_dir" && as_dir=. | |
3627 | for ac_prog in grep ggrep; do | |
3628 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3629 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3630 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3631 | # Check for GNU ac_path_GREP and select it if it is found. | |
3632 | # Check for GNU $ac_path_GREP | |
3633 | case `"$ac_path_GREP" --version 2>&1` in | |
3634 | *GNU*) | |
3635 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3636 | *) | |
3637 | ac_count=0 | |
3638 | $as_echo_n 0123456789 >"conftest.in" | |
3639 | while : | |
3640 | do | |
3641 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3642 | mv "conftest.tmp" "conftest.in" | |
3643 | cp "conftest.in" "conftest.nl" | |
3644 | $as_echo 'GREP' >> "conftest.nl" | |
3645 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3646 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3647 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3648 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3649 | # Best one so far, save it but keep looking for a better one | |
3650 | ac_cv_path_GREP="$ac_path_GREP" | |
3651 | ac_path_GREP_max=$ac_count | |
bec39cab | 3652 | fi |
81ecdfbb RW |
3653 | # 10*(2^10) chars as input seems more than enough |
3654 | test $ac_count -gt 10 && break | |
3655 | done | |
3656 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3657 | esac | |
bec39cab | 3658 | |
81ecdfbb RW |
3659 | $ac_path_GREP_found && break 3 |
3660 | done | |
3661 | done | |
3662 | done | |
3663 | IFS=$as_save_IFS | |
3664 | if test -z "$ac_cv_path_GREP"; then | |
3665 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3666 | fi | |
c906108c | 3667 | else |
81ecdfbb | 3668 | ac_cv_path_GREP=$GREP |
c906108c | 3669 | fi |
c906108c | 3670 | |
81ecdfbb RW |
3671 | fi |
3672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3673 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3674 | GREP="$ac_cv_path_GREP" | |
c906108c | 3675 | |
c906108c | 3676 | |
81ecdfbb RW |
3677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3678 | $as_echo_n "checking for egrep... " >&6; } | |
3679 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3680 | $as_echo_n "(cached) " >&6 | |
783e057b | 3681 | else |
81ecdfbb RW |
3682 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3683 | then ac_cv_path_EGREP="$GREP -E" | |
3684 | else | |
3685 | if test -z "$EGREP"; then | |
3686 | ac_path_EGREP_found=false | |
3687 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3688 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3689 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3690 | do |
3691 | IFS=$as_save_IFS | |
3692 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3693 | for ac_prog in egrep; do |
3694 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3695 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3696 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3697 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3698 | # Check for GNU $ac_path_EGREP | |
3699 | case `"$ac_path_EGREP" --version 2>&1` in | |
3700 | *GNU*) | |
3701 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3702 | *) | |
3703 | ac_count=0 | |
3704 | $as_echo_n 0123456789 >"conftest.in" | |
3705 | while : | |
3706 | do | |
3707 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3708 | mv "conftest.tmp" "conftest.in" | |
3709 | cp "conftest.in" "conftest.nl" | |
3710 | $as_echo 'EGREP' >> "conftest.nl" | |
3711 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3712 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3713 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3714 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3715 | # Best one so far, save it but keep looking for a better one | |
3716 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3717 | ac_path_EGREP_max=$ac_count | |
3718 | fi | |
3719 | # 10*(2^10) chars as input seems more than enough | |
3720 | test $ac_count -gt 10 && break | |
3721 | done | |
3722 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3723 | esac | |
bec39cab | 3724 | |
81ecdfbb RW |
3725 | $ac_path_EGREP_found && break 3 |
3726 | done | |
3727 | done | |
3728 | done | |
3729 | IFS=$as_save_IFS | |
3730 | if test -z "$ac_cv_path_EGREP"; then | |
3731 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3732 | fi |
783e057b | 3733 | else |
81ecdfbb | 3734 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3735 | fi |
3736 | ||
81ecdfbb | 3737 | fi |
783e057b | 3738 | fi |
81ecdfbb RW |
3739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3740 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3741 | EGREP="$ac_cv_path_EGREP" | |
3742 | ||
783e057b | 3743 | |
81ecdfbb RW |
3744 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3745 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3746 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3747 | $as_echo_n "(cached) " >&6 | |
783e057b | 3748 | else |
81ecdfbb | 3749 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3750 | /* end confdefs.h. */ |
783e057b | 3751 | #include <stdlib.h> |
bec39cab | 3752 | #include <stdarg.h> |
783e057b DJ |
3753 | #include <string.h> |
3754 | #include <float.h> | |
c906108c | 3755 | |
bec39cab AC |
3756 | int |
3757 | main () | |
3758 | { | |
c906108c | 3759 | |
bec39cab AC |
3760 | ; |
3761 | return 0; | |
3762 | } | |
3763 | _ACEOF | |
81ecdfbb | 3764 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3765 | ac_cv_header_stdc=yes |
c906108c | 3766 | else |
81ecdfbb | 3767 | ac_cv_header_stdc=no |
c906108c | 3768 | fi |
81ecdfbb | 3769 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3770 | |
783e057b DJ |
3771 | if test $ac_cv_header_stdc = yes; then |
3772 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3773 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3774 | /* end confdefs.h. */ |
3775 | #include <string.h> | |
c906108c | 3776 | |
783e057b DJ |
3777 | _ACEOF |
3778 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3779 | $EGREP "memchr" >/dev/null 2>&1; then : |
3780 | ||
c906108c | 3781 | else |
783e057b | 3782 | ac_cv_header_stdc=no |
c906108c | 3783 | fi |
783e057b | 3784 | rm -f conftest* |
c906108c SS |
3785 | |
3786 | fi | |
3787 | ||
783e057b DJ |
3788 | if test $ac_cv_header_stdc = yes; then |
3789 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3790 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3791 | /* end confdefs.h. */ |
3792 | #include <stdlib.h> | |
bec39cab | 3793 | |
783e057b DJ |
3794 | _ACEOF |
3795 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3796 | $EGREP "free" >/dev/null 2>&1; then : |
3797 | ||
bec39cab | 3798 | else |
783e057b | 3799 | ac_cv_header_stdc=no |
bec39cab | 3800 | fi |
783e057b | 3801 | rm -f conftest* |
bec39cab AC |
3802 | |
3803 | fi | |
bec39cab | 3804 | |
783e057b DJ |
3805 | if test $ac_cv_header_stdc = yes; then |
3806 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3807 | if test "$cross_compiling" = yes; then : |
783e057b | 3808 | : |
bec39cab | 3809 | else |
81ecdfbb | 3810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3811 | /* end confdefs.h. */ |
3812 | #include <ctype.h> | |
81ecdfbb | 3813 | #include <stdlib.h> |
783e057b DJ |
3814 | #if ((' ' & 0x0FF) == 0x020) |
3815 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3816 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3817 | #else | |
3818 | # define ISLOWER(c) \ | |
3819 | (('a' <= (c) && (c) <= 'i') \ | |
3820 | || ('j' <= (c) && (c) <= 'r') \ | |
3821 | || ('s' <= (c) && (c) <= 'z')) | |
3822 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3823 | #endif | |
3824 | ||
3825 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3826 | int | |
3827 | main () | |
3828 | { | |
3829 | int i; | |
3830 | for (i = 0; i < 256; i++) | |
3831 | if (XOR (islower (i), ISLOWER (i)) | |
3832 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3833 | return 2; |
3834 | return 0; | |
783e057b DJ |
3835 | } |
3836 | _ACEOF | |
81ecdfbb | 3837 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3838 | |
81ecdfbb RW |
3839 | else |
3840 | ac_cv_header_stdc=no | |
783e057b | 3841 | fi |
81ecdfbb RW |
3842 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3843 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3844 | fi |
81ecdfbb | 3845 | |
783e057b DJ |
3846 | fi |
3847 | fi | |
81ecdfbb RW |
3848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3849 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3850 | if test $ac_cv_header_stdc = yes; then |
3851 | ||
81ecdfbb | 3852 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3853 | |
3854 | fi | |
3855 | ||
3856 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3857 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3858 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3859 | do : |
3860 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3861 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3862 | " | |
3863 | eval as_val=\$$as_ac_Header | |
3864 | if test "x$as_val" = x""yes; then : | |
783e057b | 3865 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3866 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3867 | _ACEOF |
3868 | ||
3869 | fi | |
3870 | ||
3871 | done | |
3872 | ||
3873 | ||
3874 | ||
81ecdfbb RW |
3875 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3876 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3877 | MINIX=yes |
3878 | else | |
3879 | MINIX= | |
3880 | fi | |
3881 | ||
3882 | ||
3883 | if test "$MINIX" = yes; then | |
3884 | ||
81ecdfbb | 3885 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3886 | |
3887 | ||
81ecdfbb | 3888 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3889 | |
3890 | ||
81ecdfbb | 3891 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3892 | |
3893 | fi | |
3894 | ||
3895 | ||
81ecdfbb RW |
3896 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3897 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3898 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3899 | $as_echo_n "(cached) " >&6 | |
783e057b | 3900 | else |
81ecdfbb | 3901 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3902 | /* end confdefs.h. */ |
3903 | ||
c971b7fa PA |
3904 | # define __EXTENSIONS__ 1 |
3905 | $ac_includes_default | |
783e057b DJ |
3906 | int |
3907 | main () | |
3908 | { | |
3909 | ||
3910 | ; | |
3911 | return 0; | |
3912 | } | |
3913 | _ACEOF | |
81ecdfbb | 3914 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3915 | ac_cv_safe_to_define___extensions__=yes |
3916 | else | |
81ecdfbb | 3917 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3918 | fi |
81ecdfbb | 3919 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3920 | fi |
81ecdfbb RW |
3921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3922 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3923 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3924 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3925 | |
81ecdfbb | 3926 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3927 | |
81ecdfbb | 3928 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3929 | |
81ecdfbb | 3930 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3931 | |
81ecdfbb | 3932 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3933 | |
3934 | ||
c971b7fa PA |
3935 | ac_aux_dir= |
3936 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3937 | for ac_t in install-sh install.sh shtool; do | |
3938 | if test -f "$ac_dir/$ac_t"; then | |
3939 | ac_aux_dir=$ac_dir | |
3940 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3941 | break 2 | |
3942 | fi | |
3943 | done | |
3944 | done | |
3945 | if test -z "$ac_aux_dir"; then | |
3946 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3947 | fi | |
770d76d7 | 3948 | |
c971b7fa PA |
3949 | # These three variables are undocumented and unsupported, |
3950 | # and are intended to be withdrawn in a future Autoconf release. | |
3951 | # They can cause serious problems if a builder's source tree is in a directory | |
3952 | # whose full name contains unusual characters. | |
3953 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3954 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3955 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3956 | |
770d76d7 | 3957 | |
c971b7fa PA |
3958 | # Make sure we can run config.sub. |
3959 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3960 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3961 | |
c971b7fa PA |
3962 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3963 | $as_echo_n "checking build system type... " >&6; } | |
3964 | if test "${ac_cv_build+set}" = set; then : | |
3965 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3966 | else |
c971b7fa PA |
3967 | ac_build_alias=$build_alias |
3968 | test "x$ac_build_alias" = x && | |
3969 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3970 | test "x$ac_build_alias" = x && | |
3971 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3972 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3973 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3974 | ||
770d76d7 | 3975 | fi |
c971b7fa PA |
3976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3977 | $as_echo "$ac_cv_build" >&6; } | |
3978 | case $ac_cv_build in | |
3979 | *-*-*) ;; | |
3980 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3981 | esac |
c971b7fa PA |
3982 | build=$ac_cv_build |
3983 | ac_save_IFS=$IFS; IFS='-' | |
3984 | set x $ac_cv_build | |
3985 | shift | |
3986 | build_cpu=$1 | |
3987 | build_vendor=$2 | |
3988 | shift; shift | |
3989 | # Remember, the first character of IFS is used to create $*, | |
3990 | # except with old shells: | |
3991 | build_os=$* | |
3992 | IFS=$ac_save_IFS | |
3993 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
3994 | |
3995 | ||
c971b7fa PA |
3996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
3997 | $as_echo_n "checking host system type... " >&6; } | |
3998 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
3999 | $as_echo_n "(cached) " >&6 |
4000 | else | |
c971b7fa PA |
4001 | if test "x$host_alias" = x; then |
4002 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 4003 | else |
c971b7fa PA |
4004 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
4005 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 4006 | fi |
81ecdfbb RW |
4007 | |
4008 | fi | |
c971b7fa PA |
4009 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
4010 | $as_echo "$ac_cv_host" >&6; } | |
4011 | case $ac_cv_host in | |
4012 | *-*-*) ;; | |
4013 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 4014 | esac |
c971b7fa PA |
4015 | host=$ac_cv_host |
4016 | ac_save_IFS=$IFS; IFS='-' | |
4017 | set x $ac_cv_host | |
4018 | shift | |
4019 | host_cpu=$1 | |
4020 | host_vendor=$2 | |
4021 | shift; shift | |
4022 | # Remember, the first character of IFS is used to create $*, | |
4023 | # except with old shells: | |
4024 | host_os=$* | |
4025 | IFS=$ac_save_IFS | |
4026 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4027 | |
4028 | ||
4029 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4030 | $as_echo_n "checking target system type... " >&6; } | |
4031 | if test "${ac_cv_target+set}" = set; then : | |
4032 | $as_echo_n "(cached) " >&6 | |
4033 | else | |
4034 | if test "x$target_alias" = x; then | |
4035 | ac_cv_target=$ac_cv_host | |
4036 | else | |
4037 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4038 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4039 | fi | |
4040 | ||
4041 | fi | |
4042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4043 | $as_echo "$ac_cv_target" >&6; } | |
4044 | case $ac_cv_target in | |
4045 | *-*-*) ;; | |
4046 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4047 | esac | |
4048 | target=$ac_cv_target | |
4049 | ac_save_IFS=$IFS; IFS='-' | |
4050 | set x $ac_cv_target | |
4051 | shift | |
4052 | target_cpu=$1 | |
4053 | target_vendor=$2 | |
4054 | shift; shift | |
4055 | # Remember, the first character of IFS is used to create $*, | |
4056 | # except with old shells: | |
4057 | target_os=$* | |
4058 | IFS=$ac_save_IFS | |
4059 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4060 | ||
4061 | ||
4062 | # The aliases save the names the user supplied, while $host etc. | |
4063 | # will get canonicalized. | |
4064 | test -n "$target_alias" && | |
4065 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4066 | NONENONEs,x,x, && | |
4067 | program_prefix=${target_alias}- | |
4068 | ||
4069 | # The tests for host and target for $enable_largefile require | |
4070 | # canonical names. | |
4071 | ||
4072 | ||
81ecdfbb | 4073 | |
da2f07f1 JK |
4074 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4075 | # even in directories otherwise not depending on the $plugins option. | |
4076 | ||
4077 | ||
4078 | # Check whether --enable-plugins was given. | |
4079 | if test "${enable_plugins+set}" = set; then : | |
4080 | enableval=$enable_plugins; case "${enableval}" in | |
4081 | yes | "") plugins=yes ;; | |
4082 | no) plugins=no ;; | |
4083 | *) plugins=yes ;; | |
4084 | esac | |
4085 | else | |
4086 | plugins=no | |
4087 | fi | |
4088 | ||
4089 | ||
4090 | ||
4091 | case "${host}" in | |
4092 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4093 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4094 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4095 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4096 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4097 | # large-file support through the --enable-largefile switch, disable | |
4098 | # large-file support in favor of procfs support. | |
4099 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4100 | && : ${enable_largefile="no"} | |
4101 | ;; | |
4102 | esac | |
4103 | ||
4104 | # Check whether --enable-largefile was given. | |
4105 | if test "${enable_largefile+set}" = set; then : | |
4106 | enableval=$enable_largefile; | |
4107 | fi | |
4108 | ||
4109 | if test "$enable_largefile" != no; then | |
4110 | ||
4111 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4112 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4113 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4114 | $as_echo_n "(cached) " >&6 | |
4115 | else | |
4116 | ac_cv_sys_largefile_CC=no | |
4117 | if test "$GCC" != yes; then | |
4118 | ac_save_CC=$CC | |
4119 | while :; do | |
4120 | # IRIX 6.2 and later do not support large files by default, | |
4121 | # so use the C compiler's -n32 option if that helps. | |
4122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4123 | /* end confdefs.h. */ | |
4124 | #include <sys/types.h> | |
4125 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4126 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4127 | since some C++ compilers masquerading as C compilers | |
4128 | incorrectly reject 9223372036854775807. */ | |
4129 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4130 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4131 | && LARGE_OFF_T % 2147483647 == 1) | |
4132 | ? 1 : -1]; | |
4133 | int | |
4134 | main () | |
4135 | { | |
4136 | ||
4137 | ; | |
4138 | return 0; | |
4139 | } | |
4140 | _ACEOF | |
4141 | if ac_fn_c_try_compile "$LINENO"; then : | |
4142 | break | |
4143 | fi | |
4144 | rm -f core conftest.err conftest.$ac_objext | |
4145 | CC="$CC -n32" | |
4146 | if ac_fn_c_try_compile "$LINENO"; then : | |
4147 | ac_cv_sys_largefile_CC=' -n32'; break | |
4148 | fi | |
4149 | rm -f core conftest.err conftest.$ac_objext | |
4150 | break | |
4151 | done | |
4152 | CC=$ac_save_CC | |
4153 | rm -f conftest.$ac_ext | |
4154 | fi | |
4155 | fi | |
4156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4157 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4158 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4159 | CC=$CC$ac_cv_sys_largefile_CC | |
4160 | fi | |
4161 | ||
4162 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4163 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4164 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4165 | $as_echo_n "(cached) " >&6 | |
4166 | else | |
4167 | while :; do | |
4168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4169 | /* end confdefs.h. */ | |
4170 | #include <sys/types.h> | |
4171 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4172 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4173 | since some C++ compilers masquerading as C compilers | |
4174 | incorrectly reject 9223372036854775807. */ | |
4175 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4176 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4177 | && LARGE_OFF_T % 2147483647 == 1) | |
4178 | ? 1 : -1]; | |
4179 | int | |
4180 | main () | |
4181 | { | |
4182 | ||
4183 | ; | |
4184 | return 0; | |
4185 | } | |
4186 | _ACEOF | |
4187 | if ac_fn_c_try_compile "$LINENO"; then : | |
4188 | ac_cv_sys_file_offset_bits=no; break | |
4189 | fi | |
4190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4191 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4192 | /* end confdefs.h. */ | |
4193 | #define _FILE_OFFSET_BITS 64 | |
4194 | #include <sys/types.h> | |
4195 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4196 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4197 | since some C++ compilers masquerading as C compilers | |
4198 | incorrectly reject 9223372036854775807. */ | |
4199 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4200 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4201 | && LARGE_OFF_T % 2147483647 == 1) | |
4202 | ? 1 : -1]; | |
4203 | int | |
4204 | main () | |
4205 | { | |
4206 | ||
4207 | ; | |
4208 | return 0; | |
4209 | } | |
4210 | _ACEOF | |
4211 | if ac_fn_c_try_compile "$LINENO"; then : | |
4212 | ac_cv_sys_file_offset_bits=64; break | |
4213 | fi | |
4214 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4215 | ac_cv_sys_file_offset_bits=unknown | |
4216 | break | |
4217 | done | |
4218 | fi | |
4219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4220 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4221 | case $ac_cv_sys_file_offset_bits in #( | |
4222 | no | unknown) ;; | |
4223 | *) | |
4224 | cat >>confdefs.h <<_ACEOF | |
4225 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4226 | _ACEOF | |
4227 | ;; | |
4228 | esac | |
4229 | rm -rf conftest* | |
4230 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4232 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4233 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4234 | $as_echo_n "(cached) " >&6 | |
4235 | else | |
4236 | while :; do | |
4237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4238 | /* end confdefs.h. */ | |
4239 | #include <sys/types.h> | |
4240 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4241 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4242 | since some C++ compilers masquerading as C compilers | |
4243 | incorrectly reject 9223372036854775807. */ | |
4244 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4245 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4246 | && LARGE_OFF_T % 2147483647 == 1) | |
4247 | ? 1 : -1]; | |
4248 | int | |
4249 | main () | |
4250 | { | |
4251 | ||
4252 | ; | |
4253 | return 0; | |
4254 | } | |
4255 | _ACEOF | |
4256 | if ac_fn_c_try_compile "$LINENO"; then : | |
4257 | ac_cv_sys_large_files=no; break | |
4258 | fi | |
4259 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4260 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4261 | /* end confdefs.h. */ | |
4262 | #define _LARGE_FILES 1 | |
4263 | #include <sys/types.h> | |
4264 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4265 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4266 | since some C++ compilers masquerading as C compilers | |
4267 | incorrectly reject 9223372036854775807. */ | |
4268 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4269 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4270 | && LARGE_OFF_T % 2147483647 == 1) | |
4271 | ? 1 : -1]; | |
4272 | int | |
4273 | main () | |
4274 | { | |
4275 | ||
4276 | ; | |
4277 | return 0; | |
4278 | } | |
4279 | _ACEOF | |
4280 | if ac_fn_c_try_compile "$LINENO"; then : | |
4281 | ac_cv_sys_large_files=1; break | |
4282 | fi | |
4283 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4284 | ac_cv_sys_large_files=unknown | |
4285 | break | |
4286 | done | |
4287 | fi | |
4288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4289 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4290 | case $ac_cv_sys_large_files in #( | |
4291 | no | unknown) ;; | |
4292 | *) | |
4293 | cat >>confdefs.h <<_ACEOF | |
4294 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4295 | _ACEOF | |
4296 | ;; | |
4297 | esac | |
4298 | rm -rf conftest* | |
4299 | fi | |
4300 | fi | |
4301 | ||
4302 | ||
4303 | ||
81ecdfbb RW |
4304 | |
4305 | ||
4306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4307 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4308 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4309 | $as_echo_n "(cached) " >&6 | |
4310 | else | |
4311 | am_cv_prog_cc_stdc=no | |
4312 | ac_save_CC="$CC" | |
4313 | # Don't try gcc -ansi; that turns off useful extensions and | |
4314 | # breaks some systems' header files. | |
4315 | # AIX -qlanglvl=ansi | |
4316 | # Ultrix and OSF/1 -std1 | |
4317 | # HP-UX 10.20 and later -Ae | |
4318 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4319 | # SVR4 -Xc -D__EXTENSIONS__ | |
4320 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4321 | do | |
783e057b | 4322 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4324 | /* end confdefs.h. */ |
4325 | #include <stdarg.h> | |
4326 | #include <stdio.h> | |
4327 | #include <sys/types.h> | |
4328 | #include <sys/stat.h> | |
4329 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4330 | struct buf { int x; }; | |
4331 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4332 | static char *e (p, i) | |
4333 | char **p; | |
4334 | int i; | |
4335 | { | |
4336 | return p[i]; | |
4337 | } | |
4338 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4339 | { | |
4340 | char *s; | |
4341 | va_list v; | |
4342 | va_start (v,p); | |
4343 | s = g (p, va_arg (v,int)); | |
4344 | va_end (v); | |
4345 | return s; | |
4346 | } | |
4347 | int test (int i, double x); | |
4348 | struct s1 {int (*f) (int a);}; | |
4349 | struct s2 {int (*f) (double a);}; | |
4350 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4351 | int argc; | |
4352 | char **argv; | |
4353 | ||
4354 | int | |
4355 | main () | |
4356 | { | |
4357 | ||
4358 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4359 | ||
4360 | ; | |
4361 | return 0; | |
4362 | } | |
4363 | _ACEOF | |
81ecdfbb | 4364 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4365 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4366 | fi |
81ecdfbb | 4367 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4368 | done |
4369 | CC="$ac_save_CC" | |
4370 | ||
4371 | fi | |
4372 | ||
4373 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4374 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4375 | $as_echo "none needed" >&6; } | |
783e057b | 4376 | else |
81ecdfbb RW |
4377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4378 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4379 | fi |
4380 | case "x$am_cv_prog_cc_stdc" in | |
4381 | x|xno) ;; | |
4382 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4383 | esac | |
4384 | ||
4385 | ||
4386 | ac_aux_dir= | |
81ecdfbb RW |
4387 | for ac_dir in .. "$srcdir"/..; do |
4388 | for ac_t in install-sh install.sh shtool; do | |
4389 | if test -f "$ac_dir/$ac_t"; then | |
4390 | ac_aux_dir=$ac_dir | |
4391 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4392 | break 2 | |
4393 | fi | |
4394 | done | |
783e057b DJ |
4395 | done |
4396 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4397 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4398 | fi |
81ecdfbb RW |
4399 | |
4400 | # These three variables are undocumented and unsupported, | |
4401 | # and are intended to be withdrawn in a future Autoconf release. | |
4402 | # They can cause serious problems if a builder's source tree is in a directory | |
4403 | # whose full name contains unusual characters. | |
4404 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4405 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4406 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4407 | ||
783e057b | 4408 | |
783e057b | 4409 | |
9009e1ae MR |
4410 | test "$program_prefix" != NONE && |
4411 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4412 | # Use a double $ so make ignores it. | |
4413 | test "$program_suffix" != NONE && | |
4414 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4415 | # Double any \ or $. | |
4416 | # By default was `s,x,x', remove it if useless. | |
4417 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4418 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4419 | ||
81ecdfbb | 4420 | |
a417dc56 RW |
4421 | # Dependency checking. |
4422 | rm -rf .tst 2>/dev/null | |
4423 | mkdir .tst 2>/dev/null | |
4424 | if test -d .tst; then | |
4425 | am__leading_dot=. | |
4426 | else | |
4427 | am__leading_dot=_ | |
4428 | fi | |
4429 | rmdir .tst 2>/dev/null | |
4430 | ||
4431 | DEPDIR="${am__leading_dot}deps" | |
4432 | ||
81ecdfbb | 4433 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4434 | |
4435 | ||
4436 | depcc="$CC" am_compiler_list= | |
4437 | ||
4438 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4439 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4440 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4441 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4442 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4443 | else |
4444 | if test -f "$am_depcomp"; then | |
4445 | # We make a subdir and do the tests there. Otherwise we can end up | |
4446 | # making bogus files that we don't know about and never remove. For | |
4447 | # instance it was reported that on HP-UX the gcc test will end up | |
4448 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4449 | # in D'. | |
4450 | mkdir conftest.dir | |
4451 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4452 | # using a relative directory. | |
4453 | cp "$am_depcomp" conftest.dir | |
4454 | cd conftest.dir | |
4455 | # We will build objects and dependencies in a subdirectory because | |
4456 | # it helps to detect inapplicable dependency modes. For instance | |
4457 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4458 | # side effect of compilation, but ICC will put the dependencies in | |
4459 | # the current directory while Tru64 will put them in the object | |
4460 | # directory. | |
4461 | mkdir sub | |
4462 | ||
4463 | am_cv_CC_dependencies_compiler_type=none | |
4464 | if test "$am_compiler_list" = ""; then | |
4465 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4466 | fi | |
4467 | for depmode in $am_compiler_list; do | |
4468 | if test $depmode = none; then break; fi | |
4469 | ||
81ecdfbb | 4470 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4471 | # Setup a source with many dependencies, because some compilers |
4472 | # like to wrap large dependency lists on column 80 (with \), and | |
4473 | # we should not choose a depcomp mode which is confused by this. | |
4474 | # | |
4475 | # We need to recreate these files for each test, as the compiler may | |
4476 | # overwrite some of them when testing with obscure command lines. | |
4477 | # This happens at least with the AIX C compiler. | |
4478 | : > sub/conftest.c | |
4479 | for i in 1 2 3 4 5 6; do | |
4480 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4481 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4482 | # Solaris 8's {/usr,}/bin/sh. | |
4483 | touch sub/conftst$i.h | |
4484 | done | |
4485 | echo "include sub/conftest.Po" > confmf | |
4486 | ||
4487 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4488 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4489 | # handle `-M -o', and we need to detect this. | |
4490 | depcmd="depmode=$depmode \ | |
4491 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4492 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4493 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4494 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4495 | if env $depcmd > conftest.err 2>&1 && | |
4496 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4497 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4498 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4499 | # icc doesn't choke on unknown options, it will just issue warnings | |
4500 | # or remarks (even with -Werror). So we grep stderr for any message | |
4501 | # that says an option was ignored or not supported. | |
4502 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4503 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4504 | # The diagnosis changed in icc 8.0: | |
4505 | # icc: Command line remark: option '-MP' not supported | |
4506 | if (grep 'ignoring option' conftest.err || | |
4507 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4508 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4509 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4510 | break |
4511 | fi | |
4512 | fi | |
81ecdfbb | 4513 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4514 | sed -e 's/^/| /' < conftest.err >&5 |
4515 | done | |
4516 | ||
4517 | cd .. | |
4518 | rm -rf conftest.dir | |
4519 | else | |
4520 | am_cv_CC_dependencies_compiler_type=none | |
4521 | fi | |
4522 | ||
4523 | fi | |
81ecdfbb RW |
4524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4525 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4526 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4527 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4528 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4529 | ||
4530 | fi | |
4531 | ||
4532 | ||
4533 | # Check for the 'make' the user wants to use. | |
4534 | for ac_prog in make | |
4535 | do | |
4536 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4537 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4539 | $as_echo_n "checking for $ac_word... " >&6; } | |
4540 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4541 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4542 | else |
4543 | if test -n "$MAKE"; then | |
4544 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4545 | else | |
4546 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4547 | for as_dir in $PATH | |
4548 | do | |
4549 | IFS=$as_save_IFS | |
4550 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4551 | for ac_exec_ext in '' $ac_executable_extensions; do |
4552 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4553 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4554 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4555 | break 2 |
4556 | fi | |
4557 | done | |
81ecdfbb RW |
4558 | done |
4559 | IFS=$as_save_IFS | |
a417dc56 RW |
4560 | |
4561 | fi | |
4562 | fi | |
4563 | MAKE=$ac_cv_prog_MAKE | |
4564 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4566 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4567 | else |
81ecdfbb RW |
4568 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4569 | $as_echo "no" >&6; } | |
a417dc56 RW |
4570 | fi |
4571 | ||
81ecdfbb | 4572 | |
a417dc56 RW |
4573 | test -n "$MAKE" && break |
4574 | done | |
4575 | ||
4576 | MAKE_IS_GNU= | |
4577 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4578 | *GNU*) | |
4579 | MAKE_IS_GNU=yes | |
4580 | ;; | |
4581 | esac | |
81ecdfbb | 4582 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4583 | GMAKE_TRUE= |
4584 | GMAKE_FALSE='#' | |
4585 | else | |
4586 | GMAKE_TRUE='#' | |
4587 | GMAKE_FALSE= | |
4588 | fi | |
4589 | ||
81ecdfbb RW |
4590 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4591 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4592 | set x ${MAKE-make} | |
4593 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4594 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4595 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4596 | else |
4597 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4598 | SHELL = /bin/sh |
a417dc56 | 4599 | all: |
81ecdfbb | 4600 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4601 | _ACEOF |
4602 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4603 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4604 | *@@@%%%=?*=@@@%%%*) | |
4605 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4606 | *) | |
4607 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4608 | esac | |
a417dc56 RW |
4609 | rm -f conftest.make |
4610 | fi | |
81ecdfbb RW |
4611 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4613 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4614 | SET_MAKE= |
4615 | else | |
81ecdfbb RW |
4616 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4617 | $as_echo "no" >&6; } | |
a417dc56 RW |
4618 | SET_MAKE="MAKE=${MAKE-make}" |
4619 | fi | |
4620 | ||
4621 | ||
c971b7fa PA |
4622 | # Configure gnulib. We need to build gnulib under some other |
4623 | # directory not "gnulib", to avoid the problem of both GDB and | |
4624 | # GDBserver wanting to build it in the same directory, when building | |
4625 | # in the source dir. | |
783e057b | 4626 | |
c971b7fa PA |
4627 | in_src="gnulib" |
4628 | in_build="build-gnulib" | |
4629 | ||
4630 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4631 | # so they do not pile up. | |
4632 | ac_sub_configure_args= | |
4633 | ac_prev= | |
4634 | eval "set x $ac_configure_args" | |
4635 | shift | |
4636 | for ac_arg | |
4637 | do | |
4638 | if test -n "$ac_prev"; then | |
4639 | ac_prev= | |
4640 | continue | |
4641 | fi | |
4642 | case $ac_arg in | |
4643 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4644 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4645 | ac_prev=cache_file ;; | |
4646 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4647 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4648 | | --c=*) | |
4649 | ;; | |
4650 | --config-cache | -C) | |
4651 | ;; | |
4652 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4653 | ac_prev=srcdir ;; | |
4654 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4655 | ;; | |
4656 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4657 | ac_prev=prefix ;; | |
4658 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4659 | ;; | |
4660 | --disable-option-checking) | |
4661 | ;; | |
4662 | *) | |
4663 | case $ac_arg in | |
4664 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4665 | esac | |
4666 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4667 | esac | |
4668 | done | |
4669 | ||
4670 | # Always prepend --prefix to ensure using the same prefix | |
4671 | # in subdir configurations. | |
4672 | ac_arg="--prefix=$prefix" | |
4673 | case $ac_arg in | |
4674 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4675 | esac | |
4676 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4677 | ||
4678 | # Pass --silent | |
4679 | if test "$silent" = yes; then | |
4680 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4681 | fi | |
4682 | ||
4683 | # Always prepend --disable-option-checking to silence warnings, since | |
4684 | # different subdirs can have different --enable and --with options. | |
4685 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4686 | ||
4687 | ac_popdir=`pwd` | |
4688 | ac_dir=$in_build | |
4689 | ||
4690 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4691 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4692 | $as_echo "$ac_msg" >&6 | |
4693 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4694 | ||
38ea300a PA |
4695 | case $srcdir in |
4696 | [\\/]* | ?:[\\/]* ) | |
4697 | ac_srcdir=$srcdir/$in_src ;; | |
4698 | *) # Relative name. | |
4699 | ac_srcdir=../$srcdir/$in_src ;; | |
4700 | esac | |
c971b7fa PA |
4701 | |
4702 | cd "$ac_dir" | |
4703 | ||
4704 | ac_sub_configure=$ac_srcdir/configure | |
4705 | ||
4706 | # Make the cache file name correct relative to the subdirectory. | |
4707 | case $cache_file in | |
4708 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4709 | *) # Relative name. | |
4710 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4711 | esac | |
4712 | ||
4713 | { $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 | |
4714 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4715 | # The eval makes quoting arguments work. | |
4716 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4717 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4718 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4719 | ||
4720 | cd "$ac_popdir" | |
783e057b | 4721 | |
c971b7fa PA |
4722 | |
4723 | ||
4724 | CONFIG_OBS= | |
4725 | CONFIG_DEPS= | |
4726 | CONFIG_SRCS= | |
4727 | ENABLE_CFLAGS= | |
4728 | ||
4729 | CONFIG_ALL= | |
4730 | CONFIG_CLEAN= | |
4731 | CONFIG_INSTALL= | |
4732 | CONFIG_UNINSTALL= | |
4733 | ||
4734 | # If we haven't got the data from the intl directory, | |
4735 | # assume NLS is disabled. | |
4736 | USE_NLS=no | |
4737 | LIBINTL= | |
4738 | LIBINTL_DEP= | |
4739 | INCINTL= | |
4740 | XGETTEXT= | |
4741 | GMSGFMT= | |
4742 | POSUB= | |
783e057b DJ |
4743 | |
4744 | if test -f ../intl/config.intl; then | |
4745 | . ../intl/config.intl | |
4746 | fi | |
81ecdfbb RW |
4747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4748 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4749 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4750 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4751 | $as_echo "no" >&6; } | |
783e057b | 4752 | else |
81ecdfbb RW |
4753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4754 | $as_echo "yes" >&6; } | |
783e057b | 4755 | |
81ecdfbb | 4756 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4757 | |
4758 | ||
81ecdfbb RW |
4759 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4760 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4761 | # Look for .po and .gmo files in the source directory. |
4762 | CATALOGS= | |
4763 | XLINGUAS= | |
4764 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4765 | # If there aren't any .gmo files the shell will give us the | |
4766 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4767 | # weeded out. | |
4768 | case "$cat" in *\**) | |
4769 | continue;; | |
4770 | esac | |
4771 | # The quadruple backslash is collapsed to a double backslash | |
4772 | # by the backticks, then collapsed again by the double quotes, | |
4773 | # leaving us with one backslash in the sed expression (right | |
4774 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4775 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4776 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4777 | # The user is allowed to set LINGUAS to a list of languages to | |
4778 | # install catalogs for. If it's empty that means "all of them." | |
4779 | if test "x$LINGUAS" = x; then | |
4780 | CATALOGS="$CATALOGS $cat" | |
4781 | XLINGUAS="$XLINGUAS $lang" | |
4782 | else | |
4783 | case "$LINGUAS" in *$lang*) | |
4784 | CATALOGS="$CATALOGS $cat" | |
4785 | XLINGUAS="$XLINGUAS $lang" | |
4786 | ;; | |
4787 | esac | |
e28b3332 DJ |
4788 | fi |
4789 | done | |
c971b7fa PA |
4790 | LINGUAS="$XLINGUAS" |
4791 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
4792 | $as_echo "$LINGUAS" >&6; } | |
4793 | ||
4794 | ||
4795 | DATADIRNAME=share | |
4796 | ||
4797 | INSTOBJEXT=.mo | |
4798 | ||
4799 | GENCAT=gencat | |
4800 | ||
4801 | CATOBJEXT=.gmo | |
e28b3332 | 4802 | |
e28b3332 DJ |
4803 | fi |
4804 | ||
c971b7fa PA |
4805 | localedir='${datadir}/locale' |
4806 | ||
4807 | ||
4808 | if test x"$USE_NLS" = xyes; then | |
4809 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4810 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4811 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4812 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 4813 | fi |
e28b3332 | 4814 | |
c971b7fa PA |
4815 | GNULIB=build-gnulib/import |
4816 | ||
4817 | # For Makefile dependencies. | |
4818 | GNULIB_STDINT_H= | |
4819 | if test x"$STDINT_H" != x; then | |
4820 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
4821 | fi |
4822 | ||
4823 | ||
c971b7fa PA |
4824 | PACKAGE=gdb |
4825 | ||
4826 | cat >>confdefs.h <<_ACEOF | |
4827 | #define PACKAGE "$PACKAGE" | |
4828 | _ACEOF | |
4829 | ||
4830 | ||
4831 | ||
4832 | # We never need to detect it in this sub-configure. | |
4833 | # But preserve it for config.status --recheck. | |
4834 | ||
4835 | ||
4836 | ||
4837 | MAKEINFO_EXTRA_FLAGS="" | |
4838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
4839 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
4840 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
4841 | $as_echo_n "(cached) " >&6 | |
4842 | else | |
4843 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
4844 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
4845 | gdb_cv_have_makeinfo_click=yes | |
4846 | else | |
4847 | gdb_cv_have_makeinfo_click=no | |
4848 | fi | |
4849 | fi | |
4850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
4851 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
4852 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
4853 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
4854 | fi | |
e28b3332 DJ |
4855 | |
4856 | ||
bec39cab AC |
4857 | |
4858 | ||
81ecdfbb RW |
4859 | # Check whether --with-separate-debug-dir was given. |
4860 | if test "${with_separate_debug_dir+set}" = set; then : | |
4861 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
4862 | DEBUGDIR=$withval |
4863 | else | |
4864 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
4865 | fi |
4866 | ||
20e95c23 | 4867 | |
783e057b DJ |
4868 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4869 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 4870 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 4871 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 4872 | |
783e057b DJ |
4873 | cat >>confdefs.h <<_ACEOF |
4874 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 4875 | _ACEOF |
20e95c23 | 4876 | |
20e95c23 | 4877 | |
20e95c23 | 4878 | |
0c4a4063 | 4879 | |
b14b1491 TT |
4880 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4881 | if test "x$prefix" = xNONE; then | |
4882 | test_prefix=/usr/local | |
4883 | else | |
4884 | test_prefix=$prefix | |
4885 | fi | |
783e057b | 4886 | else |
b14b1491 | 4887 | test_prefix=$exec_prefix |
783e057b | 4888 | fi |
b14b1491 TT |
4889 | value=0 |
4890 | case ${ac_define_dir} in | |
4891 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4892 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4893 | value=1 | |
4894 | ;; | |
4895 | esac | |
4896 | ||
4897 | cat >>confdefs.h <<_ACEOF | |
4898 | #define DEBUGDIR_RELOCATABLE $value | |
4899 | _ACEOF | |
4900 | ||
4901 | ||
4902 | ||
0c4a4063 | 4903 | |
f83d8a90 DE |
4904 | # We can't pass paths as command line arguments. |
4905 | # Mingw32 tries to be clever and will convert the paths for us. | |
4906 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
4907 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
4908 | # This breaks GDB's relocatable path conversions since paths passed in | |
4909 | # config.h would not get so translated, the path prefixes no longer match. | |
4910 | ||
4911 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4912 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4913 | ac_define_dir=`eval echo $bindir` | |
4914 | ac_define_dir=`eval echo $ac_define_dir` | |
4915 | ||
4916 | cat >>confdefs.h <<_ACEOF | |
4917 | #define BINDIR "$ac_define_dir" | |
4918 | _ACEOF | |
4919 | ||
4920 | ||
4921 | ||
b14b1491 TT |
4922 | # GDB's datadir relocation |
4923 | ||
4924 | ||
4925 | ||
81ecdfbb RW |
4926 | # Check whether --with-gdb-datadir was given. |
4927 | if test "${with_gdb_datadir+set}" = set; then : | |
4928 | withval=$with_gdb_datadir; | |
b14b1491 | 4929 | GDB_DATADIR=$withval |
20e95c23 | 4930 | else |
b14b1491 | 4931 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
4932 | fi |
4933 | ||
20e95c23 | 4934 | |
b14b1491 TT |
4935 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4936 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4937 | ac_define_dir=`eval echo $GDB_DATADIR` | |
4938 | ac_define_dir=`eval echo $ac_define_dir` | |
4939 | ||
4940 | cat >>confdefs.h <<_ACEOF | |
4941 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
4942 | _ACEOF |
4943 | ||
b14b1491 TT |
4944 | |
4945 | ||
0c4a4063 | 4946 | |
b14b1491 TT |
4947 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4948 | if test "x$prefix" = xNONE; then | |
4949 | test_prefix=/usr/local | |
4950 | else | |
4951 | test_prefix=$prefix | |
4952 | fi | |
4953 | else | |
4954 | test_prefix=$exec_prefix | |
4955 | fi | |
4956 | value=0 | |
4957 | case ${ac_define_dir} in | |
4958 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4959 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4960 | value=1 | |
4961 | ;; | |
4962 | esac | |
4963 | ||
4964 | cat >>confdefs.h <<_ACEOF | |
4965 | #define GDB_DATADIR_RELOCATABLE $value | |
4966 | _ACEOF | |
4967 | ||
4968 | ||
783e057b | 4969 | |
20e95c23 | 4970 | |
0c4a4063 | 4971 | |
81ecdfbb RW |
4972 | # Check whether --with-relocated-sources was given. |
4973 | if test "${with_relocated_sources+set}" = set; then : | |
4974 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
4975 | |
4976 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4977 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4978 | ac_define_dir=`eval echo $reloc_srcdir` | |
4979 | ac_define_dir=`eval echo $ac_define_dir` | |
4980 | ||
4981 | cat >>confdefs.h <<_ACEOF | |
4982 | #define RELOC_SRCDIR "$ac_define_dir" | |
4983 | _ACEOF | |
4984 | ||
4985 | ||
4986 | ||
81ecdfbb RW |
4987 | fi |
4988 | ||
29b0e8a2 | 4989 | |
7349ff92 JK |
4990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
4991 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
4992 | ||
4993 | # Check whether --with-auto-load-dir was given. | |
4994 | if test "${with_auto_load_dir+set}" = set; then : | |
4995 | withval=$with_auto_load_dir; | |
4996 | else | |
1564a261 | 4997 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
4998 | fi |
4999 | ||
1564a261 | 5000 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
5001 | |
5002 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5003 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5004 | ac_define_dir=`eval echo $escape_dir` | |
5005 | ac_define_dir=`eval echo $ac_define_dir` | |
5006 | ||
5007 | cat >>confdefs.h <<_ACEOF | |
5008 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
5009 | _ACEOF | |
5010 | ||
5011 | ||
5012 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
5013 | $as_echo "$with_auto_load_dir" >&6; } | |
5014 | ||
bccbefd2 JK |
5015 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
5016 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
5017 | ||
5018 | # Check whether --with-auto-load-safe-path was given. | |
5019 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5020 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5021 | with_auto_load_safe_path="/" |
5022 | fi | |
bccbefd2 | 5023 | else |
7349ff92 | 5024 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5025 | fi |
5026 | ||
1564a261 | 5027 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5028 | |
5029 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5030 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5031 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5032 | ac_define_dir=`eval echo $ac_define_dir` |
5033 | ||
5034 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5035 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5036 | _ACEOF |
5037 | ||
5038 | ||
5039 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5040 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5041 | ||
29b0e8a2 | 5042 | |
20e95c23 | 5043 | |
5ae98d25 | 5044 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5045 | |
5046 | ||
783e057b | 5047 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5048 | # Check whether --enable-targets was given. |
5049 | if test "${enable_targets+set}" = set; then : | |
5050 | enableval=$enable_targets; case "${enableval}" in | |
5051 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5052 | ;; |
5053 | no) enable_targets= ;; | |
5054 | *) enable_targets=$enableval ;; | |
5055 | esac | |
81ecdfbb RW |
5056 | fi |
5057 | ||
20e95c23 | 5058 | |
783e057b | 5059 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5060 | # Check whether --enable-64-bit-bfd was given. |
5061 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5062 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5063 | yes) want64=true ;; |
5064 | no) want64=false ;; | |
81ecdfbb | 5065 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5066 | esac |
5067 | else | |
5068 | want64=false | |
81ecdfbb RW |
5069 | fi |
5070 | ||
783e057b DJ |
5071 | # Provide defaults for some variables set by the per-host and per-target |
5072 | # configuration. | |
5073 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5074 | |
783e057b DJ |
5075 | if test "${target}" = "${host}"; then |
5076 | gdb_native=yes | |
5077 | else | |
5078 | gdb_native=no | |
5079 | fi | |
20e95c23 | 5080 | |
783e057b | 5081 | . $srcdir/configure.host |
20e95c23 | 5082 | |
783e057b | 5083 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5084 | |
783e057b DJ |
5085 | TARGET_OBS= |
5086 | all_targets= | |
b292c783 | 5087 | HAVE_NATIVE_GCORE_TARGET= |
20e95c23 | 5088 | |
783e057b | 5089 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5090 | do |
783e057b DJ |
5091 | if test "$targ_alias" = "all"; then |
5092 | all_targets=true | |
5093 | else | |
5094 | # Canonicalize the secondary target names. | |
5095 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5096 | if test -n "$result"; then | |
5097 | targ=$result | |
5098 | else | |
5099 | targ=$targ_alias | |
5100 | fi | |
20e95c23 | 5101 | |
783e057b | 5102 | . ${srcdir}/configure.tgt |
20e95c23 | 5103 | |
bf307134 JB |
5104 | if test -z "${gdb_target_obs}"; then : |
5105 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5106 | fi | |
5107 | ||
783e057b DJ |
5108 | # Target-specific object files |
5109 | for i in ${gdb_target_obs}; do | |
5110 | case " $TARGET_OBS " in | |
5111 | *" ${i} "*) ;; | |
5112 | *) | |
5113 | TARGET_OBS="$TARGET_OBS ${i}" | |
5114 | ;; | |
5115 | esac | |
5116 | done | |
20e95c23 | 5117 | |
783e057b DJ |
5118 | # Check whether this target needs 64-bit CORE_ADDR |
5119 | if test x${want64} = xfalse; then | |
5120 | . ${srcdir}/../bfd/config.bfd | |
5121 | fi | |
b292c783 JK |
5122 | |
5123 | # Check whether this target is native and supports gcore. | |
5124 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ | |
5125 | && $gdb_have_gcore; then | |
5126 | HAVE_NATIVE_GCORE_TARGET=1 | |
5127 | fi | |
783e057b | 5128 | fi |
20e95c23 DJ |
5129 | done |
5130 | ||
783e057b DJ |
5131 | if test x${all_targets} = xtrue; then |
5132 | ||
5133 | # We want all 64-bit targets if we either: | |
5134 | # - run on a 64-bit host or | |
5135 | # - already require 64-bit support for some other target or | |
5136 | # - the --enable-64-bit-bfd option was supplied | |
5137 | # Otherwise we only support all 32-bit targets. | |
5138 | # | |
5139 | # NOTE: This test must be in sync with the corresponding | |
5140 | # tests in BFD! | |
20e95c23 | 5141 | |
783e057b | 5142 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5143 | # The cast to long int works around a bug in the HP C Compiler |
5144 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5145 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5146 | # This bug is HP SR number 8606223364. | |
5147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5148 | $as_echo_n "checking size of long... " >&6; } | |
5149 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5150 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5151 | else |
81ecdfbb | 5152 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5153 | |
81ecdfbb RW |
5154 | else |
5155 | if test "$ac_cv_type_long" = yes; then | |
5156 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5157 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5158 | { as_fn_set_status 77 | |
5159 | as_fn_error "cannot compute sizeof (long) | |
5160 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5161 | else | |
5162 | ac_cv_sizeof_long=0 | |
5163 | fi | |
c0993dbe | 5164 | fi |
81ecdfbb | 5165 | |
c0993dbe | 5166 | fi |
81ecdfbb RW |
5167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5168 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5169 | |
c0993dbe | 5170 | |
c0993dbe | 5171 | |
c0993dbe UW |
5172 | cat >>confdefs.h <<_ACEOF |
5173 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5174 | _ACEOF | |
5175 | ||
5176 | ||
5177 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5178 | want64=true | |
5179 | fi | |
5180 | fi | |
5181 | if test x${want64} = xtrue; then | |
5182 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5183 | else | |
5184 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5185 | fi | |
5186 | fi | |
5187 | ||
5188 | ||
5189 | ||
b292c783 | 5190 | |
c0993dbe UW |
5191 | # For other settings, only the main target counts. |
5192 | gdb_sim= | |
5193 | gdb_osabi= | |
5194 | build_gdbserver= | |
5195 | targ=$target; . ${srcdir}/configure.tgt | |
5196 | ||
5197 | # Fetch the default architecture and default target vector from BFD. | |
5198 | targ=$target; . $srcdir/../bfd/config.bfd | |
5199 | ||
5200 | # We only want the first architecture, so strip off the others if | |
5201 | # there is more than one. | |
5202 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5203 | ||
5204 | if test "x$targ_archs" != x; then | |
5205 | ||
5206 | cat >>confdefs.h <<_ACEOF | |
5207 | #define DEFAULT_BFD_ARCH $targ_archs | |
5208 | _ACEOF | |
5209 | ||
5210 | fi | |
5211 | if test "x$targ_defvec" != x; then | |
5212 | ||
5213 | cat >>confdefs.h <<_ACEOF | |
5214 | #define DEFAULT_BFD_VEC $targ_defvec | |
5215 | _ACEOF | |
5216 | ||
5217 | fi | |
5218 | ||
c0993dbe UW |
5219 | # The CLI cannot be disabled yet, but may be in the future. |
5220 | ||
5221 | # Enable CLI. | |
81ecdfbb RW |
5222 | # Check whether --enable-gdbcli was given. |
5223 | if test "${enable_gdbcli+set}" = set; then : | |
5224 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5225 | yes) |
5226 | ;; | |
5227 | no) | |
81ecdfbb | 5228 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5229 | *) |
81ecdfbb | 5230 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5231 | esac |
5232 | else | |
5233 | enable_gdbcli=yes | |
81ecdfbb RW |
5234 | fi |
5235 | ||
c0993dbe UW |
5236 | if test x"$enable_gdbcli" = xyes; then |
5237 | if test -d $srcdir/cli; then | |
5238 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5239 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5240 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5241 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5242 | fi | |
5243 | fi | |
5244 | ||
5245 | # Enable MI. | |
81ecdfbb RW |
5246 | # Check whether --enable-gdbmi was given. |
5247 | if test "${enable_gdbmi+set}" = set; then : | |
5248 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5249 | yes | no) |
5250 | ;; | |
5251 | *) | |
81ecdfbb | 5252 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5253 | esac |
5254 | else | |
5255 | enable_gdbmi=yes | |
81ecdfbb RW |
5256 | fi |
5257 | ||
c0993dbe UW |
5258 | if test x"$enable_gdbmi" = xyes; then |
5259 | if test -d $srcdir/mi; then | |
5260 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5261 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5262 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5263 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5264 | fi | |
5265 | fi | |
5266 | ||
5267 | # Enable TUI. | |
81ecdfbb RW |
5268 | # Check whether --enable-tui was given. |
5269 | if test "${enable_tui+set}" = set; then : | |
5270 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5271 | yes | no | auto) |
c0993dbe UW |
5272 | ;; |
5273 | *) | |
81ecdfbb | 5274 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5275 | esac |
5276 | else | |
3ca64bd3 | 5277 | enable_tui=auto |
81ecdfbb RW |
5278 | fi |
5279 | ||
c0993dbe UW |
5280 | |
5281 | # Enable gdbtk. | |
81ecdfbb RW |
5282 | # Check whether --enable-gdbtk was given. |
5283 | if test "${enable_gdbtk+set}" = set; then : | |
5284 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5285 | yes | no) |
5286 | ;; | |
5287 | *) | |
81ecdfbb | 5288 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5289 | esac |
5290 | else | |
5062cc19 | 5291 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5292 | enable_gdbtk=yes |
5293 | else | |
5294 | enable_gdbtk=no | |
5295 | fi | |
81ecdfbb RW |
5296 | fi |
5297 | ||
c0993dbe UW |
5298 | # We unconditionally disable gdbtk tests on selected platforms. |
5299 | case $host_os in | |
5300 | go32* | windows*) | |
81ecdfbb RW |
5301 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5302 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5303 | enable_gdbtk=no ;; |
5304 | esac | |
5305 | ||
05e7c244 | 5306 | # Libunwind support for ia64. |
bec39cab | 5307 | |
05e7c244 JK |
5308 | |
5309 | # Check whether --with-libunwind-ia64 was given. | |
5310 | if test "${with_libunwind_ia64+set}" = set; then : | |
5311 | withval=$with_libunwind_ia64; | |
bec39cab | 5312 | else |
05e7c244 JK |
5313 | with_libunwind_ia64=auto |
5314 | fi | |
bec39cab | 5315 | |
05e7c244 JK |
5316 | |
5317 | # Backward compatibility option. | |
5318 | if test "${with_libunwind+set}" = set; then | |
5319 | if test x"$with_libunwind_ia64" != xauto; then | |
5320 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5321 | fi | |
5322 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5323 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5324 | with_libunwind_ia64="$with_libunwind" | |
5325 | fi | |
5326 | ||
5327 | case "$with_libunwind_ia64" in | |
5328 | yes | no) | |
5329 | ;; | |
5330 | auto) | |
5331 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5332 | do : |
b54a8fd7 PA |
5333 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5334 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5335 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5336 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5337 | _ACEOF |
5338 | ||
5339 | fi | |
5340 | ||
5341 | done | |
5342 | ||
05e7c244 JK |
5343 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5344 | ;; | |
5345 | *) | |
5346 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5347 | ;; | |
5348 | esac | |
bec39cab | 5349 | |
05e7c244 | 5350 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5351 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5352 | do : |
b54a8fd7 PA |
5353 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5354 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5355 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5356 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5357 | _ACEOF |
5358 | ||
5359 | fi | |
5360 | ||
5361 | done | |
5362 | ||
05e7c244 JK |
5363 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5364 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5365 | fi | |
5366 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5367 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5368 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5369 | fi |
5370 | ||
cb01cfba JB |
5371 | opt_curses=no |
5372 | ||
81ecdfbb RW |
5373 | # Check whether --with-curses was given. |
5374 | if test "${with_curses+set}" = set; then : | |
5375 | withval=$with_curses; opt_curses=$withval | |
5376 | fi | |
5377 | ||
cb01cfba | 5378 | |
76a39ba7 | 5379 | prefer_curses=no |
cb01cfba | 5380 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5381 | prefer_curses=yes |
cb01cfba JB |
5382 | fi |
5383 | ||
a9322a30 | 5384 | # Profiling support. |
81ecdfbb RW |
5385 | # Check whether --enable-profiling was given. |
5386 | if test "${enable_profiling+set}" = set; then : | |
5387 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5388 | yes | no) |
5389 | ;; | |
5390 | *) | |
81ecdfbb | 5391 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5392 | esac |
5393 | else | |
5394 | enable_profiling=no | |
81ecdfbb | 5395 | fi |
bec39cab | 5396 | |
a9322a30 TT |
5397 | |
5398 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5399 | do : |
5400 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5401 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5402 | eval as_val=\$$as_ac_var | |
5403 | if test "x$as_val" = x""yes; then : | |
5404 | cat >>confdefs.h <<_ACEOF | |
5405 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5406 | _ACEOF |
a9322a30 | 5407 | |
81ecdfbb RW |
5408 | fi |
5409 | done | |
a9322a30 | 5410 | |
81ecdfbb RW |
5411 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5412 | $as_echo_n "checking for _etext... " >&6; } | |
5413 | if test "${ac_cv_var__etext+set}" = set; then : | |
5414 | $as_echo_n "(cached) " >&6 | |
5415 | else | |
5416 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5417 | /* end confdefs.h. */ | |
5418 | #include <stdlib.h> | |
5419 | extern char _etext; | |
a9322a30 TT |
5420 | |
5421 | int | |
5422 | main () | |
5423 | { | |
5424 | free (&_etext); | |
5425 | ; | |
5426 | return 0; | |
5427 | } | |
bec39cab | 5428 | _ACEOF |
81ecdfbb | 5429 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5430 | ac_cv_var__etext=yes |
bec39cab | 5431 | else |
81ecdfbb | 5432 | ac_cv_var__etext=no |
bec39cab | 5433 | fi |
81ecdfbb RW |
5434 | rm -f core conftest.err conftest.$ac_objext \ |
5435 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5436 | fi |
81ecdfbb RW |
5437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5438 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5439 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5440 | |
81ecdfbb | 5441 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5442 | |
bec39cab | 5443 | fi |
81ecdfbb RW |
5444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5445 | $as_echo_n "checking for etext... " >&6; } | |
5446 | if test "${ac_cv_var_etext+set}" = set; then : | |
5447 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5448 | else |
81ecdfbb | 5449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5450 | /* end confdefs.h. */ |
a9322a30 TT |
5451 | #include <stdlib.h> |
5452 | extern char etext; | |
bec39cab AC |
5453 | |
5454 | int | |
5455 | main () | |
5456 | { | |
a9322a30 | 5457 | free (&etext); |
bec39cab AC |
5458 | ; |
5459 | return 0; | |
5460 | } | |
5461 | _ACEOF | |
81ecdfbb | 5462 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5463 | ac_cv_var_etext=yes |
bec39cab | 5464 | else |
81ecdfbb | 5465 | ac_cv_var_etext=no |
bec39cab | 5466 | fi |
81ecdfbb RW |
5467 | rm -f core conftest.err conftest.$ac_objext \ |
5468 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5469 | fi |
81ecdfbb RW |
5470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5471 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5472 | if test $ac_cv_var_etext = yes; then |
5473 | ||
81ecdfbb | 5474 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5475 | |
5476 | fi | |
a9322a30 TT |
5477 | if test "$enable_profiling" = yes ; then |
5478 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5479 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5480 | fi |
5481 | PROFILE_CFLAGS=-pg | |
5482 | OLD_CFLAGS="$CFLAGS" | |
5483 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5484 | |
81ecdfbb RW |
5485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5486 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5487 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5488 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5489 | else |
81ecdfbb | 5490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5491 | /* end confdefs.h. */ |
bec39cab AC |
5492 | |
5493 | int | |
5494 | main () | |
5495 | { | |
a9322a30 | 5496 | int x; |
bec39cab AC |
5497 | ; |
5498 | return 0; | |
5499 | } | |
5500 | _ACEOF | |
81ecdfbb | 5501 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5502 | ac_cv_cc_supports_pg=yes |
bec39cab | 5503 | else |
81ecdfbb | 5504 | ac_cv_cc_supports_pg=no |
bec39cab | 5505 | fi |
81ecdfbb | 5506 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5507 | fi |
81ecdfbb RW |
5508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5509 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5510 | |
a9322a30 | 5511 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5512 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5513 | fi |
bec39cab | 5514 | |
a9322a30 | 5515 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5516 | fi |
5517 | ||
c16158bc JM |
5518 | |
5519 | ||
81ecdfbb RW |
5520 | # Check whether --with-pkgversion was given. |
5521 | if test "${with_pkgversion+set}" = set; then : | |
5522 | withval=$with_pkgversion; case "$withval" in | |
5523 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5524 | no) PKGVERSION= ;; |
5525 | *) PKGVERSION="($withval) " ;; | |
5526 | esac | |
5527 | else | |
5528 | PKGVERSION="(GDB) " | |
5529 | ||
81ecdfbb | 5530 | fi |
c16158bc JM |
5531 | |
5532 | ||
5533 | ||
5534 | ||
81ecdfbb RW |
5535 | |
5536 | # Check whether --with-bugurl was given. | |
5537 | if test "${with_bugurl+set}" = set; then : | |
5538 | withval=$with_bugurl; case "$withval" in | |
5539 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5540 | no) BUGURL= |
5541 | ;; | |
5542 | *) BUGURL="$withval" | |
5543 | ;; | |
5544 | esac | |
5545 | else | |
5546 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5547 | ||
81ecdfbb RW |
5548 | fi |
5549 | ||
c16158bc JM |
5550 | case ${BUGURL} in |
5551 | "") | |
5552 | REPORT_BUGS_TO= | |
5553 | REPORT_BUGS_TEXI= | |
5554 | ;; | |
5555 | *) | |
5556 | REPORT_BUGS_TO="<$BUGURL>" | |
5557 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5558 | ;; | |
5559 | esac; | |
5560 | ||
5561 | ||
5562 | ||
5563 | ||
5564 | cat >>confdefs.h <<_ACEOF | |
5565 | #define PKGVERSION "$PKGVERSION" | |
5566 | _ACEOF | |
5567 | ||
5568 | ||
5569 | cat >>confdefs.h <<_ACEOF | |
5570 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5571 | _ACEOF | |
5572 | ||
5573 | ||
bec39cab AC |
5574 | # --------------------- # |
5575 | # Checks for programs. # | |
5576 | # --------------------- # | |
5577 | ||
5578 | for ac_prog in gawk mawk nawk awk | |
5579 | do | |
5580 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5581 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5583 | $as_echo_n "checking for $ac_word... " >&6; } | |
5584 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5585 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5586 | else |
5587 | if test -n "$AWK"; then | |
5588 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5589 | else | |
5590 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5591 | for as_dir in $PATH | |
5592 | do | |
5593 | IFS=$as_save_IFS | |
5594 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5595 | for ac_exec_ext in '' $ac_executable_extensions; do |
5596 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5597 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5598 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5599 | break 2 |
5600 | fi | |
5601 | done | |
81ecdfbb RW |
5602 | done |
5603 | IFS=$as_save_IFS | |
bec39cab AC |
5604 | |
5605 | fi | |
5606 | fi | |
5607 | AWK=$ac_cv_prog_AWK | |
5608 | if test -n "$AWK"; then | |
81ecdfbb RW |
5609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5610 | $as_echo "$AWK" >&6; } | |
bec39cab | 5611 | else |
81ecdfbb RW |
5612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5613 | $as_echo "no" >&6; } | |
bec39cab AC |
5614 | fi |
5615 | ||
bec39cab | 5616 | |
81ecdfbb | 5617 | test -n "$AWK" && break |
bec39cab AC |
5618 | done |
5619 | ||
c971b7fa PA |
5620 | # Find a good install program. We prefer a C program (faster), |
5621 | # so one script is as good as another. But avoid the broken or | |
5622 | # incompatible versions: | |
5623 | # SysV /etc/install, /usr/sbin/install | |
5624 | # SunOS /usr/etc/install | |
5625 | # IRIX /sbin/install | |
5626 | # AIX /bin/install | |
5627 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5628 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5629 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5630 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5631 | # OS/2's system install, which has a completely different semantic | |
5632 | # ./install, which can be erroneously created by make from ./install.sh. | |
5633 | # Reject install programs that cannot install multiple files. | |
5634 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5635 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5636 | if test -z "$INSTALL"; then | |
5637 | if test "${ac_cv_path_install+set}" = set; then : | |
5638 | $as_echo_n "(cached) " >&6 | |
5639 | else | |
5640 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5641 | for as_dir in $PATH | |
5642 | do | |
5643 | IFS=$as_save_IFS | |
5644 | test -z "$as_dir" && as_dir=. | |
5645 | # Account for people who put trailing slashes in PATH elements. | |
5646 | case $as_dir/ in #(( | |
5647 | ./ | .// | /[cC]/* | \ | |
5648 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5649 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5650 | /usr/ucb/* ) ;; | |
5651 | *) | |
5652 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5653 | # Don't use installbsd from OSF since it installs stuff as root | |
5654 | # by default. | |
5655 | for ac_prog in ginstall scoinst install; do | |
5656 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5657 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5658 | if test $ac_prog = install && | |
5659 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5660 | # AIX install. It has an incompatible calling convention. | |
5661 | : | |
5662 | elif test $ac_prog = install && | |
5663 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5664 | # program-specific install script used by HP pwplus--don't use. | |
5665 | : | |
5666 | else | |
5667 | rm -rf conftest.one conftest.two conftest.dir | |
5668 | echo one > conftest.one | |
5669 | echo two > conftest.two | |
5670 | mkdir conftest.dir | |
5671 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5672 | test -s conftest.one && test -s conftest.two && | |
5673 | test -s conftest.dir/conftest.one && | |
5674 | test -s conftest.dir/conftest.two | |
5675 | then | |
5676 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5677 | break 3 | |
5678 | fi | |
5679 | fi | |
5680 | fi | |
5681 | done | |
5682 | done | |
5683 | ;; | |
5684 | esac | |
5685 | ||
5686 | done | |
5687 | IFS=$as_save_IFS | |
5688 | ||
5689 | rm -rf conftest.one conftest.two conftest.dir | |
5690 | ||
5691 | fi | |
5692 | if test "${ac_cv_path_install+set}" = set; then | |
5693 | INSTALL=$ac_cv_path_install | |
5694 | else | |
5695 | # As a last resort, use the slow shell script. Don't cache a | |
5696 | # value for INSTALL within a source directory, because that will | |
5697 | # break other packages using the cache if that directory is | |
5698 | # removed, or if the value is a relative name. | |
5699 | INSTALL=$ac_install_sh | |
5700 | fi | |
5701 | fi | |
5702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5703 | $as_echo "$INSTALL" >&6; } | |
5704 | ||
5705 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5706 | # It thinks the first close brace ends the variable substitution. | |
5707 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5708 | ||
5709 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5710 | ||
5711 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5712 | |
81ecdfbb RW |
5713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5714 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5715 | LN_S=$as_ln_s |
5716 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5718 | $as_echo "yes" >&6; } | |
bec39cab | 5719 | else |
81ecdfbb RW |
5720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5721 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5722 | fi |
5723 | ||
5724 | if test -n "$ac_tool_prefix"; then | |
5725 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5726 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5727 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5728 | $as_echo_n "checking for $ac_word... " >&6; } | |
5729 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5730 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5731 | else |
5732 | if test -n "$RANLIB"; then | |
5733 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5734 | else | |
5735 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5736 | for as_dir in $PATH | |
5737 | do | |
5738 | IFS=$as_save_IFS | |
5739 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5740 | for ac_exec_ext in '' $ac_executable_extensions; do |
5741 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5742 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5743 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5744 | break 2 |
5745 | fi | |
5746 | done | |
81ecdfbb RW |
5747 | done |
5748 | IFS=$as_save_IFS | |
bec39cab AC |
5749 | |
5750 | fi | |
5751 | fi | |
5752 | RANLIB=$ac_cv_prog_RANLIB | |
5753 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5754 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5755 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5756 | else |
81ecdfbb RW |
5757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5758 | $as_echo "no" >&6; } | |
bec39cab AC |
5759 | fi |
5760 | ||
81ecdfbb | 5761 | |
bec39cab AC |
5762 | fi |
5763 | if test -z "$ac_cv_prog_RANLIB"; then | |
5764 | ac_ct_RANLIB=$RANLIB | |
5765 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5766 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5767 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5768 | $as_echo_n "checking for $ac_word... " >&6; } | |
5769 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5770 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5771 | else |
5772 | if test -n "$ac_ct_RANLIB"; then | |
5773 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5774 | else | |
5775 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5776 | for as_dir in $PATH | |
5777 | do | |
5778 | IFS=$as_save_IFS | |
5779 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5780 | for ac_exec_ext in '' $ac_executable_extensions; do |
5781 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5782 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5783 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5784 | break 2 |
5785 | fi | |
5786 | done | |
81ecdfbb RW |
5787 | done |
5788 | IFS=$as_save_IFS | |
bec39cab | 5789 | |
bec39cab AC |
5790 | fi |
5791 | fi | |
5792 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5793 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
5794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
5795 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 5796 | else |
81ecdfbb RW |
5797 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5798 | $as_echo "no" >&6; } | |
bec39cab AC |
5799 | fi |
5800 | ||
81ecdfbb RW |
5801 | if test "x$ac_ct_RANLIB" = x; then |
5802 | RANLIB=":" | |
5803 | else | |
5804 | case $cross_compiling:$ac_tool_warned in | |
5805 | yes:) | |
5806 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5807 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5808 | ac_tool_warned=yes ;; | |
5809 | esac | |
5810 | RANLIB=$ac_ct_RANLIB | |
5811 | fi | |
bec39cab AC |
5812 | else |
5813 | RANLIB="$ac_cv_prog_RANLIB" | |
5814 | fi | |
5815 | ||
5816 | for ac_prog in 'bison -y' byacc | |
5817 | do | |
5818 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5819 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5821 | $as_echo_n "checking for $ac_word... " >&6; } | |
5822 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
5823 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5824 | else |
5825 | if test -n "$YACC"; then | |
5826 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5827 | else | |
5828 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5829 | for as_dir in $PATH | |
5830 | do | |
5831 | IFS=$as_save_IFS | |
5832 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5833 | for ac_exec_ext in '' $ac_executable_extensions; do |
5834 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5835 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 5836 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5837 | break 2 |
5838 | fi | |
5839 | done | |
81ecdfbb RW |
5840 | done |
5841 | IFS=$as_save_IFS | |
bec39cab AC |
5842 | |
5843 | fi | |
5844 | fi | |
5845 | YACC=$ac_cv_prog_YACC | |
5846 | if test -n "$YACC"; then | |
81ecdfbb RW |
5847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
5848 | $as_echo "$YACC" >&6; } | |
bec39cab | 5849 | else |
81ecdfbb RW |
5850 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5851 | $as_echo "no" >&6; } | |
bec39cab AC |
5852 | fi |
5853 | ||
81ecdfbb | 5854 | |
bec39cab AC |
5855 | test -n "$YACC" && break |
5856 | done | |
5857 | test -n "$YACC" || YACC="yacc" | |
5858 | ||
5859 | ||
5860 | if test -n "$ac_tool_prefix"; then | |
5861 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5862 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
5863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5864 | $as_echo_n "checking for $ac_word... " >&6; } | |
5865 | if test "${ac_cv_prog_AR+set}" = set; then : | |
5866 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5867 | else |
5868 | if test -n "$AR"; then | |
5869 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5870 | else | |
5871 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5872 | for as_dir in $PATH | |
5873 | do | |
5874 | IFS=$as_save_IFS | |
5875 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5876 | for ac_exec_ext in '' $ac_executable_extensions; do |
5877 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5878 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 5879 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5880 | break 2 |
5881 | fi | |
5882 | done | |
81ecdfbb RW |
5883 | done |
5884 | IFS=$as_save_IFS | |
bec39cab AC |
5885 | |
5886 | fi | |
5887 | fi | |
5888 | AR=$ac_cv_prog_AR | |
5889 | if test -n "$AR"; then | |
81ecdfbb RW |
5890 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
5891 | $as_echo "$AR" >&6; } | |
bec39cab | 5892 | else |
81ecdfbb RW |
5893 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5894 | $as_echo "no" >&6; } | |
bec39cab AC |
5895 | fi |
5896 | ||
81ecdfbb | 5897 | |
bec39cab AC |
5898 | fi |
5899 | if test -z "$ac_cv_prog_AR"; then | |
5900 | ac_ct_AR=$AR | |
5901 | # Extract the first word of "ar", so it can be a program name with args. | |
5902 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
5903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5904 | $as_echo_n "checking for $ac_word... " >&6; } | |
5905 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
5906 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5907 | else |
5908 | if test -n "$ac_ct_AR"; then | |
5909 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5910 | else | |
5911 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5912 | for as_dir in $PATH | |
5913 | do | |
5914 | IFS=$as_save_IFS | |
5915 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5916 | for ac_exec_ext in '' $ac_executable_extensions; do |
5917 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5918 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 5919 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5920 | break 2 |
5921 | fi | |
5922 | done | |
81ecdfbb RW |
5923 | done |
5924 | IFS=$as_save_IFS | |
bec39cab AC |
5925 | |
5926 | fi | |
5927 | fi | |
5928 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
5929 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
5930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
5931 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 5932 | else |
81ecdfbb RW |
5933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5934 | $as_echo "no" >&6; } | |
bec39cab AC |
5935 | fi |
5936 | ||
81ecdfbb RW |
5937 | if test "x$ac_ct_AR" = x; then |
5938 | AR="" | |
5939 | else | |
5940 | case $cross_compiling:$ac_tool_warned in | |
5941 | yes:) | |
5942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5943 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5944 | ac_tool_warned=yes ;; | |
5945 | esac | |
5946 | AR=$ac_ct_AR | |
5947 | fi | |
bec39cab AC |
5948 | else |
5949 | AR="$ac_cv_prog_AR" | |
5950 | fi | |
5951 | ||
5952 | if test -n "$ac_tool_prefix"; then | |
5953 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
5954 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
5955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5956 | $as_echo_n "checking for $ac_word... " >&6; } | |
5957 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
5958 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5959 | else |
5960 | if test -n "$DLLTOOL"; then | |
5961 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
5962 | else | |
5963 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5964 | for as_dir in $PATH | |
5965 | do | |
5966 | IFS=$as_save_IFS | |
5967 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5968 | for ac_exec_ext in '' $ac_executable_extensions; do |
5969 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5970 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 5971 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5972 | break 2 |
5973 | fi | |
5974 | done | |
81ecdfbb RW |
5975 | done |
5976 | IFS=$as_save_IFS | |
bec39cab AC |
5977 | |
5978 | fi | |
5979 | fi | |
5980 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
5981 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
5982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
5983 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 5984 | else |
81ecdfbb RW |
5985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5986 | $as_echo "no" >&6; } | |
bec39cab AC |
5987 | fi |
5988 | ||
81ecdfbb | 5989 | |
bec39cab AC |
5990 | fi |
5991 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
5992 | ac_ct_DLLTOOL=$DLLTOOL | |
5993 | # Extract the first word of "dlltool", so it can be a program name with args. | |
5994 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
5995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5996 | $as_echo_n "checking for $ac_word... " >&6; } | |
5997 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
5998 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5999 | else |
6000 | if test -n "$ac_ct_DLLTOOL"; then | |
6001 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
6002 | else | |
6003 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6004 | for as_dir in $PATH | |
6005 | do | |
6006 | IFS=$as_save_IFS | |
6007 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6008 | for ac_exec_ext in '' $ac_executable_extensions; do |
6009 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6010 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 6011 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6012 | break 2 |
6013 | fi | |
6014 | done | |
81ecdfbb RW |
6015 | done |
6016 | IFS=$as_save_IFS | |
bec39cab AC |
6017 | |
6018 | fi | |
6019 | fi | |
6020 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
6021 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
6022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
6023 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 6024 | else |
81ecdfbb RW |
6025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6026 | $as_echo "no" >&6; } | |
bec39cab AC |
6027 | fi |
6028 | ||
81ecdfbb RW |
6029 | if test "x$ac_ct_DLLTOOL" = x; then |
6030 | DLLTOOL="" | |
6031 | else | |
6032 | case $cross_compiling:$ac_tool_warned in | |
6033 | yes:) | |
6034 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6035 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6036 | ac_tool_warned=yes ;; | |
6037 | esac | |
6038 | DLLTOOL=$ac_ct_DLLTOOL | |
6039 | fi | |
bec39cab AC |
6040 | else |
6041 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6042 | fi | |
6043 | ||
6044 | if test -n "$ac_tool_prefix"; then | |
6045 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6046 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6048 | $as_echo_n "checking for $ac_word... " >&6; } | |
6049 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6050 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6051 | else |
6052 | if test -n "$WINDRES"; then | |
6053 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6054 | else | |
6055 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6056 | for as_dir in $PATH | |
6057 | do | |
6058 | IFS=$as_save_IFS | |
6059 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6060 | for ac_exec_ext in '' $ac_executable_extensions; do |
6061 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6062 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6063 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6064 | break 2 |
6065 | fi | |
6066 | done | |
81ecdfbb RW |
6067 | done |
6068 | IFS=$as_save_IFS | |
bec39cab AC |
6069 | |
6070 | fi | |
6071 | fi | |
6072 | WINDRES=$ac_cv_prog_WINDRES | |
6073 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6074 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6075 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6076 | else |
81ecdfbb RW |
6077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6078 | $as_echo "no" >&6; } | |
bec39cab AC |
6079 | fi |
6080 | ||
81ecdfbb | 6081 | |
bec39cab AC |
6082 | fi |
6083 | if test -z "$ac_cv_prog_WINDRES"; then | |
6084 | ac_ct_WINDRES=$WINDRES | |
6085 | # Extract the first word of "windres", so it can be a program name with args. | |
6086 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6087 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6088 | $as_echo_n "checking for $ac_word... " >&6; } | |
6089 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6090 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6091 | else |
6092 | if test -n "$ac_ct_WINDRES"; then | |
6093 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6094 | else | |
6095 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6096 | for as_dir in $PATH | |
6097 | do | |
6098 | IFS=$as_save_IFS | |
6099 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6100 | for ac_exec_ext in '' $ac_executable_extensions; do |
6101 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6102 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6103 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6104 | break 2 |
6105 | fi | |
6106 | done | |
81ecdfbb RW |
6107 | done |
6108 | IFS=$as_save_IFS | |
bec39cab AC |
6109 | |
6110 | fi | |
6111 | fi | |
6112 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6113 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6115 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6116 | else |
81ecdfbb RW |
6117 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6118 | $as_echo "no" >&6; } | |
c906108c | 6119 | fi |
bec39cab | 6120 | |
81ecdfbb RW |
6121 | if test "x$ac_ct_WINDRES" = x; then |
6122 | WINDRES="" | |
6123 | else | |
6124 | case $cross_compiling:$ac_tool_warned in | |
6125 | yes:) | |
6126 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6127 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6128 | ac_tool_warned=yes ;; | |
6129 | esac | |
6130 | WINDRES=$ac_ct_WINDRES | |
6131 | fi | |
c906108c | 6132 | else |
bec39cab | 6133 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6134 | fi |
6135 | ||
bec39cab | 6136 | |
036c3acb TS |
6137 | case $host_os in |
6138 | gnu*) | |
6139 | # Needed for GNU Hurd hosts. | |
6140 | if test -n "$ac_tool_prefix"; then | |
bec39cab AC |
6141 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
6142 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6144 | $as_echo_n "checking for $ac_word... " >&6; } | |
6145 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6146 | $as_echo_n "(cached) " >&6 | |
c906108c | 6147 | else |
bec39cab AC |
6148 | if test -n "$MIG"; then |
6149 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6150 | else | |
6151 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6152 | for as_dir in $PATH | |
6153 | do | |
6154 | IFS=$as_save_IFS | |
6155 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6156 | for ac_exec_ext in '' $ac_executable_extensions; do |
6157 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6158 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6159 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6160 | break 2 |
6161 | fi | |
6162 | done | |
81ecdfbb RW |
6163 | done |
6164 | IFS=$as_save_IFS | |
bec39cab | 6165 | |
c906108c | 6166 | fi |
bec39cab AC |
6167 | fi |
6168 | MIG=$ac_cv_prog_MIG | |
6169 | if test -n "$MIG"; then | |
81ecdfbb RW |
6170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6171 | $as_echo "$MIG" >&6; } | |
c906108c | 6172 | else |
81ecdfbb RW |
6173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6174 | $as_echo "no" >&6; } | |
c906108c SS |
6175 | fi |
6176 | ||
81ecdfbb | 6177 | |
bec39cab AC |
6178 | fi |
6179 | if test -z "$ac_cv_prog_MIG"; then | |
6180 | ac_ct_MIG=$MIG | |
6181 | # Extract the first word of "mig", so it can be a program name with args. | |
6182 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6183 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6184 | $as_echo_n "checking for $ac_word... " >&6; } | |
6185 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6186 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6187 | else |
6188 | if test -n "$ac_ct_MIG"; then | |
6189 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6190 | else | |
6191 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6192 | for as_dir in $PATH | |
6193 | do | |
6194 | IFS=$as_save_IFS | |
6195 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6196 | for ac_exec_ext in '' $ac_executable_extensions; do |
6197 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6198 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6199 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6200 | break 2 |
6201 | fi | |
6202 | done | |
81ecdfbb RW |
6203 | done |
6204 | IFS=$as_save_IFS | |
c906108c | 6205 | |
bec39cab AC |
6206 | fi |
6207 | fi | |
6208 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6209 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6211 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6212 | else |
81ecdfbb RW |
6213 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6214 | $as_echo "no" >&6; } | |
bec39cab | 6215 | fi |
c906108c | 6216 | |
81ecdfbb RW |
6217 | if test "x$ac_ct_MIG" = x; then |
6218 | MIG="" | |
6219 | else | |
6220 | case $cross_compiling:$ac_tool_warned in | |
6221 | yes:) | |
6222 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6223 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6224 | ac_tool_warned=yes ;; | |
6225 | esac | |
6226 | MIG=$ac_ct_MIG | |
6227 | fi | |
bec39cab AC |
6228 | else |
6229 | MIG="$ac_cv_prog_MIG" | |
6230 | fi | |
c906108c | 6231 | |
036c3acb TS |
6232 | if test x"$MIG" = x; then |
6233 | as_fn_error "MIG not found but required for $host hosts" "$LINENO" 5 | |
6234 | fi | |
6235 | ;; | |
6236 | esac | |
c906108c | 6237 | |
bec39cab AC |
6238 | # ---------------------- # |
6239 | # Checks for libraries. # | |
6240 | # ---------------------- # | |
c906108c | 6241 | |
bec39cab | 6242 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6244 | $as_echo_n "checking for main in -lm... " >&6; } | |
6245 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6246 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6247 | else |
6248 | ac_check_lib_save_LIBS=$LIBS | |
6249 | LIBS="-lm $LIBS" | |
81ecdfbb | 6250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6251 | /* end confdefs.h. */ |
c906108c | 6252 | |
c906108c | 6253 | |
bec39cab AC |
6254 | int |
6255 | main () | |
6256 | { | |
81ecdfbb | 6257 | return main (); |
bec39cab AC |
6258 | ; |
6259 | return 0; | |
6260 | } | |
6261 | _ACEOF | |
81ecdfbb | 6262 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6263 | ac_cv_lib_m_main=yes |
6264 | else | |
81ecdfbb | 6265 | ac_cv_lib_m_main=no |
bec39cab | 6266 | fi |
81ecdfbb RW |
6267 | rm -f core conftest.err conftest.$ac_objext \ |
6268 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6269 | LIBS=$ac_check_lib_save_LIBS |
6270 | fi | |
81ecdfbb RW |
6271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6272 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6273 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6274 | cat >>confdefs.h <<_ACEOF |
6275 | #define HAVE_LIBM 1 | |
6276 | _ACEOF | |
6277 | ||
6278 | LIBS="-lm $LIBS" | |
c906108c | 6279 | |
c906108c | 6280 | fi |
bec39cab AC |
6281 | |
6282 | ||
6283 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6284 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6285 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6286 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6287 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6288 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6289 | |
c906108c | 6290 | else |
81ecdfbb RW |
6291 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6292 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6293 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6294 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6295 | else |
6296 | ac_check_lib_save_LIBS=$LIBS | |
6297 | LIBS="-lw $LIBS" | |
81ecdfbb | 6298 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6299 | /* end confdefs.h. */ |
c906108c | 6300 | |
81ecdfbb RW |
6301 | /* Override any GCC internal prototype to avoid an error. |
6302 | Use char because int might match the return type of a GCC | |
6303 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6304 | #ifdef __cplusplus |
6305 | extern "C" | |
6306 | #endif | |
bec39cab AC |
6307 | char wctype (); |
6308 | int | |
6309 | main () | |
6310 | { | |
81ecdfbb | 6311 | return wctype (); |
bec39cab AC |
6312 | ; |
6313 | return 0; | |
6314 | } | |
6315 | _ACEOF | |
81ecdfbb | 6316 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6317 | ac_cv_lib_w_wctype=yes |
6318 | else | |
81ecdfbb | 6319 | ac_cv_lib_w_wctype=no |
bec39cab | 6320 | fi |
81ecdfbb RW |
6321 | rm -f core conftest.err conftest.$ac_objext \ |
6322 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6323 | LIBS=$ac_check_lib_save_LIBS |
6324 | fi | |
81ecdfbb RW |
6325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6326 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6327 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6328 | cat >>confdefs.h <<_ACEOF |
6329 | #define HAVE_LIBW 1 | |
6330 | _ACEOF | |
c906108c | 6331 | |
bec39cab | 6332 | LIBS="-lw $LIBS" |
c906108c | 6333 | |
bec39cab | 6334 | fi |
c906108c | 6335 | |
bec39cab | 6336 | fi |
c906108c | 6337 | |
ddc9cd0f | 6338 | |
bec39cab | 6339 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6341 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6342 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6343 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6344 | else |
6345 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6346 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6347 | /* end confdefs.h. */ |
ddc9cd0f | 6348 | |
81ecdfbb RW |
6349 | /* Override any GCC internal prototype to avoid an error. |
6350 | Use char because int might match the return type of a GCC | |
6351 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6352 | #ifdef __cplusplus |
6353 | extern "C" | |
6354 | #endif | |
bec39cab AC |
6355 | char gethostbyname (); |
6356 | int | |
6357 | main () | |
6358 | { | |
81ecdfbb | 6359 | return gethostbyname (); |
bec39cab AC |
6360 | ; |
6361 | return 0; | |
6362 | } | |
6363 | _ACEOF | |
81ecdfbb RW |
6364 | for ac_lib in '' nsl; do |
6365 | if test -z "$ac_lib"; then | |
6366 | ac_res="none required" | |
6367 | else | |
6368 | ac_res=-l$ac_lib | |
b4e70030 | 6369 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6370 | fi |
6371 | if ac_fn_c_try_link "$LINENO"; then : | |
6372 | ac_cv_search_gethostbyname=$ac_res | |
6373 | fi | |
6374 | rm -f core conftest.err conftest.$ac_objext \ | |
6375 | conftest$ac_exeext | |
6376 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6377 | break | |
6378 | fi | |
6379 | done | |
6380 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6381 | |
bec39cab | 6382 | else |
81ecdfbb | 6383 | ac_cv_search_gethostbyname=no |
bec39cab | 6384 | fi |
81ecdfbb | 6385 | rm conftest.$ac_ext |
bec39cab AC |
6386 | LIBS=$ac_func_search_save_LIBS |
6387 | fi | |
81ecdfbb RW |
6388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6389 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6390 | ac_res=$ac_cv_search_gethostbyname | |
6391 | if test "$ac_res" != no; then : | |
6392 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6393 | |
bec39cab | 6394 | fi |
96baa820 | 6395 | |
c906108c | 6396 | |
b4e70030 | 6397 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6399 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6400 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6401 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6402 | else |
6403 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6404 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6405 | /* end confdefs.h. */ |
6406 | ||
81ecdfbb RW |
6407 | /* Override any GCC internal prototype to avoid an error. |
6408 | Use char because int might match the return type of a GCC | |
6409 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6410 | #ifdef __cplusplus |
6411 | extern "C" | |
6412 | #endif | |
b4e70030 JB |
6413 | char socketpair (); |
6414 | int | |
6415 | main () | |
6416 | { | |
81ecdfbb | 6417 | return socketpair (); |
b4e70030 JB |
6418 | ; |
6419 | return 0; | |
6420 | } | |
6421 | _ACEOF | |
81ecdfbb RW |
6422 | for ac_lib in '' socket; do |
6423 | if test -z "$ac_lib"; then | |
6424 | ac_res="none required" | |
6425 | else | |
6426 | ac_res=-l$ac_lib | |
b4e70030 | 6427 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6428 | fi |
6429 | if ac_fn_c_try_link "$LINENO"; then : | |
6430 | ac_cv_search_socketpair=$ac_res | |
6431 | fi | |
6432 | rm -f core conftest.err conftest.$ac_objext \ | |
6433 | conftest$ac_exeext | |
6434 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6435 | break | |
6436 | fi | |
6437 | done | |
6438 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6439 | |
b4e70030 | 6440 | else |
81ecdfbb | 6441 | ac_cv_search_socketpair=no |
b4e70030 | 6442 | fi |
81ecdfbb | 6443 | rm conftest.$ac_ext |
b4e70030 JB |
6444 | LIBS=$ac_func_search_save_LIBS |
6445 | fi | |
81ecdfbb RW |
6446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6447 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6448 | ac_res=$ac_cv_search_socketpair | |
6449 | if test "$ac_res" != no; then : | |
6450 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6451 | |
6452 | fi | |
6453 | ||
6454 | ||
233a11ab | 6455 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6456 | |
6457 | # See if the user specified whether he wants zlib support or not. | |
6458 | ||
6459 | # Check whether --with-zlib was given. | |
6460 | if test "${with_zlib+set}" = set; then : | |
6461 | withval=$with_zlib; | |
6462 | else | |
6463 | with_zlib=auto | |
6464 | fi | |
6465 | ||
6466 | ||
6467 | if test "$with_zlib" != "no"; then | |
6468 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6469 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6470 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6471 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6472 | else |
6473 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6474 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6475 | /* end confdefs.h. */ |
6476 | ||
81ecdfbb RW |
6477 | /* Override any GCC internal prototype to avoid an error. |
6478 | Use char because int might match the return type of a GCC | |
233a11ab | 6479 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6480 | #ifdef __cplusplus |
6481 | extern "C" | |
6482 | #endif | |
233a11ab CS |
6483 | char zlibVersion (); |
6484 | int | |
6485 | main () | |
6486 | { | |
81ecdfbb | 6487 | return zlibVersion (); |
233a11ab CS |
6488 | ; |
6489 | return 0; | |
6490 | } | |
6491 | _ACEOF | |
81ecdfbb RW |
6492 | for ac_lib in '' z; do |
6493 | if test -z "$ac_lib"; then | |
6494 | ac_res="none required" | |
233a11ab | 6495 | else |
81ecdfbb RW |
6496 | ac_res=-l$ac_lib |
6497 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6498 | fi |
81ecdfbb RW |
6499 | if ac_fn_c_try_link "$LINENO"; then : |
6500 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6501 | fi |
81ecdfbb RW |
6502 | rm -f core conftest.err conftest.$ac_objext \ |
6503 | conftest$ac_exeext | |
6504 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6505 | break | |
233a11ab | 6506 | fi |
81ecdfbb RW |
6507 | done |
6508 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6509 | |
233a11ab | 6510 | else |
81ecdfbb | 6511 | ac_cv_search_zlibVersion=no |
233a11ab | 6512 | fi |
81ecdfbb RW |
6513 | rm conftest.$ac_ext |
6514 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6515 | fi |
81ecdfbb RW |
6516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6517 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6518 | ac_res=$ac_cv_search_zlibVersion | |
6519 | if test "$ac_res" != no; then : | |
6520 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6521 | for ac_header in zlib.h | |
6522 | do : | |
6523 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6524 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6525 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6526 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6527 | _ACEOF |
6528 | ||
6529 | fi | |
6530 | ||
6531 | done | |
6532 | ||
6533 | fi | |
6534 | ||
b040ad30 JB |
6535 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6536 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6537 | fi | |
6538 | fi | |
6539 | ||
233a11ab | 6540 | |
77f120bf | 6541 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6542 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6543 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6544 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6545 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6546 | else |
6547 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6548 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6549 | /* end confdefs.h. */ |
c906108c | 6550 | |
81ecdfbb RW |
6551 | /* Override any GCC internal prototype to avoid an error. |
6552 | Use char because int might match the return type of a GCC | |
6553 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6554 | #ifdef __cplusplus |
6555 | extern "C" | |
6556 | #endif | |
77f120bf | 6557 | char dlgetmodinfo (); |
bec39cab AC |
6558 | int |
6559 | main () | |
6560 | { | |
81ecdfbb | 6561 | return dlgetmodinfo (); |
bec39cab AC |
6562 | ; |
6563 | return 0; | |
6564 | } | |
6565 | _ACEOF | |
81ecdfbb RW |
6566 | for ac_lib in '' dl xpdl; do |
6567 | if test -z "$ac_lib"; then | |
6568 | ac_res="none required" | |
6569 | else | |
6570 | ac_res=-l$ac_lib | |
b4e70030 | 6571 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6572 | fi |
6573 | if ac_fn_c_try_link "$LINENO"; then : | |
6574 | ac_cv_search_dlgetmodinfo=$ac_res | |
6575 | fi | |
6576 | rm -f core conftest.err conftest.$ac_objext \ | |
6577 | conftest$ac_exeext | |
6578 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6579 | break | |
6580 | fi | |
6581 | done | |
6582 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6583 | |
4e8d927d | 6584 | else |
81ecdfbb | 6585 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6586 | fi |
81ecdfbb | 6587 | rm conftest.$ac_ext |
bec39cab AC |
6588 | LIBS=$ac_func_search_save_LIBS |
6589 | fi | |
81ecdfbb RW |
6590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6591 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6592 | ac_res=$ac_cv_search_dlgetmodinfo | |
6593 | if test "$ac_res" != no; then : | |
6594 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6595 | |
8bb2c122 | 6596 | fi |
8bb2c122 | 6597 | |
8bb2c122 | 6598 | |
77f120bf | 6599 | |
77f120bf | 6600 | |
6c7a06a3 | 6601 | |
81ecdfbb RW |
6602 | # Check whether --with-libiconv-prefix was given. |
6603 | if test "${with_libiconv_prefix+set}" = set; then : | |
6604 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6605 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6606 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6607 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6608 | done |
6609 | ||
81ecdfbb RW |
6610 | fi |
6611 | ||
6c7a06a3 | 6612 | |
f18c4681 | 6613 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6614 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6615 | ||
81ecdfbb RW |
6616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6617 | $as_echo_n "checking for iconv... " >&6; } | |
6618 | if test "${am_cv_func_iconv+set}" = set; then : | |
6619 | $as_echo_n "(cached) " >&6 | |
d542061a | 6620 | else |
6c7a06a3 TT |
6621 | |
6622 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6623 | am_cv_lib_iconv=no | |
6624 | am_cv_use_build_libiconv=no | |
f0f20949 | 6625 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6626 | |
6627 | # If libiconv is part of the build tree, then try using it over | |
6628 | # any system iconv. | |
6629 | if test -d ../libiconv; then | |
f18c4681 JB |
6630 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6631 | am_save_LIBS="$LIBS" | |
6632 | am_save_CPPFLAGS="$CPPFLAGS" | |
6633 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6634 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6636 | /* end confdefs.h. */ |
6c7a06a3 TT |
6637 | #include <stdlib.h> |
6638 | #include <iconv.h> | |
d542061a UW |
6639 | int |
6640 | main () | |
6641 | { | |
6c7a06a3 | 6642 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6643 | iconv(cd,NULL,NULL,NULL,NULL); |
6644 | iconv_close(cd); | |
d542061a UW |
6645 | ; |
6646 | return 0; | |
6647 | } | |
6648 | _ACEOF | |
81ecdfbb | 6649 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6650 | am_cv_use_build_libiconv=yes |
f0f20949 | 6651 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6652 | am_cv_lib_iconv=yes |
6653 | am_cv_func_iconv=yes | |
d542061a | 6654 | fi |
81ecdfbb RW |
6655 | rm -f core conftest.err conftest.$ac_objext \ |
6656 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6657 | LIBS="$am_save_LIBS" |
6658 | CPPFLAGS="$am_save_CPPFLAGS" | |
6659 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6660 | break |
6661 | fi | |
6662 | done | |
4edb1e84 | 6663 | fi |
94ae1714 | 6664 | |
4edb1e84 | 6665 | # Next, try to find iconv in libc. |
6c7a06a3 | 6666 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6667 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6668 | /* end confdefs.h. */ |
6c7a06a3 TT |
6669 | #include <stdlib.h> |
6670 | #include <iconv.h> | |
d542061a UW |
6671 | int |
6672 | main () | |
6673 | { | |
6c7a06a3 TT |
6674 | iconv_t cd = iconv_open("",""); |
6675 | iconv(cd,NULL,NULL,NULL,NULL); | |
6676 | iconv_close(cd); | |
d542061a UW |
6677 | ; |
6678 | return 0; | |
6679 | } | |
6680 | _ACEOF | |
81ecdfbb | 6681 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6682 | am_cv_func_iconv=yes |
d542061a | 6683 | fi |
81ecdfbb RW |
6684 | rm -f core conftest.err conftest.$ac_objext \ |
6685 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6686 | fi |
94ae1714 | 6687 | |
4edb1e84 JB |
6688 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6689 | # look in the libiconv prefix, if it was specified by the user. | |
6690 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6691 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6692 | am_save_LIBS="$LIBS" |
6693 | if test -n "$LIBICONV_INCLUDE"; then | |
6694 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6695 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6696 | fi | |
6697 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6698 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6699 | /* end confdefs.h. */ |
6c7a06a3 TT |
6700 | #include <stdlib.h> |
6701 | #include <iconv.h> | |
bec39cab AC |
6702 | int |
6703 | main () | |
6704 | { | |
6c7a06a3 TT |
6705 | iconv_t cd = iconv_open("",""); |
6706 | iconv(cd,NULL,NULL,NULL,NULL); | |
6707 | iconv_close(cd); | |
bec39cab AC |
6708 | ; |
6709 | return 0; | |
6710 | } | |
6711 | _ACEOF | |
81ecdfbb | 6712 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6713 | am_cv_lib_iconv=yes |
6c7a06a3 | 6714 | am_cv_func_iconv=yes |
627af7ea | 6715 | fi |
81ecdfbb RW |
6716 | rm -f core conftest.err conftest.$ac_objext \ |
6717 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6718 | LIBS="$am_save_LIBS" |
fc3b640d | 6719 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6720 | fi |
6721 | ||
6722 | fi | |
81ecdfbb RW |
6723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6724 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6725 | |
6726 | # Set the various flags based on the cache variables. We can't rely | |
6727 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6728 | LIBICONV= |
6729 | if test "$am_cv_lib_iconv" = yes; then | |
6730 | LIBICONV="-liconv" | |
94ae1714 TT |
6731 | else |
6732 | LIBICONV_LIBDIR= | |
6733 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6734 | fi |
6735 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6736 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6737 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6738 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6739 | fi | |
6740 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6741 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6742 | |
6c7a06a3 TT |
6743 | if test "$am_cv_func_iconv" = yes; then |
6744 | ||
81ecdfbb | 6745 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6746 | |
81ecdfbb RW |
6747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6748 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6749 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6750 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6751 | else |
6752 | ||
81ecdfbb | 6753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6754 | /* end confdefs.h. */ |
6755 | ||
6c7a06a3 TT |
6756 | #include <stdlib.h> |
6757 | #include <iconv.h> | |
6758 | extern | |
b4e70030 | 6759 | #ifdef __cplusplus |
6c7a06a3 | 6760 | "C" |
b4e70030 | 6761 | #endif |
6c7a06a3 TT |
6762 | #if defined(__STDC__) || defined(__cplusplus) |
6763 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6764 | #else | |
6765 | size_t iconv(); | |
6766 | #endif | |
6767 | ||
b4e70030 JB |
6768 | int |
6769 | main () | |
6770 | { | |
6c7a06a3 | 6771 | |
b4e70030 JB |
6772 | ; |
6773 | return 0; | |
6774 | } | |
6775 | _ACEOF | |
81ecdfbb | 6776 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6777 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6778 | else |
81ecdfbb | 6779 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6780 | fi |
81ecdfbb | 6781 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6782 | 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);" |
6783 | fi | |
6784 | ||
6785 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 6786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 6787 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
6788 | $as_echo "${ac_t:- |
6789 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
6790 | |
6791 | cat >>confdefs.h <<_ACEOF | |
6792 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6793 | _ACEOF | |
6794 | ||
6795 | fi | |
6c7a06a3 TT |
6796 | |
6797 | ||
478aac75 DE |
6798 | # GDB may fork/exec the iconv program to get the list of supported character |
6799 | # sets. Allow the user to specify where to find it. | |
6800 | # There are several factors affecting the choice of option name: | |
6801 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
6802 | # the build-time location of libiconv files. | |
6803 | # - The program we need to find is iconv, which comes with glibc. The user | |
6804 | # doesn't necessarily have libiconv installed. Therefore naming this | |
6805 | # --with-libiconv-foo feels wrong. | |
6806 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
6807 | # defined to work on directories not files (though it really doesn't know | |
6808 | # the difference). | |
6809 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
6810 | # with --with-libiconv-prefix. | |
6811 | # Putting these together is why the option name is --with-iconv-bin. | |
6812 | ||
6813 | ||
6814 | # Check whether --with-iconv-bin was given. | |
6815 | if test "${with_iconv_bin+set}" = set; then : | |
6816 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
6817 | ||
6818 | cat >>confdefs.h <<_ACEOF | |
6819 | #define ICONV_BIN "${iconv_bin}" | |
6820 | _ACEOF | |
6821 | ||
6822 | ||
6823 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6824 | if test "x$prefix" = xNONE; then | |
6825 | test_prefix=/usr/local | |
6826 | else | |
6827 | test_prefix=$prefix | |
6828 | fi | |
6829 | else | |
6830 | test_prefix=$exec_prefix | |
6831 | fi | |
6832 | value=0 | |
6833 | case ${iconv_bin} in | |
6834 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6835 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6836 | value=1 | |
6837 | ;; | |
6838 | esac | |
6839 | ||
6840 | cat >>confdefs.h <<_ACEOF | |
6841 | #define ICONV_BIN_RELOCATABLE $value | |
6842 | _ACEOF | |
6843 | ||
6844 | ||
6845 | ||
6846 | fi | |
6847 | ||
6848 | ||
6c7a06a3 TT |
6849 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
6850 | # There is a very specific comment in /usr/include/curses.h explaining that | |
6851 | # termcap routines built into libcurses must not be used. | |
6852 | # | |
6853 | # The symptoms we observed so far is GDB unexpectedly changing | |
6854 | # the terminal settings when tgetent is called - this is particularly | |
6855 | # visible as the output is missing carriage returns, and so rapidly | |
6856 | # becomes very hard to read. | |
6857 | # | |
6858 | # The readline configure script has already decided that libtermcap | |
6859 | # was enough for its purposes, and so decided to build readline using | |
6860 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
6861 | # TUI enabled results in both libraries to be used at the same time, | |
6862 | # which is not allowed. This basically means that GDB with TUI is | |
6863 | # broken on alpha-osf. | |
6864 | ||
6865 | case $host_os in | |
6bcc772d RO |
6866 | osf* ) |
6867 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6868 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 6869 | fi |
6bcc772d | 6870 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
6871 | enable_tui=no |
6872 | fi | |
6873 | ;; | |
6874 | esac | |
6875 | ||
cb01cfba | 6876 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 6877 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
6878 | prefer_curses=yes |
6879 | fi | |
6880 | ||
6881 | curses_found=no | |
6882 | if test x"$prefer_curses" = xyes; then | |
6883 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
6884 | # curses library because the latter might not provide all the | |
6885 | # functionality we need. However, this leads to problems on systems | |
6886 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
6887 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
6888 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
6889 | # a situation. | |
81ecdfbb RW |
6890 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
6891 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
6892 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6893 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6894 | else |
6895 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6897 | /* end confdefs.h. */ |
6898 | ||
81ecdfbb RW |
6899 | /* Override any GCC internal prototype to avoid an error. |
6900 | Use char because int might match the return type of a GCC | |
6901 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6902 | #ifdef __cplusplus |
6903 | extern "C" | |
6904 | #endif | |
6c7a06a3 TT |
6905 | char waddstr (); |
6906 | int | |
6907 | main () | |
6908 | { | |
81ecdfbb | 6909 | return waddstr (); |
6c7a06a3 TT |
6910 | ; |
6911 | return 0; | |
6912 | } | |
6913 | _ACEOF | |
81ecdfbb RW |
6914 | for ac_lib in '' ncurses cursesX curses; do |
6915 | if test -z "$ac_lib"; then | |
6916 | ac_res="none required" | |
6917 | else | |
6918 | ac_res=-l$ac_lib | |
6919 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6920 | fi | |
6921 | if ac_fn_c_try_link "$LINENO"; then : | |
6922 | ac_cv_search_waddstr=$ac_res | |
6923 | fi | |
6924 | rm -f core conftest.err conftest.$ac_objext \ | |
6925 | conftest$ac_exeext | |
6926 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6927 | break | |
6928 | fi | |
6929 | done | |
6930 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6931 | ||
6c7a06a3 | 6932 | else |
81ecdfbb RW |
6933 | ac_cv_search_waddstr=no |
6934 | fi | |
6935 | rm conftest.$ac_ext | |
6936 | LIBS=$ac_func_search_save_LIBS | |
6937 | fi | |
6938 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
6939 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
6940 | ac_res=$ac_cv_search_waddstr | |
6941 | if test "$ac_res" != no; then : | |
6942 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
6943 | |
6944 | fi | |
6945 | ||
6946 | ||
cb01cfba JB |
6947 | if test "$ac_cv_search_waddstr" != no; then |
6948 | curses_found=yes | |
6949 | fi | |
6950 | fi | |
6951 | ||
6952 | # Check whether we should enable the TUI, but only do so if we really | |
6953 | # can. | |
6954 | if test x"$enable_tui" != xno; then | |
6955 | if test -d $srcdir/tui; then | |
6956 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
6957 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
6958 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
6959 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
6960 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
6961 | else |
6962 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6963 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 6964 | else |
81ecdfbb RW |
6965 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
6966 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
6967 | fi |
6968 | fi | |
6969 | fi | |
6970 | fi | |
6971 | ||
6972 | # Since GDB uses Readline, we need termcap functionality. In many | |
6973 | # cases this will be provided by the curses library, but some systems | |
6974 | # have a seperate termcap library, or no curses library at all. | |
6975 | ||
6976 | case $host_os in | |
6977 | cygwin*) | |
6978 | if test -d $srcdir/libtermcap; then | |
6979 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
6980 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
6981 | fi ;; | |
6982 | go32* | *djgpp*) | |
6983 | ac_cv_search_tgetent="none required" | |
6984 | ;; | |
6985 | *mingw32*) | |
6986 | ac_cv_search_tgetent="none required" | |
6987 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
6988 | ;; | |
6989 | esac | |
6990 | ||
6991 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
6992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
6993 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
6994 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6995 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6996 | else |
6997 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6999 | /* end confdefs.h. */ |
7000 | ||
81ecdfbb RW |
7001 | /* Override any GCC internal prototype to avoid an error. |
7002 | Use char because int might match the return type of a GCC | |
7003 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
7004 | #ifdef __cplusplus |
7005 | extern "C" | |
7006 | #endif | |
6c7a06a3 TT |
7007 | char tgetent (); |
7008 | int | |
7009 | main () | |
7010 | { | |
81ecdfbb | 7011 | return tgetent (); |
6c7a06a3 TT |
7012 | ; |
7013 | return 0; | |
7014 | } | |
7015 | _ACEOF | |
81ecdfbb RW |
7016 | for ac_lib in '' termcap tinfo curses ncurses; do |
7017 | if test -z "$ac_lib"; then | |
7018 | ac_res="none required" | |
7019 | else | |
7020 | ac_res=-l$ac_lib | |
6c7a06a3 | 7021 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
7022 | fi |
7023 | if ac_fn_c_try_link "$LINENO"; then : | |
7024 | ac_cv_search_tgetent=$ac_res | |
7025 | fi | |
7026 | rm -f core conftest.err conftest.$ac_objext \ | |
7027 | conftest$ac_exeext | |
7028 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
7029 | break | |
7030 | fi | |
7031 | done | |
7032 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 7033 | |
6c7a06a3 | 7034 | else |
81ecdfbb | 7035 | ac_cv_search_tgetent=no |
6c7a06a3 | 7036 | fi |
81ecdfbb | 7037 | rm conftest.$ac_ext |
6c7a06a3 TT |
7038 | LIBS=$ac_func_search_save_LIBS |
7039 | fi | |
81ecdfbb RW |
7040 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7041 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7042 | ac_res=$ac_cv_search_tgetent | |
7043 | if test "$ac_res" != no; then : | |
7044 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7045 | |
06825bd1 MK |
7046 | fi |
7047 | ||
06825bd1 | 7048 | |
bec39cab | 7049 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7050 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7051 | fi |
7052 | ||
3841debe | 7053 | |
81ecdfbb RW |
7054 | # Check whether --with-system-readline was given. |
7055 | if test "${with_system_readline+set}" = set; then : | |
7056 | withval=$with_system_readline; | |
7057 | fi | |
6a30b0a5 | 7058 | |
6a30b0a5 AS |
7059 | |
7060 | if test "$with_system_readline" = yes; then | |
7061 | READLINE=-lreadline | |
7062 | READLINE_DEPS= | |
7063 | READLINE_CFLAGS= | |
39037522 | 7064 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7065 | else |
7066 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7067 | READLINE_DEPS='$(READLINE)' | |
7068 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7069 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7070 | fi |
7071 | ||
7072 | ||
7073 | ||
7074 | ||
7075 | ||
f997c383 SD |
7076 | # Generate jit-reader.h |
7077 | ||
7078 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7079 | TARGET_PTR= | |
7080 | ||
7081 | # The cast to long int works around a bug in the HP C Compiler | |
7082 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7083 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7084 | # This bug is HP SR number 8606223364. | |
7085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7086 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7087 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7088 | $as_echo_n "(cached) " >&6 | |
7089 | else | |
7090 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7091 | ||
7092 | else | |
7093 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7094 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7095 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7096 | { as_fn_set_status 77 | |
7097 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7098 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7099 | else | |
7100 | ac_cv_sizeof_unsigned_long_long=0 | |
7101 | fi | |
7102 | fi | |
7103 | ||
7104 | fi | |
7105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7106 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7107 | ||
7108 | ||
7109 | ||
7110 | cat >>confdefs.h <<_ACEOF | |
7111 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7112 | _ACEOF | |
7113 | ||
7114 | ||
7115 | # The cast to long int works around a bug in the HP C Compiler | |
7116 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7117 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7118 | # This bug is HP SR number 8606223364. | |
7119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7120 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7121 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7122 | $as_echo_n "(cached) " >&6 | |
7123 | else | |
7124 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7125 | ||
7126 | else | |
7127 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7128 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7129 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7130 | { as_fn_set_status 77 | |
7131 | as_fn_error "cannot compute sizeof (unsigned long) | |
7132 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7133 | else | |
7134 | ac_cv_sizeof_unsigned_long=0 | |
7135 | fi | |
7136 | fi | |
7137 | ||
7138 | fi | |
7139 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7140 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7141 | ||
7142 | ||
7143 | ||
7144 | cat >>confdefs.h <<_ACEOF | |
7145 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7146 | _ACEOF | |
7147 | ||
7148 | ||
7149 | # The cast to long int works around a bug in the HP C Compiler | |
7150 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7151 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7152 | # This bug is HP SR number 8606223364. | |
7153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7154 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7155 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7156 | $as_echo_n "(cached) " >&6 | |
7157 | else | |
7158 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7159 | ||
7160 | else | |
7161 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7162 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7163 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7164 | { as_fn_set_status 77 | |
7165 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7166 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7167 | else | |
7168 | ac_cv_sizeof_unsigned___int128=0 | |
7169 | fi | |
7170 | fi | |
7171 | ||
7172 | fi | |
7173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7174 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7175 | ||
7176 | ||
7177 | ||
7178 | cat >>confdefs.h <<_ACEOF | |
7179 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7180 | _ACEOF | |
7181 | ||
7182 | ||
7183 | ||
7184 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7185 | TARGET_PTR="unsigned long" | |
7186 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7187 | TARGET_PTR="unsigned long long" | |
7188 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7189 | TARGET_PTR="unsigned __int128" | |
7190 | else | |
7191 | TARGET_PTR="unsigned long" | |
7192 | fi | |
7193 | ||
7194 | ||
7195 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7196 | ||
7197 | ||
a2d08b9e SD |
7198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7199 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7200 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7201 | $as_echo_n "(cached) " >&6 | |
7202 | else | |
7203 | ac_func_search_save_LIBS=$LIBS | |
7204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7205 | /* end confdefs.h. */ | |
7206 | ||
7207 | /* Override any GCC internal prototype to avoid an error. | |
7208 | Use char because int might match the return type of a GCC | |
7209 | builtin and then its argument prototype would still apply. */ | |
7210 | #ifdef __cplusplus | |
7211 | extern "C" | |
7212 | #endif | |
7213 | char dlopen (); | |
7214 | int | |
7215 | main () | |
7216 | { | |
7217 | return dlopen (); | |
7218 | ; | |
7219 | return 0; | |
7220 | } | |
7221 | _ACEOF | |
7222 | for ac_lib in '' dl; do | |
7223 | if test -z "$ac_lib"; then | |
7224 | ac_res="none required" | |
7225 | else | |
7226 | ac_res=-l$ac_lib | |
7227 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7228 | fi | |
7229 | if ac_fn_c_try_link "$LINENO"; then : | |
7230 | ac_cv_search_dlopen=$ac_res | |
7231 | fi | |
7232 | rm -f core conftest.err conftest.$ac_objext \ | |
7233 | conftest$ac_exeext | |
7234 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7235 | break | |
7236 | fi | |
7237 | done | |
7238 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7239 | ||
7240 | else | |
7241 | ac_cv_search_dlopen=no | |
7242 | fi | |
7243 | rm conftest.$ac_ext | |
7244 | LIBS=$ac_func_search_save_LIBS | |
7245 | fi | |
7246 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7247 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7248 | ac_res=$ac_cv_search_dlopen | |
7249 | if test "$ac_res" != no; then : | |
7250 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7251 | ||
7252 | fi | |
7253 | ||
7254 | ||
39037522 | 7255 | |
b8e0a31c SD |
7256 | |
7257 | # Check whether --with-jit-reader-dir was given. | |
7258 | if test "${with_jit_reader_dir+set}" = set; then : | |
7259 | withval=$with_jit_reader_dir; | |
7260 | JIT_READER_DIR=$withval | |
7261 | else | |
7262 | JIT_READER_DIR=${libdir}/gdb | |
7263 | fi | |
7264 | ||
7265 | ||
7266 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7267 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7268 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7269 | ac_define_dir=`eval echo $ac_define_dir` | |
7270 | ||
7271 | cat >>confdefs.h <<_ACEOF | |
7272 | #define JIT_READER_DIR "$ac_define_dir" | |
7273 | _ACEOF | |
7274 | ||
7275 | ||
7276 | ||
7277 | ||
7278 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7279 | if test "x$prefix" = xNONE; then | |
7280 | test_prefix=/usr/local | |
7281 | else | |
7282 | test_prefix=$prefix | |
7283 | fi | |
7284 | else | |
7285 | test_prefix=$exec_prefix | |
7286 | fi | |
7287 | value=0 | |
7288 | case ${ac_define_dir} in | |
7289 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7290 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7291 | value=1 | |
7292 | ;; | |
7293 | esac | |
7294 | ||
7295 | cat >>confdefs.h <<_ACEOF | |
7296 | #define JIT_READER_DIR_RELOCATABLE $value | |
7297 | _ACEOF | |
7298 | ||
7299 | ||
7300 | ||
7301 | ||
7302 | ||
81ecdfbb RW |
7303 | # Check whether --with-expat was given. |
7304 | if test "${with_expat+set}" = set; then : | |
7305 | withval=$with_expat; | |
5c39566f DJ |
7306 | else |
7307 | with_expat=auto | |
81ecdfbb RW |
7308 | fi |
7309 | ||
7310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7311 | $as_echo_n "checking whether to use expat... " >&6; } | |
7312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7313 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7314 | |
7315 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7316 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7317 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7318 | HAVE_LIBEXPAT=no |
7319 | else | |
7320 | ||
3841debe DJ |
7321 | if test "X$prefix" = "XNONE"; then |
7322 | acl_final_prefix="$ac_default_prefix" | |
7323 | else | |
7324 | acl_final_prefix="$prefix" | |
7325 | fi | |
7326 | if test "X$exec_prefix" = "XNONE"; then | |
7327 | acl_final_exec_prefix='${prefix}' | |
7328 | else | |
7329 | acl_final_exec_prefix="$exec_prefix" | |
7330 | fi | |
7331 | acl_save_prefix="$prefix" | |
7332 | prefix="$acl_final_prefix" | |
7333 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7334 | prefix="$acl_save_prefix" | |
7335 | ||
7336 | ||
81ecdfbb RW |
7337 | # Check whether --with-gnu-ld was given. |
7338 | if test "${with_gnu_ld+set}" = set; then : | |
7339 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7340 | else |
7341 | with_gnu_ld=no | |
81ecdfbb RW |
7342 | fi |
7343 | ||
3841debe DJ |
7344 | # Prepare PATH_SEPARATOR. |
7345 | # The user is always right. | |
7346 | if test "${PATH_SEPARATOR+set}" != set; then | |
7347 | echo "#! /bin/sh" >conf$$.sh | |
7348 | echo "exit 0" >>conf$$.sh | |
7349 | chmod +x conf$$.sh | |
7350 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7351 | PATH_SEPARATOR=';' | |
7352 | else | |
7353 | PATH_SEPARATOR=: | |
7354 | fi | |
7355 | rm -f conf$$.sh | |
7356 | fi | |
7357 | ac_prog=ld | |
7358 | if test "$GCC" = yes; then | |
7359 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7361 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7362 | case $host in |
7363 | *-*-mingw*) | |
7364 | # gcc leaves a trailing carriage return which upsets mingw | |
7365 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7366 | *) | |
7367 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7368 | esac | |
7369 | case $ac_prog in | |
7370 | # Accept absolute paths. | |
7371 | [\\/]* | [A-Za-z]:[\\/]*) | |
7372 | re_direlt='/[^/][^/]*/\.\./' | |
7373 | # Canonicalize the path of ld | |
7374 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7375 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7376 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7377 | done | |
7378 | test -z "$LD" && LD="$ac_prog" | |
7379 | ;; | |
7380 | "") | |
7381 | # If it fails, then pretend we aren't using GCC. | |
7382 | ac_prog=ld | |
7383 | ;; | |
7384 | *) | |
7385 | # If it is relative, then search for the first ld in PATH. | |
7386 | with_gnu_ld=unknown | |
7387 | ;; | |
7388 | esac | |
7389 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7391 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7392 | else |
81ecdfbb RW |
7393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7394 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7395 | fi |
81ecdfbb RW |
7396 | if test "${acl_cv_path_LD+set}" = set; then : |
7397 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7398 | else |
7399 | if test -z "$LD"; then | |
7400 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7401 | for ac_dir in $PATH; do | |
7402 | test -z "$ac_dir" && ac_dir=. | |
7403 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7404 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7405 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7406 | # but apparently some GNU ld's only accept -v. | |
7407 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7408 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7409 | test "$with_gnu_ld" != no && break | |
7410 | else | |
7411 | test "$with_gnu_ld" != yes && break | |
7412 | fi | |
7413 | fi | |
7414 | done | |
7415 | IFS="$ac_save_ifs" | |
7416 | else | |
7417 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7418 | fi | |
7419 | fi | |
7420 | ||
7421 | LD="$acl_cv_path_LD" | |
7422 | if test -n "$LD"; then | |
81ecdfbb RW |
7423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7424 | $as_echo "$LD" >&6; } | |
3841debe | 7425 | else |
81ecdfbb RW |
7426 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7427 | $as_echo "no" >&6; } | |
3841debe | 7428 | fi |
81ecdfbb RW |
7429 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7431 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7432 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7433 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7434 | else |
7435 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7436 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7437 | acl_cv_prog_gnu_ld=yes | |
7438 | else | |
7439 | acl_cv_prog_gnu_ld=no | |
7440 | fi | |
7441 | fi | |
81ecdfbb RW |
7442 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7443 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7444 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7445 | ||
7446 | ||
7447 | ||
81ecdfbb RW |
7448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7449 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7450 | if test "${acl_cv_rpath+set}" = set; then : | |
7451 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7452 | else |
7453 | ||
7454 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7455 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7456 | . ./conftest.sh | |
7457 | rm -f ./conftest.sh | |
7458 | acl_cv_rpath=done | |
7459 | ||
7460 | fi | |
81ecdfbb RW |
7461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7462 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7463 | wl="$acl_cv_wl" |
7464 | libext="$acl_cv_libext" | |
7465 | shlibext="$acl_cv_shlibext" | |
7466 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7467 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7468 | hardcode_direct="$acl_cv_hardcode_direct" | |
7469 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7470 | # Check whether --enable-rpath was given. |
7471 | if test "${enable_rpath+set}" = set; then : | |
7472 | enableval=$enable_rpath; : | |
3841debe DJ |
7473 | else |
7474 | enable_rpath=yes | |
81ecdfbb RW |
7475 | fi |
7476 | ||
3841debe DJ |
7477 | |
7478 | ||
7479 | ||
7480 | ||
7481 | ||
7482 | ||
7483 | ||
7484 | ||
7485 | ||
7486 | use_additional=yes | |
7487 | ||
7488 | acl_save_prefix="$prefix" | |
7489 | prefix="$acl_final_prefix" | |
7490 | acl_save_exec_prefix="$exec_prefix" | |
7491 | exec_prefix="$acl_final_exec_prefix" | |
7492 | ||
7493 | eval additional_includedir=\"$includedir\" | |
7494 | eval additional_libdir=\"$libdir\" | |
7495 | ||
7496 | exec_prefix="$acl_save_exec_prefix" | |
7497 | prefix="$acl_save_prefix" | |
7498 | ||
7499 | ||
81ecdfbb RW |
7500 | # Check whether --with-libexpat-prefix was given. |
7501 | if test "${with_libexpat_prefix+set}" = set; then : | |
7502 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7503 | if test "X$withval" = "Xno"; then |
7504 | use_additional=no | |
7505 | else | |
7506 | if test "X$withval" = "X"; then | |
7507 | ||
7508 | acl_save_prefix="$prefix" | |
7509 | prefix="$acl_final_prefix" | |
7510 | acl_save_exec_prefix="$exec_prefix" | |
7511 | exec_prefix="$acl_final_exec_prefix" | |
7512 | ||
7513 | eval additional_includedir=\"$includedir\" | |
7514 | eval additional_libdir=\"$libdir\" | |
7515 | ||
7516 | exec_prefix="$acl_save_exec_prefix" | |
7517 | prefix="$acl_save_prefix" | |
7518 | ||
7519 | else | |
7520 | additional_includedir="$withval/include" | |
7521 | additional_libdir="$withval/lib" | |
7522 | fi | |
7523 | fi | |
7524 | ||
81ecdfbb RW |
7525 | fi |
7526 | ||
3841debe DJ |
7527 | LIBEXPAT= |
7528 | LTLIBEXPAT= | |
7529 | INCEXPAT= | |
7530 | rpathdirs= | |
7531 | ltrpathdirs= | |
7532 | names_already_handled= | |
7533 | names_next_round='expat ' | |
7534 | while test -n "$names_next_round"; do | |
7535 | names_this_round="$names_next_round" | |
7536 | names_next_round= | |
7537 | for name in $names_this_round; do | |
7538 | already_handled= | |
7539 | for n in $names_already_handled; do | |
7540 | if test "$n" = "$name"; then | |
7541 | already_handled=yes | |
7542 | break | |
7543 | fi | |
7544 | done | |
7545 | if test -z "$already_handled"; then | |
7546 | names_already_handled="$names_already_handled $name" | |
7547 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7548 | eval value=\"\$HAVE_LIB$uppername\" | |
7549 | if test -n "$value"; then | |
7550 | if test "$value" = yes; then | |
7551 | eval value=\"\$LIB$uppername\" | |
7552 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7553 | eval value=\"\$LTLIB$uppername\" | |
7554 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7555 | else | |
7556 | : | |
7557 | fi | |
7558 | else | |
7559 | found_dir= | |
7560 | found_la= | |
7561 | found_so= | |
7562 | found_a= | |
7563 | if test $use_additional = yes; then | |
7564 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7565 | found_dir="$additional_libdir" | |
7566 | found_so="$additional_libdir/lib$name.$shlibext" | |
7567 | if test -f "$additional_libdir/lib$name.la"; then | |
7568 | found_la="$additional_libdir/lib$name.la" | |
7569 | fi | |
7570 | else | |
7571 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7572 | found_dir="$additional_libdir" | |
7573 | found_a="$additional_libdir/lib$name.$libext" | |
7574 | if test -f "$additional_libdir/lib$name.la"; then | |
7575 | found_la="$additional_libdir/lib$name.la" | |
7576 | fi | |
7577 | fi | |
7578 | fi | |
7579 | fi | |
7580 | if test "X$found_dir" = "X"; then | |
7581 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7582 | ||
7583 | acl_save_prefix="$prefix" | |
7584 | prefix="$acl_final_prefix" | |
7585 | acl_save_exec_prefix="$exec_prefix" | |
7586 | exec_prefix="$acl_final_exec_prefix" | |
7587 | eval x=\"$x\" | |
7588 | exec_prefix="$acl_save_exec_prefix" | |
7589 | prefix="$acl_save_prefix" | |
7590 | ||
7591 | case "$x" in | |
7592 | -L*) | |
7593 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7594 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7595 | found_dir="$dir" | |
7596 | found_so="$dir/lib$name.$shlibext" | |
7597 | if test -f "$dir/lib$name.la"; then | |
7598 | found_la="$dir/lib$name.la" | |
7599 | fi | |
7600 | else | |
7601 | if test -f "$dir/lib$name.$libext"; then | |
7602 | found_dir="$dir" | |
7603 | found_a="$dir/lib$name.$libext" | |
7604 | if test -f "$dir/lib$name.la"; then | |
7605 | found_la="$dir/lib$name.la" | |
7606 | fi | |
7607 | fi | |
7608 | fi | |
7609 | ;; | |
7610 | esac | |
7611 | if test "X$found_dir" != "X"; then | |
7612 | break | |
7613 | fi | |
7614 | done | |
7615 | fi | |
7616 | if test "X$found_dir" != "X"; then | |
7617 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7618 | if test "X$found_so" != "X"; then | |
7619 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7620 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7621 | else | |
7622 | haveit= | |
7623 | for x in $ltrpathdirs; do | |
7624 | if test "X$x" = "X$found_dir"; then | |
7625 | haveit=yes | |
7626 | break | |
7627 | fi | |
7628 | done | |
7629 | if test -z "$haveit"; then | |
7630 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7631 | fi | |
7632 | if test "$hardcode_direct" = yes; then | |
7633 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7634 | else | |
7635 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7636 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7637 | haveit= | |
7638 | for x in $rpathdirs; do | |
7639 | if test "X$x" = "X$found_dir"; then | |
7640 | haveit=yes | |
7641 | break | |
7642 | fi | |
7643 | done | |
7644 | if test -z "$haveit"; then | |
7645 | rpathdirs="$rpathdirs $found_dir" | |
7646 | fi | |
7647 | else | |
7648 | haveit= | |
7649 | for x in $LDFLAGS $LIBEXPAT; do | |
7650 | ||
7651 | acl_save_prefix="$prefix" | |
7652 | prefix="$acl_final_prefix" | |
7653 | acl_save_exec_prefix="$exec_prefix" | |
7654 | exec_prefix="$acl_final_exec_prefix" | |
7655 | eval x=\"$x\" | |
7656 | exec_prefix="$acl_save_exec_prefix" | |
7657 | prefix="$acl_save_prefix" | |
7658 | ||
7659 | if test "X$x" = "X-L$found_dir"; then | |
7660 | haveit=yes | |
7661 | break | |
7662 | fi | |
7663 | done | |
7664 | if test -z "$haveit"; then | |
7665 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7666 | fi | |
7667 | if test "$hardcode_minus_L" != no; then | |
7668 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7669 | else | |
7670 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7671 | fi | |
7672 | fi | |
7673 | fi | |
7674 | fi | |
7675 | else | |
7676 | if test "X$found_a" != "X"; then | |
7677 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7678 | else | |
7679 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7680 | fi | |
7681 | fi | |
7682 | additional_includedir= | |
7683 | case "$found_dir" in | |
7684 | */lib | */lib/) | |
7685 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7686 | additional_includedir="$basedir/include" | |
7687 | ;; | |
7688 | esac | |
7689 | if test "X$additional_includedir" != "X"; then | |
7690 | if test "X$additional_includedir" != "X/usr/include"; then | |
7691 | haveit= | |
7692 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7693 | if test -n "$GCC"; then | |
7694 | case $host_os in | |
7695 | linux*) haveit=yes;; | |
7696 | esac | |
7697 | fi | |
7698 | fi | |
7699 | if test -z "$haveit"; then | |
7700 | for x in $CPPFLAGS $INCEXPAT; do | |
7701 | ||
7702 | acl_save_prefix="$prefix" | |
7703 | prefix="$acl_final_prefix" | |
7704 | acl_save_exec_prefix="$exec_prefix" | |
7705 | exec_prefix="$acl_final_exec_prefix" | |
7706 | eval x=\"$x\" | |
7707 | exec_prefix="$acl_save_exec_prefix" | |
7708 | prefix="$acl_save_prefix" | |
7709 | ||
7710 | if test "X$x" = "X-I$additional_includedir"; then | |
7711 | haveit=yes | |
7712 | break | |
7713 | fi | |
7714 | done | |
7715 | if test -z "$haveit"; then | |
7716 | if test -d "$additional_includedir"; then | |
7717 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7718 | fi | |
7719 | fi | |
7720 | fi | |
7721 | fi | |
7722 | fi | |
7723 | if test -n "$found_la"; then | |
7724 | save_libdir="$libdir" | |
7725 | case "$found_la" in | |
7726 | */* | *\\*) . "$found_la" ;; | |
7727 | *) . "./$found_la" ;; | |
7728 | esac | |
7729 | libdir="$save_libdir" | |
7730 | for dep in $dependency_libs; do | |
7731 | case "$dep" in | |
7732 | -L*) | |
7733 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7734 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7735 | haveit= | |
7736 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7737 | if test -n "$GCC"; then | |
7738 | case $host_os in | |
7739 | linux*) haveit=yes;; | |
7740 | esac | |
7741 | fi | |
7742 | fi | |
7743 | if test -z "$haveit"; then | |
7744 | haveit= | |
7745 | for x in $LDFLAGS $LIBEXPAT; do | |
7746 | ||
7747 | acl_save_prefix="$prefix" | |
7748 | prefix="$acl_final_prefix" | |
7749 | acl_save_exec_prefix="$exec_prefix" | |
7750 | exec_prefix="$acl_final_exec_prefix" | |
7751 | eval x=\"$x\" | |
7752 | exec_prefix="$acl_save_exec_prefix" | |
7753 | prefix="$acl_save_prefix" | |
7754 | ||
7755 | if test "X$x" = "X-L$additional_libdir"; then | |
7756 | haveit=yes | |
7757 | break | |
7758 | fi | |
7759 | done | |
7760 | if test -z "$haveit"; then | |
7761 | if test -d "$additional_libdir"; then | |
7762 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7763 | fi | |
7764 | fi | |
7765 | haveit= | |
7766 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7767 | ||
7768 | acl_save_prefix="$prefix" | |
7769 | prefix="$acl_final_prefix" | |
7770 | acl_save_exec_prefix="$exec_prefix" | |
7771 | exec_prefix="$acl_final_exec_prefix" | |
7772 | eval x=\"$x\" | |
7773 | exec_prefix="$acl_save_exec_prefix" | |
7774 | prefix="$acl_save_prefix" | |
7775 | ||
7776 | if test "X$x" = "X-L$additional_libdir"; then | |
7777 | haveit=yes | |
7778 | break | |
7779 | fi | |
7780 | done | |
7781 | if test -z "$haveit"; then | |
7782 | if test -d "$additional_libdir"; then | |
7783 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7784 | fi | |
7785 | fi | |
7786 | fi | |
7787 | fi | |
7788 | ;; | |
7789 | -R*) | |
7790 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7791 | if test "$enable_rpath" != no; then | |
7792 | haveit= | |
7793 | for x in $rpathdirs; do | |
7794 | if test "X$x" = "X$dir"; then | |
7795 | haveit=yes | |
7796 | break | |
7797 | fi | |
7798 | done | |
7799 | if test -z "$haveit"; then | |
7800 | rpathdirs="$rpathdirs $dir" | |
7801 | fi | |
7802 | haveit= | |
7803 | for x in $ltrpathdirs; do | |
7804 | if test "X$x" = "X$dir"; then | |
7805 | haveit=yes | |
7806 | break | |
7807 | fi | |
7808 | done | |
7809 | if test -z "$haveit"; then | |
7810 | ltrpathdirs="$ltrpathdirs $dir" | |
7811 | fi | |
7812 | fi | |
7813 | ;; | |
7814 | -l*) | |
7815 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7816 | ;; | |
7817 | *.la) | |
7818 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7819 | ;; | |
7820 | *) | |
7821 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
7822 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
7823 | ;; | |
81ecdfbb RW |
7824 | esac |
7825 | done | |
7826 | fi | |
7827 | else | |
7828 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7829 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
7830 | fi | |
7831 | fi | |
7832 | fi | |
7833 | done | |
7834 | done | |
7835 | if test "X$rpathdirs" != "X"; then | |
7836 | if test -n "$hardcode_libdir_separator"; then | |
7837 | alldirs= | |
7838 | for found_dir in $rpathdirs; do | |
7839 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7840 | done | |
7841 | acl_save_libdir="$libdir" | |
7842 | libdir="$alldirs" | |
7843 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7844 | libdir="$acl_save_libdir" | |
7845 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7846 | else | |
7847 | for found_dir in $rpathdirs; do | |
7848 | acl_save_libdir="$libdir" | |
7849 | libdir="$found_dir" | |
7850 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7851 | libdir="$acl_save_libdir" | |
7852 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7853 | done | |
7854 | fi | |
7855 | fi | |
7856 | if test "X$ltrpathdirs" != "X"; then | |
7857 | for found_dir in $ltrpathdirs; do | |
7858 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
7859 | done | |
7860 | fi | |
a9322a30 TT |
7861 | |
7862 | ||
81ecdfbb | 7863 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 7864 | |
81ecdfbb RW |
7865 | for element in $INCEXPAT; do |
7866 | haveit= | |
7867 | for x in $CPPFLAGS; do | |
a9322a30 | 7868 | |
81ecdfbb RW |
7869 | acl_save_prefix="$prefix" |
7870 | prefix="$acl_final_prefix" | |
7871 | acl_save_exec_prefix="$exec_prefix" | |
7872 | exec_prefix="$acl_final_exec_prefix" | |
7873 | eval x=\"$x\" | |
7874 | exec_prefix="$acl_save_exec_prefix" | |
7875 | prefix="$acl_save_prefix" | |
a8111142 | 7876 | |
81ecdfbb RW |
7877 | if test "X$x" = "X$element"; then |
7878 | haveit=yes | |
7879 | break | |
7880 | fi | |
7881 | done | |
7882 | if test -z "$haveit"; then | |
7883 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
7884 | fi | |
7885 | done | |
a9322a30 TT |
7886 | |
7887 | ||
81ecdfbb RW |
7888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
7889 | $as_echo_n "checking for libexpat... " >&6; } | |
7890 | if test "${ac_cv_libexpat+set}" = set; then : | |
7891 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7892 | else |
bec39cab | 7893 | |
81ecdfbb RW |
7894 | ac_save_LIBS="$LIBS" |
7895 | LIBS="$LIBS $LIBEXPAT" | |
7896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 7897 | /* end confdefs.h. */ |
81ecdfbb RW |
7898 | #include "expat.h" |
7899 | int | |
7900 | main () | |
7901 | { | |
7902 | XML_Parser p = XML_ParserCreate (0); | |
7903 | ; | |
7904 | return 0; | |
7905 | } | |
bec39cab | 7906 | _ACEOF |
81ecdfbb RW |
7907 | if ac_fn_c_try_link "$LINENO"; then : |
7908 | ac_cv_libexpat=yes | |
c906108c | 7909 | else |
81ecdfbb | 7910 | ac_cv_libexpat=no |
bec39cab | 7911 | fi |
81ecdfbb RW |
7912 | rm -f core conftest.err conftest.$ac_objext \ |
7913 | conftest$ac_exeext conftest.$ac_ext | |
7914 | LIBS="$ac_save_LIBS" | |
c906108c | 7915 | |
95ca63c4 | 7916 | fi |
81ecdfbb RW |
7917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
7918 | $as_echo "$ac_cv_libexpat" >&6; } | |
7919 | if test "$ac_cv_libexpat" = yes; then | |
7920 | HAVE_LIBEXPAT=yes | |
bec39cab | 7921 | |
81ecdfbb | 7922 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 7923 | |
81ecdfbb RW |
7924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
7925 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
7926 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
7927 | $as_echo "$LIBEXPAT" >&6; } | |
7928 | else | |
7929 | HAVE_LIBEXPAT=no | |
7930 | CPPFLAGS="$ac_save_CPPFLAGS" | |
7931 | LIBEXPAT= | |
7932 | LTLIBEXPAT= | |
7933 | fi | |
95ca63c4 CF |
7934 | |
7935 | ||
7936 | ||
7cb9022a MK |
7937 | |
7938 | ||
bec39cab | 7939 | |
81ecdfbb RW |
7940 | if test "$HAVE_LIBEXPAT" != yes; then |
7941 | if test "$with_expat" = yes; then | |
7942 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
7943 | else | |
7944 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
7945 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
7946 | fi | |
7947 | else | |
7948 | save_LIBS=$LIBS | |
7949 | LIBS="$LIBS $LIBEXPAT" | |
7950 | for ac_func in XML_StopParser | |
7951 | do : | |
7952 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
7953 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 7954 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7955 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 7956 | _ACEOF |
95ca63c4 | 7957 | |
bec39cab | 7958 | fi |
bec39cab | 7959 | done |
95ca63c4 | 7960 | |
81ecdfbb RW |
7961 | LIBS=$save_LIBS |
7962 | fi | |
a9322a30 TT |
7963 | fi |
7964 | ||
a9322a30 | 7965 | |
a9322a30 TT |
7966 | |
7967 | ||
ec685c5e | 7968 | |
0c4a4063 | 7969 | |
81ecdfbb RW |
7970 | # Check whether --with-python was given. |
7971 | if test "${with_python+set}" = set; then : | |
7972 | withval=$with_python; | |
bec39cab | 7973 | else |
81ecdfbb | 7974 | with_python=auto |
bec39cab | 7975 | fi |
bec39cab | 7976 | |
81ecdfbb RW |
7977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
7978 | $as_echo_n "checking whether to use python... " >&6; } | |
7979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
7980 | $as_echo "$with_python" >&6; } | |
9a156167 | 7981 | |
81ecdfbb RW |
7982 | if test "${with_python}" = no; then |
7983 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
7984 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
7985 | have_libpython=no | |
bec39cab | 7986 | else |
81ecdfbb | 7987 | case "${with_python}" in |
8c85a4e2 | 7988 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
7989 | if test -d ${with_python}; then |
7990 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 7991 | python_prog="${with_python}/bin/python" |
0c4a4063 | 7992 | python_prefix= |
9c4ea6c5 JB |
7993 | # If python does not exit ${with_python}/bin, then try in |
7994 | # ${with_python}. On Windows/MinGW, this is where the Python | |
7995 | # executable is. | |
7996 | if test ! -x "${python_prog}"; then | |
7997 | python_prog="${with_python}/python" | |
7998 | python_prefix= | |
7999 | fi | |
e7a30f46 | 8000 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
8001 | # Fall back to gdb 7.0/7.1 behaviour. |
8002 | python_prog=missing | |
0c4a4063 | 8003 | python_prefix=${with_python} |
ec685c5e | 8004 | fi |
e7a30f46 | 8005 | elif test -x "${with_python}"; then |
ec685c5e DE |
8006 | # While we can't run python compiled for $host (unless host == build), |
8007 | # the user could write a script that provides the needed information, | |
8008 | # so we support that. | |
ec685c5e | 8009 | python_prog=${with_python} |
0c4a4063 | 8010 | python_prefix= |
ec685c5e DE |
8011 | else |
8012 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
8013 | fi | |
81ecdfbb | 8014 | ;; |
ec685c5e DE |
8015 | */*) |
8016 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
8017 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
8018 | ;; | |
ec685c5e DE |
8019 | *) |
8020 | # The user has either specified auto, yes, or the name of the python | |
8021 | # program assumed to be in $PATH. | |
8022 | python_prefix= | |
8023 | case "${with_python}" in | |
8024 | yes | auto) | |
8025 | if test ${build} = ${host}; then | |
8026 | # Extract the first word of "python", so it can be a program name with args. | |
8027 | set dummy python; ac_word=$2 | |
8028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8029 | $as_echo_n "checking for $ac_word... " >&6; } | |
8030 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8031 | $as_echo_n "(cached) " >&6 | |
8032 | else | |
8033 | case $python_prog_path in | |
8034 | [\\/]* | ?:[\\/]*) | |
8035 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8036 | ;; | |
8037 | *) | |
8038 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8039 | for as_dir in $PATH | |
8040 | do | |
8041 | IFS=$as_save_IFS | |
8042 | test -z "$as_dir" && as_dir=. | |
8043 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8044 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8045 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8046 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8047 | break 2 | |
8048 | fi | |
8049 | done | |
8050 | done | |
8051 | IFS=$as_save_IFS | |
8052 | ||
8053 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8054 | ;; | |
8055 | esac | |
8056 | fi | |
8057 | python_prog_path=$ac_cv_path_python_prog_path | |
8058 | if test -n "$python_prog_path"; then | |
8059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8060 | $as_echo "$python_prog_path" >&6; } | |
8061 | else | |
8062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8063 | $as_echo "no" >&6; } | |
8064 | fi | |
8065 | ||
8066 | ||
8067 | if test "${python_prog_path}" = missing; then | |
8068 | python_prog=missing | |
8069 | else | |
8070 | python_prog=${python_prog_path} | |
8071 | fi | |
8072 | else | |
8073 | # Not much we can do except assume the cross-compiler will find the | |
8074 | # right files. | |
8075 | python_prog=missing | |
8076 | fi | |
8077 | ;; | |
8078 | *) | |
8079 | # While we can't run python compiled for $host (unless host == build), | |
8080 | # the user could write a script that provides the needed information, | |
8081 | # so we support that. | |
8082 | python_prog="${with_python}" | |
8083 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8084 | set dummy ${python_prog}; ac_word=$2 | |
8085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8086 | $as_echo_n "checking for $ac_word... " >&6; } | |
8087 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8088 | $as_echo_n "(cached) " >&6 | |
8089 | else | |
8090 | case $python_prog_path in | |
8091 | [\\/]* | ?:[\\/]*) | |
8092 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8093 | ;; | |
8094 | *) | |
8095 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8096 | for as_dir in $PATH | |
8097 | do | |
8098 | IFS=$as_save_IFS | |
8099 | test -z "$as_dir" && as_dir=. | |
8100 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8101 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8102 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8103 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8104 | break 2 | |
8105 | fi | |
8106 | done | |
8107 | done | |
8108 | IFS=$as_save_IFS | |
8109 | ||
8110 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8111 | ;; | |
8112 | esac | |
8113 | fi | |
8114 | python_prog_path=$ac_cv_path_python_prog_path | |
8115 | if test -n "$python_prog_path"; then | |
8116 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8117 | $as_echo "$python_prog_path" >&6; } | |
8118 | else | |
8119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8120 | $as_echo "no" >&6; } | |
8121 | fi | |
8122 | ||
8123 | ||
8124 | if test "${python_prog_path}" = missing; then | |
8125 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8126 | fi | |
8127 | ;; | |
8128 | esac | |
81ecdfbb RW |
8129 | esac |
8130 | ||
ec685c5e | 8131 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8132 | # We have a python program to use, but it may be too old. |
8133 | # Don't flag an error for --with-python=auto (the default). | |
8134 | have_python_config=yes | |
ec685c5e DE |
8135 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8136 | if test $? != 0; then | |
e7a30f46 DE |
8137 | have_python_config=failed |
8138 | if test "${with_python}" != auto; then | |
8139 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8140 | fi | |
ec685c5e DE |
8141 | fi |
8142 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8143 | if test $? != 0; then | |
e7a30f46 DE |
8144 | have_python_config=failed |
8145 | if test "${with_python}" != auto; then | |
8146 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8147 | fi | |
ec685c5e | 8148 | fi |
0c4a4063 DE |
8149 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8150 | if test $? != 0; then | |
e7a30f46 DE |
8151 | have_python_config=failed |
8152 | if test "${with_python}" != auto; then | |
8153 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8154 | fi | |
0c4a4063 | 8155 | fi |
ec685c5e | 8156 | else |
ac534cba JB |
8157 | # We do not have a python executable we can use to determine where |
8158 | # to find the Python headers and libs. We cannot guess the include | |
8159 | # path from the python_prefix either, because that include path | |
8160 | # depends on the Python version. So, there is nothing much we can | |
8161 | # do except assume that the compiler will be able to find those files. | |
8162 | python_includes= | |
8163 | python_libs= | |
0c4a4063 | 8164 | have_python_config=no |
ec685c5e | 8165 | fi |
bec39cab | 8166 | |
ec685c5e DE |
8167 | # If we have python-config, only try the configuration it provides. |
8168 | # Otherwise fallback on the old way of trying different versions of | |
8169 | # python in turn. | |
81ecdfbb | 8170 | |
ec685c5e DE |
8171 | have_libpython=no |
8172 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8173 | # Determine the Python version by extracting "-lpython<version>" |
8174 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8175 | # being decimal numbers, but can also be XY (seen on Windows). | |
8176 | # | |
8177 | # The extraction is performed using sed with a regular expression. | |
8178 | # Initially, the regexp used was using the '?' quantifier to make | |
8179 | # the dot in the version number optional. Unfortunately, this | |
8180 | # does not work with non-GNU versions of sed because, because of | |
8181 | # what looks like a limitation (the '?' quantifier does not work | |
8182 | # with back-references). We work around this limitation by using | |
8183 | # the '*' quantifier instead. It means that, in theory, we might | |
8184 | # match unexpected version strings such as "-lpython2..7", but | |
8185 | # this seems unlikely in practice. And even if that happens, | |
8186 | # an error will be triggered later on, when checking that version | |
8187 | # number. | |
ec685c5e | 8188 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8189 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8190 | case "${python_version}" in |
8191 | python*) | |
ec685c5e DE |
8192 | |
8193 | version=${python_version} | |
8194 | ||
8195 | new_CPPFLAGS=${python_includes} | |
8196 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8198 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8199 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8200 | save_LIBS=$LIBS |
ec685c5e DE |
8201 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8202 | LIBS="$LIBS $new_LIBS" | |
8203 | found_usable_python=no | |
81ecdfbb | 8204 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8205 | /* end confdefs.h. */ |
ac534cba | 8206 | #include "Python.h" |
81ecdfbb RW |
8207 | int |
8208 | main () | |
8209 | { | |
8210 | Py_Initialize (); | |
8211 | ; | |
8212 | return 0; | |
8213 | } | |
bec39cab | 8214 | _ACEOF |
81ecdfbb | 8215 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8216 | have_libpython=${version} |
8217 | found_usable_python=yes | |
ac534cba JB |
8218 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8219 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8220 | fi |
81ecdfbb RW |
8221 | rm -f core conftest.err conftest.$ac_objext \ |
8222 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8223 | CPPFLAGS=$save_CPPFLAGS |
8224 | LIBS=$save_LIBS | |
ec685c5e DE |
8225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8226 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8227 | |
0c4a4063 DE |
8228 | ;; |
8229 | *) | |
ec685c5e | 8230 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8231 | ;; |
8232 | esac | |
e7a30f46 | 8233 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8234 | if test "${have_libpython}" = no; then |
9a156167 | 8235 | |
420697bb TT |
8236 | version=python2.7 |
8237 | ||
8238 | new_CPPFLAGS=${python_includes} | |
8239 | new_LIBS="${python_libs} -lpython2.7" | |
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" |
420697bb TT |
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 | |
420697bb TT |
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 | |
420697bb TT |
8268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8269 | $as_echo "${found_usable_python}" >&6; } | |
8270 | ||
8271 | fi | |
8272 | if test "${have_libpython}" = no; then | |
8273 | ||
ec685c5e DE |
8274 | version=python2.6 |
8275 | ||
8276 | new_CPPFLAGS=${python_includes} | |
8277 | new_LIBS="${python_libs} -lpython2.6" | |
8278 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8279 | $as_echo_n "checking for ${version}... " >&6; } | |
8280 | save_CPPFLAGS=$CPPFLAGS | |
8281 | save_LIBS=$LIBS | |
8282 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8283 | LIBS="$LIBS $new_LIBS" | |
8284 | found_usable_python=no | |
8285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8286 | /* end confdefs.h. */ | |
ac534cba | 8287 | #include "Python.h" |
ec685c5e DE |
8288 | int |
8289 | main () | |
8290 | { | |
8291 | Py_Initialize (); | |
8292 | ; | |
8293 | return 0; | |
8294 | } | |
8295 | _ACEOF | |
8296 | if ac_fn_c_try_link "$LINENO"; then : | |
8297 | have_libpython=${version} | |
8298 | found_usable_python=yes | |
ac534cba JB |
8299 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8300 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8301 | fi |
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; } | |
9a156167 | 8308 | |
81ecdfbb | 8309 | fi |
ec685c5e | 8310 | if test ${have_libpython} = no; then |
9a156167 | 8311 | |
81ecdfbb | 8312 | version=python2.5 |
9a156167 | 8313 | |
ec685c5e DE |
8314 | new_CPPFLAGS=${python_includes} |
8315 | new_LIBS="${python_libs} -lpython2.5" | |
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" |
81ecdfbb RW |
8326 | int |
8327 | main () | |
8328 | { | |
8329 | Py_Initialize (); | |
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; } | |
a9322a30 | 8346 | |
81ecdfbb | 8347 | fi |
ec685c5e | 8348 | if test ${have_libpython} = no; then |
a9322a30 | 8349 | |
81ecdfbb | 8350 | version=python2.4 |
a9322a30 | 8351 | |
ec685c5e DE |
8352 | new_CPPFLAGS=${python_includes} |
8353 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8355 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8356 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8357 | save_LIBS=$LIBS |
ec685c5e DE |
8358 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8359 | LIBS="$LIBS $new_LIBS" | |
8360 | found_usable_python=no | |
81ecdfbb | 8361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8362 | /* end confdefs.h. */ |
ac534cba | 8363 | #include "Python.h" |
a9322a30 TT |
8364 | int |
8365 | main () | |
8366 | { | |
81ecdfbb | 8367 | Py_Initialize (); |
a9322a30 TT |
8368 | ; |
8369 | return 0; | |
8370 | } | |
436868fb | 8371 | _ACEOF |
81ecdfbb | 8372 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8373 | have_libpython=${version} |
8374 | found_usable_python=yes | |
ac534cba JB |
8375 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8376 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8377 | fi |
81ecdfbb RW |
8378 | rm -f core conftest.err conftest.$ac_objext \ |
8379 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8380 | CPPFLAGS=$save_CPPFLAGS |
8381 | LIBS=$save_LIBS | |
ec685c5e DE |
8382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8383 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8384 | |
ec685c5e DE |
8385 | fi |
8386 | fi | |
9c4ea6c5 | 8387 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8388 | |
8389 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8390 | ||
9c4ea6c5 | 8391 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8392 | |
8393 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8394 | ||
9c4ea6c5 | 8395 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8396 | |
8397 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8398 | ||
9c4ea6c5 | 8399 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8400 | |
8401 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8402 | ||
81ecdfbb | 8403 | fi |
ec685c5e DE |
8404 | |
8405 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8406 | case "${with_python}" in |
8407 | yes) | |
8408 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8409 | ;; | |
8410 | auto) | |
8411 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8412 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8413 | ;; | |
8414 | *) | |
8415 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8416 | ;; | |
8417 | esac | |
0c4a4063 DE |
8418 | else |
8419 | if test -n "${python_prefix}"; then | |
8420 | ||
8421 | cat >>confdefs.h <<_ACEOF | |
8422 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8423 | _ACEOF | |
8424 | ||
8425 | ||
8426 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8427 | if test "x$prefix" = xNONE; then | |
8428 | test_prefix=/usr/local | |
8429 | else | |
8430 | test_prefix=$prefix | |
8431 | fi | |
8432 | else | |
8433 | test_prefix=$exec_prefix | |
8434 | fi | |
8435 | value=0 | |
8436 | case ${python_prefix} in | |
8437 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8438 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8439 | value=1 | |
8440 | ;; | |
8441 | esac | |
8442 | ||
8443 | cat >>confdefs.h <<_ACEOF | |
8444 | #define PYTHON_PATH_RELOCATABLE $value | |
8445 | _ACEOF | |
8446 | ||
8447 | ||
8448 | fi | |
81ecdfbb | 8449 | fi |
436868fb | 8450 | fi |
436868fb | 8451 | |
ec685c5e | 8452 | if test "${have_libpython}" != no; then |
436868fb | 8453 | |
81ecdfbb | 8454 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8455 | |
81ecdfbb RW |
8456 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8457 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8458 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8459 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8460 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8461 | |
81ecdfbb RW |
8462 | # Flags needed to compile Python code (taken from python-config --cflags). |
8463 | # We cannot call python-config directly because it will output whatever was | |
8464 | # used when compiling the Python interpreter itself, including flags which | |
8465 | # would make the python-related objects be compiled differently from the | |
8466 | # rest of GDB (e.g., -O2 and -fPIC). | |
8467 | if test "${GCC}" = yes; then | |
8468 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8469 | fi | |
436868fb | 8470 | |
81ecdfbb RW |
8471 | if test "x${tentative_python_cflags}" != x; then |
8472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8473 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8474 | for flag in ${tentative_python_cflags}; do | |
8475 | # Check that the compiler accepts it | |
8476 | saved_CFLAGS="$CFLAGS" | |
8477 | CFLAGS="$CFLAGS $flag" | |
8478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8479 | /* end confdefs.h. */ |
81ecdfbb | 8480 | |
a9322a30 TT |
8481 | int |
8482 | main () | |
8483 | { | |
a9322a30 TT |
8484 | |
8485 | ; | |
8486 | return 0; | |
8487 | } | |
bec39cab | 8488 | _ACEOF |
81ecdfbb RW |
8489 | if ac_fn_c_try_compile "$LINENO"; then : |
8490 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8491 | fi |
81ecdfbb RW |
8492 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8493 | CFLAGS="$saved_CFLAGS" | |
8494 | done | |
8495 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8496 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8497 | fi | |
043b6510 JB |
8498 | |
8499 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
8500 | # #if _SGIAPI | |
8501 | # #define siginfo __siginfo | |
8502 | # #endif | |
8503 | # The problem is that including Python causes some XOPEN macros to be | |
8504 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
8505 | # to false. So, we work around this issue by defining siginfo ourself | |
8506 | # though the command-line. | |
c83393b9 JB |
8507 | # |
8508 | # On x64 Windows, Python's include headers, and pyconfig.h in | |
8509 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit | |
8510 | # version of Windows. Unfortunately, MS_WIN64 is only defined if | |
8511 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when | |
8512 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. | |
8513 | # The issue was reported to the Python community, but still isn't | |
8514 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). | |
8515 | ||
043b6510 JB |
8516 | case "$gdb_host" in |
8517 | irix*) if test "${GCC}" = yes; then | |
8518 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
8519 | fi | |
8520 | ;; | |
c83393b9 JB |
8521 | mingw64) |
8522 | if test "${GCC}" = yes; then | |
8523 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" | |
8524 | fi | |
8525 | ;; | |
043b6510 | 8526 | esac |
a8db4212 YPK |
8527 | |
8528 | # Note that "python -m threading" cannot be used to check for | |
8529 | # threading support due to a bug in Python 2.7.3 | |
8530 | # (http://bugs.python.org/issue15567). | |
8531 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether python supports threads" >&5 | |
8532 | $as_echo_n "checking whether python supports threads... " >&6; } | |
8533 | saved_CPPFLAGS="${CPPFLAGS}" | |
8534 | CPPFLAGS="${PYTHON_CPPFLAGS}" | |
8535 | # Note that the test is reversed so that python_has_threads=yes on | |
8536 | # unexpected failures. | |
8537 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8538 | /* end confdefs.h. */ | |
8539 | ||
8540 | #include <Python.h> | |
8541 | #ifdef WITH_THREAD | |
8542 | # error | |
8543 | #endif | |
8544 | ||
8545 | _ACEOF | |
8546 | if ac_fn_c_try_cpp "$LINENO"; then : | |
8547 | python_has_threads=no | |
8548 | else | |
8549 | python_has_threads=yes | |
8550 | fi | |
8551 | rm -f conftest.err conftest.$ac_ext | |
8552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_has_threads}" >&5 | |
8553 | $as_echo "${python_has_threads}" >&6; } | |
8554 | CPPFLAGS="${saved_CPPFLAGS}" | |
81ecdfbb RW |
8555 | else |
8556 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
8557 | # included. |
8558 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
8559 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
8560 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 8561 | fi |
9a156167 | 8562 | |
9a156167 | 8563 | |
ac534cba JB |
8564 | |
8565 | ||
a8db4212 YPK |
8566 | # Enable -lmcheck by default (it provides cheap-enough memory mangling), |
8567 | # but turn it off if Python is enabled with threads, since -lmcheck is | |
8568 | # not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939), | |
8569 | # and for releases. | |
17ef446e PA |
8570 | if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \ |
8571 | && $development; then | |
8572 | libmcheck_default=yes | |
8573 | else | |
8574 | libmcheck_default=no | |
a8db4212 YPK |
8575 | fi |
8576 | ||
17ef446e PA |
8577 | # Check whether --enable-libmcheck was given. |
8578 | if test "${enable_libmcheck+set}" = set; then : | |
8579 | enableval=$enable_libmcheck; case "${enableval}" in | |
8580 | yes | y) ENABLE_LIBMCHECK="yes" ;; | |
8581 | no | n) ENABLE_LIBMCHECK="no" ;; | |
8582 | *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; | |
8583 | esac | |
8584 | fi | |
8585 | ||
8586 | ||
8587 | if test -z "${ENABLE_LIBMCHECK}"; then | |
8588 | ENABLE_LIBMCHECK=${libmcheck_default} | |
a8db4212 | 8589 | fi |
17ef446e PA |
8590 | |
8591 | if test "$ENABLE_LIBMCHECK" = "yes" ; then | |
8592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
a8db4212 YPK |
8593 | $as_echo_n "checking for main in -lmcheck... " >&6; } |
8594 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
8595 | $as_echo_n "(cached) " >&6 | |
8596 | else | |
8597 | ac_check_lib_save_LIBS=$LIBS | |
8598 | LIBS="-lmcheck $LIBS" | |
8599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8600 | /* end confdefs.h. */ | |
8601 | ||
8602 | ||
8603 | int | |
8604 | main () | |
8605 | { | |
8606 | return main (); | |
8607 | ; | |
8608 | return 0; | |
8609 | } | |
8610 | _ACEOF | |
8611 | if ac_fn_c_try_link "$LINENO"; then : | |
8612 | ac_cv_lib_mcheck_main=yes | |
8613 | else | |
8614 | ac_cv_lib_mcheck_main=no | |
8615 | fi | |
8616 | rm -f core conftest.err conftest.$ac_objext \ | |
8617 | conftest$ac_exeext conftest.$ac_ext | |
8618 | LIBS=$ac_check_lib_save_LIBS | |
8619 | fi | |
8620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
8621 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
8622 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
8623 | cat >>confdefs.h <<_ACEOF | |
8624 | #define HAVE_LIBMCHECK 1 | |
8625 | _ACEOF | |
8626 | ||
8627 | LIBS="-lmcheck $LIBS" | |
8628 | ||
8629 | fi | |
8630 | ||
17ef446e PA |
8631 | fi |
8632 | ||
8633 | ||
8634 | if test "$ENABLE_LIBMCHECK" = "yes" \ | |
8635 | -a "${have_libpython}" != "no" \ | |
8636 | -a "${python_has_threads}" = "yes" ; then | |
8637 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&5 | |
8638 | $as_echo "$as_me: WARNING: --enable-libmcheck may lead to spurious crashes if threads are used in python" >&2;} | |
a8db4212 YPK |
8639 | fi |
8640 | ||
81ecdfbb RW |
8641 | # ------------------------- # |
8642 | # Checks for header files. # | |
8643 | # ------------------------- # | |
c890192f | 8644 | |
81ecdfbb RW |
8645 | ac_header_dirent=no |
8646 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
8647 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
8648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
8649 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
8650 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8651 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8652 | else |
81ecdfbb | 8653 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8654 | /* end confdefs.h. */ |
81ecdfbb RW |
8655 | #include <sys/types.h> |
8656 | #include <$ac_hdr> | |
8657 | ||
a9322a30 TT |
8658 | int |
8659 | main () | |
8660 | { | |
81ecdfbb RW |
8661 | if ((DIR *) 0) |
8662 | return 0; | |
a9322a30 TT |
8663 | ; |
8664 | return 0; | |
8665 | } | |
bec39cab | 8666 | _ACEOF |
81ecdfbb RW |
8667 | if ac_fn_c_try_compile "$LINENO"; then : |
8668 | eval "$as_ac_Header=yes" | |
bec39cab | 8669 | else |
81ecdfbb | 8670 | eval "$as_ac_Header=no" |
bec39cab | 8671 | fi |
81ecdfbb | 8672 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 8673 | fi |
81ecdfbb RW |
8674 | eval ac_res=\$$as_ac_Header |
8675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8676 | $as_echo "$ac_res" >&6; } | |
8677 | eval as_val=\$$as_ac_Header | |
8678 | if test "x$as_val" = x""yes; then : | |
8679 | cat >>confdefs.h <<_ACEOF | |
8680 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 8681 | _ACEOF |
bec39cab | 8682 | |
81ecdfbb RW |
8683 | ac_header_dirent=$ac_hdr; break |
8684 | fi | |
bec39cab | 8685 | |
81ecdfbb RW |
8686 | done |
8687 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
8688 | if test $ac_header_dirent = dirent.h; then | |
8689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
8690 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8691 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8692 | $as_echo_n "(cached) " >&6 | |
c890192f | 8693 | else |
81ecdfbb RW |
8694 | ac_func_search_save_LIBS=$LIBS |
8695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8696 | /* end confdefs.h. */ | |
8697 | ||
8698 | /* Override any GCC internal prototype to avoid an error. | |
8699 | Use char because int might match the return type of a GCC | |
8700 | builtin and then its argument prototype would still apply. */ | |
8701 | #ifdef __cplusplus | |
8702 | extern "C" | |
8703 | #endif | |
8704 | char opendir (); | |
8705 | int | |
8706 | main () | |
8707 | { | |
8708 | return opendir (); | |
8709 | ; | |
8710 | return 0; | |
8711 | } | |
bec39cab | 8712 | _ACEOF |
81ecdfbb RW |
8713 | for ac_lib in '' dir; do |
8714 | if test -z "$ac_lib"; then | |
8715 | ac_res="none required" | |
8716 | else | |
8717 | ac_res=-l$ac_lib | |
8718 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8719 | fi | |
8720 | if ac_fn_c_try_link "$LINENO"; then : | |
8721 | ac_cv_search_opendir=$ac_res | |
8722 | fi | |
8723 | rm -f core conftest.err conftest.$ac_objext \ | |
8724 | conftest$ac_exeext | |
8725 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8726 | break | |
8727 | fi | |
8728 | done | |
8729 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 8730 | |
81ecdfbb RW |
8731 | else |
8732 | ac_cv_search_opendir=no | |
8733 | fi | |
8734 | rm conftest.$ac_ext | |
8735 | LIBS=$ac_func_search_save_LIBS | |
8736 | fi | |
8737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
8738 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8739 | ac_res=$ac_cv_search_opendir | |
8740 | if test "$ac_res" != no; then : | |
8741 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8742 | |
bec39cab | 8743 | fi |
81ecdfbb | 8744 | |
bec39cab | 8745 | else |
81ecdfbb RW |
8746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
8747 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8748 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8749 | $as_echo_n "(cached) " >&6 | |
8750 | else | |
8751 | ac_func_search_save_LIBS=$LIBS | |
8752 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8753 | /* end confdefs.h. */ |
81ecdfbb RW |
8754 | |
8755 | /* Override any GCC internal prototype to avoid an error. | |
8756 | Use char because int might match the return type of a GCC | |
8757 | builtin and then its argument prototype would still apply. */ | |
8758 | #ifdef __cplusplus | |
8759 | extern "C" | |
8760 | #endif | |
8761 | char opendir (); | |
a9322a30 TT |
8762 | int |
8763 | main () | |
8764 | { | |
81ecdfbb | 8765 | return opendir (); |
a9322a30 TT |
8766 | ; |
8767 | return 0; | |
8768 | } | |
bec39cab | 8769 | _ACEOF |
81ecdfbb RW |
8770 | for ac_lib in '' x; do |
8771 | if test -z "$ac_lib"; then | |
8772 | ac_res="none required" | |
8773 | else | |
8774 | ac_res=-l$ac_lib | |
8775 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8776 | fi | |
8777 | if ac_fn_c_try_link "$LINENO"; then : | |
8778 | ac_cv_search_opendir=$ac_res | |
8779 | fi | |
8780 | rm -f core conftest.err conftest.$ac_objext \ | |
8781 | conftest$ac_exeext | |
8782 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8783 | break | |
8784 | fi | |
8785 | done | |
8786 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 8787 | |
81ecdfbb RW |
8788 | else |
8789 | ac_cv_search_opendir=no | |
bec39cab | 8790 | fi |
81ecdfbb RW |
8791 | rm conftest.$ac_ext |
8792 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 8793 | fi |
81ecdfbb RW |
8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
8795 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8796 | ac_res=$ac_cv_search_opendir | |
8797 | if test "$ac_res" != no; then : | |
8798 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8799 | |
81ecdfbb | 8800 | fi |
bec39cab | 8801 | |
81ecdfbb | 8802 | fi |
bec39cab | 8803 | |
81ecdfbb RW |
8804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
8805 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
8806 | if test "${ac_cv_header_stdc+set}" = set; then : | |
8807 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8808 | else |
81ecdfbb | 8809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8810 | /* end confdefs.h. */ |
81ecdfbb RW |
8811 | #include <stdlib.h> |
8812 | #include <stdarg.h> | |
8813 | #include <string.h> | |
8814 | #include <float.h> | |
8815 | ||
a9322a30 TT |
8816 | int |
8817 | main () | |
8818 | { | |
a9322a30 TT |
8819 | |
8820 | ; | |
8821 | return 0; | |
8822 | } | |
bec39cab | 8823 | _ACEOF |
81ecdfbb RW |
8824 | if ac_fn_c_try_compile "$LINENO"; then : |
8825 | ac_cv_header_stdc=yes | |
bec39cab | 8826 | else |
81ecdfbb | 8827 | ac_cv_header_stdc=no |
a9322a30 | 8828 | fi |
81ecdfbb | 8829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8830 | |
81ecdfbb RW |
8831 | if test $ac_cv_header_stdc = yes; then |
8832 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
8833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8834 | /* end confdefs.h. */ | |
8835 | #include <string.h> | |
bec39cab | 8836 | |
81ecdfbb RW |
8837 | _ACEOF |
8838 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8839 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 8840 | |
bec39cab | 8841 | else |
81ecdfbb RW |
8842 | ac_cv_header_stdc=no |
8843 | fi | |
8844 | rm -f conftest* | |
8845 | ||
8846 | fi | |
8847 | ||
8848 | if test $ac_cv_header_stdc = yes; then | |
8849 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
8850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8851 | /* end confdefs.h. */ | |
8852 | #include <stdlib.h> | |
8853 | ||
bec39cab | 8854 | _ACEOF |
81ecdfbb RW |
8855 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8856 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 8857 | |
81ecdfbb RW |
8858 | else |
8859 | ac_cv_header_stdc=no | |
8860 | fi | |
8861 | rm -f conftest* | |
bec39cab | 8862 | |
bec39cab | 8863 | fi |
81ecdfbb RW |
8864 | |
8865 | if test $ac_cv_header_stdc = yes; then | |
8866 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
8867 | if test "$cross_compiling" = yes; then : | |
8868 | : | |
bec39cab | 8869 | else |
81ecdfbb | 8870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8871 | /* end confdefs.h. */ |
81ecdfbb RW |
8872 | #include <ctype.h> |
8873 | #include <stdlib.h> | |
8874 | #if ((' ' & 0x0FF) == 0x020) | |
8875 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8876 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8877 | #else | |
8878 | # define ISLOWER(c) \ | |
8879 | (('a' <= (c) && (c) <= 'i') \ | |
8880 | || ('j' <= (c) && (c) <= 'r') \ | |
8881 | || ('s' <= (c) && (c) <= 'z')) | |
8882 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
8883 | #endif | |
8884 | ||
8885 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
8886 | int |
8887 | main () | |
8888 | { | |
81ecdfbb RW |
8889 | int i; |
8890 | for (i = 0; i < 256; i++) | |
8891 | if (XOR (islower (i), ISLOWER (i)) | |
8892 | || toupper (i) != TOUPPER (i)) | |
8893 | return 2; | |
a9322a30 TT |
8894 | return 0; |
8895 | } | |
bec39cab | 8896 | _ACEOF |
81ecdfbb RW |
8897 | if ac_fn_c_try_run "$LINENO"; then : |
8898 | ||
bec39cab | 8899 | else |
81ecdfbb RW |
8900 | ac_cv_header_stdc=no |
8901 | fi | |
8902 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8903 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8904 | fi | |
bec39cab | 8905 | |
bec39cab | 8906 | fi |
a9322a30 | 8907 | fi |
81ecdfbb RW |
8908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
8909 | $as_echo "$ac_cv_header_stdc" >&6; } | |
8910 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 8911 | |
81ecdfbb | 8912 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 8913 | |
81ecdfbb | 8914 | fi |
bec39cab | 8915 | |
81ecdfbb | 8916 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8658d16d | 8917 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h sys/socket.h proc_service.h \ |
8775fd2d | 8918 | thread_db.h signal.h stddef.h \ |
81ecdfbb RW |
8919 | stdlib.h string.h memory.h strings.h sys/fault.h \ |
8920 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
8921 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
8922 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
8923 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
e68227b9 | 8924 | sgtty.h unistd.h elf_hp.h locale.h \ |
614c279d | 8925 | dlfcn.h sys/un.h linux/perf_event.h |
81ecdfbb RW |
8926 | do : |
8927 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8928 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8929 | eval as_val=\$$as_ac_Header | |
8930 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8931 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8932 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8933 | _ACEOF |
c906108c | 8934 | |
bec39cab | 8935 | fi |
81ecdfbb RW |
8936 | |
8937 | done | |
8938 | ||
8939 | for ac_header in link.h | |
8940 | do : | |
8941 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
8942 | # include <sys/types.h> | |
8943 | #endif | |
8944 | #if HAVE_NLIST_H | |
8945 | # include <nlist.h> | |
a9322a30 TT |
8946 | #endif |
8947 | ||
81ecdfbb RW |
8948 | " |
8949 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
8950 | cat >>confdefs.h <<_ACEOF | |
8951 | #define HAVE_LINK_H 1 | |
bec39cab | 8952 | _ACEOF |
bec39cab | 8953 | |
a9322a30 | 8954 | fi |
bec39cab | 8955 | |
81ecdfbb | 8956 | done |
c906108c | 8957 | |
81ecdfbb RW |
8958 | for ac_header in sys/proc.h |
8959 | do : | |
8960 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
8961 | # include <sys/param.h> | |
8962 | #endif | |
c906108c | 8963 | |
81ecdfbb RW |
8964 | " |
8965 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 8966 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8967 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 8968 | _ACEOF |
5ee754fc | 8969 | |
bec39cab | 8970 | fi |
81ecdfbb RW |
8971 | |
8972 | done | |
8973 | ||
8974 | for ac_header in sys/user.h | |
8975 | do : | |
8976 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
8977 | # include <sys/param.h> | |
a9322a30 TT |
8978 | #endif |
8979 | ||
81ecdfbb RW |
8980 | " |
8981 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
8982 | cat >>confdefs.h <<_ACEOF | |
8983 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 8984 | _ACEOF |
bec39cab | 8985 | |
a9322a30 | 8986 | fi |
bec39cab | 8987 | |
81ecdfbb | 8988 | done |
5ee754fc | 8989 | |
5ee754fc | 8990 | |
81ecdfbb RW |
8991 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
8992 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
8993 | # think that we don't have <curses.h> if we're using GCC. | |
8994 | case $host_os in | |
8995 | solaris2.[789]) | |
8996 | if test "$GCC" = yes; then | |
8997 | ||
8998 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
8999 | ||
9000 | fi ;; | |
9001 | esac | |
9002 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
9003 | do : | |
9004 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9005 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9006 | eval as_val=\$$as_ac_Header | |
9007 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9008 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9009 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9010 | _ACEOF |
5ee754fc MK |
9011 | |
9012 | fi | |
9013 | ||
81ecdfbb | 9014 | done |
bec39cab | 9015 | |
81ecdfbb RW |
9016 | for ac_header in term.h |
9017 | do : | |
9018 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
9019 | # include <curses.h> | |
9020 | #endif | |
bec39cab | 9021 | |
81ecdfbb RW |
9022 | " |
9023 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
9024 | cat >>confdefs.h <<_ACEOF | |
9025 | #define HAVE_TERM_H 1 | |
a8111142 | 9026 | _ACEOF |
a8111142 | 9027 | |
a8111142 | 9028 | fi |
a8111142 | 9029 | |
81ecdfbb | 9030 | done |
a8111142 TT |
9031 | |
9032 | ||
81ecdfbb RW |
9033 | # ------------------------- # |
9034 | # Checks for declarations. # | |
9035 | # ------------------------- # | |
a9322a30 | 9036 | |
81ecdfbb RW |
9037 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
9038 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
9039 | ac_have_decl=1 | |
bec39cab | 9040 | else |
81ecdfbb RW |
9041 | ac_have_decl=0 |
9042 | fi | |
9043 | ||
9044 | cat >>confdefs.h <<_ACEOF | |
9045 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 9046 | _ACEOF |
81ecdfbb RW |
9047 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
9048 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
9049 | ac_have_decl=1 | |
9050 | else | |
9051 | ac_have_decl=0 | |
9052 | fi | |
9053 | ||
9054 | cat >>confdefs.h <<_ACEOF | |
9055 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 9056 | _ACEOF |
81ecdfbb RW |
9057 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
9058 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
9059 | ac_have_decl=1 | |
bec39cab | 9060 | else |
81ecdfbb RW |
9061 | ac_have_decl=0 |
9062 | fi | |
bec39cab | 9063 | |
81ecdfbb RW |
9064 | cat >>confdefs.h <<_ACEOF |
9065 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 9066 | _ACEOF |
81ecdfbb RW |
9067 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
9068 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
9069 | ac_have_decl=1 | |
9070 | else | |
9071 | ac_have_decl=0 | |
9072 | fi | |
9073 | ||
9074 | cat >>confdefs.h <<_ACEOF | |
9075 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 9076 | _ACEOF |
81ecdfbb RW |
9077 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
9078 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
9079 | ac_have_decl=1 | |
bec39cab | 9080 | else |
81ecdfbb RW |
9081 | ac_have_decl=0 |
9082 | fi | |
5ee754fc | 9083 | |
81ecdfbb RW |
9084 | cat >>confdefs.h <<_ACEOF |
9085 | #define HAVE_DECL_STRSTR $ac_have_decl | |
9086 | _ACEOF | |
9087 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
9088 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
9089 | ac_have_decl=1 | |
9090 | else | |
9091 | ac_have_decl=0 | |
5ee754fc | 9092 | fi |
81ecdfbb RW |
9093 | |
9094 | cat >>confdefs.h <<_ACEOF | |
9095 | #define HAVE_DECL_GETOPT $ac_have_decl | |
9096 | _ACEOF | |
9097 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
9098 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
9099 | ac_have_decl=1 | |
9100 | else | |
9101 | ac_have_decl=0 | |
5ee754fc | 9102 | fi |
81ecdfbb RW |
9103 | |
9104 | cat >>confdefs.h <<_ACEOF | |
9105 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
9106 | _ACEOF | |
9107 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
9108 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
9109 | ac_have_decl=1 | |
9110 | else | |
9111 | ac_have_decl=0 | |
5ee754fc MK |
9112 | fi |
9113 | ||
a9322a30 | 9114 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9115 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 9116 | _ACEOF |
5ee754fc | 9117 | |
5ee754fc | 9118 | |
81ecdfbb RW |
9119 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9120 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9121 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9122 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9123 | else |
81ecdfbb | 9124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9125 | /* end confdefs.h. */ |
81ecdfbb | 9126 | #include <locale.h> |
a9322a30 TT |
9127 | int |
9128 | main () | |
9129 | { | |
81ecdfbb | 9130 | return LC_MESSAGES |
a9322a30 TT |
9131 | ; |
9132 | return 0; | |
9133 | } | |
bec39cab | 9134 | _ACEOF |
81ecdfbb RW |
9135 | if ac_fn_c_try_link "$LINENO"; then : |
9136 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9137 | else |
81ecdfbb RW |
9138 | am_cv_val_LC_MESSAGES=no |
9139 | fi | |
9140 | rm -f core conftest.err conftest.$ac_objext \ | |
9141 | conftest$ac_exeext conftest.$ac_ext | |
9142 | fi | |
9143 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9144 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9145 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9146 | |
81ecdfbb RW |
9147 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9148 | ||
9149 | fi | |
9150 | ||
9151 | ||
9152 | # ----------------------- # | |
9153 | # Checks for structures. # | |
9154 | # ----------------------- # | |
9155 | ||
9156 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9157 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9158 | ||
9159 | cat >>confdefs.h <<_ACEOF | |
9160 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9161 | _ACEOF |
7eb368b3 | 9162 | |
81ecdfbb | 9163 | |
7eb368b3 | 9164 | fi |
81ecdfbb RW |
9165 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9166 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9167 | |
a9322a30 TT |
9168 | cat >>confdefs.h <<_ACEOF |
9169 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9170 | _ACEOF |
9171 | ||
a9322a30 | 9172 | |
7eb368b3 NR |
9173 | fi |
9174 | ||
7eb368b3 | 9175 | |
a9322a30 TT |
9176 | # ------------------ # |
9177 | # Checks for types. # | |
9178 | # ------------------ # | |
7eb368b3 | 9179 | |
81ecdfbb RW |
9180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9181 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9182 | if test "${ac_cv_type_signal+set}" = set; then : | |
9183 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9184 | else |
81ecdfbb | 9185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9186 | /* end confdefs.h. */ |
a9322a30 TT |
9187 | #include <sys/types.h> |
9188 | #include <signal.h> | |
7cb9022a | 9189 | |
a9322a30 TT |
9190 | int |
9191 | main () | |
9192 | { | |
81ecdfbb | 9193 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9194 | ; |
9195 | return 0; | |
9196 | } | |
bec39cab | 9197 | _ACEOF |
81ecdfbb RW |
9198 | if ac_fn_c_try_compile "$LINENO"; then : |
9199 | ac_cv_type_signal=int | |
bec39cab | 9200 | else |
81ecdfbb | 9201 | ac_cv_type_signal=void |
bec39cab | 9202 | fi |
81ecdfbb | 9203 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9204 | fi |
81ecdfbb RW |
9205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9206 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9207 | |
a9322a30 TT |
9208 | cat >>confdefs.h <<_ACEOF |
9209 | #define RETSIGTYPE $ac_cv_type_signal | |
9210 | _ACEOF | |
5ee754fc | 9211 | |
bec39cab | 9212 | |
81ecdfbb | 9213 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9214 | #include <sys/socket.h> |
9215 | ||
81ecdfbb RW |
9216 | " |
9217 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9218 | |
a9322a30 TT |
9219 | cat >>confdefs.h <<_ACEOF |
9220 | #define HAVE_SOCKLEN_T 1 | |
9221 | _ACEOF | |
9222 | ||
9223 | ||
9224 | fi | |
9225 | ||
9226 | ||
9227 | # ------------------------------------- # | |
9228 | # Checks for compiler characteristics. # | |
9229 | # ------------------------------------- # | |
9230 | ||
81ecdfbb RW |
9231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9232 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9233 | if test "${ac_cv_c_const+set}" = set; then : | |
9234 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9235 | else |
81ecdfbb | 9236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9237 | /* end confdefs.h. */ |
a9322a30 TT |
9238 | |
9239 | int | |
9240 | main () | |
9241 | { | |
9242 | /* FIXME: Include the comments suggested by Paul. */ | |
9243 | #ifndef __cplusplus | |
9244 | /* Ultrix mips cc rejects this. */ | |
9245 | typedef int charset[2]; | |
81ecdfbb | 9246 | const charset cs; |
a9322a30 | 9247 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9248 | char const *const *pcpcc; |
9249 | char **ppc; | |
a9322a30 TT |
9250 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9251 | struct point {int x, y;}; | |
9252 | static struct point const zero = {0,0}; | |
9253 | /* AIX XL C 1.02.0.0 rejects this. | |
9254 | It does not let you subtract one const X* pointer from another in | |
9255 | an arm of an if-expression whose if-part is not a constant | |
9256 | expression */ | |
9257 | const char *g = "string"; | |
81ecdfbb | 9258 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9259 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9260 | ++pcpcc; |
9261 | ppc = (char**) pcpcc; | |
9262 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9263 | { /* SCO 3.2v4 cc rejects this. */ |
9264 | char *t; | |
9265 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9266 | ||
9267 | *t++ = 0; | |
81ecdfbb | 9268 | if (s) return 0; |
a9322a30 TT |
9269 | } |
9270 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9271 | int x[] = {25, 17}; | |
9272 | const int *foo = &x[0]; | |
9273 | ++foo; | |
9274 | } | |
9275 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9276 | typedef const int *iptr; | |
9277 | iptr p = 0; | |
9278 | ++p; | |
9279 | } | |
9280 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9281 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9282 | struct s { int j; const int *ap[3]; }; | |
9283 | struct s *b; b->j = 5; | |
9284 | } | |
9285 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9286 | const int foo = 10; | |
81ecdfbb | 9287 | if (!foo) return 0; |
a9322a30 | 9288 | } |
81ecdfbb | 9289 | return !cs[0] && !zero.x; |
a9322a30 TT |
9290 | #endif |
9291 | ||
9292 | ; | |
9293 | return 0; | |
9294 | } | |
bec39cab | 9295 | _ACEOF |
81ecdfbb | 9296 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9297 | ac_cv_c_const=yes |
5ee754fc | 9298 | else |
81ecdfbb | 9299 | ac_cv_c_const=no |
5ee754fc | 9300 | fi |
81ecdfbb | 9301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9302 | fi |
81ecdfbb RW |
9303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9304 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9305 | if test $ac_cv_c_const = no; then |
bec39cab | 9306 | |
81ecdfbb | 9307 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9308 | |
5ee754fc | 9309 | fi |
bec39cab | 9310 | |
81ecdfbb RW |
9311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9312 | $as_echo_n "checking for inline... " >&6; } | |
9313 | if test "${ac_cv_c_inline+set}" = set; then : | |
9314 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9315 | else |
a9322a30 TT |
9316 | ac_cv_c_inline=no |
9317 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9319 | /* end confdefs.h. */ |
a9322a30 TT |
9320 | #ifndef __cplusplus |
9321 | typedef int foo_t; | |
9322 | static $ac_kw foo_t static_foo () {return 0; } | |
9323 | $ac_kw foo_t foo () {return 0; } | |
9324 | #endif | |
9325 | ||
bec39cab | 9326 | _ACEOF |
81ecdfbb RW |
9327 | if ac_fn_c_try_compile "$LINENO"; then : |
9328 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9329 | fi |
81ecdfbb RW |
9330 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9331 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9332 | done |
bec39cab | 9333 | |
5ee754fc | 9334 | fi |
81ecdfbb RW |
9335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9336 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9337 | |
a9322a30 TT |
9338 | case $ac_cv_c_inline in |
9339 | inline | yes) ;; | |
9340 | *) | |
9341 | case $ac_cv_c_inline in | |
9342 | no) ac_val=;; | |
9343 | *) ac_val=$ac_cv_c_inline;; | |
9344 | esac | |
9345 | cat >>confdefs.h <<_ACEOF | |
9346 | #ifndef __cplusplus | |
9347 | #define inline $ac_val | |
9348 | #endif | |
9349 | _ACEOF | |
bec39cab AC |
9350 | ;; |
9351 | esac | |
bec39cab | 9352 | |
81ecdfbb RW |
9353 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9354 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9355 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9356 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9357 | else |
81ecdfbb RW |
9358 | ac_cv_c_bigendian=unknown |
9359 | # See if we're dealing with a universal compiler. | |
9360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9361 | /* end confdefs.h. */ | |
9362 | #ifndef __APPLE_CC__ | |
9363 | not a universal capable compiler | |
9364 | #endif | |
9365 | typedef int dummy; | |
9366 | ||
9367 | _ACEOF | |
9368 | if ac_fn_c_try_compile "$LINENO"; then : | |
9369 | ||
9370 | # Check for potential -arch flags. It is not universal unless | |
9371 | # there are at least two -arch flags with different values. | |
9372 | ac_arch= | |
9373 | ac_prev= | |
9374 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9375 | if test -n "$ac_prev"; then | |
9376 | case $ac_word in | |
9377 | i?86 | x86_64 | ppc | ppc64) | |
9378 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9379 | ac_arch=$ac_word | |
9380 | else | |
9381 | ac_cv_c_bigendian=universal | |
9382 | break | |
9383 | fi | |
9384 | ;; | |
9385 | esac | |
9386 | ac_prev= | |
9387 | elif test "x$ac_word" = "x-arch"; then | |
9388 | ac_prev=arch | |
9389 | fi | |
9390 | done | |
9391 | fi | |
9392 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9393 | if test $ac_cv_c_bigendian = unknown; then | |
9394 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9395 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9396 | /* end confdefs.h. */ |
a9322a30 | 9397 | #include <sys/types.h> |
81ecdfbb | 9398 | #include <sys/param.h> |
a9322a30 TT |
9399 | |
9400 | int | |
9401 | main () | |
9402 | { | |
81ecdfbb RW |
9403 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9404 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9405 | && LITTLE_ENDIAN) | |
9406 | bogus endian macros | |
9407 | #endif | |
a9322a30 TT |
9408 | |
9409 | ; | |
9410 | return 0; | |
9411 | } | |
bec39cab | 9412 | _ACEOF |
81ecdfbb | 9413 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9414 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9415 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9416 | /* end confdefs.h. */ |
a9322a30 | 9417 | #include <sys/types.h> |
81ecdfbb | 9418 | #include <sys/param.h> |
a9322a30 TT |
9419 | |
9420 | int | |
9421 | main () | |
9422 | { | |
9423 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9424 | not big endian |
9425 | #endif | |
a9322a30 TT |
9426 | |
9427 | ; | |
9428 | return 0; | |
9429 | } | |
bec39cab | 9430 | _ACEOF |
81ecdfbb | 9431 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9432 | ac_cv_c_bigendian=yes |
5ee754fc | 9433 | else |
81ecdfbb | 9434 | ac_cv_c_bigendian=no |
5ee754fc | 9435 | fi |
81ecdfbb RW |
9436 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9437 | fi | |
9438 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9439 | fi | |
9440 | if test $ac_cv_c_bigendian = unknown; then | |
9441 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9443 | /* end confdefs.h. */ | |
9444 | #include <limits.h> | |
bec39cab | 9445 | |
81ecdfbb RW |
9446 | int |
9447 | main () | |
9448 | { | |
9449 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9450 | bogus endian macros | |
9451 | #endif | |
9452 | ||
9453 | ; | |
9454 | return 0; | |
9455 | } | |
7eb368b3 | 9456 | _ACEOF |
81ecdfbb RW |
9457 | if ac_fn_c_try_compile "$LINENO"; then : |
9458 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9460 | /* end confdefs.h. */ |
81ecdfbb RW |
9461 | #include <limits.h> |
9462 | ||
7eb368b3 NR |
9463 | int |
9464 | main () | |
9465 | { | |
81ecdfbb RW |
9466 | #ifndef _BIG_ENDIAN |
9467 | not big endian | |
9468 | #endif | |
9469 | ||
7eb368b3 NR |
9470 | ; |
9471 | return 0; | |
9472 | } | |
9473 | _ACEOF | |
81ecdfbb | 9474 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9475 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9476 | else |
9477 | ac_cv_c_bigendian=no | |
a9322a30 | 9478 | fi |
81ecdfbb | 9479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9480 | fi |
81ecdfbb RW |
9481 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9482 | fi | |
9483 | if test $ac_cv_c_bigendian = unknown; then | |
9484 | # Compile a test program. | |
9485 | if test "$cross_compiling" = yes; then : | |
9486 | # Try to guess by grepping values from an object file. | |
9487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9488 | /* end confdefs.h. */ | |
9489 | short int ascii_mm[] = | |
9490 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9491 | short int ascii_ii[] = | |
9492 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9493 | int use_ascii (int i) { | |
9494 | return ascii_mm[i] + ascii_ii[i]; | |
9495 | } | |
9496 | short int ebcdic_ii[] = | |
9497 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9498 | short int ebcdic_mm[] = | |
9499 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9500 | int use_ebcdic (int i) { | |
9501 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9502 | } | |
9503 | extern int foo; | |
7eb368b3 | 9504 | |
81ecdfbb RW |
9505 | int |
9506 | main () | |
9507 | { | |
9508 | return use_ascii (foo) == use_ebcdic (foo); | |
9509 | ; | |
9510 | return 0; | |
9511 | } | |
9512 | _ACEOF | |
9513 | if ac_fn_c_try_compile "$LINENO"; then : | |
9514 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9515 | ac_cv_c_bigendian=yes | |
9516 | fi | |
9517 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9518 | if test "$ac_cv_c_bigendian" = unknown; then | |
9519 | ac_cv_c_bigendian=no | |
9520 | else | |
9521 | # finding both strings is unlikely to happen, but who knows? | |
9522 | ac_cv_c_bigendian=unknown | |
9523 | fi | |
9524 | fi | |
7eb368b3 | 9525 | fi |
81ecdfbb | 9526 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9527 | else |
81ecdfbb | 9528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9529 | /* end confdefs.h. */ |
81ecdfbb | 9530 | $ac_includes_default |
d3ea6809 MM |
9531 | int |
9532 | main () | |
9533 | { | |
81ecdfbb RW |
9534 | |
9535 | /* Are we little or big endian? From Harbison&Steele. */ | |
9536 | union | |
9537 | { | |
9538 | long int l; | |
9539 | char c[sizeof (long int)]; | |
9540 | } u; | |
9541 | u.l = 1; | |
9542 | return u.c[sizeof (long int) - 1] == 1; | |
9543 | ||
9544 | ; | |
9545 | return 0; | |
d3ea6809 MM |
9546 | } |
9547 | _ACEOF | |
81ecdfbb | 9548 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9549 | ac_cv_c_bigendian=no |
d3ea6809 | 9550 | else |
81ecdfbb | 9551 | ac_cv_c_bigendian=yes |
d3ea6809 | 9552 | fi |
81ecdfbb RW |
9553 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9554 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9555 | fi |
a9322a30 | 9556 | |
81ecdfbb RW |
9557 | fi |
9558 | fi | |
9559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9560 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9561 | case $ac_cv_c_bigendian in #( | |
9562 | yes) | |
9563 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9564 | ;; #( | |
9565 | no) | |
9566 | ;; #( | |
9567 | universal) | |
9568 | ||
9569 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9570 | ||
9571 | ;; #( | |
9572 | *) | |
9573 | as_fn_error "unknown endianness | |
9574 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
9575 | esac | |
d3ea6809 MM |
9576 | |
9577 | ||
a9322a30 TT |
9578 | # ------------------------------ # |
9579 | # Checks for library functions. # | |
9580 | # ------------------------------ # | |
d3ea6809 | 9581 | |
a9322a30 TT |
9582 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
9583 | # for constant arguments. Useless! | |
81ecdfbb RW |
9584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
9585 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9586 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
9587 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 9588 | else |
81ecdfbb | 9589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 9590 | /* end confdefs.h. */ |
a9322a30 | 9591 | #include <alloca.h> |
bec39cab AC |
9592 | int |
9593 | main () | |
9594 | { | |
a9322a30 | 9595 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 9596 | if (p) return 0; |
bec39cab AC |
9597 | ; |
9598 | return 0; | |
9599 | } | |
9600 | _ACEOF | |
81ecdfbb | 9601 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9602 | ac_cv_working_alloca_h=yes |
bec39cab | 9603 | else |
81ecdfbb | 9604 | ac_cv_working_alloca_h=no |
bec39cab | 9605 | fi |
81ecdfbb RW |
9606 | rm -f core conftest.err conftest.$ac_objext \ |
9607 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9608 | fi |
81ecdfbb RW |
9609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
9610 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
9611 | if test $ac_cv_working_alloca_h = yes; then |
9612 | ||
81ecdfbb | 9613 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 9614 | |
c906108c | 9615 | fi |
bec39cab | 9616 | |
81ecdfbb RW |
9617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9618 | $as_echo_n "checking for alloca... " >&6; } | |
9619 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
9620 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9621 | else |
81ecdfbb | 9622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9623 | /* end confdefs.h. */ |
a9322a30 TT |
9624 | #ifdef __GNUC__ |
9625 | # define alloca __builtin_alloca | |
b4e70030 | 9626 | #else |
a9322a30 TT |
9627 | # ifdef _MSC_VER |
9628 | # include <malloc.h> | |
9629 | # define alloca _alloca | |
9630 | # else | |
81ecdfbb | 9631 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
9632 | # include <alloca.h> |
9633 | # else | |
9634 | # ifdef _AIX | |
9635 | #pragma alloca | |
9636 | # else | |
9637 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9638 | char *alloca (); | |
9639 | # endif | |
9640 | # endif | |
9641 | # endif | |
9642 | # endif | |
c906108c | 9643 | #endif |
97bf5e38 | 9644 | |
bec39cab AC |
9645 | int |
9646 | main () | |
9647 | { | |
a9322a30 | 9648 | char *p = (char *) alloca (1); |
81ecdfbb | 9649 | if (p) return 0; |
bec39cab AC |
9650 | ; |
9651 | return 0; | |
9652 | } | |
9653 | _ACEOF | |
81ecdfbb | 9654 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9655 | ac_cv_func_alloca_works=yes |
bec39cab | 9656 | else |
81ecdfbb | 9657 | ac_cv_func_alloca_works=no |
bec39cab | 9658 | fi |
81ecdfbb RW |
9659 | rm -f core conftest.err conftest.$ac_objext \ |
9660 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9661 | fi |
81ecdfbb RW |
9662 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
9663 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
9664 | |
9665 | if test $ac_cv_func_alloca_works = yes; then | |
9666 | ||
81ecdfbb | 9667 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 9668 | |
a9322a30 TT |
9669 | else |
9670 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
9671 | # that cause trouble. Some versions do not even contain alloca or | |
9672 | # contain a buggy version. If you still want to use their alloca, | |
9673 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
9674 | ||
81ecdfbb | 9675 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 9676 | |
81ecdfbb | 9677 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 9678 | |
bec39cab | 9679 | |
81ecdfbb RW |
9680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
9681 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9682 | if test "${ac_cv_os_cray+set}" = set; then : | |
9683 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9684 | else |
81ecdfbb | 9685 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 9686 | /* end confdefs.h. */ |
81ecdfbb | 9687 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
9688 | webecray |
9689 | #else | |
9690 | wenotbecray | |
9691 | #endif | |
9692 | ||
9693 | _ACEOF | |
9694 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 9695 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
9696 | ac_cv_os_cray=yes |
9697 | else | |
81ecdfbb | 9698 | ac_cv_os_cray=no |
bec39cab | 9699 | fi |
81ecdfbb RW |
9700 | rm -f conftest* |
9701 | ||
bec39cab | 9702 | fi |
81ecdfbb RW |
9703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
9704 | $as_echo "$ac_cv_os_cray" >&6; } | |
9705 | if test $ac_cv_os_cray = yes; then | |
9706 | for ac_func in _getb67 GETB67 getb67; do | |
9707 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9708 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9709 | eval as_val=\$$as_ac_var | |
9710 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
9711 | |
9712 | cat >>confdefs.h <<_ACEOF | |
9713 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 9714 | _ACEOF |
c906108c | 9715 | |
a9322a30 | 9716 | break |
c906108c SS |
9717 | fi |
9718 | ||
a9322a30 TT |
9719 | done |
9720 | fi | |
bec39cab | 9721 | |
81ecdfbb RW |
9722 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
9723 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9724 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
9725 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9726 | else |
81ecdfbb | 9727 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9728 | ac_cv_c_stack_direction=0 |
bec39cab | 9729 | else |
81ecdfbb | 9730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9731 | /* end confdefs.h. */ |
81ecdfbb | 9732 | $ac_includes_default |
a9322a30 TT |
9733 | int |
9734 | find_stack_direction () | |
b4e70030 | 9735 | { |
a9322a30 TT |
9736 | static char *addr = 0; |
9737 | auto char dummy; | |
9738 | if (addr == 0) | |
9739 | { | |
9740 | addr = &dummy; | |
9741 | return find_stack_direction (); | |
9742 | } | |
9743 | else | |
9744 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 9745 | } |
b757528f | 9746 | |
bec39cab AC |
9747 | int |
9748 | main () | |
9749 | { | |
81ecdfbb | 9750 | return find_stack_direction () < 0; |
bec39cab AC |
9751 | } |
9752 | _ACEOF | |
81ecdfbb | 9753 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9754 | ac_cv_c_stack_direction=1 |
9755 | else | |
81ecdfbb | 9756 | ac_cv_c_stack_direction=-1 |
a9322a30 | 9757 | fi |
81ecdfbb RW |
9758 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9759 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9760 | fi |
a9322a30 | 9761 | |
81ecdfbb RW |
9762 | fi |
9763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
9764 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
9765 | cat >>confdefs.h <<_ACEOF |
9766 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
9767 | _ACEOF | |
9768 | ||
9769 | ||
9770 | fi | |
9771 | ||
a9322a30 | 9772 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
9773 | do : |
9774 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9775 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9776 | eval as_val=\$$as_ac_Header | |
9777 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9778 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9779 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9780 | _ACEOF |
b757528f | 9781 | |
b757528f | 9782 | fi |
bec39cab | 9783 | |
a9322a30 | 9784 | done |
a3828db0 | 9785 | |
a9322a30 | 9786 | for ac_func in getpagesize |
81ecdfbb RW |
9787 | do : |
9788 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9789 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 9790 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9791 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 9792 | _ACEOF |
bcb3dc3d | 9793 | |
bcb3dc3d MK |
9794 | fi |
9795 | done | |
9796 | ||
81ecdfbb RW |
9797 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
9798 | $as_echo_n "checking for working mmap... " >&6; } | |
9799 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
9800 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9801 | else |
81ecdfbb | 9802 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9803 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 9804 | else |
81ecdfbb | 9805 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9806 | /* end confdefs.h. */ |
a9322a30 TT |
9807 | $ac_includes_default |
9808 | /* malloc might have been renamed as rpl_malloc. */ | |
9809 | #undef malloc | |
bec39cab | 9810 | |
a9322a30 TT |
9811 | /* Thanks to Mike Haertel and Jim Avera for this test. |
9812 | Here is a matrix of mmap possibilities: | |
9813 | mmap private not fixed | |
9814 | mmap private fixed at somewhere currently unmapped | |
9815 | mmap private fixed at somewhere already mapped | |
9816 | mmap shared not fixed | |
9817 | mmap shared fixed at somewhere currently unmapped | |
9818 | mmap shared fixed at somewhere already mapped | |
9819 | For private mappings, we should verify that changes cannot be read() | |
9820 | back from the file, nor mmap's back from the file at a different | |
9821 | address. (There have been systems where private was not correctly | |
9822 | implemented like the infamous i386 svr4.0, and systems where the | |
9823 | VM page cache was not coherent with the file system buffer cache | |
9824 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9825 | For shared mappings, we should conversely verify that changes get | |
9826 | propagated back to all the places they're supposed to be. | |
bec39cab | 9827 | |
a9322a30 TT |
9828 | Grep wants private fixed already mapped. |
9829 | The main things grep needs to know about mmap are: | |
9830 | * does it exist and is it safe to write into the mmap'd area | |
9831 | * how to use it (BSD variants) */ | |
8b9cf735 | 9832 | |
a9322a30 TT |
9833 | #include <fcntl.h> |
9834 | #include <sys/mman.h> | |
8b9cf735 | 9835 | |
81ecdfbb | 9836 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 9837 | char *malloc (); |
a3828db0 MK |
9838 | #endif |
9839 | ||
a9322a30 | 9840 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 9841 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 9842 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 9843 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
9844 | # define HAVE_SYS_PARAM_H 1 |
9845 | # endif | |
9846 | ||
9847 | # ifdef _SC_PAGESIZE | |
9848 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9849 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 9850 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
9851 | # include <sys/param.h> |
9852 | # ifdef EXEC_PAGESIZE | |
9853 | # define getpagesize() EXEC_PAGESIZE | |
9854 | # else /* no EXEC_PAGESIZE */ | |
9855 | # ifdef NBPG | |
9856 | # define getpagesize() NBPG * CLSIZE | |
9857 | # ifndef CLSIZE | |
9858 | # define CLSIZE 1 | |
9859 | # endif /* no CLSIZE */ | |
9860 | # else /* no NBPG */ | |
9861 | # ifdef NBPC | |
9862 | # define getpagesize() NBPC | |
9863 | # else /* no NBPC */ | |
9864 | # ifdef PAGESIZE | |
9865 | # define getpagesize() PAGESIZE | |
9866 | # endif /* PAGESIZE */ | |
9867 | # endif /* no NBPC */ | |
9868 | # endif /* no NBPG */ | |
9869 | # endif /* no EXEC_PAGESIZE */ | |
9870 | # else /* no HAVE_SYS_PARAM_H */ | |
9871 | # define getpagesize() 8192 /* punt totally */ | |
9872 | # endif /* no HAVE_SYS_PARAM_H */ | |
9873 | # endif /* no _SC_PAGESIZE */ | |
9874 | ||
9875 | #endif /* no HAVE_GETPAGESIZE */ | |
9876 | ||
bec39cab AC |
9877 | int |
9878 | main () | |
9879 | { | |
a9322a30 TT |
9880 | char *data, *data2, *data3; |
9881 | int i, pagesize; | |
9882 | int fd; | |
9883 | ||
9884 | pagesize = getpagesize (); | |
9885 | ||
9886 | /* First, make a file with some known garbage in it. */ | |
9887 | data = (char *) malloc (pagesize); | |
9888 | if (!data) | |
81ecdfbb | 9889 | return 1; |
a9322a30 TT |
9890 | for (i = 0; i < pagesize; ++i) |
9891 | *(data + i) = rand (); | |
9892 | umask (0); | |
9893 | fd = creat ("conftest.mmap", 0600); | |
9894 | if (fd < 0) | |
81ecdfbb | 9895 | return 1; |
a9322a30 | 9896 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 9897 | return 1; |
a9322a30 TT |
9898 | close (fd); |
9899 | ||
9900 | /* Next, try to mmap the file at a fixed address which already has | |
9901 | something else allocated at it. If we can, also make sure that | |
9902 | we see the same garbage. */ | |
9903 | fd = open ("conftest.mmap", O_RDWR); | |
9904 | if (fd < 0) | |
81ecdfbb | 9905 | return 1; |
a9322a30 TT |
9906 | data2 = (char *) malloc (2 * pagesize); |
9907 | if (!data2) | |
81ecdfbb RW |
9908 | return 1; |
9909 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
9910 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
9911 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 9912 | return 1; |
a9322a30 TT |
9913 | for (i = 0; i < pagesize; ++i) |
9914 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 9915 | return 1; |
a9322a30 TT |
9916 | |
9917 | /* Finally, make sure that changes to the mapped area do not | |
9918 | percolate back to the file as seen by read(). (This is a bug on | |
9919 | some variants of i386 svr4.0.) */ | |
9920 | for (i = 0; i < pagesize; ++i) | |
9921 | *(data2 + i) = *(data2 + i) + 1; | |
9922 | data3 = (char *) malloc (pagesize); | |
9923 | if (!data3) | |
81ecdfbb | 9924 | return 1; |
a9322a30 | 9925 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 9926 | return 1; |
a9322a30 TT |
9927 | for (i = 0; i < pagesize; ++i) |
9928 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 9929 | return 1; |
a9322a30 | 9930 | close (fd); |
81ecdfbb | 9931 | return 0; |
bec39cab AC |
9932 | } |
9933 | _ACEOF | |
81ecdfbb | 9934 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9935 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 9936 | else |
81ecdfbb | 9937 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 9938 | fi |
81ecdfbb RW |
9939 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9940 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 9941 | fi |
81ecdfbb | 9942 | |
a9322a30 | 9943 | fi |
81ecdfbb RW |
9944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
9945 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
9946 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
9947 | ||
81ecdfbb | 9948 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 9949 | |
086ec9eb | 9950 | fi |
a9322a30 | 9951 | rm -f conftest.mmap |
a3828db0 | 9952 | |
81ecdfbb RW |
9953 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
9954 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 9955 | |
a9322a30 TT |
9956 | else |
9957 | ||
9958 | cat >>confdefs.h <<_ACEOF | |
9959 | #define pid_t int | |
bec39cab | 9960 | _ACEOF |
086ec9eb MK |
9961 | |
9962 | fi | |
9963 | ||
81ecdfbb RW |
9964 | for ac_header in vfork.h |
9965 | do : | |
9966 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9967 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 9968 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9969 | #define HAVE_VFORK_H 1 |
bec39cab | 9970 | _ACEOF |
c906108c SS |
9971 | |
9972 | fi | |
a9322a30 | 9973 | |
a3828db0 | 9974 | done |
c906108c | 9975 | |
a9322a30 | 9976 | for ac_func in fork vfork |
81ecdfbb RW |
9977 | do : |
9978 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9979 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9980 | eval as_val=\$$as_ac_var | |
9981 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 9982 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9983 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 9984 | _ACEOF |
b83266a0 | 9985 | |
97bf5e38 | 9986 | fi |
a3828db0 | 9987 | done |
b83266a0 | 9988 | |
a9322a30 | 9989 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
9990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
9991 | $as_echo_n "checking for working fork... " >&6; } | |
9992 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
9993 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9994 | else |
81ecdfbb | 9995 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9996 | ac_cv_func_fork_works=cross |
9997 | else | |
81ecdfbb RW |
9998 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9999 | /* end confdefs.h. */ | |
10000 | $ac_includes_default | |
10001 | int | |
10002 | main () | |
10003 | { | |
10004 | ||
10005 | /* By Ruediger Kuhlmann. */ | |
10006 | return fork () < 0; | |
10007 | ||
10008 | ; | |
10009 | return 0; | |
10010 | } | |
a9322a30 | 10011 | _ACEOF |
81ecdfbb | 10012 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10013 | ac_cv_func_fork_works=yes |
10014 | else | |
81ecdfbb | 10015 | ac_cv_func_fork_works=no |
a9322a30 | 10016 | fi |
81ecdfbb RW |
10017 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10018 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10019 | fi |
81ecdfbb | 10020 | |
a9322a30 | 10021 | fi |
81ecdfbb RW |
10022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
10023 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
10024 | |
10025 | else | |
10026 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10027 | fi | |
10028 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10029 | case $host in | |
10030 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10031 | # Override, as these systems have only a dummy fork() stub | |
10032 | ac_cv_func_fork_works=no | |
10033 | ;; | |
10034 | *) | |
10035 | ac_cv_func_fork_works=yes | |
10036 | ;; | |
10037 | esac | |
81ecdfbb RW |
10038 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
10039 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10040 | fi |
10041 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
10042 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
10043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
10044 | $as_echo_n "checking for working vfork... " >&6; } | |
10045 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
10046 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 10047 | else |
81ecdfbb | 10048 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
10049 | ac_cv_func_vfork_works=cross |
10050 | else | |
81ecdfbb | 10051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
10052 | /* end confdefs.h. */ |
10053 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 10054 | $ac_includes_default |
a9322a30 | 10055 | #include <sys/wait.h> |
81ecdfbb | 10056 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
10057 | # include <vfork.h> |
10058 | #endif | |
10059 | /* On some sparc systems, changes by the child to local and incoming | |
10060 | argument registers are propagated back to the parent. The compiler | |
10061 | is told about this with #include <vfork.h>, but some compilers | |
10062 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10063 | static variable whose address is put into a register that is | |
10064 | clobbered by the vfork. */ | |
10065 | static void | |
10066 | #ifdef __cplusplus | |
10067 | sparc_address_test (int arg) | |
10068 | # else | |
10069 | sparc_address_test (arg) int arg; | |
10070 | #endif | |
10071 | { | |
10072 | static pid_t child; | |
10073 | if (!child) { | |
10074 | child = vfork (); | |
10075 | if (child < 0) { | |
10076 | perror ("vfork"); | |
10077 | _exit(2); | |
10078 | } | |
10079 | if (!child) { | |
10080 | arg = getpid(); | |
10081 | write(-1, "", 0); | |
10082 | _exit (arg); | |
10083 | } | |
10084 | } | |
10085 | } | |
10086 | ||
10087 | int | |
10088 | main () | |
10089 | { | |
10090 | pid_t parent = getpid (); | |
10091 | pid_t child; | |
10092 | ||
10093 | sparc_address_test (0); | |
10094 | ||
10095 | child = vfork (); | |
10096 | ||
10097 | if (child == 0) { | |
10098 | /* Here is another test for sparc vfork register problems. This | |
10099 | test uses lots of local variables, at least as many local | |
10100 | variables as main has allocated so far including compiler | |
10101 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10102 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10103 | reuse the register of parent for one of the local variables, | |
10104 | since it will think that parent can't possibly be used any more | |
10105 | in this routine. Assigning to the local variable will thus | |
10106 | munge parent in the parent process. */ | |
10107 | pid_t | |
10108 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10109 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10110 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10111 | use the same hardware register for all 8 local variables. */ | |
10112 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10113 | || p != p5 || p != p6 || p != p7) | |
10114 | _exit(1); | |
10115 | ||
10116 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10117 | from child file descriptors. If the child closes a descriptor | |
10118 | before it execs or exits, this munges the parent's descriptor | |
10119 | as well. Test for this by closing stdout in the child. */ | |
10120 | _exit(close(fileno(stdout)) != 0); | |
10121 | } else { | |
10122 | int status; | |
10123 | struct stat st; | |
10124 | ||
10125 | while (wait(&status) != child) | |
10126 | ; | |
81ecdfbb | 10127 | return ( |
a9322a30 TT |
10128 | /* Was there some problem with vforking? */ |
10129 | child < 0 | |
10130 | ||
10131 | /* Did the child fail? (This shouldn't happen.) */ | |
10132 | || status | |
10133 | ||
10134 | /* Did the vfork/compiler bug occur? */ | |
10135 | || parent != getpid() | |
10136 | ||
10137 | /* Did the file descriptor bug occur? */ | |
10138 | || fstat(fileno(stdout), &st) != 0 | |
10139 | ); | |
10140 | } | |
10141 | } | |
10142 | _ACEOF | |
81ecdfbb | 10143 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10144 | ac_cv_func_vfork_works=yes |
10145 | else | |
81ecdfbb | 10146 | ac_cv_func_vfork_works=no |
a9322a30 | 10147 | fi |
81ecdfbb RW |
10148 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10149 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10150 | fi |
81ecdfbb | 10151 | |
a9322a30 | 10152 | fi |
81ecdfbb RW |
10153 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10154 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10155 | |
10156 | fi; | |
10157 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10158 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10159 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10160 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10161 | fi |
10162 | ||
10163 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10164 | ||
81ecdfbb | 10165 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10166 | |
10167 | else | |
10168 | ||
81ecdfbb | 10169 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10170 | |
10171 | fi | |
10172 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10173 | ||
81ecdfbb | 10174 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10175 | |
10176 | fi | |
10177 | ||
7313baad | 10178 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 10179 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 10180 | sbrk setpgid setpgrp setsid \ |
a9322a30 | 10181 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 10182 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
614c279d | 10183 | setrlimit getrlimit posix_madvise waitpid lstat \ |
b08ee99f | 10184 | fdwalk pipe2 ptrace64 |
81ecdfbb RW |
10185 | do : |
10186 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10187 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10188 | eval as_val=\$$as_ac_var | |
10189 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10190 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10191 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10192 | _ACEOF |
10193 | ||
10194 | fi | |
10195 | done | |
10196 | ||
10197 | ||
81ecdfbb RW |
10198 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10199 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10200 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10201 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10202 | else |
81ecdfbb | 10203 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10204 | /* end confdefs.h. */ |
10205 | #include <langinfo.h> | |
10206 | int | |
10207 | main () | |
10208 | { | |
10209 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10210 | ; |
10211 | return 0; | |
10212 | } | |
10213 | _ACEOF | |
81ecdfbb | 10214 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10215 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10216 | else |
81ecdfbb | 10217 | am_cv_langinfo_codeset=no |
a4db0f07 | 10218 | fi |
81ecdfbb RW |
10219 | rm -f core conftest.err conftest.$ac_objext \ |
10220 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10221 | |
a4db0f07 | 10222 | fi |
81ecdfbb RW |
10223 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10224 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10225 | if test $am_cv_langinfo_codeset = yes; then |
10226 | ||
81ecdfbb | 10227 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10228 | |
6c7a06a3 | 10229 | fi |
c906108c | 10230 | |
06825bd1 | 10231 | |
a3828db0 MK |
10232 | # Check the return and argument types of ptrace. No canned test for |
10233 | # this, so roll our own. | |
10234 | gdb_ptrace_headers=' | |
10235 | #if HAVE_SYS_TYPES_H | |
10236 | # include <sys/types.h> | |
10237 | #endif | |
10238 | #if HAVE_SYS_PTRACE_H | |
10239 | # include <sys/ptrace.h> | |
10240 | #endif | |
10241 | #if HAVE_UNISTD_H | |
10242 | # include <unistd.h> | |
10243 | #endif | |
10244 | ' | |
10245 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
10246 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
10247 | " | |
10248 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
10249 | ac_have_decl=1 | |
06825bd1 | 10250 | else |
81ecdfbb | 10251 | ac_have_decl=0 |
06825bd1 | 10252 | fi |
06825bd1 | 10253 | |
a3828db0 | 10254 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10255 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 10256 | _ACEOF |
81ecdfbb | 10257 | if test $ac_have_decl = 1; then : |
bec39cab | 10258 | |
a3828db0 | 10259 | else |
a3828db0 MK |
10260 | |
10261 | : ${gdb_cv_func_ptrace_ret='int'} | |
10262 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10263 | ||
06825bd1 MK |
10264 | fi |
10265 | ||
064ef605 DJ |
10266 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
10267 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
10268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
10269 | $as_echo_n "checking return type of ptrace... " >&6; } | |
10270 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
10271 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10272 | else |
81ecdfbb | 10273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10274 | /* end confdefs.h. */ |
a3828db0 | 10275 | $gdb_ptrace_headers |
bec39cab AC |
10276 | int |
10277 | main () | |
10278 | { | |
064ef605 DJ |
10279 | extern long ptrace (enum __ptrace_request, ...); |
10280 | ; | |
10281 | return 0; | |
10282 | } | |
10283 | _ACEOF | |
81ecdfbb | 10284 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10285 | gdb_cv_func_ptrace_ret='long' |
10286 | else | |
81ecdfbb | 10287 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10288 | /* end confdefs.h. */ |
10289 | $gdb_ptrace_headers | |
10290 | int | |
10291 | main () | |
10292 | { | |
a3828db0 | 10293 | extern int ptrace (); |
bec39cab AC |
10294 | ; |
10295 | return 0; | |
10296 | } | |
10297 | _ACEOF | |
81ecdfbb | 10298 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10299 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 10300 | else |
81ecdfbb | 10301 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 10302 | fi |
81ecdfbb | 10303 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 10304 | fi |
81ecdfbb | 10305 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 10306 | fi |
81ecdfbb RW |
10307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
10308 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 10309 | |
a3828db0 MK |
10310 | cat >>confdefs.h <<_ACEOF |
10311 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 10312 | _ACEOF |
70f9f479 | 10313 | |
a3828db0 | 10314 | # Check argument types. |
81ecdfbb RW |
10315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
10316 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
10317 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
10318 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10319 | else |
a3828db0 | 10320 | |
81ecdfbb | 10321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10322 | /* end confdefs.h. */ |
10323 | $gdb_ptrace_headers | |
10324 | int | |
10325 | main () | |
10326 | { | |
10327 | extern long ptrace (enum __ptrace_request, ...); | |
10328 | ; | |
10329 | return 0; | |
10330 | } | |
10331 | _ACEOF | |
81ecdfbb | 10332 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10333 | gdb_cv_func_ptrace_args='int,int,long,long' |
10334 | else | |
064ef605 | 10335 | |
a3828db0 MK |
10336 | for gdb_arg1 in 'int' 'long'; do |
10337 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 10338 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
96d7229d | 10339 | for gdb_arg4 in 'int' 'long' 'void *'; do |
81ecdfbb | 10340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10341 | /* end confdefs.h. */ |
a3828db0 | 10342 | $gdb_ptrace_headers |
bec39cab AC |
10343 | int |
10344 | main () | |
10345 | { | |
a3828db0 MK |
10346 | |
10347 | extern $gdb_cv_func_ptrace_ret | |
10348 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
10349 | ||
bec39cab AC |
10350 | ; |
10351 | return 0; | |
10352 | } | |
10353 | _ACEOF | |
81ecdfbb | 10354 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10355 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
10356 | break 4; | |
5c7f2947 | 10357 | fi |
81ecdfbb | 10358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 10359 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 10360 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10361 | /* end confdefs.h. */ |
a3828db0 | 10362 | $gdb_ptrace_headers |
bec39cab AC |
10363 | int |
10364 | main () | |
10365 | { | |
a3828db0 MK |
10366 | |
10367 | extern $gdb_cv_func_ptrace_ret | |
10368 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
10369 | ||
bec39cab AC |
10370 | ; |
10371 | return 0; | |
10372 | } | |
10373 | _ACEOF | |
81ecdfbb | 10374 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10375 | |
10376 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
10377 | break 5; | |
78434e59 | 10378 | fi |
81ecdfbb | 10379 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
10380 | done |
10381 | done | |
10382 | done | |
10383 | done | |
10384 | done | |
10385 | # Provide a safe default value. | |
10386 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10387 | ||
064ef605 | 10388 | fi |
81ecdfbb | 10389 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 10390 | fi |
81ecdfbb RW |
10391 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
10392 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
10393 | ac_save_IFS=$IFS; IFS=',' |
10394 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10395 | IFS=$ac_save_IFS | |
10396 | shift | |
bec39cab | 10397 | |
a3828db0 MK |
10398 | cat >>confdefs.h <<_ACEOF |
10399 | #define PTRACE_TYPE_ARG3 $3 | |
10400 | _ACEOF | |
10401 | ||
96d7229d LM |
10402 | |
10403 | cat >>confdefs.h <<_ACEOF | |
10404 | #define PTRACE_TYPE_ARG4 $4 | |
10405 | _ACEOF | |
10406 | ||
a3828db0 MK |
10407 | if test -n "$5"; then |
10408 | ||
10409 | cat >>confdefs.h <<_ACEOF | |
10410 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 10411 | _ACEOF |
78434e59 MK |
10412 | |
10413 | fi | |
10414 | ||
a3828db0 | 10415 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
10416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10417 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10418 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10419 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 10420 | else |
81ecdfbb RW |
10421 | if test "$cross_compiling" = yes; then : |
10422 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 10423 | else |
81ecdfbb | 10424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10425 | /* end confdefs.h. */ |
81ecdfbb | 10426 | $ac_includes_default |
bec39cab AC |
10427 | int |
10428 | main () | |
10429 | { | |
a3828db0 MK |
10430 | /* If this system has a BSD-style setpgrp which takes arguments, |
10431 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
10432 | exit successfully. */ | |
81ecdfbb | 10433 | return setpgrp (1,1) != -1; |
bec39cab AC |
10434 | ; |
10435 | return 0; | |
10436 | } | |
10437 | _ACEOF | |
81ecdfbb | 10438 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 10439 | ac_cv_func_setpgrp_void=no |
c906108c | 10440 | else |
81ecdfbb | 10441 | ac_cv_func_setpgrp_void=yes |
c906108c | 10442 | fi |
81ecdfbb RW |
10443 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10444 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 10445 | fi |
81ecdfbb | 10446 | |
a3828db0 | 10447 | fi |
81ecdfbb RW |
10448 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10449 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
10450 | if test $ac_cv_func_setpgrp_void = yes; then |
10451 | ||
81ecdfbb | 10452 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
10453 | |
10454 | fi | |
a3828db0 MK |
10455 | |
10456 | else | |
81ecdfbb RW |
10457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10458 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10459 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10460 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 10461 | else |
81ecdfbb | 10462 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10463 | /* end confdefs.h. */ |
a3828db0 MK |
10464 | |
10465 | #include <unistd.h> | |
10466 | ||
bec39cab AC |
10467 | int |
10468 | main () | |
10469 | { | |
a3828db0 MK |
10470 | |
10471 | if (setpgrp(1,1) == -1) | |
10472 | exit (0); | |
10473 | else | |
10474 | exit (1); | |
10475 | ||
bec39cab AC |
10476 | ; |
10477 | return 0; | |
10478 | } | |
10479 | _ACEOF | |
81ecdfbb | 10480 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10481 | ac_cv_func_setpgrp_void=no |
c906108c | 10482 | else |
81ecdfbb | 10483 | ac_cv_func_setpgrp_void=yes |
c906108c | 10484 | fi |
81ecdfbb | 10485 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10486 | fi |
81ecdfbb RW |
10487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10488 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 10489 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 10490 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 10491 | |
a3828db0 | 10492 | fi |
c906108c SS |
10493 | fi |
10494 | ||
a3828db0 MK |
10495 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
10496 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
10497 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
10498 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
10499 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
10500 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10501 | else |
81ecdfbb | 10502 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10503 | /* end confdefs.h. */ |
a3828db0 MK |
10504 | |
10505 | #include <setjmp.h> | |
10506 | ||
bec39cab AC |
10507 | int |
10508 | main () | |
10509 | { | |
a3828db0 | 10510 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
10511 | ; |
10512 | return 0; | |
10513 | } | |
10514 | _ACEOF | |
81ecdfbb | 10515 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10516 | gdb_cv_func_sigsetjmp=yes |
c906108c | 10517 | else |
81ecdfbb | 10518 | gdb_cv_func_sigsetjmp=no |
c906108c | 10519 | fi |
81ecdfbb | 10520 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10521 | fi |
81ecdfbb RW |
10522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
10523 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 10524 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 10525 | |
81ecdfbb | 10526 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 10527 | |
97bf5e38 | 10528 | fi |
c906108c | 10529 | |
a3828db0 MK |
10530 | # Assume we'll default to using the included libiberty regex. |
10531 | gdb_use_included_regex=yes | |
10532 | ||
10533 | # However, if the system regex is GNU regex, then default to *not* | |
10534 | # using the included regex. | |
81ecdfbb RW |
10535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
10536 | $as_echo_n "checking for GNU regex... " >&6; } | |
10537 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
10538 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10539 | else |
81ecdfbb | 10540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10541 | /* end confdefs.h. */ |
a3828db0 | 10542 | #include <gnu-versions.h> |
bec39cab AC |
10543 | int |
10544 | main () | |
10545 | { | |
81ecdfbb RW |
10546 | #define REGEX_INTERFACE_VERSION 1 |
10547 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
10548 | # error "Version mismatch" | |
10549 | #endif | |
5c45e068 MK |
10550 | ; |
10551 | return 0; | |
10552 | } | |
10553 | _ACEOF | |
81ecdfbb RW |
10554 | if ac_fn_c_try_compile "$LINENO"; then : |
10555 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 10556 | else |
81ecdfbb RW |
10557 | gdb_cv_have_gnu_regex=no |
10558 | fi | |
10559 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10560 | fi | |
10561 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
10562 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
10563 | if test $gdb_cv_have_gnu_regex = yes; then | |
10564 | gdb_use_included_regex=no | |
5c45e068 | 10565 | fi |
81ecdfbb RW |
10566 | |
10567 | ||
10568 | # Check whether --with-included-regex was given. | |
10569 | if test "${with_included_regex+set}" = set; then : | |
10570 | withval=$with_included_regex; gdb_with_regex=$withval | |
10571 | else | |
10572 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 10573 | fi |
81ecdfbb RW |
10574 | |
10575 | if test "$gdb_with_regex" = yes; then | |
10576 | ||
10577 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
10578 | ||
c906108c | 10579 | fi |
81ecdfbb RW |
10580 | |
10581 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
10582 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
10583 | #include <sys/proc.h> | |
10584 | ||
10585 | " | |
10586 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 10587 | |
5c45e068 | 10588 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 10589 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 10590 | _ACEOF |
c906108c | 10591 | |
5c45e068 | 10592 | |
97bf5e38 | 10593 | fi |
c906108c | 10594 | |
5c45e068 | 10595 | |
a3828db0 | 10596 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
10597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
10598 | $as_echo_n "checking for struct lwp... " >&6; } | |
10599 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
10600 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10601 | else |
81ecdfbb | 10602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10603 | /* end confdefs.h. */ |
a3828db0 MK |
10604 | #include <sys/param.h> |
10605 | #include <sys/lwp.h> | |
bec39cab AC |
10606 | int |
10607 | main () | |
10608 | { | |
a3828db0 | 10609 | struct lwp l; |
bec39cab AC |
10610 | ; |
10611 | return 0; | |
10612 | } | |
10613 | _ACEOF | |
81ecdfbb | 10614 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10615 | gdb_cv_struct_lwp=yes |
c906108c | 10616 | else |
81ecdfbb | 10617 | gdb_cv_struct_lwp=no |
c906108c | 10618 | fi |
81ecdfbb | 10619 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10620 | fi |
81ecdfbb RW |
10621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
10622 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 10623 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 10624 | |
81ecdfbb | 10625 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 10626 | |
97bf5e38 | 10627 | fi |
c906108c | 10628 | |
a3828db0 | 10629 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
10630 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
10631 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
10632 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
10633 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10634 | else |
81ecdfbb | 10635 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10636 | /* end confdefs.h. */ |
a3828db0 MK |
10637 | #include <sys/types.h> |
10638 | #include <machine/reg.h> | |
bec39cab AC |
10639 | int |
10640 | main () | |
10641 | { | |
a3828db0 | 10642 | struct reg r; |
bec39cab AC |
10643 | ; |
10644 | return 0; | |
10645 | } | |
10646 | _ACEOF | |
81ecdfbb | 10647 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10648 | gdb_cv_struct_reg=yes |
27ca5dad | 10649 | else |
81ecdfbb | 10650 | gdb_cv_struct_reg=no |
27ca5dad | 10651 | fi |
81ecdfbb | 10652 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 10653 | fi |
81ecdfbb RW |
10654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
10655 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 10656 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 10657 | |
81ecdfbb | 10658 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
10659 | |
10660 | fi | |
97bf5e38 | 10661 | |
a3828db0 MK |
10662 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
10663 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
10664 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
10665 | " | |
10666 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
10667 | |
10668 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10669 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 10670 | _ACEOF |
3862412b | 10671 | |
5c45e068 | 10672 | |
97bf5e38 | 10673 | fi |
81ecdfbb RW |
10674 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
10675 | " | |
10676 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
10677 | |
10678 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10679 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 10680 | _ACEOF |
3862412b | 10681 | |
5c45e068 | 10682 | |
97bf5e38 | 10683 | fi |
3862412b | 10684 | |
5c45e068 | 10685 | |
6fea9e18 L |
10686 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
10687 | # Older amd64 Linux's don't have the fs_base and gs_base members of | |
10688 | # `struct user_regs_struct'. | |
10689 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/user.h> | |
10690 | " | |
10691 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = x""yes; then : | |
10692 | ||
10693 | cat >>confdefs.h <<_ACEOF | |
10694 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 | |
10695 | _ACEOF | |
10696 | ||
10697 | ||
10698 | fi | |
10699 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/user.h> | |
10700 | " | |
10701 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = x""yes; then : | |
10702 | ||
10703 | cat >>confdefs.h <<_ACEOF | |
10704 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 | |
10705 | _ACEOF | |
10706 | ||
10707 | ||
10708 | fi | |
10709 | ||
10710 | ||
a3828db0 | 10711 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
10712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10713 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
10714 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
10715 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10716 | else |
81ecdfbb | 10717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10718 | /* end confdefs.h. */ |
a3828db0 | 10719 | #include <sys/ptrace.h> |
bec39cab AC |
10720 | int |
10721 | main () | |
10722 | { | |
a3828db0 | 10723 | PTRACE_GETREGS; |
bec39cab AC |
10724 | ; |
10725 | return 0; | |
10726 | } | |
10727 | _ACEOF | |
81ecdfbb | 10728 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10729 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 10730 | else |
81ecdfbb | 10731 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 10732 | fi |
81ecdfbb | 10733 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10734 | fi |
10735 | ||
81ecdfbb RW |
10736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
10737 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 10738 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 10739 | |
81ecdfbb | 10740 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 10741 | |
97bf5e38 | 10742 | fi |
451928c5 | 10743 | |
a3828db0 | 10744 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
10745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10746 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
10747 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
10748 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10749 | else |
81ecdfbb | 10750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10751 | /* end confdefs.h. */ |
a3828db0 | 10752 | #include <sys/ptrace.h> |
bec39cab AC |
10753 | int |
10754 | main () | |
10755 | { | |
a3828db0 | 10756 | PTRACE_GETFPXREGS; |
bec39cab AC |
10757 | ; |
10758 | return 0; | |
10759 | } | |
10760 | _ACEOF | |
81ecdfbb | 10761 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10762 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 10763 | else |
81ecdfbb | 10764 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 10765 | fi |
81ecdfbb | 10766 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10767 | fi |
10768 | ||
81ecdfbb RW |
10769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
10770 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 10771 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 10772 | |
81ecdfbb | 10773 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 10774 | |
97bf5e38 | 10775 | fi |
451928c5 | 10776 | |
a3828db0 | 10777 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
10778 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
10779 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
10780 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
10781 | $as_echo_n "(cached) " >&6 | |
3862412b | 10782 | else |
81ecdfbb | 10783 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10784 | /* end confdefs.h. */ |
a3828db0 MK |
10785 | #include <sys/types.h> |
10786 | #include <sys/ptrace.h> | |
bec39cab AC |
10787 | int |
10788 | main () | |
10789 | { | |
a3828db0 | 10790 | PT_GETDBREGS; |
bec39cab AC |
10791 | ; |
10792 | return 0; | |
10793 | } | |
10794 | _ACEOF | |
81ecdfbb | 10795 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10796 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 10797 | else |
81ecdfbb | 10798 | gdb_cv_have_pt_getdbregs=no |
3862412b | 10799 | fi |
81ecdfbb | 10800 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10801 | fi |
10802 | ||
81ecdfbb RW |
10803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
10804 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 10805 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 10806 | |
81ecdfbb | 10807 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 10808 | |
97bf5e38 | 10809 | fi |
3862412b | 10810 | |
a3828db0 | 10811 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
10812 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
10813 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
10814 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
10815 | $as_echo_n "(cached) " >&6 | |
3862412b | 10816 | else |
81ecdfbb | 10817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10818 | /* end confdefs.h. */ |
a3828db0 MK |
10819 | #include <sys/types.h> |
10820 | #include <sys/ptrace.h> | |
bec39cab AC |
10821 | int |
10822 | main () | |
10823 | { | |
a3828db0 | 10824 | PT_GETXMMREGS; |
bec39cab AC |
10825 | ; |
10826 | return 0; | |
10827 | } | |
10828 | _ACEOF | |
81ecdfbb | 10829 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10830 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 10831 | else |
81ecdfbb | 10832 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 10833 | fi |
81ecdfbb | 10834 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10835 | fi |
10836 | ||
81ecdfbb RW |
10837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
10838 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 10839 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 10840 | |
81ecdfbb | 10841 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 10842 | |
97bf5e38 | 10843 | fi |
3862412b | 10844 | |
05b4bd79 | 10845 | # Detect which type of /proc is in use, such as for Solaris. |
97bf5e38 MK |
10846 | |
10847 | if test "${target}" = "${host}"; then | |
10848 | case "${host}" in | |
7b00db47 | 10849 | *-*-sysv4.2* | *-*-sysv5* ) |
60ca704f | 10850 | |
81ecdfbb | 10851 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
10852 | |
10853 | ;; | |
c162e8c9 | 10854 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 10855 | |
81ecdfbb | 10856 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
10857 | |
10858 | ;; | |
10859 | mips-sgi-irix5*) | |
10860 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 10861 | |
81ecdfbb | 10862 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
10863 | |
10864 | ;; | |
10865 | esac | |
10866 | fi | |
10867 | ||
10868 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
10869 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
10870 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
10871 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
10872 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10873 | else |
81ecdfbb | 10874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10875 | /* end confdefs.h. */ |
596c9d4b KB |
10876 | |
10877 | #define _SYSCALL32 | |
d30c5336 JK |
10878 | /* Needed for new procfs interface on sparc-solaris. */ |
10879 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10880 | #include <sys/procfs.h> |
bec39cab AC |
10881 | int |
10882 | main () | |
10883 | { | |
97bf5e38 | 10884 | pstatus_t avar |
bec39cab AC |
10885 | ; |
10886 | return 0; | |
10887 | } | |
10888 | _ACEOF | |
81ecdfbb | 10889 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10890 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 10891 | else |
81ecdfbb | 10892 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 10893 | |
596c9d4b | 10894 | fi |
81ecdfbb | 10895 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10896 | fi |
10897 | ||
97bf5e38 | 10898 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 10899 | |
81ecdfbb | 10900 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
10901 | |
10902 | fi | |
81ecdfbb RW |
10903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
10904 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 10905 | |
81ecdfbb RW |
10906 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
10907 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
10908 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
10909 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10910 | else |
81ecdfbb | 10911 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10912 | /* end confdefs.h. */ |
596c9d4b KB |
10913 | |
10914 | #define _SYSCALL32 | |
d30c5336 JK |
10915 | /* Needed for new procfs interface on sparc-solaris. */ |
10916 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10917 | #include <sys/procfs.h> |
bec39cab AC |
10918 | int |
10919 | main () | |
10920 | { | |
97bf5e38 | 10921 | prrun_t avar |
bec39cab AC |
10922 | ; |
10923 | return 0; | |
10924 | } | |
10925 | _ACEOF | |
81ecdfbb | 10926 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10927 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 10928 | else |
81ecdfbb | 10929 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 10930 | |
596c9d4b | 10931 | fi |
81ecdfbb | 10932 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10933 | fi |
10934 | ||
97bf5e38 | 10935 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 10936 | |
81ecdfbb | 10937 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
10938 | |
10939 | fi | |
81ecdfbb RW |
10940 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
10941 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 10942 | |
81ecdfbb RW |
10943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
10944 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
10945 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
10946 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10947 | else |
81ecdfbb | 10948 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10949 | /* end confdefs.h. */ |
596c9d4b KB |
10950 | |
10951 | #define _SYSCALL32 | |
d30c5336 JK |
10952 | /* Needed for new procfs interface on sparc-solaris. */ |
10953 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10954 | #include <sys/procfs.h> |
bec39cab AC |
10955 | int |
10956 | main () | |
10957 | { | |
97bf5e38 | 10958 | gregset_t avar |
bec39cab AC |
10959 | ; |
10960 | return 0; | |
10961 | } | |
10962 | _ACEOF | |
81ecdfbb | 10963 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10964 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 10965 | else |
81ecdfbb | 10966 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 10967 | |
596c9d4b | 10968 | fi |
81ecdfbb | 10969 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10970 | fi |
10971 | ||
97bf5e38 | 10972 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 10973 | |
81ecdfbb | 10974 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
10975 | |
10976 | fi | |
81ecdfbb RW |
10977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
10978 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 10979 | |
81ecdfbb RW |
10980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
10981 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
10982 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
10983 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 10984 | else |
81ecdfbb | 10985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10986 | /* end confdefs.h. */ |
97bf5e38 MK |
10987 | |
10988 | #define _SYSCALL32 | |
d30c5336 JK |
10989 | /* Needed for new procfs interface on sparc-solaris. */ |
10990 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 10991 | #include <sys/procfs.h> |
bec39cab AC |
10992 | int |
10993 | main () | |
10994 | { | |
97bf5e38 | 10995 | fpregset_t avar |
bec39cab AC |
10996 | ; |
10997 | return 0; | |
10998 | } | |
10999 | _ACEOF | |
81ecdfbb | 11000 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11001 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 11002 | else |
81ecdfbb | 11003 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 11004 | |
d84dd0c5 | 11005 | fi |
81ecdfbb | 11006 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
11007 | fi |
11008 | ||
97bf5e38 | 11009 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 11010 | |
81ecdfbb | 11011 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 11012 | |
97bf5e38 | 11013 | fi |
81ecdfbb RW |
11014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
11015 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 11016 | |
81ecdfbb RW |
11017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
11018 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
11019 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
11020 | $as_echo_n "(cached) " >&6 | |
c906108c | 11021 | else |
81ecdfbb | 11022 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11023 | /* end confdefs.h. */ |
c906108c | 11024 | |
97bf5e38 | 11025 | #define _SYSCALL32 |
d30c5336 JK |
11026 | /* Needed for new procfs interface on sparc-solaris. */ |
11027 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11028 | #include <sys/procfs.h> |
bec39cab AC |
11029 | int |
11030 | main () | |
11031 | { | |
97bf5e38 | 11032 | prgregset_t avar |
bec39cab AC |
11033 | ; |
11034 | return 0; | |
11035 | } | |
11036 | _ACEOF | |
81ecdfbb | 11037 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11038 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 11039 | else |
81ecdfbb | 11040 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 11041 | |
c906108c | 11042 | fi |
81ecdfbb | 11043 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11044 | fi |
11045 | ||
97bf5e38 | 11046 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 11047 | |
81ecdfbb | 11048 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 11049 | |
97bf5e38 | 11050 | fi |
81ecdfbb RW |
11051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
11052 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 11053 | |
81ecdfbb RW |
11054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
11055 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
11056 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
11057 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11058 | else |
81ecdfbb | 11059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11060 | /* end confdefs.h. */ |
97bf5e38 MK |
11061 | |
11062 | #define _SYSCALL32 | |
d30c5336 JK |
11063 | /* Needed for new procfs interface on sparc-solaris. */ |
11064 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11065 | #include <sys/procfs.h> |
bec39cab AC |
11066 | int |
11067 | main () | |
11068 | { | |
97bf5e38 | 11069 | prfpregset_t avar |
bec39cab AC |
11070 | ; |
11071 | return 0; | |
11072 | } | |
11073 | _ACEOF | |
81ecdfbb | 11074 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11075 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 11076 | else |
81ecdfbb | 11077 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 11078 | |
d45fe813 | 11079 | fi |
81ecdfbb | 11080 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11081 | fi |
11082 | ||
97bf5e38 | 11083 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 11084 | |
81ecdfbb | 11085 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 11086 | |
97bf5e38 | 11087 | fi |
81ecdfbb RW |
11088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
11089 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 11090 | |
81ecdfbb RW |
11091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
11092 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
11093 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
11094 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11095 | else |
81ecdfbb | 11096 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11097 | /* end confdefs.h. */ |
97bf5e38 MK |
11098 | |
11099 | #define _SYSCALL32 | |
d30c5336 JK |
11100 | /* Needed for new procfs interface on sparc-solaris. */ |
11101 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11102 | #include <sys/procfs.h> |
bec39cab AC |
11103 | int |
11104 | main () | |
11105 | { | |
97bf5e38 | 11106 | prgregset32_t avar |
bec39cab AC |
11107 | ; |
11108 | return 0; | |
11109 | } | |
11110 | _ACEOF | |
81ecdfbb | 11111 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11112 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 11113 | else |
81ecdfbb | 11114 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 11115 | |
d45fe813 | 11116 | fi |
81ecdfbb | 11117 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11118 | fi |
11119 | ||
97bf5e38 | 11120 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 11121 | |
81ecdfbb | 11122 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 11123 | |
97bf5e38 | 11124 | fi |
81ecdfbb RW |
11125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
11126 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 11127 | |
81ecdfbb RW |
11128 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
11129 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
11130 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
11131 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11132 | else |
81ecdfbb | 11133 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11134 | /* end confdefs.h. */ |
97bf5e38 MK |
11135 | |
11136 | #define _SYSCALL32 | |
d30c5336 JK |
11137 | /* Needed for new procfs interface on sparc-solaris. */ |
11138 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11139 | #include <sys/procfs.h> |
bec39cab AC |
11140 | int |
11141 | main () | |
11142 | { | |
97bf5e38 | 11143 | prfpregset32_t avar |
bec39cab AC |
11144 | ; |
11145 | return 0; | |
11146 | } | |
11147 | _ACEOF | |
81ecdfbb | 11148 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11149 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 11150 | else |
81ecdfbb | 11151 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 11152 | |
d45fe813 | 11153 | fi |
81ecdfbb | 11154 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11155 | fi |
11156 | ||
97bf5e38 | 11157 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 11158 | |
81ecdfbb | 11159 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 11160 | |
97bf5e38 | 11161 | fi |
81ecdfbb RW |
11162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
11163 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 11164 | |
81ecdfbb RW |
11165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11166 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11167 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11168 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11169 | else |
81ecdfbb | 11170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11171 | /* end confdefs.h. */ |
97bf5e38 | 11172 | |
d45fe813 | 11173 | #define _SYSCALL32 |
d30c5336 JK |
11174 | /* Needed for new procfs interface on sparc-solaris. */ |
11175 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11176 | #include <sys/procfs.h> |
bec39cab AC |
11177 | int |
11178 | main () | |
11179 | { | |
97bf5e38 | 11180 | lwpid_t avar |
bec39cab AC |
11181 | ; |
11182 | return 0; | |
11183 | } | |
11184 | _ACEOF | |
81ecdfbb | 11185 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11186 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11187 | else |
81ecdfbb | 11188 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11189 | |
d45fe813 | 11190 | fi |
81ecdfbb | 11191 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11192 | fi |
11193 | ||
97bf5e38 | 11194 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11195 | |
81ecdfbb | 11196 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11197 | |
97bf5e38 | 11198 | fi |
81ecdfbb RW |
11199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11200 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11201 | |
81ecdfbb RW |
11202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11203 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11204 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11205 | $as_echo_n "(cached) " >&6 | |
c906108c | 11206 | else |
81ecdfbb | 11207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11208 | /* end confdefs.h. */ |
c906108c | 11209 | |
97bf5e38 | 11210 | #define _SYSCALL32 |
d30c5336 JK |
11211 | /* Needed for new procfs interface on sparc-solaris. */ |
11212 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11213 | #include <sys/procfs.h> |
bec39cab AC |
11214 | int |
11215 | main () | |
11216 | { | |
97bf5e38 | 11217 | psaddr_t avar |
bec39cab AC |
11218 | ; |
11219 | return 0; | |
11220 | } | |
11221 | _ACEOF | |
81ecdfbb | 11222 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11223 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11224 | else |
81ecdfbb | 11225 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11226 | |
c906108c | 11227 | fi |
81ecdfbb | 11228 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11229 | fi |
11230 | ||
97bf5e38 | 11231 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11232 | |
81ecdfbb | 11233 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11234 | |
97bf5e38 | 11235 | fi |
81ecdfbb RW |
11236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11237 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11238 | |
81ecdfbb RW |
11239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11240 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11241 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11242 | $as_echo_n "(cached) " >&6 | |
c906108c | 11243 | else |
81ecdfbb | 11244 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11245 | /* end confdefs.h. */ |
c906108c | 11246 | |
97bf5e38 | 11247 | #define _SYSCALL32 |
d30c5336 JK |
11248 | /* Needed for new procfs interface on sparc-solaris. */ |
11249 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11250 | #include <sys/procfs.h> |
bec39cab AC |
11251 | int |
11252 | main () | |
11253 | { | |
97bf5e38 | 11254 | prsysent_t avar |
bec39cab AC |
11255 | ; |
11256 | return 0; | |
11257 | } | |
11258 | _ACEOF | |
81ecdfbb | 11259 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11260 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11261 | else |
81ecdfbb | 11262 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11263 | |
c906108c | 11264 | fi |
81ecdfbb | 11265 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11266 | fi |
11267 | ||
97bf5e38 | 11268 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11269 | |
81ecdfbb | 11270 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11271 | |
97bf5e38 | 11272 | fi |
81ecdfbb RW |
11273 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11274 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11275 | |
81ecdfbb RW |
11276 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11277 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11278 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11279 | $as_echo_n "(cached) " >&6 | |
c906108c | 11280 | else |
81ecdfbb | 11281 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11282 | /* end confdefs.h. */ |
c906108c | 11283 | |
97bf5e38 | 11284 | #define _SYSCALL32 |
d30c5336 JK |
11285 | /* Needed for new procfs interface on sparc-solaris. */ |
11286 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11287 | #include <sys/procfs.h> |
bec39cab AC |
11288 | int |
11289 | main () | |
11290 | { | |
97bf5e38 | 11291 | pr_sigset_t avar |
bec39cab AC |
11292 | ; |
11293 | return 0; | |
11294 | } | |
11295 | _ACEOF | |
81ecdfbb | 11296 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11297 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11298 | else |
81ecdfbb | 11299 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11300 | |
c906108c | 11301 | fi |
81ecdfbb | 11302 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11303 | fi |
11304 | ||
97bf5e38 | 11305 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11306 | |
81ecdfbb | 11307 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11308 | |
97bf5e38 | 11309 | fi |
81ecdfbb RW |
11310 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11311 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11312 | |
81ecdfbb RW |
11313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11314 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11315 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11316 | $as_echo_n "(cached) " >&6 | |
c906108c | 11317 | else |
81ecdfbb | 11318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11319 | /* end confdefs.h. */ |
c906108c | 11320 | |
97bf5e38 | 11321 | #define _SYSCALL32 |
d30c5336 JK |
11322 | /* Needed for new procfs interface on sparc-solaris. */ |
11323 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11324 | #include <sys/procfs.h> |
bec39cab AC |
11325 | int |
11326 | main () | |
11327 | { | |
97bf5e38 | 11328 | pr_sigaction64_t avar |
bec39cab AC |
11329 | ; |
11330 | return 0; | |
11331 | } | |
11332 | _ACEOF | |
81ecdfbb | 11333 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11334 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11335 | else |
81ecdfbb | 11336 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11337 | |
c906108c | 11338 | fi |
81ecdfbb | 11339 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11340 | fi |
11341 | ||
97bf5e38 | 11342 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11343 | |
81ecdfbb | 11344 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11345 | |
97bf5e38 | 11346 | fi |
81ecdfbb RW |
11347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11348 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11349 | |
81ecdfbb RW |
11350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
11351 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
11352 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
11353 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11354 | else |
81ecdfbb | 11355 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11356 | /* end confdefs.h. */ |
97bf5e38 MK |
11357 | |
11358 | #define _SYSCALL32 | |
d30c5336 JK |
11359 | /* Needed for new procfs interface on sparc-solaris. */ |
11360 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11361 | #include <sys/procfs.h> |
bec39cab AC |
11362 | int |
11363 | main () | |
11364 | { | |
97bf5e38 | 11365 | pr_siginfo64_t avar |
bec39cab AC |
11366 | ; |
11367 | return 0; | |
11368 | } | |
11369 | _ACEOF | |
81ecdfbb | 11370 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11371 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
11372 | else | |
81ecdfbb | 11373 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 11374 | |
97bf5e38 | 11375 | fi |
81ecdfbb | 11376 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11377 | fi |
c906108c | 11378 | |
97bf5e38 | 11379 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 11380 | |
81ecdfbb | 11381 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 11382 | |
97bf5e38 | 11383 | fi |
81ecdfbb RW |
11384 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
11385 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
11386 | |
11387 | ||
97bf5e38 MK |
11388 | |
11389 | ||
11390 | ||
97bf5e38 | 11391 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
11392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
11393 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
11394 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
11395 | $as_echo_n "(cached) " >&6 | |
c906108c | 11396 | else |
81ecdfbb | 11397 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 11398 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 11399 | else |
81ecdfbb | 11400 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11401 | /* end confdefs.h. */ |
97bf5e38 MK |
11402 | #include <sys/procfs.h> |
11403 | int main () | |
11404 | { | |
11405 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
11406 | return 1; | |
11407 | return 0; | |
11408 | } | |
bec39cab | 11409 | _ACEOF |
81ecdfbb | 11410 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11411 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
11412 | else |
11413 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 11414 | fi |
81ecdfbb RW |
11415 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11416 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11417 | fi |
81ecdfbb | 11418 | |
c906108c SS |
11419 | fi |
11420 | ||
81ecdfbb RW |
11421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
11422 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 11423 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 11424 | |
81ecdfbb | 11425 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 11426 | |
97bf5e38 MK |
11427 | fi |
11428 | fi | |
c906108c | 11429 | |
bec39cab | 11430 | |
81ecdfbb RW |
11431 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
11432 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
11433 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
11434 | $as_echo_n "(cached) " >&6 | |
c906108c | 11435 | else |
81ecdfbb | 11436 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11437 | /* end confdefs.h. */ |
97bf5e38 MK |
11438 | #include <unistd.h> |
11439 | #include <sys/types.h> | |
11440 | #include <sys/procfs.h> | |
11441 | ||
bec39cab AC |
11442 | int |
11443 | main () | |
11444 | { | |
97bf5e38 MK |
11445 | |
11446 | int dummy;; | |
11447 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
11448 | |
11449 | ; | |
11450 | return 0; | |
11451 | } | |
11452 | _ACEOF | |
81ecdfbb | 11453 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11454 | gdb_cv_have_procfs_piocset=yes |
c906108c | 11455 | else |
81ecdfbb | 11456 | gdb_cv_have_procfs_piocset=no |
c906108c | 11457 | fi |
81ecdfbb | 11458 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11459 | fi |
97bf5e38 | 11460 | |
81ecdfbb RW |
11461 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
11462 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 11463 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 11464 | |
81ecdfbb | 11465 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
11466 | |
11467 | fi | |
c906108c | 11468 | fi |
c906108c | 11469 | |
97bf5e38 | 11470 | if test ${host} = ${target} ; then |
bec39cab | 11471 | |
81ecdfbb RW |
11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
11473 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
11474 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
11475 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11476 | else |
81ecdfbb | 11477 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11478 | /* end confdefs.h. */ |
97bf5e38 | 11479 | #include <link.h> |
bec39cab AC |
11480 | int |
11481 | main () | |
11482 | { | |
97bf5e38 | 11483 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
11484 | ; |
11485 | return 0; | |
11486 | } | |
11487 | _ACEOF | |
81ecdfbb | 11488 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11489 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 11490 | else |
81ecdfbb | 11491 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 11492 | fi |
81ecdfbb | 11493 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11494 | fi |
11495 | ||
81ecdfbb RW |
11496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
11497 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 11498 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 11499 | |
81ecdfbb | 11500 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11501 | |
11502 | fi | |
11503 | ||
bec39cab | 11504 | |
81ecdfbb RW |
11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
11506 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
11507 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
11508 | $as_echo_n "(cached) " >&6 | |
c906108c | 11509 | else |
81ecdfbb | 11510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11511 | /* end confdefs.h. */ |
97bf5e38 MK |
11512 | #include <sys/types.h> |
11513 | #include <link.h> | |
bec39cab AC |
11514 | int |
11515 | main () | |
11516 | { | |
97bf5e38 | 11517 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
11518 | ; |
11519 | return 0; | |
11520 | } | |
11521 | _ACEOF | |
81ecdfbb | 11522 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11523 | gdb_cv_have_struct_link_map_with_lm_members=yes |
11524 | else | |
81ecdfbb | 11525 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 11526 | fi |
81ecdfbb | 11527 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11528 | fi |
c906108c | 11529 | |
81ecdfbb RW |
11530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
11531 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 11532 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 11533 | |
81ecdfbb | 11534 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11535 | |
11536 | fi | |
11537 | ||
bec39cab | 11538 | |
81ecdfbb RW |
11539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
11540 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
11541 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
11542 | $as_echo_n "(cached) " >&6 | |
c906108c | 11543 | else |
81ecdfbb | 11544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11545 | /* end confdefs.h. */ |
97bf5e38 MK |
11546 | #include <sys/types.h> |
11547 | #ifdef HAVE_NLIST_H | |
11548 | #include <nlist.h> | |
11549 | #endif | |
11550 | #include <link.h> | |
bec39cab AC |
11551 | int |
11552 | main () | |
11553 | { | |
97bf5e38 | 11554 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
11555 | ; |
11556 | return 0; | |
11557 | } | |
11558 | _ACEOF | |
81ecdfbb | 11559 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11560 | gdb_cv_have_struct_so_map_with_som_members=yes |
11561 | else | |
81ecdfbb | 11562 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 11563 | fi |
81ecdfbb | 11564 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11565 | fi |
c906108c | 11566 | |
81ecdfbb RW |
11567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
11568 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 11569 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 11570 | |
81ecdfbb | 11571 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 11572 | |
97bf5e38 | 11573 | fi |
c906108c | 11574 | |
bec39cab | 11575 | |
81ecdfbb RW |
11576 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
11577 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
11578 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
11579 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11580 | else |
81ecdfbb | 11581 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11582 | /* end confdefs.h. */ |
97bf5e38 MK |
11583 | #define _SYSCALL32 |
11584 | #include <sys/link.h> | |
bec39cab AC |
11585 | int |
11586 | main () | |
11587 | { | |
97bf5e38 | 11588 | struct link_map32 l; |
bec39cab AC |
11589 | ; |
11590 | return 0; | |
11591 | } | |
11592 | _ACEOF | |
81ecdfbb | 11593 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11594 | gdb_cv_have_struct_link_map32=yes |
11595 | else | |
81ecdfbb | 11596 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 11597 | fi |
81ecdfbb | 11598 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11599 | fi |
c906108c | 11600 | |
81ecdfbb RW |
11601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
11602 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 11603 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 11604 | |
81ecdfbb | 11605 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 11606 | |
60ca704f | 11607 | |
81ecdfbb | 11608 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 11609 | |
97bf5e38 MK |
11610 | fi |
11611 | fi | |
c906108c | 11612 | |
bc8bcb4b | 11613 | # Check if the compiler supports the `long long' type. |
c906108c | 11614 | |
81ecdfbb RW |
11615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
11616 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
11617 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
11618 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11619 | else |
81ecdfbb | 11620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11621 | /* end confdefs.h. */ |
bc8bcb4b | 11622 | extern long long foo; |
bec39cab AC |
11623 | int |
11624 | main () | |
11625 | { | |
bc8bcb4b | 11626 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
11627 | ; |
11628 | return 0; | |
11629 | } | |
11630 | _ACEOF | |
81ecdfbb | 11631 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11632 | gdb_cv_c_long_long=yes |
11633 | else | |
81ecdfbb | 11634 | gdb_cv_c_long_long=no |
97bf5e38 | 11635 | fi |
81ecdfbb | 11636 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11637 | fi |
81ecdfbb RW |
11638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
11639 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
74a0d9f6 JK |
11640 | if test $gdb_cv_c_long_long != yes; then |
11641 | # libdecnumber requires long long. | |
11642 | as_fn_error "Compiler must support long long for GDB." "$LINENO" 5 | |
97bf5e38 MK |
11643 | fi |
11644 | ||
bc8bcb4b | 11645 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 11646 | |
81ecdfbb RW |
11647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
11648 | $as_echo_n "checking for long long support in printf... " >&6; } | |
11649 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
11650 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11651 | else |
81ecdfbb | 11652 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11653 | gdb_cv_printf_has_long_long=no |
11654 | else | |
81ecdfbb | 11655 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11656 | /* end confdefs.h. */ |
bc8bcb4b MK |
11657 | $ac_includes_default |
11658 | int | |
11659 | main () | |
11660 | { | |
11661 | char buf[32]; | |
97bf5e38 MK |
11662 | long long l = 0; |
11663 | l = (l << 16) + 0x0123; | |
11664 | l = (l << 16) + 0x4567; | |
11665 | l = (l << 16) + 0x89ab; | |
11666 | l = (l << 16) + 0xcdef; | |
11667 | sprintf (buf, "0x%016llx", l); | |
11668 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
11669 | ; |
11670 | return 0; | |
c906108c | 11671 | } |
bec39cab | 11672 | _ACEOF |
81ecdfbb | 11673 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11674 | gdb_cv_printf_has_long_long=yes |
11675 | else | |
81ecdfbb | 11676 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 11677 | fi |
81ecdfbb RW |
11678 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11679 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11680 | fi |
81ecdfbb | 11681 | |
97bf5e38 | 11682 | fi |
81ecdfbb RW |
11683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
11684 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 11685 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 11686 | |
81ecdfbb | 11687 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11688 | |
11689 | fi | |
97bf5e38 | 11690 | |
1a619819 LM |
11691 | # Check if the compiler and runtime support printing decfloats. |
11692 | ||
81ecdfbb RW |
11693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
11694 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
11695 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
11696 | $as_echo_n "(cached) " >&6 | |
1a619819 | 11697 | else |
81ecdfbb | 11698 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
11699 | gdb_cv_printf_has_decfloat=no |
11700 | else | |
81ecdfbb | 11701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
11702 | /* end confdefs.h. */ |
11703 | $ac_includes_default | |
11704 | int | |
11705 | main () | |
11706 | { | |
11707 | char buf[64]; | |
11708 | _Decimal32 d32 = 1.2345df; | |
11709 | _Decimal64 d64 = 1.2345dd; | |
11710 | _Decimal128 d128 = 1.2345dl; | |
11711 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
11712 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
11713 | ; | |
11714 | return 0; | |
11715 | } | |
11716 | _ACEOF | |
81ecdfbb | 11717 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
11718 | gdb_cv_printf_has_decfloat=yes |
11719 | else | |
81ecdfbb | 11720 | gdb_cv_printf_has_decfloat=no |
1a619819 | 11721 | fi |
81ecdfbb RW |
11722 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11723 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 11724 | fi |
81ecdfbb | 11725 | |
1a619819 | 11726 | fi |
81ecdfbb RW |
11727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
11728 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
11729 | if test $gdb_cv_printf_has_decfloat = yes; then |
11730 | ||
81ecdfbb | 11731 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
11732 | |
11733 | fi | |
11734 | ||
bc8bcb4b MK |
11735 | # Check if the compiler supports the `long double' type. We can't use |
11736 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
11737 | # constants defined in <float.h> that fail on some systems, | |
11738 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 11739 | |
81ecdfbb RW |
11740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
11741 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
11742 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
11743 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11744 | else |
81ecdfbb | 11745 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11746 | /* end confdefs.h. */ |
97bf5e38 | 11747 | long double foo; |
bec39cab | 11748 | _ACEOF |
81ecdfbb | 11749 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 11750 | gdb_cv_c_long_double=yes |
97bf5e38 | 11751 | else |
81ecdfbb | 11752 | gdb_cv_c_long_double=no |
97bf5e38 | 11753 | fi |
81ecdfbb | 11754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11755 | fi |
81ecdfbb RW |
11756 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
11757 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 11758 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 11759 | |
81ecdfbb | 11760 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11761 | |
11762 | fi | |
11763 | ||
bc8bcb4b | 11764 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 11765 | |
81ecdfbb RW |
11766 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
11767 | $as_echo_n "checking for long double support in printf... " >&6; } | |
11768 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
11769 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11770 | else |
81ecdfbb | 11771 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11772 | gdb_cv_printf_has_long_double=no |
11773 | else | |
81ecdfbb | 11774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11775 | /* end confdefs.h. */ |
bc8bcb4b MK |
11776 | $ac_includes_default |
11777 | int | |
11778 | main () | |
11779 | { | |
11780 | char buf[16]; | |
97bf5e38 MK |
11781 | long double f = 3.141592653; |
11782 | sprintf (buf, "%Lg", f); | |
11783 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
11784 | ; |
11785 | return 0; | |
97bf5e38 | 11786 | } |
bec39cab | 11787 | _ACEOF |
81ecdfbb | 11788 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11789 | gdb_cv_printf_has_long_double=yes |
c906108c | 11790 | else |
81ecdfbb | 11791 | gdb_cv_printf_has_long_double=no |
c906108c | 11792 | fi |
81ecdfbb RW |
11793 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11794 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11795 | fi |
81ecdfbb | 11796 | |
c906108c | 11797 | fi |
81ecdfbb RW |
11798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
11799 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 11800 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 11801 | |
81ecdfbb | 11802 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11803 | |
11804 | fi | |
97bf5e38 | 11805 | |
bc8bcb4b | 11806 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 11807 | |
81ecdfbb RW |
11808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
11809 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
11810 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
11811 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11812 | else |
81ecdfbb | 11813 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11814 | gdb_cv_scanf_has_long_double=no |
11815 | else | |
81ecdfbb | 11816 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11817 | /* end confdefs.h. */ |
bc8bcb4b MK |
11818 | #include <stdio.h> |
11819 | int | |
11820 | main () | |
11821 | { | |
11822 | char *buf = "3.141592653"; | |
97bf5e38 MK |
11823 | long double f = 0; |
11824 | sscanf (buf, "%Lg", &f); | |
11825 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
11826 | ; |
11827 | return 0; | |
97bf5e38 | 11828 | } |
bec39cab | 11829 | _ACEOF |
81ecdfbb | 11830 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11831 | gdb_cv_scanf_has_long_double=yes |
11832 | else | |
81ecdfbb | 11833 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 11834 | fi |
81ecdfbb RW |
11835 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11836 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11837 | fi |
81ecdfbb | 11838 | |
c906108c | 11839 | fi |
81ecdfbb RW |
11840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
11841 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 11842 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 11843 | |
81ecdfbb | 11844 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11845 | |
11846 | fi | |
c906108c | 11847 | |
438013df AO |
11848 | case ${host_os} in |
11849 | aix*) | |
81ecdfbb RW |
11850 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
11851 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
11852 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
11853 | $as_echo_n "(cached) " >&6 | |
438013df | 11854 | else |
bec39cab | 11855 | |
438013df AO |
11856 | SAVE_LDFLAGS=$LDFLAGS |
11857 | ||
11858 | case $GCC in | |
11859 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
11860 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
11861 | esac | |
11862 | ||
11863 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 11864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11865 | /* end confdefs.h. */ |
438013df | 11866 | |
bec39cab AC |
11867 | int |
11868 | main () | |
11869 | { | |
438013df | 11870 | int i; |
bec39cab AC |
11871 | ; |
11872 | return 0; | |
11873 | } | |
11874 | _ACEOF | |
81ecdfbb | 11875 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 11876 | |
81ecdfbb RW |
11877 | else |
11878 | gdb_cv_bigtoc= | |
438013df | 11879 | fi |
81ecdfbb RW |
11880 | rm -f core conftest.err conftest.$ac_objext \ |
11881 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 11882 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 11883 | |
bec39cab | 11884 | fi |
81ecdfbb RW |
11885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
11886 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
11887 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
11888 | ;; | |
11889 | esac | |
11890 | ||
38f6b338 | 11891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 11892 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
11893 | dynamic_list=false |
11894 | if test "${gdb_native}" = yes; then | |
11895 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
11896 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
11897 | # may not be supported there. | |
11898 | old_LDFLAGS="$LDFLAGS" | |
11899 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
11900 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
11901 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
11902 | if test "${have_libpython}" = no; then | |
11903 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
11904 | /* end confdefs.h. */ |
11905 | ||
11906 | int | |
11907 | main () | |
11908 | { | |
11909 | ||
11910 | ; | |
11911 | return 0; | |
11912 | } | |
11913 | _ACEOF | |
11914 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
11915 | dynamic_list=true |
11916 | fi | |
11917 | rm -f core conftest.err conftest.$ac_objext \ | |
11918 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
11919 | else |
11920 | # Workaround http://bugs.python.org/issue4434 where static | |
11921 | # libpythonX.Y.a would get its symbols required for | |
11922 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
11923 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
11924 | old_CFLAGS="$CFLAGS" | |
11925 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
8c1fb155 JK |
11926 | old_LIBS="$LIBS" |
11927 | LIBS="$LIBS $PYTHON_LIBS" | |
38f6b338 | 11928 | if test "$cross_compiling" = yes; then : |
3bebe2f2 | 11929 | true |
f6528abd | 11930 | else |
3bebe2f2 JK |
11931 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11932 | /* end confdefs.h. */ | |
11933 | #include "${have_libpython}/Python.h" | |
11934 | int | |
11935 | main () | |
11936 | { | |
11937 | int err; | |
38f6b338 JK |
11938 | Py_Initialize (); |
11939 | err = PyRun_SimpleString ("import itertools\n"); | |
11940 | Py_Finalize (); | |
11941 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
11942 | ; |
11943 | return 0; | |
11944 | } | |
11945 | _ACEOF | |
11946 | if ac_fn_c_try_run "$LINENO"; then : | |
11947 | dynamic_list=true | |
11948 | fi | |
11949 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11950 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11951 | fi | |
11952 | ||
8c1fb155 | 11953 | LIBS="$old_LIBS" |
38f6b338 JK |
11954 | CFLAGS="$old_CFLAGS" |
11955 | fi | |
11956 | LDFLAGS="$old_LDFLAGS" | |
11957 | fi | |
11958 | if $dynamic_list; then | |
11959 | found="-Wl,--dynamic-list" | |
11960 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 11961 | else |
38f6b338 JK |
11962 | found="-rdynamic" |
11963 | RDYNAMIC="-rdynamic" | |
f6528abd | 11964 | fi |
f6528abd | 11965 | |
38f6b338 | 11966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 11967 | $as_echo "$found" >&6; } |
0407b3f1 | 11968 | |
f6528abd | 11969 | |
0407b3f1 | 11970 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 11971 | case ${host_os} in |
c906108c | 11972 | solaris*) |
d92419e5 JB |
11973 | # See if thread_db library is around for Solaris thread debugging. |
11974 | # Note that we must explicitly test for version 1 of the library | |
11975 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
11976 | # the same API. | |
81ecdfbb RW |
11977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
11978 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 11979 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
11980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11981 | $as_echo "yes" >&6; } | |
60ca704f | 11982 | |
81ecdfbb | 11983 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 11984 | |
3483b318 | 11985 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 11986 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
11987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
11988 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
11989 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
11990 | $as_echo_n "(cached) " >&6 | |
c906108c | 11991 | else |
bec39cab | 11992 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 11993 | LIBS="-ldl $LIBS" |
81ecdfbb | 11994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
11995 | /* end confdefs.h. */ |
11996 | ||
81ecdfbb RW |
11997 | /* Override any GCC internal prototype to avoid an error. |
11998 | Use char because int might match the return type of a GCC | |
11999 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
12000 | #ifdef __cplusplus |
12001 | extern "C" | |
12002 | #endif | |
bec39cab AC |
12003 | char dlopen (); |
12004 | int | |
12005 | main () | |
12006 | { | |
81ecdfbb | 12007 | return dlopen (); |
bec39cab AC |
12008 | ; |
12009 | return 0; | |
12010 | } | |
12011 | _ACEOF | |
81ecdfbb | 12012 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
12013 | ac_cv_lib_dl_dlopen=yes |
12014 | else | |
81ecdfbb | 12015 | ac_cv_lib_dl_dlopen=no |
bec39cab | 12016 | fi |
81ecdfbb RW |
12017 | rm -f core conftest.err conftest.$ac_objext \ |
12018 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
12019 | LIBS=$ac_check_lib_save_LIBS |
12020 | fi | |
81ecdfbb RW |
12021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
12022 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
12023 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
12024 | cat >>confdefs.h <<_ACEOF |
12025 | #define HAVE_LIBDL 1 | |
12026 | _ACEOF | |
c906108c SS |
12027 | |
12028 | LIBS="-ldl $LIBS" | |
12029 | ||
c906108c SS |
12030 | fi |
12031 | ||
f6528abd | 12032 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
12033 | # Sun randomly tweaked the prototypes in <proc_service.h> |
12034 | # at one point. | |
81ecdfbb RW |
12035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
12036 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
12037 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
12038 | $as_echo_n "(cached) " >&6 | |
c906108c | 12039 | else |
bec39cab | 12040 | |
81ecdfbb | 12041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12042 | /* end confdefs.h. */ |
c906108c SS |
12043 | |
12044 | #include <proc_service.h> | |
12045 | ps_err_e ps_pdwrite | |
12046 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 12047 | |
bec39cab AC |
12048 | int |
12049 | main () | |
12050 | { | |
12051 | ||
12052 | ; | |
12053 | return 0; | |
12054 | } | |
12055 | _ACEOF | |
81ecdfbb | 12056 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
12057 | gdb_cv_proc_service_is_old=no |
12058 | else | |
81ecdfbb | 12059 | gdb_cv_proc_service_is_old=yes |
c906108c | 12060 | fi |
81ecdfbb | 12061 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 12062 | |
c906108c SS |
12063 | fi |
12064 | ||
81ecdfbb RW |
12065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
12066 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 12067 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 12068 | |
81ecdfbb | 12069 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
12070 | |
12071 | fi | |
12072 | else | |
81ecdfbb RW |
12073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
12074 | $as_echo "no" >&6; } | |
c906108c SS |
12075 | fi |
12076 | ;; | |
d92419e5 | 12077 | aix*) |
81ecdfbb RW |
12078 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
12079 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
12080 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
12081 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12082 | else |
81ecdfbb | 12083 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12084 | /* end confdefs.h. */ |
d92419e5 | 12085 | #include <sys/pthdebug.h> |
bec39cab AC |
12086 | int |
12087 | main () | |
12088 | { | |
d92419e5 JB |
12089 | #ifndef PTHDB_VERSION_3 |
12090 | #error | |
12091 | #endif | |
bec39cab AC |
12092 | ; |
12093 | return 0; | |
12094 | } | |
12095 | _ACEOF | |
81ecdfbb | 12096 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
12097 | gdb_cv_have_aix_thread_debug=yes |
12098 | else | |
81ecdfbb | 12099 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 12100 | fi |
81ecdfbb | 12101 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
12102 | fi |
12103 | ||
81ecdfbb RW |
12104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
12105 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
12106 | if test $gdb_cv_have_aix_thread_debug = yes; then |
12107 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 12108 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 12109 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
12110 | |
12111 | # Older versions of AIX do not provide the declaration for | |
12112 | # the getthrds function (it appears that it was introduced | |
12113 | # with AIX 6.x). | |
12114 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
12115 | " | |
12116 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
12117 | ac_have_decl=1 | |
12118 | else | |
12119 | ac_have_decl=0 | |
12120 | fi | |
12121 | ||
12122 | cat >>confdefs.h <<_ACEOF | |
12123 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
12124 | _ACEOF | |
12125 | ||
d92419e5 JB |
12126 | fi |
12127 | ;; | |
c906108c | 12128 | esac |
bec39cab | 12129 | |
c906108c SS |
12130 | fi |
12131 | ||
3f47be5c | 12132 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
12133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
12134 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
12135 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
12136 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12137 | else |
81ecdfbb | 12138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12139 | /* end confdefs.h. */ |
3f47be5c | 12140 | #include <thread_db.h> |
bec39cab AC |
12141 | int |
12142 | main () | |
12143 | { | |
3f47be5c | 12144 | int i = TD_NOTALLOC; |
bec39cab AC |
12145 | ; |
12146 | return 0; | |
12147 | } | |
12148 | _ACEOF | |
81ecdfbb | 12149 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12150 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12151 | else | |
81ecdfbb | 12152 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12153 | |
3f47be5c | 12154 | fi |
81ecdfbb | 12155 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12156 | |
bec39cab | 12157 | fi |
81ecdfbb RW |
12158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12159 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12161 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12162 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12163 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12164 | else |
81ecdfbb | 12165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12166 | /* end confdefs.h. */ |
12167 | #include <thread_db.h> | |
12168 | int | |
12169 | main () | |
12170 | { | |
12171 | int i = TD_VERSION; | |
12172 | ; | |
12173 | return 0; | |
12174 | } | |
12175 | _ACEOF | |
81ecdfbb | 12176 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12177 | gdb_cv_thread_db_h_has_td_version=yes |
12178 | else | |
81ecdfbb | 12179 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12180 | |
12181 | fi | |
81ecdfbb | 12182 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12183 | |
12184 | fi | |
81ecdfbb RW |
12185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12186 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12187 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12188 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12189 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12190 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12191 | else |
81ecdfbb | 12192 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12193 | /* end confdefs.h. */ |
12194 | #include <thread_db.h> | |
12195 | int | |
12196 | main () | |
12197 | { | |
12198 | int i = TD_NOTLS; | |
12199 | ; | |
12200 | return 0; | |
12201 | } | |
12202 | _ACEOF | |
81ecdfbb | 12203 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12204 | gdb_cv_thread_db_h_has_td_notls=yes |
12205 | else | |
81ecdfbb | 12206 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12207 | |
12208 | fi | |
81ecdfbb | 12209 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12210 | |
12211 | fi | |
81ecdfbb RW |
12212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12213 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12214 | fi |
12215 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12216 | |
81ecdfbb | 12217 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12218 | |
59f80f10 DJ |
12219 | fi |
12220 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12221 | ||
81ecdfbb | 12222 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12223 | |
12224 | fi | |
12225 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12226 | ||
81ecdfbb | 12227 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12228 | |
3f47be5c EZ |
12229 | fi |
12230 | ||
b757528f | 12231 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12233 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12234 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12235 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12236 | else |
81ecdfbb | 12237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12238 | /* end confdefs.h. */ |
b757528f | 12239 | #include <sys/syscall.h> |
bec39cab AC |
12240 | int |
12241 | main () | |
12242 | { | |
b757528f | 12243 | int i = __NR_tkill; |
bec39cab AC |
12244 | ; |
12245 | return 0; | |
12246 | } | |
12247 | _ACEOF | |
81ecdfbb | 12248 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12249 | gdb_cv_sys_syscall_h_has_tkill=yes |
12250 | else | |
81ecdfbb | 12251 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12252 | |
b757528f | 12253 | fi |
81ecdfbb | 12254 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12255 | |
bec39cab | 12256 | fi |
81ecdfbb RW |
12257 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12258 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
12259 | fi |
12260 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 12261 | |
81ecdfbb | 12262 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
12263 | |
12264 | fi | |
12265 | ||
81ecdfbb RW |
12266 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12267 | " | |
12268 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12269 | ac_have_decl=1 | |
10568435 | 12270 | else |
81ecdfbb | 12271 | ac_have_decl=0 |
10568435 | 12272 | fi |
10568435 JK |
12273 | |
12274 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12275 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12276 | _ACEOF |
12277 | ||
12278 | ||
81ecdfbb RW |
12279 | if test "$cross_compiling" = yes; then : |
12280 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12281 | /* end confdefs.h. */ |
12282 | #include <sys/personality.h> | |
12283 | int | |
12284 | main () | |
12285 | { | |
12286 | ||
12287 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12288 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12289 | # endif | |
12290 | /* Test the flag could be set and stays set. */ | |
12291 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12292 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12293 | return 1 | |
12294 | ; | |
12295 | return 0; | |
12296 | } | |
12297 | _ACEOF | |
81ecdfbb | 12298 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12299 | have_personality=true |
12300 | else | |
81ecdfbb | 12301 | have_personality=false |
10568435 | 12302 | fi |
81ecdfbb RW |
12303 | rm -f core conftest.err conftest.$ac_objext \ |
12304 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12305 | else |
81ecdfbb | 12306 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12307 | /* end confdefs.h. */ |
12308 | #include <sys/personality.h> | |
12309 | int | |
12310 | main () | |
12311 | { | |
12312 | ||
12313 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12314 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12315 | # endif | |
12316 | /* Test the flag could be set and stays set. */ | |
12317 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12318 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12319 | return 1 | |
12320 | ; | |
12321 | return 0; | |
12322 | } | |
12323 | _ACEOF | |
81ecdfbb | 12324 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12325 | have_personality=true |
12326 | else | |
81ecdfbb | 12327 | have_personality=false |
10568435 | 12328 | fi |
81ecdfbb RW |
12329 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12330 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12331 | fi |
81ecdfbb | 12332 | |
10568435 JK |
12333 | if $have_personality |
12334 | then | |
12335 | ||
81ecdfbb | 12336 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12337 | |
12338 | fi | |
12339 | ||
e655c1a2 PA |
12340 | case $host_os in |
12341 | go32* | *djgpp*) | |
12342 | gdbinit=gdb.ini | |
12343 | ;; | |
12344 | *) | |
12345 | gdbinit=.gdbinit | |
12346 | ;; | |
12347 | esac | |
12348 | ||
12349 | cat >>confdefs.h <<_ACEOF | |
12350 | #define GDBINIT "$gdbinit" | |
12351 | _ACEOF | |
12352 | ||
12353 | ||
fb40c209 | 12354 | |
f83d8a90 DE |
12355 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12356 | # except that the argument to --with-sysroot is optional. | |
12357 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12358 | if test "x$with_sysroot" = xyes; then | |
12359 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12360 | fi | |
bec39cab | 12361 | |
81ecdfbb RW |
12362 | # Check whether --with-sysroot was given. |
12363 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12364 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12365 | else | |
12366 | TARGET_SYSTEM_ROOT= | |
12367 | fi | |
030292b7 | 12368 | |
030292b7 | 12369 | |
f83d8a90 DE |
12370 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12371 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12372 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12373 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12374 | |
f83d8a90 DE |
12375 | cat >>confdefs.h <<_ACEOF |
12376 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12377 | _ACEOF | |
bec39cab | 12378 | |
030292b7 | 12379 | |
b14b1491 | 12380 | |
f83d8a90 DE |
12381 | |
12382 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12383 | if test "x$prefix" = xNONE; then | |
12384 | test_prefix=/usr/local | |
12385 | else | |
12386 | test_prefix=$prefix | |
12387 | fi | |
12388 | else | |
12389 | test_prefix=$exec_prefix | |
12390 | fi | |
12391 | value=0 | |
12392 | case ${ac_define_dir} in | |
12393 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12394 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12395 | value=1 | |
12396 | ;; | |
12397 | esac | |
12398 | ||
12399 | cat >>confdefs.h <<_ACEOF | |
12400 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12401 | _ACEOF | |
030292b7 DJ |
12402 | |
12403 | ||
12404 | ||
16e7150e | 12405 | |
16e7150e | 12406 | |
81ecdfbb RW |
12407 | # Check whether --with-system-gdbinit was given. |
12408 | if test "${with_system_gdbinit+set}" = set; then : | |
12409 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12410 | SYSTEM_GDBINIT=$withval |
12411 | else | |
12412 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12413 | fi |
12414 | ||
16e7150e JG |
12415 | |
12416 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12417 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12418 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12419 | ac_define_dir=`eval echo $ac_define_dir` |
12420 | ||
12421 | cat >>confdefs.h <<_ACEOF | |
12422 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12423 | _ACEOF | |
12424 | ||
12425 | ||
12426 | ||
0c4a4063 | 12427 | |
b14b1491 TT |
12428 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12429 | if test "x$prefix" = xNONE; then | |
12430 | test_prefix=/usr/local | |
12431 | else | |
12432 | test_prefix=$prefix | |
12433 | fi | |
12434 | else | |
12435 | test_prefix=$exec_prefix | |
12436 | fi | |
12437 | value=0 | |
12438 | case ${ac_define_dir} in | |
12439 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12440 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12441 | value=1 | |
12442 | ;; | |
12443 | esac | |
16e7150e | 12444 | |
b14b1491 TT |
12445 | cat >>confdefs.h <<_ACEOF |
12446 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12447 | _ACEOF |
12448 | ||
b14b1491 | 12449 | |
16e7150e | 12450 | |
0c4a4063 | 12451 | |
81ecdfbb RW |
12452 | # Check whether --enable-werror was given. |
12453 | if test "${enable_werror+set}" = set; then : | |
12454 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12455 | yes | y) ERROR_ON_WARNING="yes" ;; |
12456 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12457 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12458 | esac |
81ecdfbb RW |
12459 | fi |
12460 | ||
094a342e | 12461 | |
a68ffae9 JK |
12462 | # Enable -Werror by default when using gcc. Turn it off for releases. |
12463 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
12464 | ERROR_ON_WARNING=yes |
12465 | fi | |
12466 | ||
12467 | WERROR_CFLAGS="" | |
12468 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12469 | WERROR_CFLAGS="-Werror" | |
12470 | fi | |
12471 | ||
aa79a185 | 12472 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
d3685d60 | 12473 | -Wpointer-sign \ |
1cb5e2a4 | 12474 | -Wno-unused -Wunused-value -Wunused-function \ |
352b3eda | 12475 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ |
44d100c3 | 12476 | -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ |
dd9aa048 | 12477 | -Wold-style-declaration -Wold-style-definition" |
a3b362c4 | 12478 | |
3526781e DJ |
12479 | # Enable -Wno-format by default when using gcc on mingw since many |
12480 | # GCC versions complain about %I64. | |
12481 | case "${host}" in | |
12482 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
d3685d60 | 12483 | *) build_warnings="$build_warnings -Wformat-nonliteral" ;; |
3526781e DJ |
12484 | esac |
12485 | ||
81ecdfbb RW |
12486 | # Check whether --enable-build-warnings was given. |
12487 | if test "${enable_build_warnings+set}" = set; then : | |
12488 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12489 | yes) ;; |
12490 | no) build_warnings="-w";; | |
12491 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12492 | build_warnings="${build_warnings} ${t}";; | |
12493 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12494 | build_warnings="${t} ${build_warnings}";; | |
12495 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12496 | esac | |
d4f3574e | 12497 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12498 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12499 | fi |
81ecdfbb RW |
12500 | fi |
12501 | # Check whether --enable-gdb-build-warnings was given. | |
12502 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12503 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12504 | yes) ;; |
12505 | no) build_warnings="-w";; | |
12506 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12507 | build_warnings="${build_warnings} ${t}";; | |
12508 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12509 | build_warnings="${t} ${build_warnings}";; | |
12510 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12511 | esac | |
12512 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12513 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12514 | fi | |
81ecdfbb RW |
12515 | fi |
12516 | WARN_CFLAGS="" | |
c906108c SS |
12517 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12518 | then | |
81ecdfbb RW |
12519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12520 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12521 | # Separate out the -Werror flag as some files just cannot be |
12522 | # compiled with it enabled. | |
12523 | for w in ${build_warnings}; do | |
12524 | case $w in | |
12525 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12526 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12527 | saved_CFLAGS="$CFLAGS" |
12528 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 12529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12530 | /* end confdefs.h. */ |
4536bbc6 | 12531 | |
bec39cab AC |
12532 | int |
12533 | main () | |
12534 | { | |
4536bbc6 | 12535 | |
bec39cab AC |
12536 | ; |
12537 | return 0; | |
12538 | } | |
12539 | _ACEOF | |
81ecdfbb | 12540 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 12541 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 12542 | fi |
81ecdfbb | 12543 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 12544 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
12545 | esac |
12546 | done | |
81ecdfbb RW |
12547 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
12548 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
12549 | fi |
12550 | ||
12551 | ||
104c1213 | 12552 | |
7a292a7a | 12553 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
12554 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
12555 | $as_echo_n "checking for cygwin... " >&6; } | |
12556 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
12557 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12558 | else |
81ecdfbb | 12559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12560 | /* end confdefs.h. */ |
7a292a7a SS |
12561 | |
12562 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
12563 | lose | |
12564 | #endif | |
bec39cab | 12565 | _ACEOF |
7a292a7a | 12566 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 12567 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
12568 | gdb_cv_os_cygwin=yes |
12569 | else | |
7a292a7a SS |
12570 | gdb_cv_os_cygwin=no |
12571 | fi | |
12572 | rm -f conftest* | |
12573 | ||
12574 | fi | |
81ecdfbb RW |
12575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
12576 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 12577 | |
aff38e61 | 12578 | |
3eb25fda | 12579 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 12580 | case ${host} in |
95cbc983 AC |
12581 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
12582 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 12583 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
12584 | esac |
12585 | ||
12586 | ||
cd0fc7c3 SS |
12587 | # libreadline needs libuser32.a in a cygwin environment |
12588 | WIN32LIBS= | |
12589 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
12590 | WIN32LIBS="-luser32" |
12591 | case "${target}" in | |
12592 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
12593 | ;; | |
12594 | esac | |
cd0fc7c3 | 12595 | fi |
c906108c | 12596 | |
b4505029 MM |
12597 | # The ser-tcp.c module requires sockets. |
12598 | case ${host} in | |
12599 | *mingw32*) | |
12600 | ||
81ecdfbb | 12601 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
12602 | |
12603 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
12604 | ;; | |
12605 | esac | |
12606 | ||
7a292a7a | 12607 | |
31d99776 | 12608 | # Add ELF support to GDB, but only if BFD includes ELF support. |
def63ff0 TT |
12609 | |
12610 | OLD_CFLAGS=$CFLAGS | |
12611 | OLD_LDFLAGS=$LDFLAGS | |
12612 | OLD_LIBS=$LIBS | |
12613 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
12614 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12615 | # always want our bfd. | |
12616 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
12617 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
12618 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
12619 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
12620 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
12621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
12622 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
12623 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12624 | $as_echo_n "(cached) " >&6 | |
12625 | else | |
12626 | ac_func_search_save_LIBS=$LIBS | |
12627 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12628 | /* end confdefs.h. */ | |
12629 | ||
12630 | /* Override any GCC internal prototype to avoid an error. | |
12631 | Use char because int might match the return type of a GCC | |
12632 | builtin and then its argument prototype would still apply. */ | |
12633 | #ifdef __cplusplus | |
12634 | extern "C" | |
12635 | #endif | |
12636 | char dlopen (); | |
12637 | int | |
12638 | main () | |
12639 | { | |
12640 | return dlopen (); | |
12641 | ; | |
12642 | return 0; | |
12643 | } | |
12644 | _ACEOF | |
12645 | for ac_lib in '' dl; do | |
12646 | if test -z "$ac_lib"; then | |
12647 | ac_res="none required" | |
12648 | else | |
12649 | ac_res=-l$ac_lib | |
12650 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12651 | fi | |
12652 | if ac_fn_c_try_link "$LINENO"; then : | |
12653 | ac_cv_search_dlopen=$ac_res | |
12654 | fi | |
12655 | rm -f core conftest.err conftest.$ac_objext \ | |
12656 | conftest$ac_exeext | |
12657 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12658 | break | |
12659 | fi | |
12660 | done | |
12661 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12662 | ||
12663 | else | |
12664 | ac_cv_search_dlopen=no | |
12665 | fi | |
12666 | rm conftest.$ac_ext | |
12667 | LIBS=$ac_func_search_save_LIBS | |
12668 | fi | |
12669 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
12670 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
12671 | ac_res=$ac_cv_search_dlopen | |
12672 | if test "$ac_res" != no; then : | |
12673 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
12674 | ||
12675 | fi | |
12676 | ||
def63ff0 TT |
12677 | fi |
12678 | LIBS="-lbfd -liberty $intl $LIBS" | |
12679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 | |
81ecdfbb RW |
12680 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
12681 | if test "${gdb_cv_var_elf+set}" = set; then : | |
12682 | $as_echo_n "(cached) " >&6 | |
31d99776 | 12683 | else |
81ecdfbb | 12684 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
12685 | /* end confdefs.h. */ |
12686 | #include <stdlib.h> | |
def63ff0 TT |
12687 | #include "bfd.h" |
12688 | #include "elf-bfd.h" | |
31d99776 DJ |
12689 | |
12690 | int | |
12691 | main () | |
12692 | { | |
def63ff0 | 12693 | return bfd_get_elf_phdr_upper_bound (NULL); |
31d99776 DJ |
12694 | ; |
12695 | return 0; | |
12696 | } | |
12697 | _ACEOF | |
81ecdfbb | 12698 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
12699 | gdb_cv_var_elf=yes |
12700 | else | |
81ecdfbb | 12701 | gdb_cv_var_elf=no |
31d99776 | 12702 | fi |
81ecdfbb RW |
12703 | rm -f core conftest.err conftest.$ac_objext \ |
12704 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 12705 | fi |
81ecdfbb RW |
12706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
12707 | $as_echo "$gdb_cv_var_elf" >&6; } | |
def63ff0 TT |
12708 | CFLAGS=$OLD_CFLAGS |
12709 | LDFLAGS=$OLD_LDFLAGS | |
12710 | LIBS=$OLD_LIBS | |
31d99776 | 12711 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 12712 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 12713 | |
81ecdfbb | 12714 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 12715 | |
075ff26d JK |
12716 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12717 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
12718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
12719 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
12720 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12721 | $as_echo_n "(cached) " >&6 | |
12722 | else | |
12723 | ac_func_search_save_LIBS=$LIBS | |
12724 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12725 | /* end confdefs.h. */ | |
12726 | ||
12727 | /* Override any GCC internal prototype to avoid an error. | |
12728 | Use char because int might match the return type of a GCC | |
12729 | builtin and then its argument prototype would still apply. */ | |
12730 | #ifdef __cplusplus | |
12731 | extern "C" | |
12732 | #endif | |
12733 | char dlopen (); | |
12734 | int | |
12735 | main () | |
12736 | { | |
12737 | return dlopen (); | |
12738 | ; | |
12739 | return 0; | |
12740 | } | |
12741 | _ACEOF | |
12742 | for ac_lib in '' dl; do | |
12743 | if test -z "$ac_lib"; then | |
12744 | ac_res="none required" | |
12745 | else | |
12746 | ac_res=-l$ac_lib | |
12747 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12748 | fi | |
12749 | if ac_fn_c_try_link "$LINENO"; then : | |
12750 | ac_cv_search_dlopen=$ac_res | |
12751 | fi | |
12752 | rm -f core conftest.err conftest.$ac_objext \ | |
12753 | conftest$ac_exeext | |
12754 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12755 | break | |
12756 | fi | |
12757 | done | |
12758 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12759 | ||
12760 | else | |
12761 | ac_cv_search_dlopen=no | |
12762 | fi | |
12763 | rm conftest.$ac_ext | |
12764 | LIBS=$ac_func_search_save_LIBS | |
12765 | fi | |
12766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
12767 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
12768 | ac_res=$ac_cv_search_dlopen | |
12769 | if test "$ac_res" != no; then : | |
12770 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
12771 | ||
12772 | fi | |
12773 | ||
075ff26d | 12774 | fi |
31d99776 | 12775 | fi |
31d99776 | 12776 | |
4f05add4 TT |
12777 | # Add macho support to GDB, but only if BFD includes it. |
12778 | ||
12779 | OLD_CFLAGS=$CFLAGS | |
12780 | OLD_LDFLAGS=$LDFLAGS | |
12781 | OLD_LIBS=$LIBS | |
12782 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
12783 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12784 | # always want our bfd. | |
12785 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
12786 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
12787 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
12788 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
12789 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
12790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
12791 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
12792 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12793 | $as_echo_n "(cached) " >&6 | |
12794 | else | |
12795 | ac_func_search_save_LIBS=$LIBS | |
12796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12797 | /* end confdefs.h. */ | |
12798 | ||
12799 | /* Override any GCC internal prototype to avoid an error. | |
12800 | Use char because int might match the return type of a GCC | |
12801 | builtin and then its argument prototype would still apply. */ | |
12802 | #ifdef __cplusplus | |
12803 | extern "C" | |
12804 | #endif | |
12805 | char dlopen (); | |
12806 | int | |
12807 | main () | |
12808 | { | |
12809 | return dlopen (); | |
12810 | ; | |
12811 | return 0; | |
12812 | } | |
12813 | _ACEOF | |
12814 | for ac_lib in '' dl; do | |
12815 | if test -z "$ac_lib"; then | |
12816 | ac_res="none required" | |
12817 | else | |
12818 | ac_res=-l$ac_lib | |
12819 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12820 | fi | |
12821 | if ac_fn_c_try_link "$LINENO"; then : | |
12822 | ac_cv_search_dlopen=$ac_res | |
12823 | fi | |
12824 | rm -f core conftest.err conftest.$ac_objext \ | |
12825 | conftest$ac_exeext | |
12826 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12827 | break | |
12828 | fi | |
12829 | done | |
12830 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12831 | ||
12832 | else | |
12833 | ac_cv_search_dlopen=no | |
12834 | fi | |
12835 | rm conftest.$ac_ext | |
12836 | LIBS=$ac_func_search_save_LIBS | |
12837 | fi | |
12838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
12839 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
12840 | ac_res=$ac_cv_search_dlopen | |
12841 | if test "$ac_res" != no; then : | |
12842 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
12843 | ||
12844 | fi | |
12845 | ||
4f05add4 TT |
12846 | fi |
12847 | LIBS="-lbfd -liberty $intl $LIBS" | |
12848 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 | |
12849 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } | |
12850 | if test "${gdb_cv_var_macho+set}" = set; then : | |
12851 | $as_echo_n "(cached) " >&6 | |
12852 | else | |
12853 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12854 | /* end confdefs.h. */ | |
12855 | #include <stdlib.h> | |
12856 | #include "bfd.h" | |
12857 | #include "mach-o.h" | |
12858 | ||
12859 | int | |
12860 | main () | |
12861 | { | |
12862 | return bfd_mach_o_lookup_command (NULL, 0, NULL); | |
12863 | ; | |
12864 | return 0; | |
12865 | } | |
12866 | _ACEOF | |
12867 | if ac_fn_c_try_link "$LINENO"; then : | |
12868 | gdb_cv_var_macho=yes | |
12869 | else | |
12870 | gdb_cv_var_macho=no | |
12871 | fi | |
12872 | rm -f core conftest.err conftest.$ac_objext \ | |
12873 | conftest$ac_exeext conftest.$ac_ext | |
12874 | fi | |
12875 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 | |
12876 | $as_echo "$gdb_cv_var_macho" >&6; } | |
12877 | CFLAGS=$OLD_CFLAGS | |
12878 | LDFLAGS=$OLD_LDFLAGS | |
12879 | LIBS=$OLD_LIBS | |
12880 | if test $gdb_cv_var_macho = yes; then | |
12881 | CONFIG_OBS="$CONFIG_OBS machoread.o" | |
12882 | fi | |
12883 | ||
b2259038 TT |
12884 | # Add SOM support to GDB, but only if BFD includes it. |
12885 | ||
12886 | OLD_CFLAGS=$CFLAGS | |
12887 | OLD_LDFLAGS=$LDFLAGS | |
12888 | OLD_LIBS=$LIBS | |
12889 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS | |
12890 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12891 | # always want our bfd. | |
12892 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
12893 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" | |
12894 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` | |
12895 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. | |
12896 | if test "$plugins" = "yes"; then | |
a48b32c0 L |
12897 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
12898 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
12899 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12900 | $as_echo_n "(cached) " >&6 | |
12901 | else | |
12902 | ac_func_search_save_LIBS=$LIBS | |
12903 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12904 | /* end confdefs.h. */ | |
12905 | ||
12906 | /* Override any GCC internal prototype to avoid an error. | |
12907 | Use char because int might match the return type of a GCC | |
12908 | builtin and then its argument prototype would still apply. */ | |
12909 | #ifdef __cplusplus | |
12910 | extern "C" | |
12911 | #endif | |
12912 | char dlopen (); | |
12913 | int | |
12914 | main () | |
12915 | { | |
12916 | return dlopen (); | |
12917 | ; | |
12918 | return 0; | |
12919 | } | |
12920 | _ACEOF | |
12921 | for ac_lib in '' dl; do | |
12922 | if test -z "$ac_lib"; then | |
12923 | ac_res="none required" | |
12924 | else | |
12925 | ac_res=-l$ac_lib | |
12926 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12927 | fi | |
12928 | if ac_fn_c_try_link "$LINENO"; then : | |
12929 | ac_cv_search_dlopen=$ac_res | |
12930 | fi | |
12931 | rm -f core conftest.err conftest.$ac_objext \ | |
12932 | conftest$ac_exeext | |
12933 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12934 | break | |
12935 | fi | |
12936 | done | |
12937 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
12938 | ||
12939 | else | |
12940 | ac_cv_search_dlopen=no | |
12941 | fi | |
12942 | rm conftest.$ac_ext | |
12943 | LIBS=$ac_func_search_save_LIBS | |
12944 | fi | |
12945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
12946 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
12947 | ac_res=$ac_cv_search_dlopen | |
12948 | if test "$ac_res" != no; then : | |
12949 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
12950 | ||
12951 | fi | |
12952 | ||
b2259038 TT |
12953 | fi |
12954 | LIBS="-lbfd -liberty $intl $LIBS" | |
12955 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SOM support in BFD" >&5 | |
12956 | $as_echo_n "checking for SOM support in BFD... " >&6; } | |
12957 | if test "${gdb_cv_var_som+set}" = set; then : | |
12958 | $as_echo_n "(cached) " >&6 | |
12959 | else | |
12960 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12961 | /* end confdefs.h. */ | |
12962 | #include <stdlib.h> | |
12963 | #include "bfd.h" | |
12964 | #include "som.h" | |
12965 | ||
12966 | int | |
12967 | main () | |
12968 | { | |
12969 | return bfd_som_attach_aux_hdr (NULL, 0, NULL); | |
12970 | ; | |
12971 | return 0; | |
12972 | } | |
12973 | _ACEOF | |
12974 | if ac_fn_c_try_link "$LINENO"; then : | |
12975 | gdb_cv_var_som=yes | |
12976 | else | |
12977 | gdb_cv_var_som=no | |
12978 | fi | |
12979 | rm -f core conftest.err conftest.$ac_objext \ | |
12980 | conftest$ac_exeext conftest.$ac_ext | |
12981 | fi | |
12982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_som" >&5 | |
12983 | $as_echo "$gdb_cv_var_som" >&6; } | |
12984 | CFLAGS=$OLD_CFLAGS | |
12985 | LDFLAGS=$OLD_LDFLAGS | |
12986 | LIBS=$OLD_LIBS | |
12987 | if test $gdb_cv_var_som = yes; then | |
12988 | CONFIG_OBS="$CONFIG_OBS somread.o" | |
12989 | fi | |
12990 | ||
121ce6e5 DJ |
12991 | # Add any host-specific objects to GDB. |
12992 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
12993 | ||
608e2dbb TT |
12994 | # If building on ELF, look for lzma support for embedded compressed debug info. |
12995 | if test $gdb_cv_var_elf = yes; then | |
12996 | ||
12997 | # Check whether --with-lzma was given. | |
12998 | if test "${with_lzma+set}" = set; then : | |
12999 | withval=$with_lzma; | |
13000 | else | |
13001 | with_lzma=auto | |
13002 | fi | |
13003 | ||
13004 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 | |
13005 | $as_echo_n "checking whether to use lzma... " >&6; } | |
13006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 | |
13007 | $as_echo "$with_lzma" >&6; } | |
13008 | ||
13009 | if test "${with_lzma}" != no; then | |
13010 | ||
13011 | ||
13012 | ||
13013 | ||
13014 | ||
13015 | ||
13016 | ||
13017 | ||
13018 | use_additional=yes | |
13019 | ||
13020 | acl_save_prefix="$prefix" | |
13021 | prefix="$acl_final_prefix" | |
13022 | acl_save_exec_prefix="$exec_prefix" | |
13023 | exec_prefix="$acl_final_exec_prefix" | |
13024 | ||
13025 | eval additional_includedir=\"$includedir\" | |
13026 | eval additional_libdir=\"$libdir\" | |
13027 | ||
13028 | exec_prefix="$acl_save_exec_prefix" | |
13029 | prefix="$acl_save_prefix" | |
13030 | ||
13031 | ||
13032 | # Check whether --with-liblzma-prefix was given. | |
13033 | if test "${with_liblzma_prefix+set}" = set; then : | |
13034 | withval=$with_liblzma_prefix; | |
13035 | if test "X$withval" = "Xno"; then | |
13036 | use_additional=no | |
13037 | else | |
13038 | if test "X$withval" = "X"; then | |
13039 | ||
13040 | acl_save_prefix="$prefix" | |
13041 | prefix="$acl_final_prefix" | |
13042 | acl_save_exec_prefix="$exec_prefix" | |
13043 | exec_prefix="$acl_final_exec_prefix" | |
13044 | ||
13045 | eval additional_includedir=\"$includedir\" | |
13046 | eval additional_libdir=\"$libdir\" | |
13047 | ||
13048 | exec_prefix="$acl_save_exec_prefix" | |
13049 | prefix="$acl_save_prefix" | |
13050 | ||
13051 | else | |
13052 | additional_includedir="$withval/include" | |
13053 | additional_libdir="$withval/lib" | |
13054 | fi | |
13055 | fi | |
13056 | ||
13057 | fi | |
13058 | ||
13059 | LIBLZMA= | |
13060 | LTLIBLZMA= | |
13061 | INCLZMA= | |
13062 | rpathdirs= | |
13063 | ltrpathdirs= | |
13064 | names_already_handled= | |
13065 | names_next_round='lzma ' | |
13066 | while test -n "$names_next_round"; do | |
13067 | names_this_round="$names_next_round" | |
13068 | names_next_round= | |
13069 | for name in $names_this_round; do | |
13070 | already_handled= | |
13071 | for n in $names_already_handled; do | |
13072 | if test "$n" = "$name"; then | |
13073 | already_handled=yes | |
13074 | break | |
13075 | fi | |
13076 | done | |
13077 | if test -z "$already_handled"; then | |
13078 | names_already_handled="$names_already_handled $name" | |
13079 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
13080 | eval value=\"\$HAVE_LIB$uppername\" | |
13081 | if test -n "$value"; then | |
13082 | if test "$value" = yes; then | |
13083 | eval value=\"\$LIB$uppername\" | |
13084 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" | |
13085 | eval value=\"\$LTLIB$uppername\" | |
13086 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" | |
13087 | else | |
13088 | : | |
13089 | fi | |
13090 | else | |
13091 | found_dir= | |
13092 | found_la= | |
13093 | found_so= | |
13094 | found_a= | |
13095 | if test $use_additional = yes; then | |
13096 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
13097 | found_dir="$additional_libdir" | |
13098 | found_so="$additional_libdir/lib$name.$shlibext" | |
13099 | if test -f "$additional_libdir/lib$name.la"; then | |
13100 | found_la="$additional_libdir/lib$name.la" | |
13101 | fi | |
13102 | else | |
13103 | if test -f "$additional_libdir/lib$name.$libext"; then | |
13104 | found_dir="$additional_libdir" | |
13105 | found_a="$additional_libdir/lib$name.$libext" | |
13106 | if test -f "$additional_libdir/lib$name.la"; then | |
13107 | found_la="$additional_libdir/lib$name.la" | |
13108 | fi | |
13109 | fi | |
13110 | fi | |
13111 | fi | |
13112 | if test "X$found_dir" = "X"; then | |
13113 | for x in $LDFLAGS $LTLIBLZMA; do | |
13114 | ||
13115 | acl_save_prefix="$prefix" | |
13116 | prefix="$acl_final_prefix" | |
13117 | acl_save_exec_prefix="$exec_prefix" | |
13118 | exec_prefix="$acl_final_exec_prefix" | |
13119 | eval x=\"$x\" | |
13120 | exec_prefix="$acl_save_exec_prefix" | |
13121 | prefix="$acl_save_prefix" | |
13122 | ||
13123 | case "$x" in | |
13124 | -L*) | |
13125 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
13126 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
13127 | found_dir="$dir" | |
13128 | found_so="$dir/lib$name.$shlibext" | |
13129 | if test -f "$dir/lib$name.la"; then | |
13130 | found_la="$dir/lib$name.la" | |
13131 | fi | |
13132 | else | |
13133 | if test -f "$dir/lib$name.$libext"; then | |
13134 | found_dir="$dir" | |
13135 | found_a="$dir/lib$name.$libext" | |
13136 | if test -f "$dir/lib$name.la"; then | |
13137 | found_la="$dir/lib$name.la" | |
13138 | fi | |
13139 | fi | |
13140 | fi | |
13141 | ;; | |
13142 | esac | |
13143 | if test "X$found_dir" != "X"; then | |
13144 | break | |
13145 | fi | |
13146 | done | |
13147 | fi | |
13148 | if test "X$found_dir" != "X"; then | |
13149 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" | |
13150 | if test "X$found_so" != "X"; then | |
13151 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
13152 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13153 | else | |
13154 | haveit= | |
13155 | for x in $ltrpathdirs; do | |
13156 | if test "X$x" = "X$found_dir"; then | |
13157 | haveit=yes | |
13158 | break | |
13159 | fi | |
13160 | done | |
13161 | if test -z "$haveit"; then | |
13162 | ltrpathdirs="$ltrpathdirs $found_dir" | |
13163 | fi | |
13164 | if test "$hardcode_direct" = yes; then | |
13165 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13166 | else | |
13167 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
13168 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13169 | haveit= | |
13170 | for x in $rpathdirs; do | |
13171 | if test "X$x" = "X$found_dir"; then | |
13172 | haveit=yes | |
13173 | break | |
13174 | fi | |
13175 | done | |
13176 | if test -z "$haveit"; then | |
13177 | rpathdirs="$rpathdirs $found_dir" | |
13178 | fi | |
13179 | else | |
13180 | haveit= | |
13181 | for x in $LDFLAGS $LIBLZMA; do | |
13182 | ||
13183 | acl_save_prefix="$prefix" | |
13184 | prefix="$acl_final_prefix" | |
13185 | acl_save_exec_prefix="$exec_prefix" | |
13186 | exec_prefix="$acl_final_exec_prefix" | |
13187 | eval x=\"$x\" | |
13188 | exec_prefix="$acl_save_exec_prefix" | |
13189 | prefix="$acl_save_prefix" | |
13190 | ||
13191 | if test "X$x" = "X-L$found_dir"; then | |
13192 | haveit=yes | |
13193 | break | |
13194 | fi | |
13195 | done | |
13196 | if test -z "$haveit"; then | |
13197 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" | |
13198 | fi | |
13199 | if test "$hardcode_minus_L" != no; then | |
13200 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" | |
13201 | else | |
13202 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
13203 | fi | |
13204 | fi | |
13205 | fi | |
13206 | fi | |
13207 | else | |
13208 | if test "X$found_a" != "X"; then | |
13209 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" | |
13210 | else | |
13211 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" | |
13212 | fi | |
13213 | fi | |
13214 | additional_includedir= | |
13215 | case "$found_dir" in | |
13216 | */lib | */lib/) | |
13217 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
13218 | additional_includedir="$basedir/include" | |
13219 | ;; | |
13220 | esac | |
13221 | if test "X$additional_includedir" != "X"; then | |
13222 | if test "X$additional_includedir" != "X/usr/include"; then | |
13223 | haveit= | |
13224 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
13225 | if test -n "$GCC"; then | |
13226 | case $host_os in | |
13227 | linux*) haveit=yes;; | |
13228 | esac | |
13229 | fi | |
13230 | fi | |
13231 | if test -z "$haveit"; then | |
13232 | for x in $CPPFLAGS $INCLZMA; do | |
13233 | ||
13234 | acl_save_prefix="$prefix" | |
13235 | prefix="$acl_final_prefix" | |
13236 | acl_save_exec_prefix="$exec_prefix" | |
13237 | exec_prefix="$acl_final_exec_prefix" | |
13238 | eval x=\"$x\" | |
13239 | exec_prefix="$acl_save_exec_prefix" | |
13240 | prefix="$acl_save_prefix" | |
13241 | ||
13242 | if test "X$x" = "X-I$additional_includedir"; then | |
13243 | haveit=yes | |
13244 | break | |
13245 | fi | |
13246 | done | |
13247 | if test -z "$haveit"; then | |
13248 | if test -d "$additional_includedir"; then | |
13249 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" | |
13250 | fi | |
13251 | fi | |
13252 | fi | |
13253 | fi | |
13254 | fi | |
13255 | if test -n "$found_la"; then | |
13256 | save_libdir="$libdir" | |
13257 | case "$found_la" in | |
13258 | */* | *\\*) . "$found_la" ;; | |
13259 | *) . "./$found_la" ;; | |
13260 | esac | |
13261 | libdir="$save_libdir" | |
13262 | for dep in $dependency_libs; do | |
13263 | case "$dep" in | |
13264 | -L*) | |
13265 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
13266 | if test "X$additional_libdir" != "X/usr/lib"; then | |
13267 | haveit= | |
13268 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
13269 | if test -n "$GCC"; then | |
13270 | case $host_os in | |
13271 | linux*) haveit=yes;; | |
13272 | esac | |
13273 | fi | |
13274 | fi | |
13275 | if test -z "$haveit"; then | |
13276 | haveit= | |
13277 | for x in $LDFLAGS $LIBLZMA; do | |
13278 | ||
13279 | acl_save_prefix="$prefix" | |
13280 | prefix="$acl_final_prefix" | |
13281 | acl_save_exec_prefix="$exec_prefix" | |
13282 | exec_prefix="$acl_final_exec_prefix" | |
13283 | eval x=\"$x\" | |
13284 | exec_prefix="$acl_save_exec_prefix" | |
13285 | prefix="$acl_save_prefix" | |
13286 | ||
13287 | if test "X$x" = "X-L$additional_libdir"; then | |
13288 | haveit=yes | |
13289 | break | |
13290 | fi | |
13291 | done | |
13292 | if test -z "$haveit"; then | |
13293 | if test -d "$additional_libdir"; then | |
13294 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" | |
13295 | fi | |
13296 | fi | |
13297 | haveit= | |
13298 | for x in $LDFLAGS $LTLIBLZMA; do | |
13299 | ||
13300 | acl_save_prefix="$prefix" | |
13301 | prefix="$acl_final_prefix" | |
13302 | acl_save_exec_prefix="$exec_prefix" | |
13303 | exec_prefix="$acl_final_exec_prefix" | |
13304 | eval x=\"$x\" | |
13305 | exec_prefix="$acl_save_exec_prefix" | |
13306 | prefix="$acl_save_prefix" | |
13307 | ||
13308 | if test "X$x" = "X-L$additional_libdir"; then | |
13309 | haveit=yes | |
13310 | break | |
13311 | fi | |
13312 | done | |
13313 | if test -z "$haveit"; then | |
13314 | if test -d "$additional_libdir"; then | |
13315 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" | |
13316 | fi | |
13317 | fi | |
13318 | fi | |
13319 | fi | |
13320 | ;; | |
13321 | -R*) | |
13322 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
13323 | if test "$enable_rpath" != no; then | |
13324 | haveit= | |
13325 | for x in $rpathdirs; do | |
13326 | if test "X$x" = "X$dir"; then | |
13327 | haveit=yes | |
13328 | break | |
13329 | fi | |
13330 | done | |
13331 | if test -z "$haveit"; then | |
13332 | rpathdirs="$rpathdirs $dir" | |
13333 | fi | |
13334 | haveit= | |
13335 | for x in $ltrpathdirs; do | |
13336 | if test "X$x" = "X$dir"; then | |
13337 | haveit=yes | |
13338 | break | |
13339 | fi | |
13340 | done | |
13341 | if test -z "$haveit"; then | |
13342 | ltrpathdirs="$ltrpathdirs $dir" | |
13343 | fi | |
13344 | fi | |
13345 | ;; | |
13346 | -l*) | |
13347 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
13348 | ;; | |
13349 | *.la) | |
13350 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
13351 | ;; | |
13352 | *) | |
13353 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" | |
13354 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" | |
13355 | ;; | |
13356 | esac | |
13357 | done | |
13358 | fi | |
13359 | else | |
13360 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" | |
13361 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" | |
13362 | fi | |
13363 | fi | |
13364 | fi | |
13365 | done | |
13366 | done | |
13367 | if test "X$rpathdirs" != "X"; then | |
13368 | if test -n "$hardcode_libdir_separator"; then | |
13369 | alldirs= | |
13370 | for found_dir in $rpathdirs; do | |
13371 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
13372 | done | |
13373 | acl_save_libdir="$libdir" | |
13374 | libdir="$alldirs" | |
13375 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13376 | libdir="$acl_save_libdir" | |
13377 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13378 | else | |
13379 | for found_dir in $rpathdirs; do | |
13380 | acl_save_libdir="$libdir" | |
13381 | libdir="$found_dir" | |
13382 | eval flag=\"$hardcode_libdir_flag_spec\" | |
13383 | libdir="$acl_save_libdir" | |
13384 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" | |
13385 | done | |
13386 | fi | |
13387 | fi | |
13388 | if test "X$ltrpathdirs" != "X"; then | |
13389 | for found_dir in $ltrpathdirs; do | |
13390 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" | |
13391 | done | |
13392 | fi | |
13393 | ||
13394 | ||
13395 | ac_save_CPPFLAGS="$CPPFLAGS" | |
13396 | ||
13397 | for element in $INCLZMA; do | |
13398 | haveit= | |
13399 | for x in $CPPFLAGS; do | |
13400 | ||
13401 | acl_save_prefix="$prefix" | |
13402 | prefix="$acl_final_prefix" | |
13403 | acl_save_exec_prefix="$exec_prefix" | |
13404 | exec_prefix="$acl_final_exec_prefix" | |
13405 | eval x=\"$x\" | |
13406 | exec_prefix="$acl_save_exec_prefix" | |
13407 | prefix="$acl_save_prefix" | |
13408 | ||
13409 | if test "X$x" = "X$element"; then | |
13410 | haveit=yes | |
13411 | break | |
13412 | fi | |
13413 | done | |
13414 | if test -z "$haveit"; then | |
13415 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
13416 | fi | |
13417 | done | |
13418 | ||
13419 | ||
13420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 | |
13421 | $as_echo_n "checking for liblzma... " >&6; } | |
13422 | if test "${ac_cv_liblzma+set}" = set; then : | |
13423 | $as_echo_n "(cached) " >&6 | |
13424 | else | |
13425 | ||
13426 | ac_save_LIBS="$LIBS" | |
13427 | LIBS="$LIBS $LIBLZMA" | |
13428 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
13429 | /* end confdefs.h. */ | |
13430 | #include "lzma.h" | |
13431 | int | |
13432 | main () | |
13433 | { | |
13434 | lzma_index_iter iter; | |
13435 | lzma_index_iter_init (&iter, 0); | |
13436 | lzma_mf_is_supported (LZMA_MF_HC3); | |
13437 | ; | |
13438 | return 0; | |
13439 | } | |
13440 | _ACEOF | |
13441 | if ac_fn_c_try_link "$LINENO"; then : | |
13442 | ac_cv_liblzma=yes | |
13443 | else | |
13444 | ac_cv_liblzma=no | |
13445 | fi | |
13446 | rm -f core conftest.err conftest.$ac_objext \ | |
13447 | conftest$ac_exeext conftest.$ac_ext | |
13448 | LIBS="$ac_save_LIBS" | |
13449 | ||
13450 | fi | |
13451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 | |
13452 | $as_echo "$ac_cv_liblzma" >&6; } | |
13453 | if test "$ac_cv_liblzma" = yes; then | |
13454 | HAVE_LIBLZMA=yes | |
13455 | ||
13456 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h | |
13457 | ||
13458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 | |
13459 | $as_echo_n "checking how to link with liblzma... " >&6; } | |
13460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 | |
13461 | $as_echo "$LIBLZMA" >&6; } | |
13462 | else | |
13463 | HAVE_LIBLZMA=no | |
13464 | CPPFLAGS="$ac_save_CPPFLAGS" | |
13465 | LIBLZMA= | |
13466 | LTLIBLZMA= | |
13467 | fi | |
13468 | ||
13469 | ||
13470 | ||
13471 | ||
13472 | ||
13473 | ||
13474 | if test "$HAVE_LIBLZMA" != yes; then | |
13475 | if test "$with_lzma" = yes; then | |
13476 | as_fn_error "missing liblzma for --with-lzma" "$LINENO" 5 | |
13477 | fi | |
13478 | fi | |
13479 | fi | |
13480 | fi | |
13481 | ||
3fc11d3e JM |
13482 | LIBGUI="../libgui/src/libgui.a" |
13483 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
13484 | ||
13485 | ||
7a292a7a | 13486 | |
3fc11d3e JM |
13487 | WIN32LDAPP= |
13488 | ||
13489 | ||
13490 | ||
d91670b9 | 13491 | case "${host}" in |
686a5eed | 13492 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
13493 | configdir="win" |
13494 | ;; | |
13495 | *) | |
13496 | configdir="unix" | |
13497 | ;; | |
13498 | esac | |
3fc11d3e JM |
13499 | |
13500 | GDBTKLIBS= | |
13501 | if test "${enable_gdbtk}" = "yes"; then | |
13502 | ||
d1c3b63a KS |
13503 | # Gdbtk must have an absolute path to srcdir in order to run |
13504 | # properly when not installed. | |
13505 | here=`pwd` | |
13506 | cd ${srcdir} | |
13507 | GDBTK_SRC_DIR=`pwd` | |
13508 | cd $here | |
13509 | ||
bec39cab | 13510 | |
5062cc19 KS |
13511 | # |
13512 | # Ok, lets find the tcl configuration | |
13513 | # First, look for one uninstalled. | |
13514 | # the alternative search directory is invoked by --with-tcl | |
13515 | # | |
3fc11d3e | 13516 | |
5062cc19 KS |
13517 | if test x"${no_tcl}" = x ; then |
13518 | # we reset no_tcl in case something fails here | |
13519 | no_tcl=true | |
bec39cab | 13520 | |
81ecdfbb RW |
13521 | # Check whether --with-tcl was given. |
13522 | if test "${with_tcl+set}" = set; then : | |
13523 | withval=$with_tcl; with_tclconfig=${withval} | |
13524 | fi | |
13525 | ||
13526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
13527 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
13528 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
13529 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 13530 | else |
bec39cab | 13531 | |
3fc11d3e | 13532 | |
5062cc19 KS |
13533 | # First check to see if --with-tcl was specified. |
13534 | case "${host}" in | |
13535 | *-*-cygwin*) platDir="win" ;; | |
13536 | *) platDir="unix" ;; | |
13537 | esac | |
13538 | if test x"${with_tclconfig}" != x ; then | |
13539 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
13540 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
13541 | else | |
81ecdfbb | 13542 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13543 | fi |
13544 | fi | |
13545 | ||
13546 | # then check for a private Tcl installation | |
13547 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13548 | for i in \ | |
13549 | ../tcl \ | |
13550 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13551 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
13552 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13553 | ../../tcl \ | |
13554 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13555 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13556 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
13557 | ../../../tcl \ | |
13558 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13559 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
13560 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13561 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13562 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13563 | break | |
13564 | fi | |
13565 | done | |
13566 | fi | |
13567 | ||
13568 | # on Darwin, check in Framework installation locations | |
13569 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
13570 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13571 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13572 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13573 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13574 | ; do | |
13575 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
13576 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
13577 | break | |
13578 | fi | |
13579 | done | |
13580 | fi | |
13581 | ||
13582 | # check in a few common install locations | |
13583 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13584 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13585 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13586 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13587 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13588 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13589 | `ls -d /usr/lib 2>/dev/null` \ | |
13590 | ; do | |
13591 | if test -f "$i/tclConfig.sh" ; then | |
13592 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
13593 | break | |
13594 | fi | |
13595 | done | |
13596 | fi | |
3fc11d3e | 13597 | |
5062cc19 KS |
13598 | # check in a few other private locations |
13599 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13600 | for i in \ | |
13601 | ${srcdir}/../tcl \ | |
13602 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13603 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
13604 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
13605 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
13606 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
13607 | break | |
13608 | fi | |
13609 | done | |
13610 | fi | |
bec39cab | 13611 | |
3fc11d3e JM |
13612 | fi |
13613 | ||
5062cc19 KS |
13614 | |
13615 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
13616 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
13617 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
13618 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
13619 | else |
13620 | no_tcl= | |
13621 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
13622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13623 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
13624 | fi |
13625 | fi | |
3fc11d3e | 13626 | |
bec39cab | 13627 | |
85541719 DE |
13628 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
13629 | # point to doing Tcl. | |
bec39cab | 13630 | |
5062cc19 KS |
13631 | # |
13632 | # Ok, lets find the tk configuration | |
13633 | # First, look for one uninstalled. | |
13634 | # the alternative search directory is invoked by --with-tk | |
13635 | # | |
3fc11d3e | 13636 | |
5062cc19 KS |
13637 | if test x"${no_tk}" = x ; then |
13638 | # we reset no_tk in case something fails here | |
13639 | no_tk=true | |
bec39cab | 13640 | |
81ecdfbb RW |
13641 | # Check whether --with-tk was given. |
13642 | if test "${with_tk+set}" = set; then : | |
13643 | withval=$with_tk; with_tkconfig=${withval} | |
13644 | fi | |
13645 | ||
13646 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
13647 | $as_echo_n "checking for Tk configuration... " >&6; } | |
13648 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
13649 | $as_echo_n "(cached) " >&6 | |
bec39cab | 13650 | else |
3fc11d3e JM |
13651 | |
13652 | ||
5062cc19 KS |
13653 | # First check to see if --with-tkconfig was specified. |
13654 | if test x"${with_tkconfig}" != x ; then | |
13655 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
13656 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
13657 | else | |
81ecdfbb | 13658 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
13659 | fi |
13660 | fi | |
3fc11d3e | 13661 | |
5062cc19 KS |
13662 | # then check for a private Tk library |
13663 | case "${host}" in | |
13664 | *-*-cygwin*) platDir="win" ;; | |
13665 | *) platDir="unix" ;; | |
13666 | esac | |
13667 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13668 | for i in \ | |
13669 | ../tk \ | |
13670 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13671 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
13672 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
13673 | ../../tk \ | |
13674 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13675 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
13676 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
13677 | ../../../tk \ | |
13678 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13679 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
13680 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13681 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13682 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13683 | break | |
13684 | fi | |
13685 | done | |
13686 | fi | |
13687 | ||
13688 | # on Darwin, check in Framework installation locations | |
13689 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
13690 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
13691 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
13692 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
13693 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
13694 | ; do | |
13695 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
13696 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
13697 | break | |
13698 | fi | |
13699 | done | |
13700 | fi | |
13701 | ||
13702 | # check in a few common install locations | |
13703 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13704 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
13705 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
13706 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
13707 | `ls -d /usr/local/lib 2>/dev/null` \ | |
13708 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
13709 | `ls -d /usr/lib 2>/dev/null` \ | |
13710 | ; do | |
13711 | if test -f "$i/tkConfig.sh" ; then | |
13712 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
13713 | break | |
13714 | fi | |
13715 | done | |
13716 | fi | |
13717 | # check in a few other private locations | |
13718 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
13719 | for i in \ | |
13720 | ${srcdir}/../tk \ | |
13721 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
13722 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
13723 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
13724 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
13725 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
13726 | break | |
13727 | fi | |
13728 | done | |
13729 | fi | |
3fc11d3e | 13730 | |
3fc11d3e JM |
13731 | fi |
13732 | ||
13733 | ||
5062cc19 KS |
13734 | if test x"${ac_cv_c_tkconfig}" = x ; then |
13735 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
13736 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
13737 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
13738 | else |
13739 | no_tk= | |
13740 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
13741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13742 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 13743 | fi |
3fc11d3e | 13744 | fi |
dd2504ab | 13745 | |
dd2504ab | 13746 | |
85541719 DE |
13747 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
13748 | ||
81ecdfbb RW |
13749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13750 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
13751 | |
13752 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
13753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13754 | $as_echo "loading" >&6; } | |
85541719 DE |
13755 | . ${TCL_BIN_DIR}/tclConfig.sh |
13756 | else | |
81ecdfbb RW |
13757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
13758 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
13759 | fi |
13760 | ||
13761 | # eval is required to do the TCL_DBGX substitution | |
13762 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
13763 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
13764 | ||
13765 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
13766 | # then set the common variable name to the value of the build variables. | |
13767 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
13768 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
13769 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
13770 | # installed and uninstalled version of Tcl. | |
13771 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
13772 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
13773 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
13774 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
13775 | elif test "`uname -s`" = "Darwin"; then | |
13776 | # If Tcl was built as a framework, attempt to use the libraries | |
13777 | # from the framework at the given location so that linking works | |
a68ffae9 | 13778 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
13779 | case ${TCL_DEFS} in |
13780 | *TCL_FRAMEWORK*) | |
13781 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
13782 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
13783 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
13784 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
13785 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
13786 | break | |
13787 | fi | |
13788 | done | |
13789 | fi | |
13790 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
13791 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
13792 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
13793 | fi | |
13794 | ;; | |
13795 | esac | |
13796 | fi | |
13797 | ||
13798 | # eval is required to do the TCL_DBGX substitution | |
13799 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
13800 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
13801 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
13802 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
13803 | ||
13804 | ||
13805 | ||
13806 | ||
13807 | ||
13808 | ||
13809 | ||
13810 | ||
13811 | ||
13812 | ||
13813 | ||
13814 | ||
13815 | ||
13816 | ||
13817 | ||
13818 | # Check for in-tree tcl | |
13819 | here=`pwd` | |
13820 | cd ${srcdir}/.. | |
13821 | topdir=`pwd` | |
13822 | cd ${here} | |
13823 | ||
13824 | intree="no" | |
13825 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
13826 | intree="yes" | |
13827 | fi | |
13828 | ||
13829 | # Find Tcl private headers | |
13830 | if test x"${intree}" = xno; then | |
13831 | ||
81ecdfbb RW |
13832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
13833 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
13834 | private_dir="" |
13835 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
13836 | if test -f ${dir}/tclInt.h ; then | |
13837 | private_dir=${dir} | |
13838 | fi | |
13839 | ||
13840 | if test x"${private_dir}" = x; then | |
81ecdfbb | 13841 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
13842 | else |
13843 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
13844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13845 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
13846 | fi |
13847 | ||
13848 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
13849 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
13850 | TCL_DEPS="" | |
13851 | else | |
13852 | # If building tcl in the same src tree, private headers | |
13853 | # are not needed, but we need to be sure to use the right | |
13854 | # headers library | |
13855 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
13856 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
13857 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
13858 | fi | |
13859 | ||
13860 | ||
13861 | ||
13862 | ||
13863 | ||
81ecdfbb RW |
13864 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13865 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 13866 | |
5062cc19 | 13867 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
13868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
13869 | $as_echo "loading" >&6; } | |
5062cc19 | 13870 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 13871 | else |
81ecdfbb RW |
13872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
13873 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 13874 | fi |
bec39cab | 13875 | |
5062cc19 KS |
13876 | # eval is required to do the TK_DBGX substitution |
13877 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
13878 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
13879 | ||
13880 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
13881 | # then set the common variable name to the value of the build variables. | |
13882 | # For example, the variable TK_LIB_SPEC will be set to the value | |
13883 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
13884 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
13885 | # installed and uninstalled version of Tcl. | |
85541719 | 13886 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
13887 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
13888 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
13889 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
13890 | elif test "`uname -s`" = "Darwin"; then | |
13891 | # If Tk was built as a framework, attempt to use the libraries | |
13892 | # from the framework at the given location so that linking works | |
a68ffae9 | 13893 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
13894 | case ${TK_DEFS} in |
13895 | *TK_FRAMEWORK*) | |
85541719 | 13896 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
13897 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
13898 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
13899 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
13900 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
13901 | break | |
13902 | fi | |
13903 | done | |
13904 | fi | |
85541719 | 13905 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
13906 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
13907 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
13908 | fi | |
13909 | ;; | |
13910 | esac | |
3fc11d3e JM |
13911 | fi |
13912 | ||
5062cc19 KS |
13913 | # eval is required to do the TK_DBGX substitution |
13914 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
13915 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
13916 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
13917 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 13918 | |
3fc11d3e JM |
13919 | |
13920 | ||
bec39cab AC |
13921 | |
13922 | ||
13923 | ||
13924 | ||
13925 | ||
13926 | ||
13927 | ||
3fc11d3e | 13928 | |
3fc11d3e | 13929 | |
bec39cab | 13930 | |
bec39cab | 13931 | |
85541719 DE |
13932 | # Check for in-tree Tk |
13933 | intree="no" | |
13934 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
13935 | intree="yes" | |
13936 | fi | |
3fc11d3e | 13937 | |
85541719 DE |
13938 | # Find Tk private headers |
13939 | if test x"${intree}" = xno; then | |
3fc11d3e | 13940 | |
81ecdfbb RW |
13941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
13942 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
13943 | private_dir="" |
13944 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
13945 | if test -f ${dir}/tkInt.h; then | |
13946 | private_dir=${dir} | |
3fc11d3e | 13947 | fi |
bec39cab | 13948 | |
5062cc19 | 13949 | if test x"${private_dir}" = x; then |
81ecdfbb | 13950 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 13951 | else |
5062cc19 | 13952 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
13953 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13954 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 13955 | fi |
3fc11d3e | 13956 | |
85541719 DE |
13957 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
13958 | TK_LIBRARY=${TK_LIB_SPEC} | |
13959 | TK_DEPS="" | |
13960 | else | |
13961 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
13962 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
13963 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
13964 | fi | |
3fc11d3e JM |
13965 | |
13966 | ||
3fc11d3e JM |
13967 | |
13968 | ||
3fc11d3e | 13969 | |
85541719 | 13970 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 13971 | |
85541719 DE |
13972 | # Include some libraries that Tcl and Tk want. |
13973 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
13974 | # Yes, the ordering seems wrong here. But it isn't. | |
13975 | # TK_LIBS is the list of libraries that need to be linked | |
13976 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
13977 | # were in LIBS then any link tests after this point would | |
13978 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
13979 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 13980 | |
85541719 DE |
13981 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
13982 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
13983 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
13984 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
13985 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
13986 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
13987 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 13988 | |
85541719 DE |
13989 | if test x$gdb_cv_os_cygwin = xyes; then |
13990 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
13991 | WIN32LDAPP="-Wl,--subsystem,console" | |
13992 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 13993 | fi |
ffc6a242 | 13994 | |
81ecdfbb | 13995 | subdirs="$subdirs gdbtk" |
3ace7edb | 13996 | |
85541719 | 13997 | fi |
3fc11d3e JM |
13998 | fi |
13999 | ||
14000 | ||
14001 | ||
14002 | ||
14003 | ||
14004 | ||
14005 | ||
14006 | ||
81ecdfbb RW |
14007 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
14008 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 14009 | |
c906108c | 14010 | |
81ecdfbb RW |
14011 | # Check whether --with-x was given. |
14012 | if test "${with_x+set}" = set; then : | |
14013 | withval=$with_x; | |
14014 | fi | |
c906108c SS |
14015 | |
14016 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
14017 | if test "x$with_x" = xno; then | |
14018 | # The user explicitly disabled X. | |
14019 | have_x=disabled | |
14020 | else | |
81ecdfbb RW |
14021 | case $x_includes,$x_libraries in #( |
14022 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
14023 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
14024 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
14025 | else |
14026 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 14027 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 14028 | rm -f -r conftest.dir |
bec39cab AC |
14029 | if mkdir conftest.dir; then |
14030 | cd conftest.dir | |
bec39cab | 14031 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
14032 | incroot: |
14033 | @echo incroot='${INCROOT}' | |
14034 | usrlibdir: | |
14035 | @echo usrlibdir='${USRLIBDIR}' | |
14036 | libdir: | |
14037 | @echo libdir='${LIBDIR}' | |
14038 | _ACEOF | |
14039 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 14040 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
14041 | for ac_var in incroot usrlibdir libdir; do |
14042 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
14043 | done | |
c906108c | 14044 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
14045 | for ac_extension in a so sl dylib la dll; do |
14046 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
14047 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 14048 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
14049 | fi |
14050 | done | |
14051 | # Screen out bogus values from the imake configuration. They are | |
14052 | # bogus both because they are the default anyway, and because | |
14053 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 14054 | case $ac_im_incroot in |
81ecdfbb | 14055 | /usr/include) ac_x_includes= ;; |
bec39cab | 14056 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 14057 | esac |
bec39cab | 14058 | case $ac_im_usrlibdir in |
81ecdfbb | 14059 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 14060 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
14061 | esac |
14062 | fi | |
14063 | cd .. | |
81ecdfbb | 14064 | rm -f -r conftest.dir |
c906108c SS |
14065 | fi |
14066 | ||
bec39cab AC |
14067 | # Standard set of common directories for X headers. |
14068 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
14069 | ac_x_header_dirs=' | |
14070 | /usr/X11/include | |
81ecdfbb | 14071 | /usr/X11R7/include |
bec39cab AC |
14072 | /usr/X11R6/include |
14073 | /usr/X11R5/include | |
14074 | /usr/X11R4/include | |
14075 | ||
14076 | /usr/include/X11 | |
81ecdfbb | 14077 | /usr/include/X11R7 |
bec39cab AC |
14078 | /usr/include/X11R6 |
14079 | /usr/include/X11R5 | |
14080 | /usr/include/X11R4 | |
14081 | ||
14082 | /usr/local/X11/include | |
81ecdfbb | 14083 | /usr/local/X11R7/include |
bec39cab AC |
14084 | /usr/local/X11R6/include |
14085 | /usr/local/X11R5/include | |
14086 | /usr/local/X11R4/include | |
14087 | ||
14088 | /usr/local/include/X11 | |
81ecdfbb | 14089 | /usr/local/include/X11R7 |
bec39cab AC |
14090 | /usr/local/include/X11R6 |
14091 | /usr/local/include/X11R5 | |
14092 | /usr/local/include/X11R4 | |
14093 | ||
14094 | /usr/X386/include | |
14095 | /usr/x386/include | |
14096 | /usr/XFree86/include/X11 | |
14097 | ||
14098 | /usr/include | |
14099 | /usr/local/include | |
14100 | /usr/unsupported/include | |
14101 | /usr/athena/include | |
14102 | /usr/local/x11r5/include | |
14103 | /usr/lpp/Xamples/include | |
14104 | ||
14105 | /usr/openwin/include | |
14106 | /usr/openwin/share/include' | |
14107 | ||
14108 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 14109 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 14110 | # First, try using that file with no special directory specified. |
81ecdfbb | 14111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 14112 | /* end confdefs.h. */ |
81ecdfbb | 14113 | #include <X11/Xlib.h> |
bec39cab | 14114 | _ACEOF |
81ecdfbb | 14115 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
14116 | # We can compile using X headers with no special include directory. |
14117 | ac_x_includes= | |
14118 | else | |
bec39cab | 14119 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 14120 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
14121 | ac_x_includes=$ac_dir |
14122 | break | |
14123 | fi | |
14124 | done | |
c906108c | 14125 | fi |
bec39cab AC |
14126 | rm -f conftest.err conftest.$ac_ext |
14127 | fi # $ac_x_includes = no | |
c906108c | 14128 | |
bec39cab | 14129 | if test "$ac_x_libraries" = no; then |
c906108c | 14130 | # Check for the libraries. |
c906108c SS |
14131 | # See if we find them without any special options. |
14132 | # Don't add to $LIBS permanently. | |
bec39cab | 14133 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
14134 | LIBS="-lX11 $LIBS" |
14135 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 14136 | /* end confdefs.h. */ |
81ecdfbb | 14137 | #include <X11/Xlib.h> |
bec39cab AC |
14138 | int |
14139 | main () | |
14140 | { | |
81ecdfbb | 14141 | XrmInitialize () |
bec39cab AC |
14142 | ; |
14143 | return 0; | |
14144 | } | |
14145 | _ACEOF | |
81ecdfbb | 14146 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 14147 | LIBS=$ac_save_LIBS |
c906108c SS |
14148 | # We can link X programs with no special library path. |
14149 | ac_x_libraries= | |
14150 | else | |
81ecdfbb RW |
14151 | LIBS=$ac_save_LIBS |
14152 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 14153 | do |
bec39cab | 14154 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
14155 | for ac_extension in a so sl dylib la dll; do |
14156 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
14157 | ac_x_libraries=$ac_dir |
14158 | break 2 | |
14159 | fi | |
14160 | done | |
14161 | done | |
14162 | fi | |
81ecdfbb RW |
14163 | rm -f core conftest.err conftest.$ac_objext \ |
14164 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 14165 | fi # $ac_x_libraries = no |
c906108c | 14166 | |
81ecdfbb RW |
14167 | case $ac_x_includes,$ac_x_libraries in #( |
14168 | no,* | *,no | *\'*) | |
14169 | # Didn't find X, or a directory has "'" in its name. | |
14170 | ac_cv_have_x="have_x=no";; #( | |
14171 | *) | |
14172 | # Record where we found X for the cache. | |
14173 | ac_cv_have_x="have_x=yes\ | |
14174 | ac_x_includes='$ac_x_includes'\ | |
14175 | ac_x_libraries='$ac_x_libraries'" | |
14176 | esac | |
c906108c | 14177 | fi |
81ecdfbb RW |
14178 | ;; #( |
14179 | *) have_x=yes;; | |
14180 | esac | |
c906108c SS |
14181 | eval "$ac_cv_have_x" |
14182 | fi # $with_x != no | |
14183 | ||
14184 | if test "$have_x" != yes; then | |
81ecdfbb RW |
14185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
14186 | $as_echo "$have_x" >&6; } | |
c906108c SS |
14187 | no_x=yes |
14188 | else | |
14189 | # If each of the values was on the command line, it overrides each guess. | |
14190 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
14191 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
14192 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
14193 | ac_cv_have_x="have_x=yes\ |
14194 | ac_x_includes='$x_includes'\ | |
14195 | ac_x_libraries='$x_libraries'" | |
14196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
14197 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
14198 | fi |
14199 | ||
14200 | ||
bec39cab | 14201 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 14202 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
14203 | # This code just checks for a few cases where we'd like to ignore those |
14204 | # definitions, even when they're present in the '.mt' file. These cases | |
14205 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 14206 | # not part of the source tree. |
7a292a7a | 14207 | # |
81ecdfbb RW |
14208 | # Check whether --enable-sim was given. |
14209 | if test "${enable_sim+set}" = set; then : | |
14210 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
14211 | echo "enableval = ${enableval}"; |
14212 | case "${enableval}" in | |
14213 | yes) ignore_sim=false ;; | |
14214 | no) ignore_sim=true ;; | |
14215 | *) ignore_sim=false ;; | |
14216 | esac | |
14217 | else | |
14218 | ignore_sim=false | |
81ecdfbb RW |
14219 | fi |
14220 | ||
7a292a7a SS |
14221 | |
14222 | if test ! -d "${srcdir}/../sim"; then | |
14223 | ignore_sim=true | |
14224 | fi | |
14225 | ||
9b624dbe UW |
14226 | SIM= |
14227 | SIM_OBS= | |
14228 | if test "${ignore_sim}" = "false"; then | |
14229 | if test x"${gdb_sim}" != x ; then | |
14230 | SIM="${gdb_sim}" | |
14231 | SIM_OBS="remote-sim.o" | |
60ca704f | 14232 | |
81ecdfbb | 14233 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 14234 | |
9b624dbe | 14235 | fi |
7a292a7a SS |
14236 | fi |
14237 | ||
14238 | ||
14239 | ||
c906108c SS |
14240 | |
14241 | ||
14242 | ||
14243 | ||
14244 | ||
14245 | ||
dfcd3bfb | 14246 | |
e56ac5c3 AC |
14247 | |
14248 | ||
b3a90332 AC |
14249 | |
14250 | ||
c35f4ffc | 14251 | # List of host floatformats. |
bec39cab AC |
14252 | |
14253 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14254 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 14255 | _ACEOF |
c35f4ffc | 14256 | |
bec39cab AC |
14257 | |
14258 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 14259 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
14260 | _ACEOF |
14261 | ||
c35f4ffc | 14262 | |
bec39cab | 14263 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 14264 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 14265 | _ACEOF |
c35f4ffc AC |
14266 | |
14267 | ||
c906108c SS |
14268 | # target_subdir is used by the testsuite to find the target libraries. |
14269 | target_subdir= | |
14270 | if test "${host}" != "${target}"; then | |
14271 | target_subdir="${target_alias}/" | |
14272 | fi | |
14273 | ||
14274 | ||
14275 | frags= | |
771b4502 | 14276 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
14277 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
14278 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 14279 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
14280 | fi |
14281 | frags="$frags $host_makefile_frag" | |
14282 | else | |
14283 | host_makefile_frag=/dev/null | |
c906108c | 14284 | fi |
c906108c | 14285 | |
c906108c SS |
14286 | |
14287 | ||
14288 | ||
771b4502 | 14289 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
14290 | # We pick this up from the host configuration file (.mh) because we |
14291 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
14292 | nativefile=`sed -n ' |
14293 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
14294 | ' ${host_makefile_frag}` | |
c906108c SS |
14295 | fi |
14296 | ||
14297 | ||
b00a8037 | 14298 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
14299 | |
14300 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 14301 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 14302 | _ACEOF |
b00a8037 DJ |
14303 | |
14304 | fi | |
14305 | ||
8dcde887 | 14306 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
14307 | # Check whether --enable-multi-ice was given. |
14308 | if test "${enable_multi_ice+set}" = set; then : | |
14309 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
14310 | yes | no) |
14311 | ;; | |
81ecdfbb | 14312 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 14313 | esac |
81ecdfbb | 14314 | fi |
b4e70030 | 14315 | |
81ecdfbb RW |
14316 | if test "x$enable_multi_ice" = xyes; then |
14317 | subdirs="$subdirs multi-ice" | |
3ace7edb | 14318 | |
a85f51e7 DJ |
14319 | fi |
14320 | ||
496c0e1b JB |
14321 | # Check whether --enable-gdbserver was given. |
14322 | if test "${enable_gdbserver+set}" = set; then : | |
14323 | enableval=$enable_gdbserver; case "${enableval}" in | |
14324 | yes| no|auto) ;; | |
14325 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
14326 | esac | |
14327 | else | |
14328 | enable_gdbserver=auto | |
14329 | fi | |
14330 | ||
14331 | ||
14332 | # We only build gdbserver automatically in a native configuration, and | |
14333 | # only if the user did not explicitly disable its build. | |
14334 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
14335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
14336 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 14337 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
14338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
14339 | $as_echo "yes" >&6; } | |
14340 | subdirs="$subdirs gdbserver" | |
3ace7edb | 14341 | |
496c0e1b | 14342 | gdbserver_build_enabled=yes |
8dcde887 | 14343 | else |
81ecdfbb RW |
14344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
14345 | $as_echo "no" >&6; } | |
8dcde887 MK |
14346 | fi |
14347 | fi | |
14348 | ||
496c0e1b JB |
14349 | # If the user explicitly request the gdbserver to be built, verify that |
14350 | # we were in fact able to enable it. | |
14351 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
14352 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
14353 | fi | |
14354 | ||
393fd4c3 YQ |
14355 | # Check for babeltrace and babeltrace-ctf |
14356 | ||
14357 | # Check whether --with-babeltrace was given. | |
14358 | if test "${with_babeltrace+set}" = set; then : | |
14359 | withval=$with_babeltrace; | |
14360 | else | |
14361 | with_babeltrace=auto | |
14362 | fi | |
14363 | ||
14364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 | |
14365 | $as_echo_n "checking whether to use babeltrace... " >&6; } | |
14366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 | |
14367 | $as_echo "$with_babeltrace" >&6; } | |
14368 | ||
14369 | if test "x$with_babeltrace" = "xno"; then | |
14370 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 | |
14371 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} | |
14372 | else | |
14373 | # Append -Werror to CFLAGS so that configure can catch the warning | |
14374 | # "assignment from incompatible pointer type", which is related to | |
14375 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works | |
14376 | # in GDB, while babeltrace 1.0.3 is broken. | |
14377 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be | |
14378 | # safe to save and restore CFLAGS here. | |
14379 | saved_CFLAGS=$CFLAGS | |
14380 | CFLAGS="$CFLAGS -Werror" | |
14381 | ||
14382 | ||
14383 | ||
14384 | ||
14385 | ||
14386 | ||
14387 | ||
14388 | ||
14389 | use_additional=yes | |
14390 | ||
14391 | acl_save_prefix="$prefix" | |
14392 | prefix="$acl_final_prefix" | |
14393 | acl_save_exec_prefix="$exec_prefix" | |
14394 | exec_prefix="$acl_final_exec_prefix" | |
14395 | ||
14396 | eval additional_includedir=\"$includedir\" | |
14397 | eval additional_libdir=\"$libdir\" | |
14398 | ||
14399 | exec_prefix="$acl_save_exec_prefix" | |
14400 | prefix="$acl_save_prefix" | |
14401 | ||
14402 | ||
14403 | # Check whether --with-libbabeltrace-prefix was given. | |
14404 | if test "${with_libbabeltrace_prefix+set}" = set; then : | |
14405 | withval=$with_libbabeltrace_prefix; | |
14406 | if test "X$withval" = "Xno"; then | |
14407 | use_additional=no | |
14408 | else | |
14409 | if test "X$withval" = "X"; then | |
14410 | ||
14411 | acl_save_prefix="$prefix" | |
14412 | prefix="$acl_final_prefix" | |
14413 | acl_save_exec_prefix="$exec_prefix" | |
14414 | exec_prefix="$acl_final_exec_prefix" | |
14415 | ||
14416 | eval additional_includedir=\"$includedir\" | |
14417 | eval additional_libdir=\"$libdir\" | |
14418 | ||
14419 | exec_prefix="$acl_save_exec_prefix" | |
14420 | prefix="$acl_save_prefix" | |
14421 | ||
14422 | else | |
14423 | additional_includedir="$withval/include" | |
14424 | additional_libdir="$withval/lib" | |
14425 | fi | |
14426 | fi | |
14427 | ||
14428 | fi | |
14429 | ||
14430 | LIBBABELTRACE= | |
14431 | LTLIBBABELTRACE= | |
14432 | INCBABELTRACE= | |
14433 | rpathdirs= | |
14434 | ltrpathdirs= | |
14435 | names_already_handled= | |
14436 | names_next_round='babeltrace babeltrace-ctf' | |
14437 | while test -n "$names_next_round"; do | |
14438 | names_this_round="$names_next_round" | |
14439 | names_next_round= | |
14440 | for name in $names_this_round; do | |
14441 | already_handled= | |
14442 | for n in $names_already_handled; do | |
14443 | if test "$n" = "$name"; then | |
14444 | already_handled=yes | |
14445 | break | |
14446 | fi | |
14447 | done | |
14448 | if test -z "$already_handled"; then | |
14449 | names_already_handled="$names_already_handled $name" | |
14450 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
14451 | eval value=\"\$HAVE_LIB$uppername\" | |
14452 | if test -n "$value"; then | |
14453 | if test "$value" = yes; then | |
14454 | eval value=\"\$LIB$uppername\" | |
14455 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" | |
14456 | eval value=\"\$LTLIB$uppername\" | |
14457 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" | |
14458 | else | |
14459 | : | |
14460 | fi | |
14461 | else | |
14462 | found_dir= | |
14463 | found_la= | |
14464 | found_so= | |
14465 | found_a= | |
14466 | if test $use_additional = yes; then | |
14467 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
14468 | found_dir="$additional_libdir" | |
14469 | found_so="$additional_libdir/lib$name.$shlibext" | |
14470 | if test -f "$additional_libdir/lib$name.la"; then | |
14471 | found_la="$additional_libdir/lib$name.la" | |
14472 | fi | |
14473 | else | |
14474 | if test -f "$additional_libdir/lib$name.$libext"; then | |
14475 | found_dir="$additional_libdir" | |
14476 | found_a="$additional_libdir/lib$name.$libext" | |
14477 | if test -f "$additional_libdir/lib$name.la"; then | |
14478 | found_la="$additional_libdir/lib$name.la" | |
14479 | fi | |
14480 | fi | |
14481 | fi | |
14482 | fi | |
14483 | if test "X$found_dir" = "X"; then | |
14484 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
14485 | ||
14486 | acl_save_prefix="$prefix" | |
14487 | prefix="$acl_final_prefix" | |
14488 | acl_save_exec_prefix="$exec_prefix" | |
14489 | exec_prefix="$acl_final_exec_prefix" | |
14490 | eval x=\"$x\" | |
14491 | exec_prefix="$acl_save_exec_prefix" | |
14492 | prefix="$acl_save_prefix" | |
14493 | ||
14494 | case "$x" in | |
14495 | -L*) | |
14496 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
14497 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
14498 | found_dir="$dir" | |
14499 | found_so="$dir/lib$name.$shlibext" | |
14500 | if test -f "$dir/lib$name.la"; then | |
14501 | found_la="$dir/lib$name.la" | |
14502 | fi | |
14503 | else | |
14504 | if test -f "$dir/lib$name.$libext"; then | |
14505 | found_dir="$dir" | |
14506 | found_a="$dir/lib$name.$libext" | |
14507 | if test -f "$dir/lib$name.la"; then | |
14508 | found_la="$dir/lib$name.la" | |
14509 | fi | |
14510 | fi | |
14511 | fi | |
14512 | ;; | |
14513 | esac | |
14514 | if test "X$found_dir" != "X"; then | |
14515 | break | |
14516 | fi | |
14517 | done | |
14518 | fi | |
14519 | if test "X$found_dir" != "X"; then | |
14520 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" | |
14521 | if test "X$found_so" != "X"; then | |
14522 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
14523 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14524 | else | |
14525 | haveit= | |
14526 | for x in $ltrpathdirs; do | |
14527 | if test "X$x" = "X$found_dir"; then | |
14528 | haveit=yes | |
14529 | break | |
14530 | fi | |
14531 | done | |
14532 | if test -z "$haveit"; then | |
14533 | ltrpathdirs="$ltrpathdirs $found_dir" | |
14534 | fi | |
14535 | if test "$hardcode_direct" = yes; then | |
14536 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14537 | else | |
14538 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
14539 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14540 | haveit= | |
14541 | for x in $rpathdirs; do | |
14542 | if test "X$x" = "X$found_dir"; then | |
14543 | haveit=yes | |
14544 | break | |
14545 | fi | |
14546 | done | |
14547 | if test -z "$haveit"; then | |
14548 | rpathdirs="$rpathdirs $found_dir" | |
14549 | fi | |
14550 | else | |
14551 | haveit= | |
14552 | for x in $LDFLAGS $LIBBABELTRACE; do | |
14553 | ||
14554 | acl_save_prefix="$prefix" | |
14555 | prefix="$acl_final_prefix" | |
14556 | acl_save_exec_prefix="$exec_prefix" | |
14557 | exec_prefix="$acl_final_exec_prefix" | |
14558 | eval x=\"$x\" | |
14559 | exec_prefix="$acl_save_exec_prefix" | |
14560 | prefix="$acl_save_prefix" | |
14561 | ||
14562 | if test "X$x" = "X-L$found_dir"; then | |
14563 | haveit=yes | |
14564 | break | |
14565 | fi | |
14566 | done | |
14567 | if test -z "$haveit"; then | |
14568 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" | |
14569 | fi | |
14570 | if test "$hardcode_minus_L" != no; then | |
14571 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" | |
14572 | else | |
14573 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
14574 | fi | |
14575 | fi | |
14576 | fi | |
14577 | fi | |
14578 | else | |
14579 | if test "X$found_a" != "X"; then | |
14580 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" | |
14581 | else | |
14582 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" | |
14583 | fi | |
14584 | fi | |
14585 | additional_includedir= | |
14586 | case "$found_dir" in | |
14587 | */lib | */lib/) | |
14588 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
14589 | additional_includedir="$basedir/include" | |
14590 | ;; | |
14591 | esac | |
14592 | if test "X$additional_includedir" != "X"; then | |
14593 | if test "X$additional_includedir" != "X/usr/include"; then | |
14594 | haveit= | |
14595 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
14596 | if test -n "$GCC"; then | |
14597 | case $host_os in | |
14598 | linux*) haveit=yes;; | |
14599 | esac | |
14600 | fi | |
14601 | fi | |
14602 | if test -z "$haveit"; then | |
14603 | for x in $CPPFLAGS $INCBABELTRACE; do | |
14604 | ||
14605 | acl_save_prefix="$prefix" | |
14606 | prefix="$acl_final_prefix" | |
14607 | acl_save_exec_prefix="$exec_prefix" | |
14608 | exec_prefix="$acl_final_exec_prefix" | |
14609 | eval x=\"$x\" | |
14610 | exec_prefix="$acl_save_exec_prefix" | |
14611 | prefix="$acl_save_prefix" | |
14612 | ||
14613 | if test "X$x" = "X-I$additional_includedir"; then | |
14614 | haveit=yes | |
14615 | break | |
14616 | fi | |
14617 | done | |
14618 | if test -z "$haveit"; then | |
14619 | if test -d "$additional_includedir"; then | |
14620 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" | |
14621 | fi | |
14622 | fi | |
14623 | fi | |
14624 | fi | |
14625 | fi | |
14626 | if test -n "$found_la"; then | |
14627 | save_libdir="$libdir" | |
14628 | case "$found_la" in | |
14629 | */* | *\\*) . "$found_la" ;; | |
14630 | *) . "./$found_la" ;; | |
14631 | esac | |
14632 | libdir="$save_libdir" | |
14633 | for dep in $dependency_libs; do | |
14634 | case "$dep" in | |
14635 | -L*) | |
14636 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
14637 | if test "X$additional_libdir" != "X/usr/lib"; then | |
14638 | haveit= | |
14639 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
14640 | if test -n "$GCC"; then | |
14641 | case $host_os in | |
14642 | linux*) haveit=yes;; | |
14643 | esac | |
14644 | fi | |
14645 | fi | |
14646 | if test -z "$haveit"; then | |
14647 | haveit= | |
14648 | for x in $LDFLAGS $LIBBABELTRACE; do | |
14649 | ||
14650 | acl_save_prefix="$prefix" | |
14651 | prefix="$acl_final_prefix" | |
14652 | acl_save_exec_prefix="$exec_prefix" | |
14653 | exec_prefix="$acl_final_exec_prefix" | |
14654 | eval x=\"$x\" | |
14655 | exec_prefix="$acl_save_exec_prefix" | |
14656 | prefix="$acl_save_prefix" | |
14657 | ||
14658 | if test "X$x" = "X-L$additional_libdir"; then | |
14659 | haveit=yes | |
14660 | break | |
14661 | fi | |
14662 | done | |
14663 | if test -z "$haveit"; then | |
14664 | if test -d "$additional_libdir"; then | |
14665 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" | |
14666 | fi | |
14667 | fi | |
14668 | haveit= | |
14669 | for x in $LDFLAGS $LTLIBBABELTRACE; do | |
14670 | ||
14671 | acl_save_prefix="$prefix" | |
14672 | prefix="$acl_final_prefix" | |
14673 | acl_save_exec_prefix="$exec_prefix" | |
14674 | exec_prefix="$acl_final_exec_prefix" | |
14675 | eval x=\"$x\" | |
14676 | exec_prefix="$acl_save_exec_prefix" | |
14677 | prefix="$acl_save_prefix" | |
14678 | ||
14679 | if test "X$x" = "X-L$additional_libdir"; then | |
14680 | haveit=yes | |
14681 | break | |
14682 | fi | |
14683 | done | |
14684 | if test -z "$haveit"; then | |
14685 | if test -d "$additional_libdir"; then | |
14686 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" | |
14687 | fi | |
14688 | fi | |
14689 | fi | |
14690 | fi | |
14691 | ;; | |
14692 | -R*) | |
14693 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
14694 | if test "$enable_rpath" != no; then | |
14695 | haveit= | |
14696 | for x in $rpathdirs; do | |
14697 | if test "X$x" = "X$dir"; then | |
14698 | haveit=yes | |
14699 | break | |
14700 | fi | |
14701 | done | |
14702 | if test -z "$haveit"; then | |
14703 | rpathdirs="$rpathdirs $dir" | |
14704 | fi | |
14705 | haveit= | |
14706 | for x in $ltrpathdirs; do | |
14707 | if test "X$x" = "X$dir"; then | |
14708 | haveit=yes | |
14709 | break | |
14710 | fi | |
14711 | done | |
14712 | if test -z "$haveit"; then | |
14713 | ltrpathdirs="$ltrpathdirs $dir" | |
14714 | fi | |
14715 | fi | |
14716 | ;; | |
14717 | -l*) | |
14718 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
14719 | ;; | |
14720 | *.la) | |
14721 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
14722 | ;; | |
14723 | *) | |
14724 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" | |
14725 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" | |
14726 | ;; | |
14727 | esac | |
14728 | done | |
14729 | fi | |
14730 | else | |
14731 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" | |
14732 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" | |
14733 | fi | |
14734 | fi | |
14735 | fi | |
14736 | done | |
14737 | done | |
14738 | if test "X$rpathdirs" != "X"; then | |
14739 | if test -n "$hardcode_libdir_separator"; then | |
14740 | alldirs= | |
14741 | for found_dir in $rpathdirs; do | |
14742 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
14743 | done | |
14744 | acl_save_libdir="$libdir" | |
14745 | libdir="$alldirs" | |
14746 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14747 | libdir="$acl_save_libdir" | |
14748 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
14749 | else | |
14750 | for found_dir in $rpathdirs; do | |
14751 | acl_save_libdir="$libdir" | |
14752 | libdir="$found_dir" | |
14753 | eval flag=\"$hardcode_libdir_flag_spec\" | |
14754 | libdir="$acl_save_libdir" | |
14755 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" | |
14756 | done | |
14757 | fi | |
14758 | fi | |
14759 | if test "X$ltrpathdirs" != "X"; then | |
14760 | for found_dir in $ltrpathdirs; do | |
14761 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" | |
14762 | done | |
14763 | fi | |
14764 | ||
14765 | ||
14766 | ac_save_CPPFLAGS="$CPPFLAGS" | |
14767 | ||
14768 | for element in $INCBABELTRACE; do | |
14769 | haveit= | |
14770 | for x in $CPPFLAGS; do | |
14771 | ||
14772 | acl_save_prefix="$prefix" | |
14773 | prefix="$acl_final_prefix" | |
14774 | acl_save_exec_prefix="$exec_prefix" | |
14775 | exec_prefix="$acl_final_exec_prefix" | |
14776 | eval x=\"$x\" | |
14777 | exec_prefix="$acl_save_exec_prefix" | |
14778 | prefix="$acl_save_prefix" | |
14779 | ||
14780 | if test "X$x" = "X$element"; then | |
14781 | haveit=yes | |
14782 | break | |
14783 | fi | |
14784 | done | |
14785 | if test -z "$haveit"; then | |
14786 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
14787 | fi | |
14788 | done | |
14789 | ||
14790 | ||
14791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 | |
14792 | $as_echo_n "checking for libbabeltrace... " >&6; } | |
14793 | if test "${ac_cv_libbabeltrace+set}" = set; then : | |
14794 | $as_echo_n "(cached) " >&6 | |
14795 | else | |
14796 | ||
14797 | ac_save_LIBS="$LIBS" | |
14798 | LIBS="$LIBS $LIBBABELTRACE" | |
14799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
14800 | /* end confdefs.h. */ | |
14801 | #include <babeltrace/babeltrace.h> | |
14802 | #include <babeltrace/ctf/events.h> | |
14803 | #include <babeltrace/ctf/iterator.h> | |
14804 | int | |
14805 | main () | |
14806 | { | |
14807 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); | |
14808 | struct bt_ctf_event *event = NULL; | |
14809 | const struct bt_definition *scope; | |
14810 | ||
14811 | scope = bt_ctf_get_top_level_scope (event, | |
14812 | BT_STREAM_EVENT_HEADER); | |
14813 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); | |
14814 | ||
14815 | ; | |
14816 | return 0; | |
14817 | } | |
14818 | _ACEOF | |
14819 | if ac_fn_c_try_link "$LINENO"; then : | |
14820 | ac_cv_libbabeltrace=yes | |
14821 | else | |
14822 | ac_cv_libbabeltrace=no | |
14823 | fi | |
14824 | rm -f core conftest.err conftest.$ac_objext \ | |
14825 | conftest$ac_exeext conftest.$ac_ext | |
14826 | LIBS="$ac_save_LIBS" | |
14827 | ||
14828 | fi | |
14829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 | |
14830 | $as_echo "$ac_cv_libbabeltrace" >&6; } | |
14831 | if test "$ac_cv_libbabeltrace" = yes; then | |
14832 | HAVE_LIBBABELTRACE=yes | |
14833 | ||
14834 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h | |
14835 | ||
14836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 | |
14837 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } | |
14838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 | |
14839 | $as_echo "$LIBBABELTRACE" >&6; } | |
14840 | else | |
14841 | HAVE_LIBBABELTRACE=no | |
14842 | CPPFLAGS="$ac_save_CPPFLAGS" | |
14843 | LIBBABELTRACE= | |
14844 | LTLIBBABELTRACE= | |
14845 | fi | |
14846 | ||
14847 | ||
14848 | ||
14849 | ||
14850 | ||
14851 | ||
14852 | CFLAGS=$saved_CFLAGS | |
14853 | ||
14854 | if test "$HAVE_LIBBABELTRACE" != yes; then | |
14855 | if test "$with_babeltrace" = yes; then | |
14856 | as_fn_error "babeltrace is missing or unusable" "$LINENO" 5 | |
14857 | else | |
14858 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 | |
14859 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} | |
14860 | fi | |
14861 | fi | |
14862 | fi | |
14863 | ||
db985757 | 14864 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 14865 | # to an empty version. |
c906108c SS |
14866 | |
14867 | files= | |
14868 | links= | |
5a2402b8 | 14869 | |
c906108c SS |
14870 | rm -f nm.h |
14871 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
14872 | case "${nativefile}" in |
14873 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
14874 | * ) GDB_NM_FILE="${nativefile}" | |
14875 | esac | |
5a2402b8 AC |
14876 | files="${files} ${GDB_NM_FILE}" |
14877 | links="${links} nm.h" | |
60ca704f SE |
14878 | |
14879 | cat >>confdefs.h <<_ACEOF | |
b78960be | 14880 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 14881 | _ACEOF |
5a2402b8 | 14882 | |
c906108c | 14883 | fi |
5a2402b8 AC |
14884 | |
14885 | ||
bec39cab AC |
14886 | ac_sources="$files" |
14887 | ac_dests="$links" | |
14888 | while test -n "$ac_sources"; do | |
14889 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
14890 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
14891 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
14892 | done | |
81ecdfbb | 14893 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
14894 | |
14895 | ||
c906108c SS |
14896 | |
14897 | ||
c906108c | 14898 | |
81ecdfbb | 14899 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 14900 | |
bec39cab | 14901 | |
b292c783 JK |
14902 | # Undo the $ec_script escaping suitable for Makefile. |
14903 | transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` | |
14904 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$transform"` | |
14905 | if test "x$GDB_TRANSFORM_NAME" = x; then | |
14906 | GDB_TRANSFORM_NAME=gdb | |
14907 | fi | |
14908 | ||
14909 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$transform"` | |
14910 | if test "x$GCORE_TRANSFORM_NAME" = x; then | |
14911 | GCORE_TRANSFORM_NAME=gcore | |
14912 | fi | |
14913 | ||
14914 | ac_config_files="$ac_config_files gcore" | |
14915 | ||
14916 | ||
c971b7fa | 14917 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
14918 | |
14919 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 14920 | |
bec39cab AC |
14921 | cat >confcache <<\_ACEOF |
14922 | # This file is a shell script that caches the results of configure | |
14923 | # tests run on this system so they can be shared between configure | |
14924 | # scripts and configure runs, see configure's option --config-cache. | |
14925 | # It is not useful on other systems. If it contains results you don't | |
14926 | # want to keep, you may remove or edit it. | |
14927 | # | |
14928 | # config.status only pays attention to the cache file if you give it | |
14929 | # the --recheck option to rerun configure. | |
14930 | # | |
14931 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
14932 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
14933 | # following values. | |
14934 | ||
14935 | _ACEOF | |
14936 | ||
14937 | # The following way of writing the cache mishandles newlines in values, | |
14938 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 14939 | # So, we kill variables containing newlines. |
bec39cab AC |
14940 | # Ultrix sh set writes to stderr and can't be redirected directly, |
14941 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
14942 | ( |
14943 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
14944 | eval ac_val=\$$ac_var | |
14945 | case $ac_val in #( | |
14946 | *${as_nl}*) | |
14947 | case $ac_var in #( | |
14948 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
14949 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
14950 | esac | |
14951 | case $ac_var in #( | |
14952 | _ | IFS | as_nl) ;; #( | |
14953 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
14954 | *) { eval $ac_var=; unset $ac_var;} ;; | |
14955 | esac ;; | |
14956 | esac | |
14957 | done | |
14958 | ||
bec39cab | 14959 | (set) 2>&1 | |
81ecdfbb RW |
14960 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
14961 | *${as_nl}ac_space=\ *) | |
14962 | # `set' does not quote correctly, so add quotes: double-quote | |
14963 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
14964 | sed -n \ |
14965 | "s/'/'\\\\''/g; | |
14966 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 14967 | ;; #( |
bec39cab AC |
14968 | *) |
14969 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 14970 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 14971 | ;; |
81ecdfbb RW |
14972 | esac | |
14973 | sort | |
14974 | ) | | |
bec39cab | 14975 | sed ' |
81ecdfbb | 14976 | /^ac_cv_env_/b end |
bec39cab | 14977 | t clear |
81ecdfbb | 14978 | :clear |
bec39cab AC |
14979 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
14980 | t end | |
81ecdfbb RW |
14981 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
14982 | :end' >>confcache | |
14983 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
14984 | if test -w "$cache_file"; then | |
14985 | test "x$cache_file" != "x/dev/null" && | |
14986 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
14987 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
14988 | cat confcache >$cache_file |
14989 | else | |
81ecdfbb RW |
14990 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
14991 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
14992 | fi |
14993 | fi | |
14994 | rm -f confcache | |
14995 | ||
14996 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
14997 | # Let make expand exec_prefix. | |
14998 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
14999 | ||
bec39cab AC |
15000 | DEFS=-DHAVE_CONFIG_H |
15001 | ||
15002 | ac_libobjs= | |
15003 | ac_ltlibobjs= | |
15004 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
15005 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
15006 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
15007 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
15008 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
15009 | # will be set to the directory where LIBOBJS objects are built. | |
15010 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
15011 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
15012 | done |
15013 | LIBOBJS=$ac_libobjs | |
15014 | ||
15015 | LTLIBOBJS=$ac_ltlibobjs | |
15016 | ||
15017 | ||
85981d60 | 15018 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
15019 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
15020 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 15021 | fi |
a417dc56 | 15022 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
15023 | as_fn_error "conditional \"GMAKE\" was never defined. |
15024 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 15025 | fi |
81ecdfbb RW |
15026 | |
15027 | ||
bec39cab | 15028 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 15029 | ac_write_fail=0 |
bec39cab AC |
15030 | ac_clean_files_save=$ac_clean_files |
15031 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
15032 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
15033 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
15034 | as_write_fail=0 | |
15035 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
15036 | #! $SHELL |
15037 | # Generated by $as_me. | |
15038 | # Run this file to recreate the current configuration. | |
15039 | # Compiler output produced by configure, useful for debugging | |
15040 | # configure, is in config.log if it exists. | |
15041 | ||
15042 | debug=false | |
15043 | ac_cs_recheck=false | |
15044 | ac_cs_silent=false | |
bec39cab | 15045 | |
81ecdfbb RW |
15046 | SHELL=\${CONFIG_SHELL-$SHELL} |
15047 | export SHELL | |
15048 | _ASEOF | |
15049 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
15050 | ## -------------------- ## | |
15051 | ## M4sh Initialization. ## | |
15052 | ## -------------------- ## | |
15053 | ||
15054 | # Be more Bourne compatible | |
15055 | DUALCASE=1; export DUALCASE # for MKS sh | |
15056 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
15057 | emulate sh |
15058 | NULLCMD=: | |
81ecdfbb | 15059 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
15060 | # is contrary to our usage. Disable this feature. |
15061 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
15062 | setopt NO_GLOB_SUBST |
15063 | else | |
15064 | case `(set -o) 2>/dev/null` in #( | |
15065 | *posix*) : | |
15066 | set -o posix ;; #( | |
15067 | *) : | |
15068 | ;; | |
15069 | esac | |
bec39cab | 15070 | fi |
bec39cab | 15071 | |
81ecdfbb RW |
15072 | |
15073 | as_nl=' | |
15074 | ' | |
15075 | export as_nl | |
15076 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
15077 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
15078 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
15079 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
15080 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
15081 | # but without wasting forks for bash or zsh. | |
15082 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
15083 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15084 | as_echo='print -r --' | |
15085 | as_echo_n='print -rn --' | |
15086 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
15087 | as_echo='printf %s\n' | |
15088 | as_echo_n='printf %s' | |
15089 | else | |
15090 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
15091 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
15092 | as_echo_n='/usr/ucb/echo -n' | |
15093 | else | |
15094 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
15095 | as_echo_n_body='eval | |
15096 | arg=$1; | |
15097 | case $arg in #( | |
15098 | *"$as_nl"*) | |
15099 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
15100 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
15101 | esac; | |
15102 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
15103 | ' | |
15104 | export as_echo_n_body | |
15105 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
15106 | fi | |
15107 | export as_echo_body | |
15108 | as_echo='sh -c $as_echo_body as_echo' | |
15109 | fi | |
15110 | ||
15111 | # The user is always right. | |
15112 | if test "${PATH_SEPARATOR+set}" != set; then | |
15113 | PATH_SEPARATOR=: | |
15114 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
15115 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
15116 | PATH_SEPARATOR=';' | |
15117 | } | |
bec39cab AC |
15118 | fi |
15119 | ||
15120 | ||
81ecdfbb RW |
15121 | # IFS |
15122 | # We need space, tab and new line, in precisely that order. Quoting is | |
15123 | # there to prevent editors from complaining about space-tab. | |
15124 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
15125 | # splitting by setting IFS to empty value.) | |
15126 | IFS=" "" $as_nl" | |
15127 | ||
15128 | # Find who we are. Look in the path if we contain no directory separator. | |
15129 | case $0 in #(( | |
15130 | *[\\/]* ) as_myself=$0 ;; | |
15131 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
15132 | for as_dir in $PATH | |
15133 | do | |
15134 | IFS=$as_save_IFS | |
15135 | test -z "$as_dir" && as_dir=. | |
15136 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
15137 | done | |
15138 | IFS=$as_save_IFS | |
15139 | ||
15140 | ;; | |
15141 | esac | |
15142 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
15143 | # in which case we are not to be found in the path. | |
15144 | if test "x$as_myself" = x; then | |
15145 | as_myself=$0 | |
15146 | fi | |
15147 | if test ! -f "$as_myself"; then | |
15148 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
15149 | exit 1 | |
15150 | fi | |
15151 | ||
15152 | # Unset variables that we do not need and which cause bugs (e.g. in | |
15153 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
15154 | # suppresses any "Segmentation fault" message there. '((' could | |
15155 | # trigger a bug in pdksh 5.2.14. | |
15156 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
15157 | do eval test x\${$as_var+set} = xset \ | |
15158 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
15159 | done | |
bec39cab AC |
15160 | PS1='$ ' |
15161 | PS2='> ' | |
15162 | PS4='+ ' | |
15163 | ||
15164 | # NLS nuisances. | |
81ecdfbb RW |
15165 | LC_ALL=C |
15166 | export LC_ALL | |
15167 | LANGUAGE=C | |
15168 | export LANGUAGE | |
15169 | ||
15170 | # CDPATH. | |
15171 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
15172 | ||
15173 | ||
15174 | # as_fn_error ERROR [LINENO LOG_FD] | |
15175 | # --------------------------------- | |
15176 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
15177 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
15178 | # script with status $?, using 1 if that was 0. | |
15179 | as_fn_error () | |
15180 | { | |
15181 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
15182 | if test "$3"; then | |
15183 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
15184 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
15185 | fi | |
15186 | $as_echo "$as_me: error: $1" >&2 | |
15187 | as_fn_exit $as_status | |
15188 | } # as_fn_error | |
15189 | ||
15190 | ||
15191 | # as_fn_set_status STATUS | |
15192 | # ----------------------- | |
15193 | # Set $? to STATUS, without forking. | |
15194 | as_fn_set_status () | |
15195 | { | |
15196 | return $1 | |
15197 | } # as_fn_set_status | |
15198 | ||
15199 | # as_fn_exit STATUS | |
15200 | # ----------------- | |
15201 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
15202 | as_fn_exit () | |
15203 | { | |
15204 | set +e | |
15205 | as_fn_set_status $1 | |
15206 | exit $1 | |
15207 | } # as_fn_exit | |
15208 | ||
15209 | # as_fn_unset VAR | |
15210 | # --------------- | |
15211 | # Portably unset VAR. | |
15212 | as_fn_unset () | |
15213 | { | |
15214 | { eval $1=; unset $1;} | |
15215 | } | |
15216 | as_unset=as_fn_unset | |
15217 | # as_fn_append VAR VALUE | |
15218 | # ---------------------- | |
15219 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
15220 | # advantage of any shell optimizations that allow amortized linear growth over | |
15221 | # repeated appends, instead of the typical quadratic growth present in naive | |
15222 | # implementations. | |
15223 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
15224 | eval 'as_fn_append () | |
15225 | { | |
15226 | eval $1+=\$2 | |
15227 | }' | |
15228 | else | |
15229 | as_fn_append () | |
15230 | { | |
15231 | eval $1=\$$1\$2 | |
15232 | } | |
15233 | fi # as_fn_append | |
15234 | ||
15235 | # as_fn_arith ARG... | |
15236 | # ------------------ | |
15237 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
15238 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
15239 | # must be portable across $(()) and expr. | |
15240 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
15241 | eval 'as_fn_arith () | |
15242 | { | |
15243 | as_val=$(( $* )) | |
15244 | }' | |
15245 | else | |
15246 | as_fn_arith () | |
15247 | { | |
15248 | as_val=`expr "$@" || test $? -eq 1` | |
15249 | } | |
15250 | fi # as_fn_arith | |
bec39cab | 15251 | |
81ecdfbb RW |
15252 | |
15253 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
15254 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
15255 | as_expr=expr |
15256 | else | |
15257 | as_expr=false | |
15258 | fi | |
15259 | ||
81ecdfbb | 15260 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
15261 | as_basename=basename |
15262 | else | |
15263 | as_basename=false | |
15264 | fi | |
15265 | ||
81ecdfbb RW |
15266 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
15267 | as_dirname=dirname | |
15268 | else | |
15269 | as_dirname=false | |
15270 | fi | |
bec39cab | 15271 | |
81ecdfbb | 15272 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
15273 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
15274 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
15275 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
15276 | $as_echo X/"$0" | | |
15277 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
15278 | s//\1/ | |
15279 | q | |
15280 | } | |
15281 | /^X\/\(\/\/\)$/{ | |
15282 | s//\1/ | |
15283 | q | |
15284 | } | |
15285 | /^X\/\(\/\).*/{ | |
15286 | s//\1/ | |
15287 | q | |
15288 | } | |
15289 | s/.*/./; q'` | |
b4e70030 | 15290 | |
b4e70030 JB |
15291 | # Avoid depending upon Character Ranges. |
15292 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
15293 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
15294 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
15295 | as_cr_digits='0123456789' | |
15296 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
15297 | ||
81ecdfbb RW |
15298 | ECHO_C= ECHO_N= ECHO_T= |
15299 | case `echo -n x` in #((((( | |
15300 | -n*) | |
15301 | case `echo 'xy\c'` in | |
15302 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
15303 | xy) ECHO_C='\c';; | |
15304 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
15305 | ECHO_T=' ';; | |
15306 | esac;; | |
15307 | *) | |
15308 | ECHO_N='-n';; | |
bec39cab AC |
15309 | esac |
15310 | ||
81ecdfbb RW |
15311 | rm -f conf$$ conf$$.exe conf$$.file |
15312 | if test -d conf$$.dir; then | |
15313 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 15314 | else |
81ecdfbb RW |
15315 | rm -f conf$$.dir |
15316 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 15317 | fi |
81ecdfbb RW |
15318 | if (echo >conf$$.file) 2>/dev/null; then |
15319 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 15320 | as_ln_s='ln -s' |
81ecdfbb RW |
15321 | # ... but there are two gotchas: |
15322 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
15323 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
15324 | # In both cases, we have to default to `cp -p'. | |
15325 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
15326 | as_ln_s='cp -p' | |
15327 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
15328 | as_ln_s=ln | |
15329 | else | |
15330 | as_ln_s='cp -p' | |
b4e70030 | 15331 | fi |
bec39cab AC |
15332 | else |
15333 | as_ln_s='cp -p' | |
15334 | fi | |
81ecdfbb RW |
15335 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
15336 | rmdir conf$$.dir 2>/dev/null | |
15337 | ||
15338 | ||
15339 | # as_fn_mkdir_p | |
15340 | # ------------- | |
15341 | # Create "$as_dir" as a directory, including parents if necessary. | |
15342 | as_fn_mkdir_p () | |
15343 | { | |
15344 | ||
15345 | case $as_dir in #( | |
15346 | -*) as_dir=./$as_dir;; | |
15347 | esac | |
15348 | test -d "$as_dir" || eval $as_mkdir_p || { | |
15349 | as_dirs= | |
15350 | while :; do | |
15351 | case $as_dir in #( | |
15352 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
15353 | *) as_qdir=$as_dir;; | |
15354 | esac | |
15355 | as_dirs="'$as_qdir' $as_dirs" | |
15356 | as_dir=`$as_dirname -- "$as_dir" || | |
15357 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
15358 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
15359 | X"$as_dir" : 'X\(//\)$' \| \ | |
15360 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
15361 | $as_echo X"$as_dir" | | |
15362 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
15363 | s//\1/ | |
15364 | q | |
15365 | } | |
15366 | /^X\(\/\/\)[^/].*/{ | |
15367 | s//\1/ | |
15368 | q | |
15369 | } | |
15370 | /^X\(\/\/\)$/{ | |
15371 | s//\1/ | |
15372 | q | |
15373 | } | |
15374 | /^X\(\/\).*/{ | |
15375 | s//\1/ | |
15376 | q | |
15377 | } | |
15378 | s/.*/./; q'` | |
15379 | test -d "$as_dir" && break | |
15380 | done | |
15381 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
15382 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
15383 | ||
bec39cab | 15384 | |
81ecdfbb | 15385 | } # as_fn_mkdir_p |
bec39cab | 15386 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 15387 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
15388 | else |
15389 | test -d ./-p && rmdir ./-p | |
15390 | as_mkdir_p=false | |
15391 | fi | |
15392 | ||
81ecdfbb RW |
15393 | if test -x / >/dev/null 2>&1; then |
15394 | as_test_x='test -x' | |
15395 | else | |
15396 | if ls -dL / >/dev/null 2>&1; then | |
15397 | as_ls_L_option=L | |
15398 | else | |
15399 | as_ls_L_option= | |
15400 | fi | |
15401 | as_test_x=' | |
15402 | eval sh -c '\'' | |
15403 | if test -d "$1"; then | |
15404 | test -d "$1/."; | |
15405 | else | |
15406 | case $1 in #( | |
15407 | -*)set "./$1";; | |
15408 | esac; | |
15409 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
15410 | ???[sx]*):;;*)false;;esac;fi | |
15411 | '\'' sh | |
15412 | ' | |
15413 | fi | |
15414 | as_executable_p=$as_test_x | |
bec39cab AC |
15415 | |
15416 | # Sed expression to map a string onto a valid CPP name. | |
15417 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
15418 | ||
15419 | # Sed expression to map a string onto a valid variable name. | |
15420 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
15421 | ||
15422 | ||
bec39cab | 15423 | exec 6>&1 |
81ecdfbb RW |
15424 | ## ----------------------------------- ## |
15425 | ## Main body of $CONFIG_STATUS script. ## | |
15426 | ## ----------------------------------- ## | |
15427 | _ASEOF | |
15428 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
15429 | ||
15430 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15431 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 15432 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
15433 | # values after options handling. |
15434 | ac_log=" | |
bec39cab | 15435 | This file was extended by $as_me, which was |
81ecdfbb | 15436 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
15437 | |
15438 | CONFIG_FILES = $CONFIG_FILES | |
15439 | CONFIG_HEADERS = $CONFIG_HEADERS | |
15440 | CONFIG_LINKS = $CONFIG_LINKS | |
15441 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
15442 | $ $0 $@ | |
15443 | ||
81ecdfbb RW |
15444 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
15445 | " | |
15446 | ||
bec39cab AC |
15447 | _ACEOF |
15448 | ||
81ecdfbb RW |
15449 | case $ac_config_files in *" |
15450 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
15451 | esac | |
234b45d4 | 15452 | |
81ecdfbb RW |
15453 | case $ac_config_headers in *" |
15454 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
15455 | esac | |
b4e70030 | 15456 | |
b4e70030 | 15457 | |
81ecdfbb RW |
15458 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
15459 | # Files that config.status was made for. | |
15460 | config_files="$ac_config_files" | |
15461 | config_headers="$ac_config_headers" | |
15462 | config_links="$ac_config_links" | |
15463 | config_commands="$ac_config_commands" | |
234b45d4 | 15464 | |
81ecdfbb | 15465 | _ACEOF |
b4e70030 | 15466 | |
81ecdfbb | 15467 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 15468 | ac_cs_usage="\ |
81ecdfbb RW |
15469 | \`$as_me' instantiates files and other configuration actions |
15470 | from templates according to the current configuration. Unless the files | |
15471 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 15472 | |
81ecdfbb | 15473 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 15474 | |
bec39cab | 15475 | -h, --help print this help, then exit |
81ecdfbb RW |
15476 | -V, --version print version number and configuration settings, then exit |
15477 | -q, --quiet, --silent | |
15478 | do not print progress messages | |
bec39cab AC |
15479 | -d, --debug don't remove temporary files |
15480 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
15481 | --file=FILE[:TEMPLATE] |
15482 | instantiate the configuration file FILE | |
15483 | --header=FILE[:TEMPLATE] | |
15484 | instantiate the configuration header FILE | |
234b45d4 | 15485 | |
bec39cab AC |
15486 | Configuration files: |
15487 | $config_files | |
234b45d4 | 15488 | |
bec39cab AC |
15489 | Configuration headers: |
15490 | $config_headers | |
234b45d4 | 15491 | |
bec39cab AC |
15492 | Configuration links: |
15493 | $config_links | |
234b45d4 | 15494 | |
bec39cab AC |
15495 | Configuration commands: |
15496 | $config_commands | |
15497 | ||
81ecdfbb | 15498 | Report bugs to the package provider." |
b4e70030 | 15499 | |
81ecdfbb RW |
15500 | _ACEOF |
15501 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
15502 | ac_cs_version="\\ |
15503 | config.status | |
81ecdfbb RW |
15504 | configured by $0, generated by GNU Autoconf 2.64, |
15505 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 15506 | |
81ecdfbb | 15507 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
15508 | This config.status script is free software; the Free Software Foundation |
15509 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
15510 | |
15511 | ac_pwd='$ac_pwd' | |
15512 | srcdir='$srcdir' | |
15513 | INSTALL='$INSTALL' | |
81ecdfbb RW |
15514 | AWK='$AWK' |
15515 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
15516 | _ACEOF |
15517 | ||
81ecdfbb RW |
15518 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15519 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
15520 | ac_need_defaults=: |
15521 | while test $# != 0 | |
15522 | do | |
15523 | case $1 in | |
15524 | --*=*) | |
81ecdfbb RW |
15525 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
15526 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 15527 | ac_shift=: |
c906108c | 15528 | ;; |
81ecdfbb | 15529 | *) |
bec39cab AC |
15530 | ac_option=$1 |
15531 | ac_optarg=$2 | |
15532 | ac_shift=shift | |
c906108c | 15533 | ;; |
bec39cab | 15534 | esac |
c906108c | 15535 | |
bec39cab AC |
15536 | case $ac_option in |
15537 | # Handling of the options. | |
bec39cab AC |
15538 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
15539 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
15540 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
15541 | $as_echo "$ac_cs_version"; exit ;; | |
15542 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
15543 | debug=: ;; |
15544 | --file | --fil | --fi | --f ) | |
15545 | $ac_shift | |
81ecdfbb RW |
15546 | case $ac_optarg in |
15547 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
15548 | esac | |
15549 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
15550 | ac_need_defaults=false;; |
15551 | --header | --heade | --head | --hea ) | |
15552 | $ac_shift | |
81ecdfbb RW |
15553 | case $ac_optarg in |
15554 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
15555 | esac | |
15556 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 15557 | ac_need_defaults=false;; |
81ecdfbb RW |
15558 | --he | --h) |
15559 | # Conflict between --help and --header | |
15560 | as_fn_error "ambiguous option: \`$1' | |
15561 | Try \`$0 --help' for more information.";; | |
15562 | --help | --hel | -h ) | |
15563 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
15564 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
15565 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
15566 | ac_cs_silent=: ;; | |
c906108c | 15567 | |
bec39cab | 15568 | # This is an error. |
81ecdfbb RW |
15569 | -*) as_fn_error "unrecognized option: \`$1' |
15570 | Try \`$0 --help' for more information." ;; | |
c906108c | 15571 | |
81ecdfbb RW |
15572 | *) as_fn_append ac_config_targets " $1" |
15573 | ac_need_defaults=false ;; | |
c906108c | 15574 | |
bec39cab AC |
15575 | esac |
15576 | shift | |
15577 | done | |
c906108c | 15578 | |
bec39cab | 15579 | ac_configure_extra_args= |
c906108c | 15580 | |
bec39cab AC |
15581 | if $ac_cs_silent; then |
15582 | exec 6>/dev/null | |
15583 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
15584 | fi | |
c906108c | 15585 | |
bec39cab | 15586 | _ACEOF |
81ecdfbb | 15587 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 15588 | if \$ac_cs_recheck; then |
81ecdfbb RW |
15589 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
15590 | shift | |
15591 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
15592 | CONFIG_SHELL='$SHELL' | |
15593 | export CONFIG_SHELL | |
15594 | exec "\$@" | |
bec39cab AC |
15595 | fi |
15596 | ||
15597 | _ACEOF | |
81ecdfbb RW |
15598 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15599 | exec 5>>config.log | |
15600 | { | |
15601 | echo | |
15602 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
15603 | ## Running $as_me. ## | |
15604 | _ASBOX | |
15605 | $as_echo "$ac_log" | |
15606 | } >&5 | |
bec39cab | 15607 | |
81ecdfbb RW |
15608 | _ACEOF |
15609 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 15610 | # |
81ecdfbb | 15611 | # INIT-COMMANDS |
c906108c | 15612 | # |
a417dc56 | 15613 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 15614 | |
bec39cab AC |
15615 | _ACEOF |
15616 | ||
81ecdfbb | 15617 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 15618 | |
81ecdfbb | 15619 | # Handling of arguments. |
bec39cab | 15620 | for ac_config_target in $ac_config_targets |
c906108c | 15621 | do |
81ecdfbb RW |
15622 | case $ac_config_target in |
15623 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
15624 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 15625 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb | 15626 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
b292c783 | 15627 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
81ecdfbb | 15628 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
e2207b9a | 15629 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 15630 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 15631 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
15632 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
15633 | ||
15634 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
15635 | esac |
15636 | done | |
15637 | ||
81ecdfbb | 15638 | |
bec39cab AC |
15639 | # If the user did not use the arguments to specify the items to instantiate, |
15640 | # then the envvar interface is used. Set only those that are not. | |
15641 | # We use the long form for the default assignment because of an extremely | |
15642 | # bizarre bug on SunOS 4.1.3. | |
15643 | if $ac_need_defaults; then | |
15644 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
15645 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
15646 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
15647 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
15648 | fi | |
15649 | ||
b4e70030 | 15650 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 15651 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 15652 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
15653 | # Hook for its removal unless debugging. |
15654 | # Note that there is a small window in which the directory will not be cleaned: | |
15655 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
15656 | $debug || |
15657 | { | |
81ecdfbb RW |
15658 | tmp= |
15659 | trap 'exit_status=$? | |
15660 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
15661 | ' 0 | |
15662 | trap 'as_fn_exit 1' 1 2 13 15 | |
15663 | } | |
15664 | # Create a (secure) tmp directory for tmp files. | |
15665 | ||
15666 | { | |
15667 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
15668 | test -n "$tmp" && test -d "$tmp" | |
15669 | } || | |
15670 | { | |
15671 | tmp=./conf$$-$RANDOM | |
15672 | (umask 077 && mkdir "$tmp") | |
15673 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
15674 | ||
15675 | # Set up the scripts for CONFIG_FILES section. | |
15676 | # No need to generate them if there are no CONFIG_FILES. | |
15677 | # This happens for instance with `./config.status config.h'. | |
15678 | if test -n "$CONFIG_FILES"; then | |
15679 | ||
15680 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
15681 | ac_cs_awk_getline=: | |
15682 | ac_cs_awk_pipe_init= | |
15683 | ac_cs_awk_read_file=' | |
15684 | while ((getline aline < (F[key])) > 0) | |
15685 | print(aline) | |
15686 | close(F[key])' | |
15687 | ac_cs_awk_pipe_fini= | |
15688 | else | |
15689 | ac_cs_awk_getline=false | |
15690 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
15691 | ac_cs_awk_read_file=' | |
15692 | print "|#_!!_#|" | |
15693 | print "cat " F[key] " &&" | |
15694 | '$ac_cs_awk_pipe_init | |
15695 | # The final `:' finishes the AND list. | |
15696 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
15697 | fi | |
15698 | ac_cr=`echo X | tr X '\015'` | |
15699 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
15700 | # But we know of no other shell where ac_cr would be empty at this | |
15701 | # point, so we can use a bashism as a fallback. | |
15702 | if test "x$ac_cr" = x; then | |
15703 | eval ac_cr=\$\'\\r\' | |
15704 | fi | |
15705 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
15706 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
15707 | ac_cs_awk_cr='\r' | |
15708 | else | |
15709 | ac_cs_awk_cr=$ac_cr | |
15710 | fi | |
15711 | ||
15712 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
15713 | _ACEOF | |
15714 | ||
15715 | # Create commands to substitute file output variables. | |
15716 | { | |
15717 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
15718 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
15719 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
15720 | echo "_ACAWK" && | |
15721 | echo "_ACEOF" | |
15722 | } >conf$$files.sh && | |
15723 | . ./conf$$files.sh || | |
15724 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15725 | rm -f conf$$files.sh | |
15726 | ||
15727 | { | |
15728 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
15729 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
15730 | echo "_ACEOF" | |
15731 | } >conf$$subs.sh || | |
15732 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15733 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
15734 | ac_delim='%!_!# ' | |
15735 | for ac_last_try in false false false false false :; do | |
15736 | . ./conf$$subs.sh || | |
15737 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15738 | ||
15739 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
15740 | if test $ac_delim_n = $ac_delim_num; then | |
15741 | break | |
15742 | elif $ac_last_try; then | |
15743 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
15744 | else | |
15745 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15746 | fi | |
15747 | done | |
15748 | rm -f conf$$subs.sh | |
15749 | ||
15750 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15751 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
15752 | _ACEOF | |
15753 | sed -n ' | |
15754 | h | |
15755 | s/^/S["/; s/!.*/"]=/ | |
15756 | p | |
15757 | g | |
15758 | s/^[^!]*!// | |
15759 | :repl | |
15760 | t repl | |
15761 | s/'"$ac_delim"'$// | |
15762 | t delim | |
15763 | :nl | |
15764 | h | |
15765 | s/\(.\{148\}\).*/\1/ | |
15766 | t more1 | |
15767 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
15768 | p | |
15769 | n | |
15770 | b repl | |
15771 | :more1 | |
15772 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15773 | p | |
15774 | g | |
15775 | s/.\{148\}// | |
15776 | t nl | |
15777 | :delim | |
15778 | h | |
15779 | s/\(.\{148\}\).*/\1/ | |
15780 | t more2 | |
15781 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
15782 | p | |
15783 | b | |
15784 | :more2 | |
15785 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
15786 | p | |
15787 | g | |
15788 | s/.\{148\}// | |
15789 | t delim | |
15790 | ' <conf$$subs.awk | sed ' | |
15791 | /^[^""]/{ | |
15792 | N | |
15793 | s/\n// | |
15794 | } | |
15795 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
15796 | rm -f conf$$subs.awk | |
15797 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15798 | _ACAWK | |
15799 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
15800 | for (key in S) S_is_set[key] = 1 | |
15801 | FS = "\a" | |
15802 | \$ac_cs_awk_pipe_init | |
15803 | } | |
15804 | { | |
15805 | line = $ 0 | |
15806 | nfields = split(line, field, "@") | |
15807 | substed = 0 | |
15808 | len = length(field[1]) | |
15809 | for (i = 2; i < nfields; i++) { | |
15810 | key = field[i] | |
15811 | keylen = length(key) | |
15812 | if (S_is_set[key]) { | |
15813 | value = S[key] | |
15814 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
15815 | len += length(value) + length(field[++i]) | |
15816 | substed = 1 | |
15817 | } else | |
15818 | len += 1 + keylen | |
15819 | } | |
15820 | if (nfields == 3 && !substed) { | |
15821 | key = field[2] | |
15822 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
15823 | \$ac_cs_awk_read_file | |
15824 | next | |
15825 | } | |
15826 | } | |
15827 | print line | |
b4e70030 | 15828 | } |
81ecdfbb RW |
15829 | \$ac_cs_awk_pipe_fini |
15830 | _ACAWK | |
15831 | _ACEOF | |
15832 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15833 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
15834 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
15835 | else | |
15836 | cat | |
15837 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
15838 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
15839 | _ACEOF | |
15840 | ||
15841 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
15842 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
15843 | # trailing colons and then remove the whole line if VPATH becomes empty | |
15844 | # (actually we leave an empty line to preserve line numbers). | |
15845 | if test "x$srcdir" = x.; then | |
15846 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
15847 | s/:*\$(srcdir):*/:/ | |
15848 | s/:*\${srcdir}:*/:/ | |
15849 | s/:*@srcdir@:*/:/ | |
15850 | s/^\([^=]*=[ ]*\):*/\1/ | |
15851 | s/:*$// | |
15852 | s/^[^=]*=[ ]*$// | |
15853 | }' | |
15854 | fi | |
15855 | ||
15856 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
15857 | fi # test -n "$CONFIG_FILES" | |
15858 | ||
15859 | # Set up the scripts for CONFIG_HEADERS section. | |
15860 | # No need to generate them if there are no CONFIG_HEADERS. | |
15861 | # This happens for instance with `./config.status Makefile'. | |
15862 | if test -n "$CONFIG_HEADERS"; then | |
15863 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
15864 | BEGIN { | |
15865 | _ACEOF | |
15866 | ||
15867 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
15868 | # here-document in config.status, that substitutes the proper values into | |
15869 | # config.h.in to produce config.h. | |
4e8d927d | 15870 | |
81ecdfbb RW |
15871 | # Create a delimiter string that does not exist in confdefs.h, to ease |
15872 | # handling of long lines. | |
15873 | ac_delim='%!_!# ' | |
15874 | for ac_last_try in false false :; do | |
15875 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
15876 | if test -z "$ac_t"; then | |
15877 | break | |
15878 | elif $ac_last_try; then | |
15879 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
15880 | else | |
15881 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
15882 | fi | |
15883 | done | |
4e8d927d | 15884 | |
81ecdfbb RW |
15885 | # For the awk script, D is an array of macro values keyed by name, |
15886 | # likewise P contains macro parameters if any. Preserve backslash | |
15887 | # newline sequences. | |
15888 | ||
15889 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
15890 | sed -n ' | |
15891 | s/.\{148\}/&'"$ac_delim"'/g | |
15892 | t rset | |
15893 | :rset | |
15894 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
15895 | t def | |
15896 | d | |
15897 | :def | |
15898 | s/\\$// | |
15899 | t bsnl | |
15900 | s/["\\]/\\&/g | |
15901 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15902 | D["\1"]=" \3"/p | |
15903 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
15904 | d | |
15905 | :bsnl | |
15906 | s/["\\]/\\&/g | |
15907 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
15908 | D["\1"]=" \3\\\\\\n"\\/p | |
15909 | t cont | |
15910 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
15911 | t cont | |
15912 | d | |
15913 | :cont | |
15914 | n | |
15915 | s/.\{148\}/&'"$ac_delim"'/g | |
15916 | t clear | |
15917 | :clear | |
15918 | s/\\$// | |
15919 | t bsnlc | |
15920 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
15921 | d | |
15922 | :bsnlc | |
15923 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
15924 | b cont | |
15925 | ' <confdefs.h | sed ' | |
15926 | s/'"$ac_delim"'/"\\\ | |
15927 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
15928 | ||
15929 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
15930 | for (key in D) D_is_set[key] = 1 | |
15931 | FS = "\a" | |
15932 | } | |
15933 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
15934 | line = \$ 0 | |
15935 | split(line, arg, " ") | |
15936 | if (arg[1] == "#") { | |
15937 | defundef = arg[2] | |
15938 | mac1 = arg[3] | |
15939 | } else { | |
15940 | defundef = substr(arg[1], 2) | |
15941 | mac1 = arg[2] | |
15942 | } | |
15943 | split(mac1, mac2, "(") #) | |
15944 | macro = mac2[1] | |
15945 | prefix = substr(line, 1, index(line, defundef) - 1) | |
15946 | if (D_is_set[macro]) { | |
15947 | # Preserve the white space surrounding the "#". | |
15948 | print prefix "define", macro P[macro] D[macro] | |
15949 | next | |
15950 | } else { | |
15951 | # Replace #undef with comments. This is necessary, for example, | |
15952 | # in the case of _POSIX_SOURCE, which is predefined and required | |
15953 | # on some systems where configure will not decide to define it. | |
15954 | if (defundef == "undef") { | |
15955 | print "/*", prefix defundef, macro, "*/" | |
15956 | next | |
15957 | } | |
15958 | } | |
b4e70030 | 15959 | } |
81ecdfbb RW |
15960 | { print } |
15961 | _ACAWK | |
b4e70030 | 15962 | _ACEOF |
81ecdfbb RW |
15963 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
15964 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
15965 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 15966 | |
4e8d927d | 15967 | |
81ecdfbb RW |
15968 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
15969 | shift | |
15970 | for ac_tag | |
15971 | do | |
15972 | case $ac_tag in | |
15973 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
15974 | esac | |
15975 | case $ac_mode$ac_tag in | |
15976 | :[FHL]*:*);; | |
15977 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
15978 | :[FH]-) ac_tag=-:-;; | |
15979 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
15980 | esac | |
15981 | ac_save_IFS=$IFS | |
15982 | IFS=: | |
15983 | set x $ac_tag | |
15984 | IFS=$ac_save_IFS | |
15985 | shift | |
15986 | ac_file=$1 | |
15987 | shift | |
4e8d927d | 15988 | |
81ecdfbb RW |
15989 | case $ac_mode in |
15990 | :L) ac_source=$1;; | |
15991 | :[FH]) | |
15992 | ac_file_inputs= | |
15993 | for ac_f | |
15994 | do | |
15995 | case $ac_f in | |
15996 | -) ac_f="$tmp/stdin";; | |
15997 | *) # Look for the file first in the build tree, then in the source tree | |
15998 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
15999 | # because $ac_f cannot contain `:'. | |
16000 | test -f "$ac_f" || | |
16001 | case $ac_f in | |
16002 | [\\/$]*) false;; | |
16003 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
16004 | esac || | |
16005 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
16006 | esac | |
16007 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
16008 | as_fn_append ac_file_inputs " '$ac_f'" | |
16009 | done | |
16010 | ||
16011 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
16012 | # use $as_me), people would be surprised to read: | |
16013 | # /* config.h. Generated by config.status. */ | |
16014 | configure_input='Generated from '` | |
16015 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
16016 | `' by configure.' | |
16017 | if test x"$ac_file" != x-; then | |
16018 | configure_input="$ac_file. $configure_input" | |
16019 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
16020 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 16021 | fi |
81ecdfbb RW |
16022 | # Neutralize special characters interpreted by sed in replacement strings. |
16023 | case $configure_input in #( | |
16024 | *\&* | *\|* | *\\* ) | |
16025 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
16026 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
16027 | *) ac_sed_conf_input=$configure_input;; | |
16028 | esac | |
4e8d927d | 16029 | |
81ecdfbb RW |
16030 | case $ac_tag in |
16031 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
16032 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
16033 | esac | |
16034 | ;; | |
c906108c SS |
16035 | esac |
16036 | ||
81ecdfbb | 16037 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
16038 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
16039 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
16040 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
16041 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
16042 | $as_echo X"$ac_file" | | |
16043 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
16044 | s//\1/ | |
16045 | q | |
16046 | } | |
16047 | /^X\(\/\/\)[^/].*/{ | |
16048 | s//\1/ | |
16049 | q | |
16050 | } | |
16051 | /^X\(\/\/\)$/{ | |
16052 | s//\1/ | |
16053 | q | |
16054 | } | |
16055 | /^X\(\/\).*/{ | |
16056 | s//\1/ | |
16057 | q | |
16058 | } | |
16059 | s/.*/./; q'` | |
16060 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16061 | ac_builddir=. |
16062 | ||
81ecdfbb RW |
16063 | case "$ac_dir" in |
16064 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16065 | *) | |
16066 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16067 | # A ".." for each directory in $ac_dir_suffix. | |
16068 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16069 | case $ac_top_builddir_sub in | |
16070 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16071 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16072 | esac ;; | |
16073 | esac | |
16074 | ac_abs_top_builddir=$ac_pwd | |
16075 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16076 | # for backward compatibility: | |
16077 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16078 | |
16079 | case $srcdir in | |
81ecdfbb | 16080 | .) # We are building in place. |
bec39cab | 16081 | ac_srcdir=. |
81ecdfbb RW |
16082 | ac_top_srcdir=$ac_top_builddir_sub |
16083 | ac_abs_top_srcdir=$ac_pwd ;; | |
16084 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16085 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16086 | ac_top_srcdir=$srcdir |
16087 | ac_abs_top_srcdir=$srcdir ;; | |
16088 | *) # Relative name. | |
16089 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16090 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16091 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16092 | esac |
81ecdfbb | 16093 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 16094 | |
c906108c | 16095 | |
81ecdfbb RW |
16096 | case $ac_mode in |
16097 | :F) | |
16098 | # | |
16099 | # CONFIG_FILE | |
16100 | # | |
c906108c | 16101 | |
bec39cab AC |
16102 | case $INSTALL in |
16103 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 16104 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 16105 | esac |
81ecdfbb | 16106 | _ACEOF |
121ce6e5 | 16107 | |
81ecdfbb RW |
16108 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
16109 | # If the template does not know about datarootdir, expand it. | |
16110 | # FIXME: This hack should be removed a few years after 2.60. | |
16111 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
16112 | ac_sed_dataroot=' | |
16113 | /datarootdir/ { | |
16114 | p | |
16115 | q | |
16116 | } | |
16117 | /@datadir@/p | |
16118 | /@docdir@/p | |
16119 | /@infodir@/p | |
16120 | /@localedir@/p | |
16121 | /@mandir@/p' | |
16122 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
16123 | *datarootdir*) ac_datarootdir_seen=yes;; | |
16124 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
16125 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
16126 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
16127 | _ACEOF | |
16128 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16129 | ac_datarootdir_hack=' | |
16130 | s&@datadir@&$datadir&g | |
16131 | s&@docdir@&$docdir&g | |
16132 | s&@infodir@&$infodir&g | |
16133 | s&@localedir@&$localedir&g | |
16134 | s&@mandir@&$mandir&g | |
16135 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
16136 | esac | |
4e8d927d | 16137 | _ACEOF |
81ecdfbb RW |
16138 | |
16139 | # Neutralize VPATH when `$srcdir' = `.'. | |
16140 | # Shell code in configure.ac might set extrasub. | |
16141 | # FIXME: do we really want to maintain this feature? | |
16142 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
16143 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
16144 | $extrasub |
16145 | _ACEOF | |
81ecdfbb | 16146 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
16147 | :t |
16148 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
16149 | s|@configure_input@|$ac_sed_conf_input|;t t |
16150 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
16151 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
16152 | s&@srcdir@&$ac_srcdir&;t t | |
16153 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
16154 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
16155 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
16156 | s&@builddir@&$ac_builddir&;t t | |
16157 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
16158 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
16159 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
16160 | $ac_datarootdir_hack |
16161 | " | |
16162 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
16163 | if $ac_cs_awk_getline; then | |
16164 | $AWK -f "$tmp/subs.awk" | |
16165 | else | |
16166 | $AWK -f "$tmp/subs.awk" | $SHELL | |
16167 | fi >$tmp/out \ | |
16168 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16169 | ||
16170 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
16171 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
16172 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
16173 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
16174 | which seems to be undefined. Please make sure it is defined." >&5 | |
16175 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
16176 | which seems to be undefined. Please make sure it is defined." >&2;} | |
16177 | ||
16178 | rm -f "$tmp/stdin" | |
bec39cab | 16179 | case $ac_file in |
81ecdfbb RW |
16180 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
16181 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
16182 | esac \ | |
16183 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16184 | ;; | |
16185 | :H) | |
16186 | # | |
16187 | # CONFIG_HEADER | |
16188 | # | |
bec39cab | 16189 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
16190 | { |
16191 | $as_echo "/* $configure_input */" \ | |
16192 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
16193 | } >"$tmp/config.h" \ | |
16194 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
16195 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
16196 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
16197 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 16198 | else |
81ecdfbb RW |
16199 | rm -f "$ac_file" |
16200 | mv "$tmp/config.h" "$ac_file" \ | |
16201 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
16202 | fi |
16203 | else | |
81ecdfbb RW |
16204 | $as_echo "/* $configure_input */" \ |
16205 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
16206 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 16207 | fi |
81ecdfbb RW |
16208 | ;; |
16209 | :L) | |
16210 | # | |
16211 | # CONFIG_LINK | |
16212 | # | |
c906108c | 16213 | |
81ecdfbb RW |
16214 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
16215 | : | |
b4e70030 | 16216 | else |
81ecdfbb RW |
16217 | # Prefer the file from the source tree if names are identical. |
16218 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
16219 | ac_source=$srcdir/$ac_source | |
16220 | fi | |
b4e70030 | 16221 | |
81ecdfbb RW |
16222 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
16223 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 16224 | |
81ecdfbb RW |
16225 | if test ! -r "$ac_source"; then |
16226 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
16227 | fi | |
16228 | rm -f "$ac_file" | |
bec39cab | 16229 | |
81ecdfbb RW |
16230 | # Try a relative symlink, then a hard link, then a copy. |
16231 | case $srcdir in | |
16232 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
16233 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
16234 | esac | |
16235 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
16236 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
16237 | cp -p "$ac_source" "$ac_file" || | |
16238 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
16239 | fi | |
16240 | ;; | |
16241 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
16242 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
16243 | ;; | |
c906108c | 16244 | esac |
b4e70030 | 16245 | |
bec39cab | 16246 | |
81ecdfbb RW |
16247 | case $ac_file$ac_mode in |
16248 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
b292c783 | 16249 | "gcore":F) chmod +x gcore ;; |
81ecdfbb | 16250 | "default":C) |
c906108c SS |
16251 | case x$CONFIG_HEADERS in |
16252 | xconfig.h:config.in) | |
16253 | echo > stamp-h ;; | |
16254 | esac | |
bec39cab | 16255 | ;; |
81ecdfbb | 16256 | |
bec39cab | 16257 | esac |
81ecdfbb | 16258 | done # for ac_tag |
c906108c | 16259 | |
bec39cab | 16260 | |
81ecdfbb | 16261 | as_fn_exit 0 |
bec39cab | 16262 | _ACEOF |
bec39cab AC |
16263 | ac_clean_files=$ac_clean_files_save |
16264 | ||
81ecdfbb RW |
16265 | test $ac_write_fail = 0 || |
16266 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
16267 | ||
bec39cab AC |
16268 | |
16269 | # configure is writing to config.log, and then calls config.status. | |
16270 | # config.status does its own redirection, appending to config.log. | |
16271 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
16272 | # by configure, so config.status won't be able to write to it; its | |
16273 | # output is simply discarded. So we exec the FD to /dev/null, | |
16274 | # effectively closing config.log, so it can be properly (re)opened and | |
16275 | # appended to by config.status. When coming back to configure, we | |
16276 | # need to make the FD available again. | |
16277 | if test "$no_create" != yes; then | |
16278 | ac_cs_success=: | |
16279 | ac_config_status_args= | |
16280 | test "$silent" = yes && | |
16281 | ac_config_status_args="$ac_config_status_args --quiet" | |
16282 | exec 5>/dev/null | |
16283 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
16284 | exec 5>>config.log | |
16285 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
16286 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 16287 | $ac_cs_success || as_fn_exit $? |
bec39cab | 16288 | fi |
c906108c | 16289 | |
bec39cab | 16290 | # |
81ecdfbb | 16291 | # CONFIG_SUBDIRS section. |
bec39cab | 16292 | # |
c906108c SS |
16293 | if test "$no_recursion" != yes; then |
16294 | ||
81ecdfbb RW |
16295 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
16296 | # so they do not pile up. | |
c906108c SS |
16297 | ac_sub_configure_args= |
16298 | ac_prev= | |
fdc59709 PB |
16299 | eval "set x $ac_configure_args" |
16300 | shift | |
16301 | for ac_arg | |
16302 | do | |
c906108c SS |
16303 | if test -n "$ac_prev"; then |
16304 | ac_prev= | |
16305 | continue | |
16306 | fi | |
bec39cab | 16307 | case $ac_arg in |
c906108c SS |
16308 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
16309 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
16310 | ac_prev=cache_file ;; | |
16311 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
16312 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
16313 | | --c=*) | |
16314 | ;; | |
16315 | --config-cache | -C) | |
c906108c SS |
16316 | ;; |
16317 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
16318 | ac_prev=srcdir ;; | |
16319 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
16320 | ;; | |
bec39cab AC |
16321 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
16322 | ac_prev=prefix ;; | |
16323 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
16324 | ;; | |
81ecdfbb RW |
16325 | --disable-option-checking) |
16326 | ;; | |
fdc59709 PB |
16327 | *) |
16328 | case $ac_arg in | |
81ecdfbb | 16329 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 16330 | esac |
81ecdfbb | 16331 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
16332 | esac |
16333 | done | |
16334 | ||
bec39cab AC |
16335 | # Always prepend --prefix to ensure using the same prefix |
16336 | # in subdir configurations. | |
fdc59709 PB |
16337 | ac_arg="--prefix=$prefix" |
16338 | case $ac_arg in | |
81ecdfbb | 16339 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 16340 | esac |
81ecdfbb RW |
16341 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
16342 | ||
16343 | # Pass --silent | |
16344 | if test "$silent" = yes; then | |
16345 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
16346 | fi | |
16347 | ||
16348 | # Always prepend --disable-option-checking to silence warnings, since | |
16349 | # different subdirs can have different --enable and --with options. | |
16350 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 16351 | |
b4e70030 | 16352 | ac_popdir=`pwd` |
bec39cab | 16353 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
16354 | |
16355 | # Do not complain, so a configure script can configure whichever | |
16356 | # parts of a large source tree are present. | |
fdc59709 | 16357 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 16358 | |
81ecdfbb RW |
16359 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
16360 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
16361 | $as_echo "$ac_msg" >&6 | |
16362 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
16363 | ac_builddir=. |
16364 | ||
81ecdfbb RW |
16365 | case "$ac_dir" in |
16366 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16367 | *) | |
16368 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
16369 | # A ".." for each directory in $ac_dir_suffix. | |
16370 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
16371 | case $ac_top_builddir_sub in | |
16372 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
16373 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
16374 | esac ;; | |
16375 | esac | |
16376 | ac_abs_top_builddir=$ac_pwd | |
16377 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
16378 | # for backward compatibility: | |
16379 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
16380 | |
16381 | case $srcdir in | |
81ecdfbb | 16382 | .) # We are building in place. |
bec39cab | 16383 | ac_srcdir=. |
81ecdfbb RW |
16384 | ac_top_srcdir=$ac_top_builddir_sub |
16385 | ac_abs_top_srcdir=$ac_pwd ;; | |
16386 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 16387 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
16388 | ac_top_srcdir=$srcdir |
16389 | ac_abs_top_srcdir=$srcdir ;; | |
16390 | *) # Relative name. | |
16391 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
16392 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
16393 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 16394 | esac |
81ecdfbb | 16395 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 16396 | |
c906108c | 16397 | |
fdc59709 | 16398 | cd "$ac_dir" |
c906108c SS |
16399 | |
16400 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
16401 | if test -f "$ac_srcdir/configure.gnu"; then |
16402 | ac_sub_configure=$ac_srcdir/configure.gnu | |
16403 | elif test -f "$ac_srcdir/configure"; then | |
16404 | ac_sub_configure=$ac_srcdir/configure | |
16405 | elif test -f "$ac_srcdir/configure.in"; then | |
16406 | # This should be Cygnus configure. | |
16407 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 16408 | else |
81ecdfbb RW |
16409 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
16410 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
16411 | ac_sub_configure= |
16412 | fi | |
16413 | ||
16414 | # The recursion is here. | |
16415 | if test -n "$ac_sub_configure"; then | |
c906108c | 16416 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
16417 | case $cache_file in |
16418 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
16419 | *) # Relative name. |
16420 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 16421 | esac |
c906108c | 16422 | |
81ecdfbb RW |
16423 | { $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 |
16424 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 16425 | # The eval makes quoting arguments work. |
fdc59709 PB |
16426 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
16427 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 16428 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
16429 | fi |
16430 | ||
fdc59709 | 16431 | cd "$ac_popdir" |
c906108c SS |
16432 | done |
16433 | fi | |
81ecdfbb RW |
16434 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
16435 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
16436 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
16437 | fi | |
c906108c SS |
16438 | |
16439 | ||
16440 | exit 0 |