Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
81ecdfbb RW |
3 | # Generated by GNU Autoconf 2.64. |
4 | # | |
5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | |
6 | # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software | |
7 | # Foundation, Inc. | |
c906108c SS |
8 | # |
9 | # This configure script is free software; the Free Software Foundation | |
10 | # gives unlimited permission to copy, distribute and modify it. | |
81ecdfbb RW |
11 | ## -------------------- ## |
12 | ## M4sh Initialization. ## | |
13 | ## -------------------- ## | |
bec39cab | 14 | |
81ecdfbb RW |
15 | # Be more Bourne compatible |
16 | DUALCASE=1; export DUALCASE # for MKS sh | |
17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
18 | emulate sh |
19 | NULLCMD=: | |
81ecdfbb | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
21 | # is contrary to our usage. Disable this feature. |
22 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
23 | setopt NO_GLOB_SUBST |
24 | else | |
25 | case `(set -o) 2>/dev/null` in #( | |
26 | *posix*) : | |
27 | set -o posix ;; #( | |
28 | *) : | |
29 | ;; | |
30 | esac | |
bec39cab | 31 | fi |
bec39cab | 32 | |
81ecdfbb RW |
33 | |
34 | as_nl=' | |
35 | ' | |
36 | export as_nl | |
37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
41 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
42 | # but without wasting forks for bash or zsh. | |
43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
45 | as_echo='print -r --' | |
46 | as_echo_n='print -rn --' | |
47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
48 | as_echo='printf %s\n' | |
49 | as_echo_n='printf %s' | |
50 | else | |
51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
53 | as_echo_n='/usr/ucb/echo -n' | |
54 | else | |
55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
56 | as_echo_n_body='eval | |
57 | arg=$1; | |
58 | case $arg in #( | |
59 | *"$as_nl"*) | |
60 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
62 | esac; | |
63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
64 | ' | |
65 | export as_echo_n_body | |
66 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
67 | fi | |
68 | export as_echo_body | |
69 | as_echo='sh -c $as_echo_body as_echo' | |
70 | fi | |
71 | ||
72 | # The user is always right. | |
73 | if test "${PATH_SEPARATOR+set}" != set; then | |
74 | PATH_SEPARATOR=: | |
75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
77 | PATH_SEPARATOR=';' | |
78 | } | |
bec39cab AC |
79 | fi |
80 | ||
81 | ||
81ecdfbb RW |
82 | # IFS |
83 | # We need space, tab and new line, in precisely that order. Quoting is | |
84 | # there to prevent editors from complaining about space-tab. | |
85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
86 | # splitting by setting IFS to empty value.) | |
87 | IFS=" "" $as_nl" | |
88 | ||
89 | # Find who we are. Look in the path if we contain no directory separator. | |
90 | case $0 in #(( | |
91 | *[\\/]* ) as_myself=$0 ;; | |
92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
93 | for as_dir in $PATH | |
94 | do | |
95 | IFS=$as_save_IFS | |
96 | test -z "$as_dir" && as_dir=. | |
97 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
98 | done | |
99 | IFS=$as_save_IFS | |
100 | ||
101 | ;; | |
102 | esac | |
103 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
104 | # in which case we are not to be found in the path. | |
105 | if test "x$as_myself" = x; then | |
106 | as_myself=$0 | |
107 | fi | |
108 | if test ! -f "$as_myself"; then | |
109 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
110 | exit 1 | |
111 | fi | |
112 | ||
113 | # Unset variables that we do not need and which cause bugs (e.g. in | |
114 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
115 | # suppresses any "Segmentation fault" message there. '((' could | |
116 | # trigger a bug in pdksh 5.2.14. | |
117 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
118 | do eval test x\${$as_var+set} = xset \ | |
119 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
120 | done | |
bec39cab AC |
121 | PS1='$ ' |
122 | PS2='> ' | |
123 | PS4='+ ' | |
124 | ||
125 | # NLS nuisances. | |
81ecdfbb RW |
126 | LC_ALL=C |
127 | export LC_ALL | |
128 | LANGUAGE=C | |
129 | export LANGUAGE | |
130 | ||
131 | # CDPATH. | |
132 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
133 | ||
134 | if test "x$CONFIG_SHELL" = x; then | |
135 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : | |
136 | emulate sh | |
137 | NULLCMD=: | |
138 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
139 | # is contrary to our usage. Disable this feature. | |
140 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
141 | setopt NO_GLOB_SUBST | |
142 | else | |
143 | case \`(set -o) 2>/dev/null\` in #( | |
144 | *posix*) : | |
145 | set -o posix ;; #( | |
146 | *) : | |
147 | ;; | |
148 | esac | |
149 | fi | |
150 | " | |
151 | as_required="as_fn_return () { (exit \$1); } | |
152 | as_fn_success () { as_fn_return 0; } | |
153 | as_fn_failure () { as_fn_return 1; } | |
154 | as_fn_ret_success () { return 0; } | |
155 | as_fn_ret_failure () { return 1; } | |
156 | ||
157 | exitcode=0 | |
158 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
159 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
160 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
161 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
162 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : | |
163 | ||
164 | else | |
165 | exitcode=1; echo positional parameters were not saved. | |
166 | fi | |
167 | test x\$exitcode = x0 || exit 1" | |
168 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
169 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
170 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
171 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
172 | test \$(( 1 + 1 )) = 2 || exit 1" | |
173 | if (eval "$as_required") 2>/dev/null; then : | |
174 | as_have_required=yes | |
175 | else | |
176 | as_have_required=no | |
177 | fi | |
178 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : | |
179 | ||
180 | else | |
181 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
182 | as_found=false | |
183 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
bec39cab | 184 | do |
81ecdfbb RW |
185 | IFS=$as_save_IFS |
186 | test -z "$as_dir" && as_dir=. | |
187 | as_found=: | |
188 | case $as_dir in #( | |
189 | /*) | |
190 | for as_base in sh bash ksh sh5; do | |
191 | # Try only shells that exist, to save several forks. | |
192 | as_shell=$as_dir/$as_base | |
193 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
194 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
195 | CONFIG_SHELL=$as_shell as_have_required=yes | |
196 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : | |
197 | break 2 | |
198 | fi | |
199 | fi | |
200 | done;; | |
201 | esac | |
202 | as_found=false | |
203 | done | |
204 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
205 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : | |
206 | CONFIG_SHELL=$SHELL as_have_required=yes | |
207 | fi; } | |
208 | IFS=$as_save_IFS | |
209 | ||
210 | ||
211 | if test "x$CONFIG_SHELL" != x; then : | |
212 | # We cannot yet assume a decent shell, so we have to provide a | |
213 | # neutralization value for shells without unset; and this also | |
214 | # works around shells that cannot unset nonexistent variables. | |
215 | BASH_ENV=/dev/null | |
216 | ENV=/dev/null | |
217 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
218 | export CONFIG_SHELL | |
219 | exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} | |
220 | fi | |
221 | ||
222 | if test x$as_have_required = xno; then : | |
223 | $as_echo "$0: This script requires a shell more modern than all" | |
224 | $as_echo "$0: the shells that I found on your system." | |
225 | if test x${ZSH_VERSION+set} = xset ; then | |
226 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
227 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." | |
bec39cab | 228 | else |
81ecdfbb RW |
229 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
230 | $0: including any error possibly output before this | |
231 | $0: message. Then install a modern shell, or manually run | |
232 | $0: the script under such a shell if you do have one." | |
bec39cab | 233 | fi |
81ecdfbb RW |
234 | exit 1 |
235 | fi | |
236 | fi | |
237 | fi | |
238 | SHELL=${CONFIG_SHELL-/bin/sh} | |
239 | export SHELL | |
240 | # Unset more variables known to interfere with behavior of common tools. | |
241 | CLICOLOR_FORCE= GREP_OPTIONS= | |
242 | unset CLICOLOR_FORCE GREP_OPTIONS | |
243 | ||
244 | ## --------------------- ## | |
245 | ## M4sh Shell Functions. ## | |
246 | ## --------------------- ## | |
247 | # as_fn_unset VAR | |
248 | # --------------- | |
249 | # Portably unset VAR. | |
250 | as_fn_unset () | |
251 | { | |
252 | { eval $1=; unset $1;} | |
253 | } | |
254 | as_unset=as_fn_unset | |
255 | ||
256 | # as_fn_set_status STATUS | |
257 | # ----------------------- | |
258 | # Set $? to STATUS, without forking. | |
259 | as_fn_set_status () | |
260 | { | |
261 | return $1 | |
262 | } # as_fn_set_status | |
bec39cab | 263 | |
81ecdfbb RW |
264 | # as_fn_exit STATUS |
265 | # ----------------- | |
266 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
267 | as_fn_exit () | |
268 | { | |
269 | set +e | |
270 | as_fn_set_status $1 | |
271 | exit $1 | |
272 | } # as_fn_exit | |
273 | ||
274 | # as_fn_mkdir_p | |
275 | # ------------- | |
276 | # Create "$as_dir" as a directory, including parents if necessary. | |
277 | as_fn_mkdir_p () | |
278 | { | |
279 | ||
280 | case $as_dir in #( | |
281 | -*) as_dir=./$as_dir;; | |
282 | esac | |
283 | test -d "$as_dir" || eval $as_mkdir_p || { | |
284 | as_dirs= | |
285 | while :; do | |
286 | case $as_dir in #( | |
287 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
288 | *) as_qdir=$as_dir;; | |
289 | esac | |
290 | as_dirs="'$as_qdir' $as_dirs" | |
291 | as_dir=`$as_dirname -- "$as_dir" || | |
292 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
293 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
294 | X"$as_dir" : 'X\(//\)$' \| \ | |
295 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
296 | $as_echo X"$as_dir" | | |
297 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
298 | s//\1/ | |
299 | q | |
300 | } | |
301 | /^X\(\/\/\)[^/].*/{ | |
302 | s//\1/ | |
303 | q | |
304 | } | |
305 | /^X\(\/\/\)$/{ | |
306 | s//\1/ | |
307 | q | |
308 | } | |
309 | /^X\(\/\).*/{ | |
310 | s//\1/ | |
311 | q | |
312 | } | |
313 | s/.*/./; q'` | |
314 | test -d "$as_dir" && break | |
315 | done | |
316 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
317 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
318 | ||
319 | ||
320 | } # as_fn_mkdir_p | |
321 | # as_fn_append VAR VALUE | |
322 | # ---------------------- | |
323 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
324 | # advantage of any shell optimizations that allow amortized linear growth over | |
325 | # repeated appends, instead of the typical quadratic growth present in naive | |
326 | # implementations. | |
327 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
328 | eval 'as_fn_append () | |
329 | { | |
330 | eval $1+=\$2 | |
331 | }' | |
332 | else | |
333 | as_fn_append () | |
334 | { | |
335 | eval $1=\$$1\$2 | |
336 | } | |
337 | fi # as_fn_append | |
338 | ||
339 | # as_fn_arith ARG... | |
340 | # ------------------ | |
341 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
342 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
343 | # must be portable across $(()) and expr. | |
344 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
345 | eval 'as_fn_arith () | |
346 | { | |
347 | as_val=$(( $* )) | |
348 | }' | |
349 | else | |
350 | as_fn_arith () | |
351 | { | |
352 | as_val=`expr "$@" || test $? -eq 1` | |
353 | } | |
354 | fi # as_fn_arith | |
355 | ||
356 | ||
357 | # as_fn_error ERROR [LINENO LOG_FD] | |
358 | # --------------------------------- | |
359 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
360 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
361 | # script with status $?, using 1 if that was 0. | |
362 | as_fn_error () | |
363 | { | |
364 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
365 | if test "$3"; then | |
366 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
367 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
368 | fi | |
369 | $as_echo "$as_me: error: $1" >&2 | |
370 | as_fn_exit $as_status | |
371 | } # as_fn_error | |
372 | ||
373 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
374 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
375 | as_expr=expr |
376 | else | |
377 | as_expr=false | |
378 | fi | |
379 | ||
81ecdfbb | 380 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
381 | as_basename=basename |
382 | else | |
383 | as_basename=false | |
384 | fi | |
385 | ||
81ecdfbb RW |
386 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
387 | as_dirname=dirname | |
388 | else | |
389 | as_dirname=false | |
390 | fi | |
bec39cab | 391 | |
81ecdfbb | 392 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
393 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
394 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
395 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
396 | $as_echo X/"$0" | | |
397 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
398 | s//\1/ | |
399 | q | |
400 | } | |
401 | /^X\/\(\/\/\)$/{ | |
402 | s//\1/ | |
403 | q | |
404 | } | |
405 | /^X\/\(\/\).*/{ | |
406 | s//\1/ | |
407 | q | |
408 | } | |
409 | s/.*/./; q'` | |
bec39cab | 410 | |
b4e70030 JB |
411 | # Avoid depending upon Character Ranges. |
412 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
413 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
414 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
415 | as_cr_digits='0123456789' | |
416 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 417 | |
bec39cab | 418 | |
81ecdfbb RW |
419 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
420 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
421 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
422 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
423 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
424 | sed -n ' | |
425 | p | |
426 | /[$]LINENO/= | |
427 | ' <$as_myself | | |
bec39cab | 428 | sed ' |
81ecdfbb RW |
429 | s/[$]LINENO.*/&-/ |
430 | t lineno | |
431 | b | |
432 | :lineno | |
bec39cab | 433 | N |
81ecdfbb RW |
434 | :loop |
435 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
bec39cab | 436 | t loop |
81ecdfbb | 437 | s/-\n.*// |
bec39cab | 438 | ' >$as_me.lineno && |
81ecdfbb RW |
439 | chmod +x "$as_me.lineno" || |
440 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
bec39cab AC |
441 | |
442 | # Don't try to exec as it changes $[0], causing all sort of problems | |
443 | # (the dirname of $[0] is not the place where we might find the | |
81ecdfbb RW |
444 | # original and so on. Autoconf is especially sensitive to this). |
445 | . "./$as_me.lineno" | |
bec39cab AC |
446 | # Exit status is that of the last command. |
447 | exit | |
448 | } | |
449 | ||
81ecdfbb RW |
450 | ECHO_C= ECHO_N= ECHO_T= |
451 | case `echo -n x` in #((((( | |
452 | -n*) | |
453 | case `echo 'xy\c'` in | |
454 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
455 | xy) ECHO_C='\c';; | |
456 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
457 | ECHO_T=' ';; | |
458 | esac;; | |
459 | *) | |
460 | ECHO_N='-n';; | |
bec39cab AC |
461 | esac |
462 | ||
81ecdfbb RW |
463 | rm -f conf$$ conf$$.exe conf$$.file |
464 | if test -d conf$$.dir; then | |
465 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 466 | else |
81ecdfbb RW |
467 | rm -f conf$$.dir |
468 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 469 | fi |
81ecdfbb RW |
470 | if (echo >conf$$.file) 2>/dev/null; then |
471 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 472 | as_ln_s='ln -s' |
81ecdfbb RW |
473 | # ... but there are two gotchas: |
474 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
475 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
476 | # In both cases, we have to default to `cp -p'. | |
477 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
478 | as_ln_s='cp -p' | |
479 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
480 | as_ln_s=ln | |
481 | else | |
482 | as_ln_s='cp -p' | |
b4e70030 | 483 | fi |
bec39cab AC |
484 | else |
485 | as_ln_s='cp -p' | |
486 | fi | |
81ecdfbb RW |
487 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
488 | rmdir conf$$.dir 2>/dev/null | |
bec39cab AC |
489 | |
490 | if mkdir -p . 2>/dev/null; then | |
81ecdfbb | 491 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
492 | else |
493 | test -d ./-p && rmdir ./-p | |
494 | as_mkdir_p=false | |
495 | fi | |
496 | ||
81ecdfbb RW |
497 | if test -x / >/dev/null 2>&1; then |
498 | as_test_x='test -x' | |
499 | else | |
500 | if ls -dL / >/dev/null 2>&1; then | |
501 | as_ls_L_option=L | |
502 | else | |
503 | as_ls_L_option= | |
504 | fi | |
505 | as_test_x=' | |
506 | eval sh -c '\'' | |
507 | if test -d "$1"; then | |
508 | test -d "$1/."; | |
509 | else | |
510 | case $1 in #( | |
511 | -*)set "./$1";; | |
512 | esac; | |
513 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
514 | ???[sx]*):;;*)false;;esac;fi | |
515 | '\'' sh | |
516 | ' | |
517 | fi | |
518 | as_executable_p=$as_test_x | |
bec39cab AC |
519 | |
520 | # Sed expression to map a string onto a valid CPP name. | |
521 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
522 | ||
523 | # Sed expression to map a string onto a valid variable name. | |
524 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
525 | ||
526 | ||
81ecdfbb | 527 | exec 7<&0 </dev/null 6>&1 |
c906108c | 528 | |
bec39cab AC |
529 | # Name of the host. |
530 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
531 | # so uname gets run too. | |
532 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
533 | ||
bec39cab AC |
534 | # |
535 | # Initializations. | |
536 | # | |
c906108c | 537 | ac_default_prefix=/usr/local |
81ecdfbb | 538 | ac_clean_files= |
bec39cab | 539 | ac_config_libobj_dir=. |
81ecdfbb | 540 | LIBOBJS= |
bec39cab AC |
541 | cross_compiling=no |
542 | subdirs= | |
543 | MFLAGS= | |
544 | MAKEFLAGS= | |
b4e70030 | 545 | |
bec39cab AC |
546 | # Identity of this package. |
547 | PACKAGE_NAME= | |
548 | PACKAGE_TARNAME= | |
549 | PACKAGE_VERSION= | |
550 | PACKAGE_STRING= | |
551 | PACKAGE_BUGREPORT= | |
81ecdfbb | 552 | PACKAGE_URL= |
bec39cab AC |
553 | |
554 | ac_unique_file="main.c" | |
555 | # Factoring default headers for most tests. | |
556 | ac_includes_default="\ | |
557 | #include <stdio.h> | |
81ecdfbb | 558 | #ifdef HAVE_SYS_TYPES_H |
bec39cab AC |
559 | # include <sys/types.h> |
560 | #endif | |
81ecdfbb | 561 | #ifdef HAVE_SYS_STAT_H |
bec39cab AC |
562 | # include <sys/stat.h> |
563 | #endif | |
81ecdfbb | 564 | #ifdef STDC_HEADERS |
bec39cab AC |
565 | # include <stdlib.h> |
566 | # include <stddef.h> | |
567 | #else | |
81ecdfbb | 568 | # ifdef HAVE_STDLIB_H |
bec39cab AC |
569 | # include <stdlib.h> |
570 | # endif | |
571 | #endif | |
81ecdfbb RW |
572 | #ifdef HAVE_STRING_H |
573 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | |
bec39cab AC |
574 | # include <memory.h> |
575 | # endif | |
576 | # include <string.h> | |
577 | #endif | |
81ecdfbb | 578 | #ifdef HAVE_STRINGS_H |
bec39cab AC |
579 | # include <strings.h> |
580 | #endif | |
81ecdfbb | 581 | #ifdef HAVE_INTTYPES_H |
bec39cab | 582 | # include <inttypes.h> |
bec39cab | 583 | #endif |
81ecdfbb RW |
584 | #ifdef HAVE_STDINT_H |
585 | # include <stdint.h> | |
586 | #endif | |
587 | #ifdef HAVE_UNISTD_H | |
bec39cab AC |
588 | # include <unistd.h> |
589 | #endif" | |
590 | ||
81ecdfbb | 591 | enable_option_checking=no |
c971b7fa | 592 | ac_subst_vars='LTLIBOBJS |
81ecdfbb RW |
593 | LIBOBJS |
594 | GDB_NM_FILE | |
595 | frags | |
596 | target_subdir | |
597 | CONFIG_UNINSTALL | |
598 | CONFIG_INSTALL | |
599 | CONFIG_CLEAN | |
600 | CONFIG_ALL | |
601 | CONFIG_SRCS | |
602 | CONFIG_DEPS | |
603 | CONFIG_OBS | |
604 | PROFILE_CFLAGS | |
605 | ENABLE_CFLAGS | |
606 | SIM_OBS | |
607 | SIM | |
608 | XMKMF | |
609 | GDBTK_SRC_DIR | |
610 | GDBTK_CFLAGS | |
611 | GDBTKLIBS | |
612 | X_LIBS | |
613 | X_LDFLAGS | |
614 | X_CFLAGS | |
615 | TK_XINCLUDES | |
616 | TK_DEPS | |
617 | TK_LIBRARY | |
618 | TK_INCLUDE | |
619 | TK_STUB_LIB_SPEC | |
620 | TK_STUB_LIB_FLAG | |
621 | TK_STUB_LIB_FILE | |
622 | TK_LIB_SPEC | |
623 | TK_LIB_FLAG | |
624 | TK_LIB_FILE | |
625 | TK_SRC_DIR | |
626 | TK_BIN_DIR | |
627 | TK_VERSION | |
628 | TCL_DEPS | |
629 | TCL_LIBRARY | |
630 | TCL_INCLUDE | |
631 | TCL_STUB_LIB_SPEC | |
632 | TCL_STUB_LIB_FLAG | |
633 | TCL_STUB_LIB_FILE | |
634 | TCL_LIB_SPEC | |
635 | TCL_LIB_FLAG | |
636 | TCL_LIB_FILE | |
637 | TCL_SRC_DIR | |
638 | TCL_BIN_DIR | |
639 | TCL_PATCH_LEVEL | |
640 | TCL_VERSION | |
641 | WIN32LDAPP | |
642 | GUI_CFLAGS_X | |
643 | LIBGUI | |
644 | WIN32LIBS | |
645 | SER_HARDWIRE | |
646 | WERROR_CFLAGS | |
647 | WARN_CFLAGS | |
648 | SYSTEM_GDBINIT | |
81ecdfbb RW |
649 | TARGET_SYSTEM_ROOT |
650 | CONFIG_LDFLAGS | |
f6528abd | 651 | RDYNAMIC |
81ecdfbb | 652 | ALLOCA |
ac534cba JB |
653 | PYTHON_LIBS |
654 | PYTHON_CPPFLAGS | |
81ecdfbb | 655 | PYTHON_CFLAGS |
ec685c5e | 656 | python_prog_path |
81ecdfbb RW |
657 | LTLIBEXPAT |
658 | LIBEXPAT | |
659 | HAVE_LIBEXPAT | |
b8e0a31c | 660 | JIT_READER_DIR |
f997c383 | 661 | TARGET_PTR |
39037522 | 662 | READLINE_TEXI_INCFLAG |
81ecdfbb RW |
663 | READLINE_CFLAGS |
664 | READLINE_DEPS | |
665 | READLINE | |
666 | MIG | |
667 | WINDRES | |
668 | DLLTOOL | |
c971b7fa | 669 | AR |
81ecdfbb RW |
670 | YFLAGS |
671 | YACC | |
c971b7fa | 672 | RANLIB |
81ecdfbb | 673 | LN_S |
c971b7fa PA |
674 | INSTALL_DATA |
675 | INSTALL_SCRIPT | |
676 | INSTALL_PROGRAM | |
677 | AWK | |
81ecdfbb RW |
678 | REPORT_BUGS_TEXI |
679 | REPORT_BUGS_TO | |
680 | PKGVERSION | |
681 | TARGET_OBS | |
682 | subdirs | |
683 | GDB_DATADIR | |
684 | DEBUGDIR | |
5048e516 JK |
685 | MAKEINFO_EXTRA_FLAGS |
686 | MAKEINFOFLAGS | |
687 | MAKEINFO | |
81ecdfbb RW |
688 | PACKAGE |
689 | GNULIB_STDINT_H | |
81ecdfbb RW |
690 | CATOBJEXT |
691 | GENCAT | |
692 | INSTOBJEXT | |
693 | DATADIRNAME | |
694 | CATALOGS | |
695 | POSUB | |
696 | GMSGFMT | |
697 | XGETTEXT | |
698 | INCINTL | |
699 | LIBINTL_DEP | |
700 | LIBINTL | |
701 | USE_NLS | |
702 | SET_MAKE | |
703 | GMAKE_FALSE | |
704 | GMAKE_TRUE | |
705 | MAKE | |
706 | CCDEPMODE | |
707 | DEPDIR | |
708 | am__leading_dot | |
709 | target_os | |
710 | target_vendor | |
711 | target_cpu | |
712 | target | |
713 | host_os | |
714 | host_vendor | |
715 | host_cpu | |
716 | host | |
717 | build_os | |
718 | build_vendor | |
719 | build_cpu | |
720 | build | |
c971b7fa PA |
721 | EGREP |
722 | GREP | |
723 | CPP | |
81ecdfbb RW |
724 | OBJEXT |
725 | EXEEXT | |
726 | ac_ct_CC | |
727 | CPPFLAGS | |
728 | LDFLAGS | |
729 | CFLAGS | |
730 | CC | |
731 | MAINT | |
732 | MAINTAINER_MODE_FALSE | |
733 | MAINTAINER_MODE_TRUE | |
734 | target_alias | |
735 | host_alias | |
736 | build_alias | |
737 | LIBS | |
738 | ECHO_T | |
739 | ECHO_N | |
740 | ECHO_C | |
741 | DEFS | |
742 | mandir | |
743 | localedir | |
744 | libdir | |
745 | psdir | |
746 | pdfdir | |
747 | dvidir | |
748 | htmldir | |
749 | infodir | |
750 | docdir | |
751 | oldincludedir | |
752 | includedir | |
753 | localstatedir | |
754 | sharedstatedir | |
755 | sysconfdir | |
756 | datadir | |
757 | datarootdir | |
758 | libexecdir | |
759 | sbindir | |
760 | bindir | |
761 | program_transform_name | |
762 | prefix | |
763 | exec_prefix | |
764 | PACKAGE_URL | |
765 | PACKAGE_BUGREPORT | |
766 | PACKAGE_STRING | |
767 | PACKAGE_VERSION | |
768 | PACKAGE_TARNAME | |
769 | PACKAGE_NAME | |
770 | PATH_SEPARATOR | |
771 | SHELL' | |
a4ce5b0d | 772 | ac_subst_files='host_makefile_frag' |
81ecdfbb RW |
773 | ac_user_opts=' |
774 | enable_option_checking | |
775 | enable_maintainer_mode | |
da2f07f1 JK |
776 | enable_plugins |
777 | enable_largefile | |
81ecdfbb RW |
778 | with_separate_debug_dir |
779 | with_gdb_datadir | |
780 | with_relocated_sources | |
7349ff92 | 781 | with_auto_load_dir |
bccbefd2 | 782 | with_auto_load_safe_path |
81ecdfbb RW |
783 | enable_targets |
784 | enable_64_bit_bfd | |
785 | enable_gdbcli | |
786 | enable_gdbmi | |
787 | enable_tui | |
788 | enable_gdbtk | |
05e7c244 | 789 | with_libunwind_ia64 |
81ecdfbb RW |
790 | with_curses |
791 | enable_profiling | |
792 | with_pkgversion | |
793 | with_bugurl | |
b040ad30 | 794 | with_zlib |
81ecdfbb | 795 | with_libiconv_prefix |
478aac75 | 796 | with_iconv_bin |
81ecdfbb | 797 | with_system_readline |
b8e0a31c | 798 | with_jit_reader_dir |
81ecdfbb RW |
799 | with_expat |
800 | with_gnu_ld | |
801 | enable_rpath | |
802 | with_libexpat_prefix | |
803 | with_python | |
804 | with_included_regex | |
805 | with_sysroot | |
806 | with_system_gdbinit | |
807 | enable_werror | |
808 | enable_build_warnings | |
809 | enable_gdb_build_warnings | |
810 | with_tcl | |
811 | with_tk | |
812 | with_x | |
813 | enable_sim | |
814 | enable_multi_ice | |
496c0e1b | 815 | enable_gdbserver |
81ecdfbb RW |
816 | ' |
817 | ac_precious_vars='build_alias | |
818 | host_alias | |
819 | target_alias | |
820 | CC | |
821 | CFLAGS | |
822 | LDFLAGS | |
823 | LIBS | |
824 | CPPFLAGS | |
825 | CPP | |
f06e05e0 JK |
826 | MAKEINFO |
827 | MAKEINFOFLAGS | |
81ecdfbb RW |
828 | YACC |
829 | YFLAGS | |
830 | XMKMF' | |
5ae98d25 | 831 | ac_subdirs_all='testsuite |
81ecdfbb RW |
832 | gdbtk |
833 | multi-ice | |
834 | gdbserver' | |
c906108c SS |
835 | |
836 | # Initialize some variables set by options. | |
bec39cab AC |
837 | ac_init_help= |
838 | ac_init_version=false | |
81ecdfbb RW |
839 | ac_unrecognized_opts= |
840 | ac_unrecognized_sep= | |
c906108c SS |
841 | # The variables have the same names as the options, with |
842 | # dashes changed to underlines. | |
bec39cab | 843 | cache_file=/dev/null |
c906108c | 844 | exec_prefix=NONE |
c906108c | 845 | no_create= |
c906108c SS |
846 | no_recursion= |
847 | prefix=NONE | |
848 | program_prefix=NONE | |
849 | program_suffix=NONE | |
850 | program_transform_name=s,x,x, | |
851 | silent= | |
852 | site= | |
853 | srcdir= | |
c906108c SS |
854 | verbose= |
855 | x_includes=NONE | |
856 | x_libraries=NONE | |
bec39cab AC |
857 | |
858 | # Installation directory options. | |
859 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
860 | # and all the variables that are supposed to be based on exec_prefix | |
861 | # by default will actually change. | |
862 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
81ecdfbb | 863 | # (The list follows the same order as the GNU Coding Standards.) |
c906108c SS |
864 | bindir='${exec_prefix}/bin' |
865 | sbindir='${exec_prefix}/sbin' | |
866 | libexecdir='${exec_prefix}/libexec' | |
81ecdfbb RW |
867 | datarootdir='${prefix}/share' |
868 | datadir='${datarootdir}' | |
c906108c SS |
869 | sysconfdir='${prefix}/etc' |
870 | sharedstatedir='${prefix}/com' | |
871 | localstatedir='${prefix}/var' | |
c906108c SS |
872 | includedir='${prefix}/include' |
873 | oldincludedir='/usr/include' | |
81ecdfbb RW |
874 | docdir='${datarootdir}/doc/${PACKAGE}' |
875 | infodir='${datarootdir}/info' | |
876 | htmldir='${docdir}' | |
877 | dvidir='${docdir}' | |
878 | pdfdir='${docdir}' | |
879 | psdir='${docdir}' | |
880 | libdir='${exec_prefix}/lib' | |
881 | localedir='${datarootdir}/locale' | |
882 | mandir='${datarootdir}/man' | |
c906108c | 883 | |
c906108c | 884 | ac_prev= |
81ecdfbb | 885 | ac_dashdash= |
c906108c SS |
886 | for ac_option |
887 | do | |
c906108c SS |
888 | # If the previous option needs an argument, assign it. |
889 | if test -n "$ac_prev"; then | |
81ecdfbb | 890 | eval $ac_prev=\$ac_option |
c906108c SS |
891 | ac_prev= |
892 | continue | |
893 | fi | |
894 | ||
81ecdfbb RW |
895 | case $ac_option in |
896 | *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
897 | *) ac_optarg=yes ;; | |
898 | esac | |
c906108c SS |
899 | |
900 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
901 | ||
81ecdfbb RW |
902 | case $ac_dashdash$ac_option in |
903 | --) | |
904 | ac_dashdash=yes ;; | |
c906108c SS |
905 | |
906 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
907 | ac_prev=bindir ;; | |
908 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 909 | bindir=$ac_optarg ;; |
c906108c SS |
910 | |
911 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 912 | ac_prev=build_alias ;; |
c906108c | 913 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 914 | build_alias=$ac_optarg ;; |
c906108c SS |
915 | |
916 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
917 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
918 | ac_prev=cache_file ;; | |
919 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
920 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
921 | cache_file=$ac_optarg ;; |
922 | ||
923 | --config-cache | -C) | |
924 | cache_file=config.cache ;; | |
c906108c | 925 | |
81ecdfbb | 926 | -datadir | --datadir | --datadi | --datad) |
c906108c | 927 | ac_prev=datadir ;; |
81ecdfbb | 928 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
bec39cab | 929 | datadir=$ac_optarg ;; |
c906108c | 930 | |
81ecdfbb RW |
931 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
932 | | --dataroo | --dataro | --datar) | |
933 | ac_prev=datarootdir ;; | |
934 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
935 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
936 | datarootdir=$ac_optarg ;; | |
937 | ||
c906108c | 938 | -disable-* | --disable-*) |
81ecdfbb | 939 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 940 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
941 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
942 | as_fn_error "invalid feature name: $ac_useropt" | |
943 | ac_useropt_orig=$ac_useropt | |
944 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
945 | case $ac_user_opts in | |
946 | *" | |
947 | "enable_$ac_useropt" | |
948 | "*) ;; | |
949 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
950 | ac_unrecognized_sep=', ';; | |
951 | esac | |
952 | eval enable_$ac_useropt=no ;; | |
953 | ||
954 | -docdir | --docdir | --docdi | --doc | --do) | |
955 | ac_prev=docdir ;; | |
956 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
957 | docdir=$ac_optarg ;; | |
958 | ||
959 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
960 | ac_prev=dvidir ;; | |
961 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
962 | dvidir=$ac_optarg ;; | |
c906108c SS |
963 | |
964 | -enable-* | --enable-*) | |
81ecdfbb | 965 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 966 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
967 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
968 | as_fn_error "invalid feature name: $ac_useropt" | |
969 | ac_useropt_orig=$ac_useropt | |
970 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
971 | case $ac_user_opts in | |
972 | *" | |
973 | "enable_$ac_useropt" | |
974 | "*) ;; | |
975 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
976 | ac_unrecognized_sep=', ';; | |
b4e70030 | 977 | esac |
81ecdfbb | 978 | eval enable_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
979 | |
980 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
981 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
982 | | --exec | --exe | --ex) | |
983 | ac_prev=exec_prefix ;; | |
984 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
985 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
986 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 987 | exec_prefix=$ac_optarg ;; |
c906108c SS |
988 | |
989 | -gas | --gas | --ga | --g) | |
990 | # Obsolete; use --with-gas. | |
991 | with_gas=yes ;; | |
992 | ||
bec39cab AC |
993 | -help | --help | --hel | --he | -h) |
994 | ac_init_help=long ;; | |
995 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
996 | ac_init_help=recursive ;; | |
997 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
998 | ac_init_help=short ;; | |
c906108c SS |
999 | |
1000 | -host | --host | --hos | --ho) | |
bec39cab | 1001 | ac_prev=host_alias ;; |
c906108c | 1002 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 1003 | host_alias=$ac_optarg ;; |
c906108c | 1004 | |
81ecdfbb RW |
1005 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
1006 | ac_prev=htmldir ;; | |
1007 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
1008 | | --ht=*) | |
1009 | htmldir=$ac_optarg ;; | |
1010 | ||
c906108c SS |
1011 | -includedir | --includedir | --includedi | --included | --include \ |
1012 | | --includ | --inclu | --incl | --inc) | |
1013 | ac_prev=includedir ;; | |
1014 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
1015 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 1016 | includedir=$ac_optarg ;; |
c906108c SS |
1017 | |
1018 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
1019 | ac_prev=infodir ;; | |
1020 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 1021 | infodir=$ac_optarg ;; |
c906108c SS |
1022 | |
1023 | -libdir | --libdir | --libdi | --libd) | |
1024 | ac_prev=libdir ;; | |
1025 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 1026 | libdir=$ac_optarg ;; |
c906108c SS |
1027 | |
1028 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
1029 | | --libexe | --libex | --libe) | |
1030 | ac_prev=libexecdir ;; | |
1031 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
1032 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 1033 | libexecdir=$ac_optarg ;; |
c906108c | 1034 | |
81ecdfbb RW |
1035 | -localedir | --localedir | --localedi | --localed | --locale) |
1036 | ac_prev=localedir ;; | |
1037 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
1038 | localedir=$ac_optarg ;; | |
1039 | ||
c906108c | 1040 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
81ecdfbb | 1041 | | --localstate | --localstat | --localsta | --localst | --locals) |
c906108c SS |
1042 | ac_prev=localstatedir ;; |
1043 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
81ecdfbb | 1044 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
bec39cab | 1045 | localstatedir=$ac_optarg ;; |
c906108c SS |
1046 | |
1047 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
1048 | ac_prev=mandir ;; | |
1049 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 1050 | mandir=$ac_optarg ;; |
c906108c SS |
1051 | |
1052 | -nfp | --nfp | --nf) | |
1053 | # Obsolete; use --without-fp. | |
1054 | with_fp=no ;; | |
1055 | ||
1056 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 1057 | | --no-cr | --no-c | -n) |
c906108c SS |
1058 | no_create=yes ;; |
1059 | ||
1060 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
1061 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
1062 | no_recursion=yes ;; | |
1063 | ||
1064 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
1065 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
1066 | | --oldin | --oldi | --old | --ol | --o) | |
1067 | ac_prev=oldincludedir ;; | |
1068 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
1069 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
1070 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 1071 | oldincludedir=$ac_optarg ;; |
c906108c SS |
1072 | |
1073 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
1074 | ac_prev=prefix ;; | |
1075 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 1076 | prefix=$ac_optarg ;; |
c906108c SS |
1077 | |
1078 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
1079 | | --program-pre | --program-pr | --program-p) | |
1080 | ac_prev=program_prefix ;; | |
1081 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
1082 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 1083 | program_prefix=$ac_optarg ;; |
c906108c SS |
1084 | |
1085 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
1086 | | --program-suf | --program-su | --program-s) | |
1087 | ac_prev=program_suffix ;; | |
1088 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
1089 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 1090 | program_suffix=$ac_optarg ;; |
c906108c SS |
1091 | |
1092 | -program-transform-name | --program-transform-name \ | |
1093 | | --program-transform-nam | --program-transform-na \ | |
1094 | | --program-transform-n | --program-transform- \ | |
1095 | | --program-transform | --program-transfor \ | |
1096 | | --program-transfo | --program-transf \ | |
1097 | | --program-trans | --program-tran \ | |
1098 | | --progr-tra | --program-tr | --program-t) | |
1099 | ac_prev=program_transform_name ;; | |
1100 | -program-transform-name=* | --program-transform-name=* \ | |
1101 | | --program-transform-nam=* | --program-transform-na=* \ | |
1102 | | --program-transform-n=* | --program-transform-=* \ | |
1103 | | --program-transform=* | --program-transfor=* \ | |
1104 | | --program-transfo=* | --program-transf=* \ | |
1105 | | --program-trans=* | --program-tran=* \ | |
1106 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 1107 | program_transform_name=$ac_optarg ;; |
c906108c | 1108 | |
81ecdfbb RW |
1109 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
1110 | ac_prev=pdfdir ;; | |
1111 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
1112 | pdfdir=$ac_optarg ;; | |
1113 | ||
1114 | -psdir | --psdir | --psdi | --psd | --ps) | |
1115 | ac_prev=psdir ;; | |
1116 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
1117 | psdir=$ac_optarg ;; | |
1118 | ||
c906108c SS |
1119 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
1120 | | -silent | --silent | --silen | --sile | --sil) | |
1121 | silent=yes ;; | |
1122 | ||
1123 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
1124 | ac_prev=sbindir ;; | |
1125 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
1126 | | --sbi=* | --sb=*) | |
bec39cab | 1127 | sbindir=$ac_optarg ;; |
c906108c SS |
1128 | |
1129 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
1130 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
1131 | | --sharedst | --shareds | --shared | --share | --shar \ | |
1132 | | --sha | --sh) | |
1133 | ac_prev=sharedstatedir ;; | |
1134 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
1135 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
1136 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
1137 | | --sha=* | --sh=*) | |
bec39cab | 1138 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
1139 | |
1140 | -site | --site | --sit) | |
1141 | ac_prev=site ;; | |
1142 | -site=* | --site=* | --sit=*) | |
bec39cab | 1143 | site=$ac_optarg ;; |
3ace7edb | 1144 | |
c906108c SS |
1145 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
1146 | ac_prev=srcdir ;; | |
1147 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 1148 | srcdir=$ac_optarg ;; |
c906108c SS |
1149 | |
1150 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
1151 | | --syscon | --sysco | --sysc | --sys | --sy) | |
1152 | ac_prev=sysconfdir ;; | |
1153 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
1154 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 1155 | sysconfdir=$ac_optarg ;; |
c906108c SS |
1156 | |
1157 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 1158 | ac_prev=target_alias ;; |
c906108c | 1159 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 1160 | target_alias=$ac_optarg ;; |
c906108c SS |
1161 | |
1162 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
1163 | verbose=yes ;; | |
1164 | ||
bec39cab AC |
1165 | -version | --version | --versio | --versi | --vers | -V) |
1166 | ac_init_version=: ;; | |
c906108c SS |
1167 | |
1168 | -with-* | --with-*) | |
81ecdfbb | 1169 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 1170 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1171 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1172 | as_fn_error "invalid package name: $ac_useropt" | |
1173 | ac_useropt_orig=$ac_useropt | |
1174 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1175 | case $ac_user_opts in | |
1176 | *" | |
1177 | "with_$ac_useropt" | |
1178 | "*) ;; | |
1179 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
1180 | ac_unrecognized_sep=', ';; | |
b4e70030 | 1181 | esac |
81ecdfbb | 1182 | eval with_$ac_useropt=\$ac_optarg ;; |
c906108c SS |
1183 | |
1184 | -without-* | --without-*) | |
81ecdfbb | 1185 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 1186 | # Reject names that are not valid shell variable names. |
81ecdfbb RW |
1187 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
1188 | as_fn_error "invalid package name: $ac_useropt" | |
1189 | ac_useropt_orig=$ac_useropt | |
1190 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` | |
1191 | case $ac_user_opts in | |
1192 | *" | |
1193 | "with_$ac_useropt" | |
1194 | "*) ;; | |
1195 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
1196 | ac_unrecognized_sep=', ';; | |
1197 | esac | |
1198 | eval with_$ac_useropt=no ;; | |
c906108c SS |
1199 | |
1200 | --x) | |
1201 | # Obsolete; use --with-x. | |
1202 | with_x=yes ;; | |
1203 | ||
1204 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
1205 | | --x-incl | --x-inc | --x-in | --x-i) | |
1206 | ac_prev=x_includes ;; | |
1207 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
1208 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 1209 | x_includes=$ac_optarg ;; |
c906108c SS |
1210 | |
1211 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
1212 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
1213 | ac_prev=x_libraries ;; | |
1214 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
1215 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 1216 | x_libraries=$ac_optarg ;; |
c906108c | 1217 | |
81ecdfbb RW |
1218 | -*) as_fn_error "unrecognized option: \`$ac_option' |
1219 | Try \`$0 --help' for more information." | |
c906108c SS |
1220 | ;; |
1221 | ||
bec39cab AC |
1222 | *=*) |
1223 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
1224 | # Reject names that are not valid shell variable names. | |
81ecdfbb RW |
1225 | case $ac_envvar in #( |
1226 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
1227 | as_fn_error "invalid variable name: \`$ac_envvar'" ;; | |
1228 | esac | |
1229 | eval $ac_envvar=\$ac_optarg | |
bec39cab AC |
1230 | export $ac_envvar ;; |
1231 | ||
c906108c | 1232 | *) |
bec39cab | 1233 | # FIXME: should be removed in autoconf 3.0. |
81ecdfbb | 1234 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
bec39cab | 1235 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
81ecdfbb | 1236 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
bec39cab | 1237 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} |
c906108c SS |
1238 | ;; |
1239 | ||
1240 | esac | |
1241 | done | |
1242 | ||
1243 | if test -n "$ac_prev"; then | |
bec39cab | 1244 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
81ecdfbb | 1245 | as_fn_error "missing argument to $ac_option" |
c906108c | 1246 | fi |
c906108c | 1247 | |
81ecdfbb RW |
1248 | if test -n "$ac_unrecognized_opts"; then |
1249 | case $enable_option_checking in | |
1250 | no) ;; | |
1251 | fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; | |
1252 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
b4e70030 | 1253 | esac |
81ecdfbb | 1254 | fi |
b4e70030 | 1255 | |
81ecdfbb RW |
1256 | # Check all directory arguments for consistency. |
1257 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
1258 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
1259 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
1260 | libdir localedir mandir | |
b4e70030 | 1261 | do |
81ecdfbb RW |
1262 | eval ac_val=\$$ac_var |
1263 | # Remove trailing slashes. | |
1264 | case $ac_val in | |
1265 | */ ) | |
1266 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
1267 | eval $ac_var=\$ac_val;; | |
1268 | esac | |
1269 | # Be sure to have absolute directory names. | |
b4e70030 | 1270 | case $ac_val in |
81ecdfbb RW |
1271 | [\\/$]* | ?:[\\/]* ) continue;; |
1272 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
c906108c | 1273 | esac |
81ecdfbb | 1274 | as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" |
c906108c SS |
1275 | done |
1276 | ||
bec39cab AC |
1277 | # There might be people who depend on the old broken behavior: `$host' |
1278 | # used to hold the argument of --host etc. | |
1279 | # FIXME: To remove some day. | |
1280 | build=$build_alias | |
1281 | host=$host_alias | |
1282 | target=$target_alias | |
1283 | ||
1284 | # FIXME: To remove some day. | |
1285 | if test "x$host_alias" != x; then | |
1286 | if test "x$build_alias" = x; then | |
1287 | cross_compiling=maybe | |
81ecdfbb | 1288 | $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. |
bec39cab AC |
1289 | If a cross compiler is detected then cross compile mode will be used." >&2 |
1290 | elif test "x$build_alias" != "x$host_alias"; then | |
1291 | cross_compiling=yes | |
1292 | fi | |
1293 | fi | |
c906108c | 1294 | |
bec39cab AC |
1295 | ac_tool_prefix= |
1296 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
1297 | ||
1298 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 1299 | |
c906108c | 1300 | |
81ecdfbb RW |
1301 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
1302 | ac_ls_di=`ls -di .` && | |
1303 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
1304 | as_fn_error "working directory cannot be determined" | |
1305 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
1306 | as_fn_error "pwd does not report name of working directory" | |
1307 | ||
1308 | ||
c906108c SS |
1309 | # Find the source files, if location was not specified. |
1310 | if test -z "$srcdir"; then | |
1311 | ac_srcdir_defaulted=yes | |
81ecdfbb RW |
1312 | # Try the directory containing this script, then the parent directory. |
1313 | ac_confdir=`$as_dirname -- "$as_myself" || | |
1314 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
1315 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
1316 | X"$as_myself" : 'X\(//\)$' \| \ | |
1317 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
1318 | $as_echo X"$as_myself" | | |
1319 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
1320 | s//\1/ | |
1321 | q | |
1322 | } | |
1323 | /^X\(\/\/\)[^/].*/{ | |
1324 | s//\1/ | |
1325 | q | |
1326 | } | |
1327 | /^X\(\/\/\)$/{ | |
1328 | s//\1/ | |
1329 | q | |
1330 | } | |
1331 | /^X\(\/\).*/{ | |
1332 | s//\1/ | |
1333 | q | |
1334 | } | |
1335 | s/.*/./; q'` | |
c906108c | 1336 | srcdir=$ac_confdir |
81ecdfbb | 1337 | if test ! -r "$srcdir/$ac_unique_file"; then |
c906108c SS |
1338 | srcdir=.. |
1339 | fi | |
1340 | else | |
1341 | ac_srcdir_defaulted=no | |
1342 | fi | |
81ecdfbb RW |
1343 | if test ! -r "$srcdir/$ac_unique_file"; then |
1344 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
1345 | as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" | |
1346 | fi | |
1347 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" | |
1348 | ac_abs_confdir=`( | |
1349 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" | |
1350 | pwd)` | |
1351 | # When building in place, set srcdir=. | |
1352 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
1353 | srcdir=. | |
1354 | fi | |
1355 | # Remove unnecessary trailing slashes from srcdir. | |
1356 | # Double slashes in file names in object file debugging info | |
1357 | # mess up M-x gdb in Emacs. | |
1358 | case $srcdir in | |
1359 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
1360 | esac | |
1361 | for ac_var in $ac_precious_vars; do | |
1362 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
1363 | eval ac_env_${ac_var}_value=\$${ac_var} | |
1364 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
1365 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
1366 | done | |
c906108c | 1367 | |
bec39cab AC |
1368 | # |
1369 | # Report the --help message. | |
1370 | # | |
1371 | if test "$ac_init_help" = "long"; then | |
1372 | # Omit some internal or obsolete options to make the list less imposing. | |
1373 | # This message is too long to be a string in the A/UX 3.1 sh. | |
1374 | cat <<_ACEOF | |
1375 | \`configure' configures this package to adapt to many kinds of systems. | |
1376 | ||
1377 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
1378 | ||
1379 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1380 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
1381 | ||
1382 | Defaults for the options are specified in brackets. | |
1383 | ||
1384 | Configuration: | |
1385 | -h, --help display this help and exit | |
1386 | --help=short display options specific to this package | |
1387 | --help=recursive display the short help of all the included packages | |
1388 | -V, --version display version information and exit | |
1389 | -q, --quiet, --silent do not print \`checking...' messages | |
1390 | --cache-file=FILE cache test results in FILE [disabled] | |
1391 | -C, --config-cache alias for \`--cache-file=config.cache' | |
1392 | -n, --no-create do not create output files | |
1393 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1394 | ||
bec39cab AC |
1395 | Installation directories: |
1396 | --prefix=PREFIX install architecture-independent files in PREFIX | |
81ecdfbb | 1397 | [$ac_default_prefix] |
bec39cab | 1398 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
81ecdfbb | 1399 | [PREFIX] |
bec39cab AC |
1400 | |
1401 | By default, \`make install' will install all the files in | |
1402 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1403 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1404 | for instance \`--prefix=\$HOME'. | |
1405 | ||
1406 | For better control, use the options below. | |
1407 | ||
1408 | Fine tuning of the installation directories: | |
81ecdfbb RW |
1409 | --bindir=DIR user executables [EPREFIX/bin] |
1410 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1411 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
1412 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1413 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1414 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1415 | --libdir=DIR object code libraries [EPREFIX/lib] | |
1416 | --includedir=DIR C header files [PREFIX/include] | |
1417 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1418 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
1419 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
1420 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
1421 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
1422 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
1423 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] | |
1424 | --htmldir=DIR html documentation [DOCDIR] | |
1425 | --dvidir=DIR dvi documentation [DOCDIR] | |
1426 | --pdfdir=DIR pdf documentation [DOCDIR] | |
1427 | --psdir=DIR ps documentation [DOCDIR] | |
bec39cab AC |
1428 | _ACEOF |
1429 | ||
1430 | cat <<\_ACEOF | |
1431 | ||
9009e1ae MR |
1432 | Program names: |
1433 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
1434 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
1435 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
1436 | ||
bec39cab AC |
1437 | X features: |
1438 | --x-includes=DIR X include files are in DIR | |
1439 | --x-libraries=DIR X library files are in DIR | |
1440 | ||
1441 | System types: | |
1442 | --build=BUILD configure for building on BUILD [guessed] | |
1443 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
1444 | --target=TARGET configure for building compilers for TARGET [HOST] | |
1445 | _ACEOF | |
1446 | fi | |
1447 | ||
1448 | if test -n "$ac_init_help"; then | |
1449 | ||
1450 | cat <<\_ACEOF | |
1451 | ||
1452 | Optional Features: | |
81ecdfbb | 1453 | --disable-option-checking ignore unrecognized --enable/--with options |
bec39cab AC |
1454 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
1455 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
1456 | --enable-maintainer-mode enable make rules and dependencies not useful |
1457 | (and sometimes confusing) to the casual installer | |
da2f07f1 JK |
1458 | --enable-plugins Enable support for plugins (defaults no) |
1459 | --disable-largefile omit support for large files | |
a1220294 TT |
1460 | --enable-targets=TARGETS |
1461 | alternative target configurations | |
c0993dbe | 1462 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
1463 | --disable-gdbcli disable command-line interface (CLI) |
1464 | --disable-gdbmi disable machine-interface (MI) | |
1465 | --enable-tui enable full-screen terminal user interface (TUI) | |
1466 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
1467 | --enable-profiling enable profiling of GDB | |
3841debe | 1468 | --disable-rpath do not hardcode runtime library paths |
a1220294 | 1469 | --enable-werror treat compile warnings as errors |
32c1c914 | 1470 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
a1220294 | 1471 | --enable-gdb-build-warnings |
32c1c914 | 1472 | enable GDB specific build-time compiler warnings if |
a1220294 | 1473 | gcc is used |
32c1c914 | 1474 | --enable-sim link gdb with simulator |
bec39cab | 1475 | --enable-multi-ice build the multi-ice-gdb-server |
496c0e1b JB |
1476 | --enable-gdbserver automatically build gdbserver (yes/no/auto, default |
1477 | is auto) | |
bec39cab AC |
1478 | |
1479 | Optional Packages: | |
1480 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1481 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
a1220294 | 1482 | --with-separate-debug-dir=PATH |
32c1c914 | 1483 | look for global separate debug info in this path |
62e4f60c | 1484 | [LIBDIR/debug] |
b14b1491 TT |
1485 | --with-gdb-datadir=PATH look for global separate data files in this path |
1486 | [DATADIR/gdb] | |
29b0e8a2 | 1487 | --with-relocated-sources=PATH |
32c1c914 | 1488 | automatically relocate this path for source files |
7349ff92 | 1489 | --with-auto-load-dir=PATH |
aff139ff | 1490 | directories from which to load auto-loaded scripts |
1564a261 | 1491 | [$debugdir:$datadir/auto-load] |
bccbefd2 | 1492 | --with-auto-load-safe-path=PATH |
aff139ff | 1493 | directories safe to hold auto-loaded files |
7349ff92 | 1494 | [--with-auto-load-dir] |
bccbefd2 JK |
1495 | --without-auto-load-safe-path |
1496 | do not restrict auto-loaded files locations | |
05e7c244 | 1497 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
cb01cfba JB |
1498 | --with-curses use the curses library instead of the termcap |
1499 | library | |
c16158bc JM |
1500 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
1501 | --with-bugurl=URL Direct users to URL to report a bug | |
b040ad30 | 1502 | --with-zlib include zlib support (auto/yes/no) default=auto |
a1220294 TT |
1503 | --with-libiconv-prefix=DIR |
1504 | search for libiconv in DIR/include and DIR/lib | |
478aac75 | 1505 | --with-iconv-bin=PATH specify where to find the iconv program |
6a30b0a5 | 1506 | --with-system-readline use installed readline library |
b8e0a31c SD |
1507 | --with-jit-reader-dir=PATH |
1508 | directory to load the JIT readers from | |
5c39566f | 1509 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
1510 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
1511 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
1512 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
0c4a4063 DE |
1513 | --with-python[=PYTHON] include python support |
1514 | (auto/yes/no/<python-program>) | |
a1220294 TT |
1515 | --without-included-regex |
1516 | don't use included regex; this is the default on | |
1517 | systems with version 2 of the GNU C library (use | |
1518 | with caution on other system) | |
81ecdfbb | 1519 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
b14b1491 | 1520 | --with-system-gdbinit=PATH |
32c1c914 | 1521 | automatically load a system-wide gdbinit file |
5062cc19 KS |
1522 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
1523 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 1524 | --with-x use the X Window System |
bec39cab AC |
1525 | |
1526 | Some influential environment variables: | |
1527 | CC C compiler command | |
1528 | CFLAGS C compiler flags | |
1529 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1530 | nonstandard directory <lib dir> | |
81ecdfbb RW |
1531 | LIBS libraries to pass to the linker, e.g. -l<library> |
1532 | CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if | |
1533 | you have headers in a nonstandard directory <include dir> | |
bec39cab | 1534 | CPP C preprocessor |
f06e05e0 JK |
1535 | MAKEINFO Parent configure detects if it is of sufficient version. |
1536 | MAKEINFOFLAGS | |
1537 | Parameters for MAKEINFO. | |
81ecdfbb RW |
1538 | YACC The `Yet Another C Compiler' implementation to use. Defaults to |
1539 | the first program found out of: `bison -y', `byacc', `yacc'. | |
1540 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
1541 | This script will default YFLAGS to the empty string to avoid a | |
1542 | default value of `-d' given by some make applications. | |
1543 | XMKMF Path to xmkmf, Makefile generator for X Window System | |
bec39cab AC |
1544 | |
1545 | Use these variables to override the choices made by `configure' or to help | |
1546 | it to find libraries and programs with nonstandard names/locations. | |
1547 | ||
81ecdfbb | 1548 | Report bugs to the package provider. |
bec39cab | 1549 | _ACEOF |
81ecdfbb | 1550 | ac_status=$? |
bec39cab AC |
1551 | fi |
1552 | ||
1553 | if test "$ac_init_help" = "recursive"; then | |
1554 | # If there are subdirs, report their specific --help. | |
bec39cab | 1555 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
81ecdfbb RW |
1556 | test -d "$ac_dir" || |
1557 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
1558 | continue | |
bec39cab AC |
1559 | ac_builddir=. |
1560 | ||
81ecdfbb RW |
1561 | case "$ac_dir" in |
1562 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1563 | *) | |
1564 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
1565 | # A ".." for each directory in $ac_dir_suffix. | |
1566 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
1567 | case $ac_top_builddir_sub in | |
1568 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
1569 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
1570 | esac ;; | |
1571 | esac | |
1572 | ac_abs_top_builddir=$ac_pwd | |
1573 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
1574 | # for backward compatibility: | |
1575 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
1576 | |
1577 | case $srcdir in | |
81ecdfbb | 1578 | .) # We are building in place. |
bec39cab | 1579 | ac_srcdir=. |
81ecdfbb RW |
1580 | ac_top_srcdir=$ac_top_builddir_sub |
1581 | ac_abs_top_srcdir=$ac_pwd ;; | |
1582 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 1583 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
1584 | ac_top_srcdir=$srcdir |
1585 | ac_abs_top_srcdir=$srcdir ;; | |
1586 | *) # Relative name. | |
1587 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
1588 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
1589 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 1590 | esac |
81ecdfbb | 1591 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 1592 | |
81ecdfbb RW |
1593 | cd "$ac_dir" || { ac_status=$?; continue; } |
1594 | # Check for guested configure. | |
1595 | if test -f "$ac_srcdir/configure.gnu"; then | |
1596 | echo && | |
1597 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
1598 | elif test -f "$ac_srcdir/configure"; then | |
1599 | echo && | |
1600 | $SHELL "$ac_srcdir/configure" --help=recursive | |
3ace7edb | 1601 | else |
81ecdfbb RW |
1602 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
1603 | fi || ac_status=$? | |
1604 | cd "$ac_pwd" || { ac_status=$?; break; } | |
bec39cab AC |
1605 | done |
1606 | fi | |
1607 | ||
81ecdfbb | 1608 | test -n "$ac_init_help" && exit $ac_status |
bec39cab AC |
1609 | if $ac_init_version; then |
1610 | cat <<\_ACEOF | |
81ecdfbb RW |
1611 | configure |
1612 | generated by GNU Autoconf 2.64 | |
bec39cab | 1613 | |
81ecdfbb | 1614 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
1615 | This configure script is free software; the Free Software Foundation |
1616 | gives unlimited permission to copy, distribute and modify it. | |
1617 | _ACEOF | |
81ecdfbb | 1618 | exit |
bec39cab | 1619 | fi |
bec39cab | 1620 | |
81ecdfbb RW |
1621 | ## ------------------------ ## |
1622 | ## Autoconf initialization. ## | |
1623 | ## ------------------------ ## | |
bec39cab | 1624 | |
81ecdfbb RW |
1625 | # ac_fn_c_try_compile LINENO |
1626 | # -------------------------- | |
1627 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1628 | ac_fn_c_try_compile () | |
1629 | { | |
1630 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1631 | rm -f conftest.$ac_objext | |
1632 | if { { ac_try="$ac_compile" | |
1633 | case "(($ac_try" in | |
1634 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1635 | *) ac_try_echo=$ac_try;; | |
1636 | esac | |
1637 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1638 | $as_echo "$ac_try_echo"; } >&5 | |
1639 | (eval "$ac_compile") 2>conftest.err | |
1640 | ac_status=$? | |
1641 | if test -s conftest.err; then | |
1642 | grep -v '^ *+' conftest.err >conftest.er1 | |
1643 | cat conftest.er1 >&5 | |
1644 | mv -f conftest.er1 conftest.err | |
1645 | fi | |
1646 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1647 | test $ac_status = 0; } && { | |
1648 | test -z "$ac_c_werror_flag" || | |
1649 | test ! -s conftest.err | |
1650 | } && test -s conftest.$ac_objext; then : | |
1651 | ac_retval=0 | |
1652 | else | |
1653 | $as_echo "$as_me: failed program was:" >&5 | |
1654 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1655 | |
81ecdfbb RW |
1656 | ac_retval=1 |
1657 | fi | |
1658 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1659 | return $ac_retval | |
1660 | ||
1661 | } # ac_fn_c_try_compile | |
1662 | ||
1663 | # ac_fn_c_try_cpp LINENO | |
1664 | # ---------------------- | |
1665 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
1666 | ac_fn_c_try_cpp () | |
bec39cab | 1667 | { |
81ecdfbb RW |
1668 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1669 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
1670 | case "(($ac_try" in | |
1671 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1672 | *) ac_try_echo=$ac_try;; | |
1673 | esac | |
1674 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1675 | $as_echo "$ac_try_echo"; } >&5 | |
1676 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
1677 | ac_status=$? | |
1678 | if test -s conftest.err; then | |
1679 | grep -v '^ *+' conftest.err >conftest.er1 | |
1680 | cat conftest.er1 >&5 | |
1681 | mv -f conftest.er1 conftest.err | |
1682 | fi | |
1683 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1684 | test $ac_status = 0; } >/dev/null && { | |
1685 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
1686 | test ! -s conftest.err | |
1687 | }; then : | |
1688 | ac_retval=0 | |
1689 | else | |
1690 | $as_echo "$as_me: failed program was:" >&5 | |
1691 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1692 | |
81ecdfbb RW |
1693 | ac_retval=1 |
1694 | fi | |
1695 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1696 | return $ac_retval | |
bec39cab | 1697 | |
81ecdfbb | 1698 | } # ac_fn_c_try_cpp |
bec39cab | 1699 | |
81ecdfbb RW |
1700 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
1701 | # ------------------------------------------------------- | |
1702 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1703 | # the include files in INCLUDES and setting the cache variable VAR | |
1704 | # accordingly. | |
1705 | ac_fn_c_check_header_mongrel () | |
1706 | { | |
1707 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1708 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1710 | $as_echo_n "checking for $2... " >&6; } | |
1711 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1712 | $as_echo_n "(cached) " >&6 | |
1713 | fi | |
1714 | eval ac_res=\$$3 | |
1715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1716 | $as_echo "$ac_res" >&6; } | |
1717 | else | |
1718 | # Is the header compilable? | |
1719 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1720 | $as_echo_n "checking $2 usability... " >&6; } | |
1721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1722 | /* end confdefs.h. */ | |
1723 | $4 | |
1724 | #include <$2> | |
1725 | _ACEOF | |
1726 | if ac_fn_c_try_compile "$LINENO"; then : | |
1727 | ac_header_compiler=yes | |
1728 | else | |
1729 | ac_header_compiler=no | |
1730 | fi | |
1731 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1733 | $as_echo "$ac_header_compiler" >&6; } | |
bec39cab | 1734 | |
81ecdfbb RW |
1735 | # Is the header present? |
1736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1737 | $as_echo_n "checking $2 presence... " >&6; } | |
1738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1739 | /* end confdefs.h. */ | |
1740 | #include <$2> | |
1741 | _ACEOF | |
1742 | if ac_fn_c_try_cpp "$LINENO"; then : | |
1743 | ac_header_preproc=yes | |
1744 | else | |
1745 | ac_header_preproc=no | |
1746 | fi | |
1747 | rm -f conftest.err conftest.$ac_ext | |
1748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1749 | $as_echo "$ac_header_preproc" >&6; } | |
bec39cab | 1750 | |
81ecdfbb RW |
1751 | # So? What about this header? |
1752 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1753 | yes:no: ) | |
1754 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1755 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1756 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1757 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1758 | ;; | |
1759 | no:yes:* ) | |
1760 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1761 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1762 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1763 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1764 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1765 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1766 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1767 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1768 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1769 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1770 | ;; | |
1771 | esac | |
1772 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1773 | $as_echo_n "checking for $2... " >&6; } | |
1774 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1775 | $as_echo_n "(cached) " >&6 | |
1776 | else | |
1777 | eval "$3=\$ac_header_compiler" | |
1778 | fi | |
1779 | eval ac_res=\$$3 | |
1780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1781 | $as_echo "$ac_res" >&6; } | |
1782 | fi | |
1783 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1784 | |
81ecdfbb | 1785 | } # ac_fn_c_check_header_mongrel |
bec39cab | 1786 | |
81ecdfbb RW |
1787 | # ac_fn_c_try_run LINENO |
1788 | # ---------------------- | |
1789 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes | |
1790 | # that executables *can* be run. | |
1791 | ac_fn_c_try_run () | |
1792 | { | |
1793 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1794 | if { { ac_try="$ac_link" | |
1795 | case "(($ac_try" in | |
1796 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1797 | *) ac_try_echo=$ac_try;; | |
1798 | esac | |
1799 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1800 | $as_echo "$ac_try_echo"; } >&5 | |
1801 | (eval "$ac_link") 2>&5 | |
1802 | ac_status=$? | |
1803 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1804 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
1805 | { { case "(($ac_try" in | |
1806 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1807 | *) ac_try_echo=$ac_try;; | |
1808 | esac | |
1809 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1810 | $as_echo "$ac_try_echo"; } >&5 | |
1811 | (eval "$ac_try") 2>&5 | |
1812 | ac_status=$? | |
1813 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1814 | test $ac_status = 0; }; }; then : | |
1815 | ac_retval=0 | |
1816 | else | |
1817 | $as_echo "$as_me: program exited with status $ac_status" >&5 | |
1818 | $as_echo "$as_me: failed program was:" >&5 | |
1819 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 1820 | |
81ecdfbb RW |
1821 | ac_retval=$ac_status |
1822 | fi | |
1823 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
1824 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
1825 | return $ac_retval | |
bec39cab | 1826 | |
81ecdfbb | 1827 | } # ac_fn_c_try_run |
bec39cab | 1828 | |
81ecdfbb RW |
1829 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
1830 | # ------------------------------------------------------- | |
1831 | # Tests whether HEADER exists and can be compiled using the include files in | |
1832 | # INCLUDES, setting the cache variable VAR accordingly. | |
1833 | ac_fn_c_check_header_compile () | |
1834 | { | |
1835 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1837 | $as_echo_n "checking for $2... " >&6; } | |
1838 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
1839 | $as_echo_n "(cached) " >&6 | |
1840 | else | |
1841 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1842 | /* end confdefs.h. */ | |
1843 | $4 | |
1844 | #include <$2> | |
bec39cab | 1845 | _ACEOF |
81ecdfbb RW |
1846 | if ac_fn_c_try_compile "$LINENO"; then : |
1847 | eval "$3=yes" | |
1848 | else | |
1849 | eval "$3=no" | |
1850 | fi | |
1851 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1852 | fi | |
1853 | eval ac_res=\$$3 | |
1854 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1855 | $as_echo "$ac_res" >&6; } | |
1856 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
bec39cab | 1857 | |
81ecdfbb | 1858 | } # ac_fn_c_check_header_compile |
bec39cab | 1859 | |
81ecdfbb RW |
1860 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
1861 | # -------------------------------------------- | |
1862 | # Tries to find the compile-time value of EXPR in a program that includes | |
1863 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
1864 | # computed | |
1865 | ac_fn_c_compute_int () | |
1866 | { | |
1867 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1868 | if test "$cross_compiling" = yes; then | |
1869 | # Depending upon the size, compute the lo and hi bounds. | |
1870 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1871 | /* end confdefs.h. */ | |
1872 | $4 | |
1873 | int | |
1874 | main () | |
1875 | { | |
1876 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
1877 | test_array [0] = 0 | |
bec39cab | 1878 | |
81ecdfbb RW |
1879 | ; |
1880 | return 0; | |
1881 | } | |
1882 | _ACEOF | |
1883 | if ac_fn_c_try_compile "$LINENO"; then : | |
1884 | ac_lo=0 ac_mid=0 | |
1885 | while :; do | |
1886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1887 | /* end confdefs.h. */ | |
1888 | $4 | |
1889 | int | |
1890 | main () | |
1891 | { | |
1892 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1893 | test_array [0] = 0 | |
bec39cab | 1894 | |
81ecdfbb RW |
1895 | ; |
1896 | return 0; | |
1897 | } | |
1898 | _ACEOF | |
1899 | if ac_fn_c_try_compile "$LINENO"; then : | |
1900 | ac_hi=$ac_mid; break | |
1901 | else | |
1902 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
1903 | if test $ac_lo -le $ac_mid; then | |
1904 | ac_lo= ac_hi= | |
1905 | break | |
1906 | fi | |
1907 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val | |
c906108c | 1908 | fi |
81ecdfbb RW |
1909 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1910 | done | |
c906108c | 1911 | else |
81ecdfbb RW |
1912 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1913 | /* end confdefs.h. */ | |
1914 | $4 | |
1915 | int | |
1916 | main () | |
1917 | { | |
1918 | static int test_array [1 - 2 * !(($2) < 0)]; | |
1919 | test_array [0] = 0 | |
bec39cab | 1920 | |
81ecdfbb RW |
1921 | ; |
1922 | return 0; | |
1923 | } | |
1924 | _ACEOF | |
1925 | if ac_fn_c_try_compile "$LINENO"; then : | |
1926 | ac_hi=-1 ac_mid=-1 | |
1927 | while :; do | |
1928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1929 | /* end confdefs.h. */ | |
1930 | $4 | |
1931 | int | |
1932 | main () | |
1933 | { | |
1934 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
1935 | test_array [0] = 0 | |
bec39cab | 1936 | |
81ecdfbb RW |
1937 | ; |
1938 | return 0; | |
1939 | } | |
1940 | _ACEOF | |
1941 | if ac_fn_c_try_compile "$LINENO"; then : | |
1942 | ac_lo=$ac_mid; break | |
1943 | else | |
1944 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
1945 | if test $ac_mid -le $ac_hi; then | |
1946 | ac_lo= ac_hi= | |
1947 | break | |
1948 | fi | |
1949 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val | |
1950 | fi | |
1951 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1952 | done | |
1953 | else | |
1954 | ac_lo= ac_hi= | |
1955 | fi | |
1956 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1957 | fi | |
1958 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1959 | # Binary search between lo and hi bounds. | |
1960 | while test "x$ac_lo" != "x$ac_hi"; do | |
1961 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
1962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1963 | /* end confdefs.h. */ | |
1964 | $4 | |
1965 | int | |
1966 | main () | |
1967 | { | |
1968 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
1969 | test_array [0] = 0 | |
bec39cab | 1970 | |
81ecdfbb RW |
1971 | ; |
1972 | return 0; | |
1973 | } | |
1974 | _ACEOF | |
1975 | if ac_fn_c_try_compile "$LINENO"; then : | |
1976 | ac_hi=$ac_mid | |
1977 | else | |
1978 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val | |
1979 | fi | |
1980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1981 | done | |
1982 | case $ac_lo in #(( | |
1983 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
1984 | '') ac_retval=1 ;; | |
1985 | esac | |
1986 | else | |
1987 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1988 | /* end confdefs.h. */ | |
1989 | $4 | |
1990 | static long int longval () { return $2; } | |
1991 | static unsigned long int ulongval () { return $2; } | |
1992 | #include <stdio.h> | |
1993 | #include <stdlib.h> | |
1994 | int | |
1995 | main () | |
1996 | { | |
bec39cab | 1997 | |
81ecdfbb RW |
1998 | FILE *f = fopen ("conftest.val", "w"); |
1999 | if (! f) | |
2000 | return 1; | |
2001 | if (($2) < 0) | |
2002 | { | |
2003 | long int i = longval (); | |
2004 | if (i != ($2)) | |
2005 | return 1; | |
2006 | fprintf (f, "%ld", i); | |
2007 | } | |
2008 | else | |
2009 | { | |
2010 | unsigned long int i = ulongval (); | |
2011 | if (i != ($2)) | |
2012 | return 1; | |
2013 | fprintf (f, "%lu", i); | |
2014 | } | |
2015 | /* Do not output a trailing newline, as this causes \r\n confusion | |
2016 | on some platforms. */ | |
2017 | return ferror (f) || fclose (f) != 0; | |
bec39cab | 2018 | |
81ecdfbb RW |
2019 | ; |
2020 | return 0; | |
2021 | } | |
2022 | _ACEOF | |
2023 | if ac_fn_c_try_run "$LINENO"; then : | |
2024 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
2025 | else | |
2026 | ac_retval=1 | |
2027 | fi | |
2028 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
2029 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
2030 | rm -f conftest.val | |
bec39cab | 2031 | |
81ecdfbb RW |
2032 | fi |
2033 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2034 | return $ac_retval | |
bec39cab | 2035 | |
81ecdfbb | 2036 | } # ac_fn_c_compute_int |
bec39cab | 2037 | |
c971b7fa PA |
2038 | # ac_fn_c_try_link LINENO |
2039 | # ----------------------- | |
2040 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
2041 | ac_fn_c_try_link () | |
2042 | { | |
2043 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2044 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2045 | if { { ac_try="$ac_link" | |
2046 | case "(($ac_try" in | |
2047 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
2048 | *) ac_try_echo=$ac_try;; | |
2049 | esac | |
2050 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
2051 | $as_echo "$ac_try_echo"; } >&5 | |
2052 | (eval "$ac_link") 2>conftest.err | |
2053 | ac_status=$? | |
2054 | if test -s conftest.err; then | |
2055 | grep -v '^ *+' conftest.err >conftest.er1 | |
2056 | cat conftest.er1 >&5 | |
2057 | mv -f conftest.er1 conftest.err | |
2058 | fi | |
2059 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
2060 | test $ac_status = 0; } && { | |
2061 | test -z "$ac_c_werror_flag" || | |
2062 | test ! -s conftest.err | |
2063 | } && test -s conftest$ac_exeext && { | |
2064 | test "$cross_compiling" = yes || | |
2065 | $as_test_x conftest$ac_exeext | |
2066 | }; then : | |
2067 | ac_retval=0 | |
2068 | else | |
2069 | $as_echo "$as_me: failed program was:" >&5 | |
2070 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2071 | ||
2072 | ac_retval=1 | |
2073 | fi | |
2074 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
2075 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
2076 | # interfere with the next link command; also delete a directory that is | |
2077 | # left behind by Apple's compiler. We do this before executing the actions. | |
2078 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
2079 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2080 | return $ac_retval | |
2081 | ||
2082 | } # ac_fn_c_try_link | |
2083 | ||
55a8c076 YQ |
2084 | # ac_fn_c_check_func LINENO FUNC VAR |
2085 | # ---------------------------------- | |
2086 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
2087 | ac_fn_c_check_func () | |
81ecdfbb RW |
2088 | { |
2089 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2090 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2091 | $as_echo_n "checking for $2... " >&6; } | |
2092 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2093 | $as_echo_n "(cached) " >&6 | |
2094 | else | |
81ecdfbb RW |
2095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
2096 | /* end confdefs.h. */ | |
55a8c076 YQ |
2097 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
2098 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
2099 | #define $2 innocuous_$2 | |
2100 | ||
2101 | /* System header to define __stub macros and hopefully few prototypes, | |
2102 | which can conflict with char $2 (); below. | |
2103 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2104 | <limits.h> exists even on freestanding compilers. */ | |
2105 | ||
2106 | #ifdef __STDC__ | |
2107 | # include <limits.h> | |
2108 | #else | |
2109 | # include <assert.h> | |
2110 | #endif | |
2111 | ||
2112 | #undef $2 | |
2113 | ||
2114 | /* Override any GCC internal prototype to avoid an error. | |
2115 | Use char because int might match the return type of a GCC | |
2116 | builtin and then its argument prototype would still apply. */ | |
2117 | #ifdef __cplusplus | |
2118 | extern "C" | |
2119 | #endif | |
2120 | char $2 (); | |
2121 | /* The GNU C library defines this for functions which it implements | |
2122 | to always fail with ENOSYS. Some functions are actually named | |
2123 | something starting with __ and the normal name is an alias. */ | |
2124 | #if defined __stub_$2 || defined __stub___$2 | |
2125 | choke me | |
2126 | #endif | |
2127 | ||
2128 | int | |
2129 | main () | |
2130 | { | |
2131 | return $2 (); | |
2132 | ; | |
2133 | return 0; | |
2134 | } | |
2135 | _ACEOF | |
2136 | if ac_fn_c_try_link "$LINENO"; then : | |
2137 | eval "$3=yes" | |
2138 | else | |
2139 | eval "$3=no" | |
2140 | fi | |
2141 | rm -f core conftest.err conftest.$ac_objext \ | |
2142 | conftest$ac_exeext conftest.$ac_ext | |
2143 | fi | |
2144 | eval ac_res=\$$3 | |
2145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2146 | $as_echo "$ac_res" >&6; } | |
2147 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2148 | ||
2149 | } # ac_fn_c_check_func | |
2150 | ||
770d76d7 PA |
2151 | # ac_fn_c_check_decl LINENO SYMBOL VAR |
2152 | # ------------------------------------ | |
2153 | # Tests whether SYMBOL is declared, setting cache variable VAR accordingly. | |
2154 | ac_fn_c_check_decl () | |
2155 | { | |
2156 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2157 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
2158 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
2159 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
2160 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } | |
2161 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2162 | $as_echo_n "(cached) " >&6 | |
2163 | else | |
2164 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2165 | /* end confdefs.h. */ | |
2166 | $4 | |
2167 | int | |
2168 | main () | |
2169 | { | |
2170 | #ifndef $as_decl_name | |
2171 | #ifdef __cplusplus | |
2172 | (void) $as_decl_use; | |
2173 | #else | |
2174 | (void) $as_decl_name; | |
2175 | #endif | |
2176 | #endif | |
2177 | ||
2178 | ; | |
2179 | return 0; | |
2180 | } | |
2181 | _ACEOF | |
2182 | if ac_fn_c_try_compile "$LINENO"; then : | |
2183 | eval "$3=yes" | |
2184 | else | |
2185 | eval "$3=no" | |
2186 | fi | |
2187 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2188 | fi | |
2189 | eval ac_res=\$$3 | |
2190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2191 | $as_echo "$ac_res" >&6; } | |
2192 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2193 | ||
2194 | } # ac_fn_c_check_decl | |
2195 | ||
55a8c076 YQ |
2196 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
2197 | # ---------------------------------------------------- | |
2198 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
2199 | # INCLUDES, setting cache variable VAR accordingly. | |
2200 | ac_fn_c_check_member () | |
2201 | { | |
2202 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
2204 | $as_echo_n "checking for $2.$3... " >&6; } | |
2205 | if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2206 | $as_echo_n "(cached) " >&6 | |
2207 | else | |
2208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2209 | /* end confdefs.h. */ | |
2210 | $5 | |
2211 | int | |
2212 | main () | |
2213 | { | |
2214 | static $2 ac_aggr; | |
2215 | if (ac_aggr.$3) | |
2216 | return 0; | |
2217 | ; | |
2218 | return 0; | |
2219 | } | |
2220 | _ACEOF | |
2221 | if ac_fn_c_try_compile "$LINENO"; then : | |
2222 | eval "$4=yes" | |
2223 | else | |
2224 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2225 | /* end confdefs.h. */ | |
2226 | $5 | |
2227 | int | |
2228 | main () | |
2229 | { | |
2230 | static $2 ac_aggr; | |
2231 | if (sizeof ac_aggr.$3) | |
2232 | return 0; | |
2233 | ; | |
2234 | return 0; | |
2235 | } | |
2236 | _ACEOF | |
2237 | if ac_fn_c_try_compile "$LINENO"; then : | |
2238 | eval "$4=yes" | |
2239 | else | |
2240 | eval "$4=no" | |
2241 | fi | |
2242 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2243 | fi | |
2244 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2245 | fi | |
2246 | eval ac_res=\$$4 | |
2247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2248 | $as_echo "$ac_res" >&6; } | |
2249 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
2250 | ||
2251 | } # ac_fn_c_check_member | |
2252 | ||
2253 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
2254 | # ------------------------------------------- | |
2255 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
2256 | # variable VAR accordingly. | |
2257 | ac_fn_c_check_type () | |
2258 | { | |
2259 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
2260 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
2261 | $as_echo_n "checking for $2... " >&6; } | |
2262 | if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : | |
2263 | $as_echo_n "(cached) " >&6 | |
2264 | else | |
2265 | eval "$3=no" | |
2266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2267 | /* end confdefs.h. */ | |
2268 | $4 | |
2269 | int | |
2270 | main () | |
2271 | { | |
2272 | if (sizeof ($2)) | |
2273 | return 0; | |
2274 | ; | |
2275 | return 0; | |
2276 | } | |
2277 | _ACEOF | |
2278 | if ac_fn_c_try_compile "$LINENO"; then : | |
2279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
2280 | /* end confdefs.h. */ | |
2281 | $4 | |
2282 | int | |
2283 | main () | |
2284 | { | |
2285 | if (sizeof (($2))) | |
2286 | return 0; | |
2287 | ; | |
2288 | return 0; | |
2289 | } | |
2290 | _ACEOF | |
2291 | if ac_fn_c_try_compile "$LINENO"; then : | |
d5af19ba | 2292 | |
81ecdfbb RW |
2293 | else |
2294 | eval "$3=yes" | |
2295 | fi | |
2296 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2297 | fi | |
2298 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
2299 | fi | |
2300 | eval ac_res=\$$3 | |
2301 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
2302 | $as_echo "$ac_res" >&6; } | |
2303 | eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} | |
d5af19ba | 2304 | |
81ecdfbb RW |
2305 | } # ac_fn_c_check_type |
2306 | cat >config.log <<_ACEOF | |
2307 | This file contains any messages produced by compilers while | |
2308 | running configure, to aid debugging if configure makes a mistake. | |
d5af19ba | 2309 | |
81ecdfbb RW |
2310 | It was created by $as_me, which was |
2311 | generated by GNU Autoconf 2.64. Invocation command line was | |
b4e70030 | 2312 | |
81ecdfbb | 2313 | $ $0 $@ |
413ccac7 | 2314 | |
81ecdfbb RW |
2315 | _ACEOF |
2316 | exec 5>>config.log | |
2317 | { | |
2318 | cat <<_ASUNAME | |
2319 | ## --------- ## | |
2320 | ## Platform. ## | |
2321 | ## --------- ## | |
413ccac7 | 2322 | |
81ecdfbb RW |
2323 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
2324 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
2325 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
2326 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
2327 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
85981d60 | 2328 | |
81ecdfbb RW |
2329 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
2330 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
413ccac7 | 2331 | |
81ecdfbb RW |
2332 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
2333 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
2334 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
2335 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
2336 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
2337 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
2338 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
c906108c | 2339 | |
81ecdfbb | 2340 | _ASUNAME |
bec39cab | 2341 | |
bec39cab AC |
2342 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2343 | for as_dir in $PATH | |
2344 | do | |
2345 | IFS=$as_save_IFS | |
2346 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2347 | $as_echo "PATH: $as_dir" |
2348 | done | |
2349 | IFS=$as_save_IFS | |
bec39cab | 2350 | |
81ecdfbb | 2351 | } >&5 |
bec39cab | 2352 | |
81ecdfbb | 2353 | cat >&5 <<_ACEOF |
bec39cab | 2354 | |
bec39cab | 2355 | |
81ecdfbb RW |
2356 | ## ----------- ## |
2357 | ## Core tests. ## | |
2358 | ## ----------- ## | |
2359 | ||
2360 | _ACEOF | |
2361 | ||
2362 | ||
2363 | # Keep a trace of the command line. | |
2364 | # Strip out --no-create and --no-recursion so they do not pile up. | |
2365 | # Strip out --silent because we don't want to record it for future runs. | |
2366 | # Also quote any args containing shell meta-characters. | |
2367 | # Make two passes to allow for proper duplicate-argument suppression. | |
2368 | ac_configure_args= | |
2369 | ac_configure_args0= | |
2370 | ac_configure_args1= | |
2371 | ac_must_keep_next=false | |
2372 | for ac_pass in 1 2 | |
2373 | do | |
2374 | for ac_arg | |
2375 | do | |
2376 | case $ac_arg in | |
2377 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
2378 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
2379 | | -silent | --silent | --silen | --sile | --sil) | |
2380 | continue ;; | |
2381 | *\'*) | |
2382 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2383 | esac | |
2384 | case $ac_pass in | |
2385 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
2386 | 2) | |
2387 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
2388 | if test $ac_must_keep_next = true; then | |
2389 | ac_must_keep_next=false # Got value, back to normal. | |
2390 | else | |
2391 | case $ac_arg in | |
2392 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
2393 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
2394 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
2395 | | -with-* | --with-* | -without-* | --without-* | --x) | |
2396 | case "$ac_configure_args0 " in | |
2397 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
2398 | esac | |
2399 | ;; | |
2400 | -* ) ac_must_keep_next=true ;; | |
2401 | esac | |
2402 | fi | |
2403 | as_fn_append ac_configure_args " '$ac_arg'" | |
2404 | ;; | |
2405 | esac | |
2406 | done | |
2407 | done | |
2408 | { ac_configure_args0=; unset ac_configure_args0;} | |
2409 | { ac_configure_args1=; unset ac_configure_args1;} | |
2410 | ||
2411 | # When interrupted or exit'd, cleanup temporary files, and complete | |
2412 | # config.log. We remove comments because anyway the quotes in there | |
2413 | # would cause problems or look ugly. | |
2414 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
2415 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
2416 | trap 'exit_status=$? | |
2417 | # Save into config.log some information that might help in debugging. | |
2418 | { | |
2419 | echo | |
2420 | ||
2421 | cat <<\_ASBOX | |
2422 | ## ---------------- ## | |
2423 | ## Cache variables. ## | |
2424 | ## ---------------- ## | |
2425 | _ASBOX | |
2426 | echo | |
2427 | # The following way of writing the cache mishandles newlines in values, | |
2428 | ( | |
2429 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
2430 | eval ac_val=\$$ac_var | |
2431 | case $ac_val in #( | |
2432 | *${as_nl}*) | |
2433 | case $ac_var in #( | |
2434 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
2435 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
2436 | esac | |
2437 | case $ac_var in #( | |
2438 | _ | IFS | as_nl) ;; #( | |
2439 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
2440 | *) { eval $ac_var=; unset $ac_var;} ;; | |
2441 | esac ;; | |
2442 | esac | |
2443 | done | |
2444 | (set) 2>&1 | | |
2445 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
2446 | *${as_nl}ac_space=\ *) | |
2447 | sed -n \ | |
2448 | "s/'\''/'\''\\\\'\'''\''/g; | |
2449 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
2450 | ;; #( | |
2451 | *) | |
2452 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
2453 | ;; | |
2454 | esac | | |
2455 | sort | |
2456 | ) | |
2457 | echo | |
2458 | ||
2459 | cat <<\_ASBOX | |
2460 | ## ----------------- ## | |
2461 | ## Output variables. ## | |
2462 | ## ----------------- ## | |
2463 | _ASBOX | |
2464 | echo | |
2465 | for ac_var in $ac_subst_vars | |
2466 | do | |
2467 | eval ac_val=\$$ac_var | |
2468 | case $ac_val in | |
2469 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2470 | esac | |
2471 | $as_echo "$ac_var='\''$ac_val'\''" | |
2472 | done | sort | |
2473 | echo | |
2474 | ||
2475 | if test -n "$ac_subst_files"; then | |
2476 | cat <<\_ASBOX | |
2477 | ## ------------------- ## | |
2478 | ## File substitutions. ## | |
2479 | ## ------------------- ## | |
2480 | _ASBOX | |
2481 | echo | |
2482 | for ac_var in $ac_subst_files | |
2483 | do | |
2484 | eval ac_val=\$$ac_var | |
2485 | case $ac_val in | |
2486 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
2487 | esac | |
2488 | $as_echo "$ac_var='\''$ac_val'\''" | |
2489 | done | sort | |
2490 | echo | |
2491 | fi | |
2492 | ||
2493 | if test -s confdefs.h; then | |
2494 | cat <<\_ASBOX | |
2495 | ## ----------- ## | |
2496 | ## confdefs.h. ## | |
2497 | ## ----------- ## | |
2498 | _ASBOX | |
2499 | echo | |
2500 | cat confdefs.h | |
2501 | echo | |
2502 | fi | |
2503 | test "$ac_signal" != 0 && | |
2504 | $as_echo "$as_me: caught signal $ac_signal" | |
2505 | $as_echo "$as_me: exit $exit_status" | |
2506 | } >&5 | |
2507 | rm -f core *.core core.conftest.* && | |
2508 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
2509 | exit $exit_status | |
2510 | ' 0 | |
2511 | for ac_signal in 1 2 13 15; do | |
2512 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
2513 | done | |
2514 | ac_signal=0 | |
2515 | ||
2516 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
2517 | rm -f -r conftest* confdefs.h | |
2518 | ||
2519 | $as_echo "/* confdefs.h */" > confdefs.h | |
2520 | ||
2521 | # Predefined preprocessor variables. | |
2522 | ||
2523 | cat >>confdefs.h <<_ACEOF | |
2524 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
2525 | _ACEOF | |
2526 | ||
2527 | cat >>confdefs.h <<_ACEOF | |
2528 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
2529 | _ACEOF | |
2530 | ||
2531 | cat >>confdefs.h <<_ACEOF | |
2532 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
2533 | _ACEOF | |
2534 | ||
2535 | cat >>confdefs.h <<_ACEOF | |
2536 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
2537 | _ACEOF | |
2538 | ||
2539 | cat >>confdefs.h <<_ACEOF | |
2540 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
2541 | _ACEOF | |
2542 | ||
2543 | cat >>confdefs.h <<_ACEOF | |
2544 | #define PACKAGE_URL "$PACKAGE_URL" | |
2545 | _ACEOF | |
2546 | ||
2547 | ||
2548 | # Let the site file select an alternate cache file if it wants to. | |
2549 | # Prefer an explicitly selected file to automatically selected ones. | |
2550 | ac_site_file1=NONE | |
2551 | ac_site_file2=NONE | |
2552 | if test -n "$CONFIG_SITE"; then | |
2553 | ac_site_file1=$CONFIG_SITE | |
2554 | elif test "x$prefix" != xNONE; then | |
2555 | ac_site_file1=$prefix/share/config.site | |
2556 | ac_site_file2=$prefix/etc/config.site | |
2557 | else | |
2558 | ac_site_file1=$ac_default_prefix/share/config.site | |
2559 | ac_site_file2=$ac_default_prefix/etc/config.site | |
2560 | fi | |
2561 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" | |
2562 | do | |
2563 | test "x$ac_site_file" = xNONE && continue | |
2564 | if test -r "$ac_site_file"; then | |
2565 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
2566 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} | |
2567 | sed 's/^/| /' "$ac_site_file" >&5 | |
2568 | . "$ac_site_file" | |
2569 | fi | |
2570 | done | |
2571 | ||
2572 | if test -r "$cache_file"; then | |
2573 | # Some versions of bash will fail to source /dev/null (special | |
2574 | # files actually), so we avoid doing that. | |
2575 | if test -f "$cache_file"; then | |
2576 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
2577 | $as_echo "$as_me: loading cache $cache_file" >&6;} | |
2578 | case $cache_file in | |
2579 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
2580 | *) . "./$cache_file";; | |
2581 | esac | |
2582 | fi | |
2583 | else | |
2584 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
2585 | $as_echo "$as_me: creating cache $cache_file" >&6;} | |
2586 | >$cache_file | |
bec39cab AC |
2587 | fi |
2588 | ||
81ecdfbb RW |
2589 | # Check that the precious variables saved in the cache have kept the same |
2590 | # value. | |
2591 | ac_cache_corrupted=false | |
2592 | for ac_var in $ac_precious_vars; do | |
2593 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
2594 | eval ac_new_set=\$ac_env_${ac_var}_set | |
2595 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
2596 | eval ac_new_val=\$ac_env_${ac_var}_value | |
2597 | case $ac_old_set,$ac_new_set in | |
2598 | set,) | |
2599 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
2600 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
2601 | ac_cache_corrupted=: ;; | |
2602 | ,set) | |
2603 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 | |
2604 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
2605 | ac_cache_corrupted=: ;; | |
2606 | ,);; | |
2607 | *) | |
2608 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
2609 | # differences in whitespace do not lead to failure. | |
2610 | ac_old_val_w=`echo x $ac_old_val` | |
2611 | ac_new_val_w=`echo x $ac_new_val` | |
2612 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
2613 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 | |
2614 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
2615 | ac_cache_corrupted=: | |
2616 | else | |
2617 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
2618 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
2619 | eval $ac_var=\$ac_old_val | |
2620 | fi | |
2621 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 | |
2622 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
2623 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 | |
2624 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
2625 | fi;; | |
2626 | esac | |
2627 | # Pass precious variables to config.status. | |
2628 | if test "$ac_new_set" = set; then | |
2629 | case $ac_new_val in | |
2630 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
2631 | *) ac_arg=$ac_var=$ac_new_val ;; | |
2632 | esac | |
2633 | case " $ac_configure_args " in | |
2634 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
2635 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
2636 | esac | |
2637 | fi | |
2638 | done | |
2639 | if $ac_cache_corrupted; then | |
2640 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
2641 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
2643 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
2644 | as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 | |
2645 | fi | |
2646 | ## -------------------- ## | |
2647 | ## Main body of script. ## | |
2648 | ## -------------------- ## | |
2649 | ||
2650 | ac_ext=c | |
2651 | ac_cpp='$CPP $CPPFLAGS' | |
2652 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2653 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2654 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2655 | ||
2656 | ||
2657 | ||
2658 | ||
2659 | ||
2660 | ac_config_headers="$ac_config_headers config.h:config.in" | |
2661 | ||
2662 | ||
2663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
2664 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } | |
2665 | # Check whether --enable-maintainer-mode was given. | |
2666 | if test "${enable_maintainer_mode+set}" = set; then : | |
2667 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval | |
2668 | else | |
2669 | USE_MAINTAINER_MODE=no | |
2670 | fi | |
2671 | ||
2672 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 | |
2673 | $as_echo "$USE_MAINTAINER_MODE" >&6; } | |
2674 | if test $USE_MAINTAINER_MODE = yes; then | |
2675 | MAINTAINER_MODE_TRUE= | |
2676 | MAINTAINER_MODE_FALSE='#' | |
2677 | else | |
2678 | MAINTAINER_MODE_TRUE='#' | |
2679 | MAINTAINER_MODE_FALSE= | |
2680 | fi | |
2681 | ||
2682 | MAINT=$MAINTAINER_MODE_TRUE | |
2683 | ||
2684 | ||
2685 | ||
f5f1cdb6 JK |
2686 | # Provide more thorough testing by -lmcheck. |
2687 | # Set it to 'true' for development snapshots, 'false' for releases or | |
2688 | # pre-releases. | |
2689 | development=true | |
2690 | ||
81ecdfbb RW |
2691 | ac_ext=c |
2692 | ac_cpp='$CPP $CPPFLAGS' | |
2693 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2694 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2695 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2696 | if test -n "$ac_tool_prefix"; then | |
2697 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2698 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2700 | $as_echo_n "checking for $ac_word... " >&6; } | |
2701 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2702 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2703 | else |
2704 | if test -n "$CC"; then | |
2705 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2706 | else | |
bec39cab AC |
2707 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2708 | for as_dir in $PATH | |
2709 | do | |
2710 | IFS=$as_save_IFS | |
2711 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2712 | for ac_exec_ext in '' $ac_executable_extensions; do |
2713 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2714 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2715 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2716 | break 2 |
2717 | fi | |
2718 | done | |
81ecdfbb RW |
2719 | done |
2720 | IFS=$as_save_IFS | |
bec39cab | 2721 | |
c906108c SS |
2722 | fi |
2723 | fi | |
bec39cab | 2724 | CC=$ac_cv_prog_CC |
c906108c | 2725 | if test -n "$CC"; then |
81ecdfbb RW |
2726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2727 | $as_echo "$CC" >&6; } | |
c906108c | 2728 | else |
81ecdfbb RW |
2729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2730 | $as_echo "no" >&6; } | |
c906108c SS |
2731 | fi |
2732 | ||
81ecdfbb | 2733 | |
b4e70030 JB |
2734 | fi |
2735 | if test -z "$ac_cv_prog_CC"; then | |
2736 | ac_ct_CC=$CC | |
81ecdfbb RW |
2737 | # Extract the first word of "gcc", so it can be a program name with args. |
2738 | set dummy gcc; ac_word=$2 | |
2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2740 | $as_echo_n "checking for $ac_word... " >&6; } | |
2741 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2742 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
2743 | else |
2744 | if test -n "$ac_ct_CC"; then | |
2745 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2746 | else | |
2747 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2748 | for as_dir in $PATH | |
2749 | do | |
2750 | IFS=$as_save_IFS | |
2751 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2752 | for ac_exec_ext in '' $ac_executable_extensions; do |
2753 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2754 | ac_cv_prog_ac_ct_CC="gcc" | |
2755 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
b4e70030 | 2756 | break 2 |
4e8d927d | 2757 | fi |
b4e70030 | 2758 | done |
81ecdfbb RW |
2759 | done |
2760 | IFS=$as_save_IFS | |
b4e70030 JB |
2761 | |
2762 | fi | |
2763 | fi | |
2764 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2765 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2767 | $as_echo "$ac_ct_CC" >&6; } | |
b4e70030 | 2768 | else |
81ecdfbb RW |
2769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2770 | $as_echo "no" >&6; } | |
b4e70030 JB |
2771 | fi |
2772 | ||
81ecdfbb RW |
2773 | if test "x$ac_ct_CC" = x; then |
2774 | CC="" | |
2775 | else | |
2776 | case $cross_compiling:$ac_tool_warned in | |
2777 | yes:) | |
2778 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2779 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2780 | ac_tool_warned=yes ;; | |
2781 | esac | |
2782 | CC=$ac_ct_CC | |
2783 | fi | |
b4e70030 JB |
2784 | else |
2785 | CC="$ac_cv_prog_CC" | |
2786 | fi | |
2787 | ||
c906108c | 2788 | if test -z "$CC"; then |
81ecdfbb RW |
2789 | if test -n "$ac_tool_prefix"; then |
2790 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2791 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2793 | $as_echo_n "checking for $ac_word... " >&6; } | |
2794 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2795 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2796 | else |
2797 | if test -n "$CC"; then | |
2798 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2799 | else | |
bec39cab AC |
2800 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2801 | for as_dir in $PATH | |
2802 | do | |
2803 | IFS=$as_save_IFS | |
2804 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2805 | for ac_exec_ext in '' $ac_executable_extensions; do |
2806 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2807 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2808 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
bec39cab AC |
2809 | break 2 |
2810 | fi | |
2811 | done | |
81ecdfbb RW |
2812 | done |
2813 | IFS=$as_save_IFS | |
2814 | ||
2815 | fi | |
2816 | fi | |
2817 | CC=$ac_cv_prog_CC | |
2818 | if test -n "$CC"; then | |
2819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2820 | $as_echo "$CC" >&6; } | |
2821 | else | |
2822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2823 | $as_echo "no" >&6; } | |
2824 | fi | |
2825 | ||
2826 | ||
2827 | fi | |
2828 | fi | |
2829 | if test -z "$CC"; then | |
2830 | # Extract the first word of "cc", so it can be a program name with args. | |
2831 | set dummy cc; ac_word=$2 | |
2832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2833 | $as_echo_n "checking for $ac_word... " >&6; } | |
2834 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2835 | $as_echo_n "(cached) " >&6 | |
2836 | else | |
2837 | if test -n "$CC"; then | |
2838 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2839 | else | |
2840 | ac_prog_rejected=no | |
2841 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2842 | for as_dir in $PATH | |
2843 | do | |
2844 | IFS=$as_save_IFS | |
2845 | test -z "$as_dir" && as_dir=. | |
2846 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2847 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
2848 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2849 | ac_prog_rejected=yes | |
2850 | continue | |
2851 | fi | |
2852 | ac_cv_prog_CC="cc" | |
2853 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2854 | break 2 | |
2855 | fi | |
2856 | done | |
2857 | done | |
2858 | IFS=$as_save_IFS | |
bec39cab | 2859 | |
c906108c SS |
2860 | if test $ac_prog_rejected = yes; then |
2861 | # We found a bogon in the path, so make sure we never use it. | |
2862 | set dummy $ac_cv_prog_CC | |
2863 | shift | |
bec39cab | 2864 | if test $# != 0; then |
c906108c SS |
2865 | # We chose a different compiler from the bogus one. |
2866 | # However, it has the same basename, so the bogon will be chosen | |
2867 | # first if we set CC to just the basename; use the full file name. | |
2868 | shift | |
bec39cab | 2869 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
2870 | fi |
2871 | fi | |
2872 | fi | |
2873 | fi | |
bec39cab | 2874 | CC=$ac_cv_prog_CC |
c906108c | 2875 | if test -n "$CC"; then |
81ecdfbb RW |
2876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2877 | $as_echo "$CC" >&6; } | |
c906108c | 2878 | else |
81ecdfbb RW |
2879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2880 | $as_echo "no" >&6; } | |
c906108c SS |
2881 | fi |
2882 | ||
81ecdfbb | 2883 | |
bec39cab AC |
2884 | fi |
2885 | if test -z "$CC"; then | |
2886 | if test -n "$ac_tool_prefix"; then | |
81ecdfbb | 2887 | for ac_prog in cl.exe |
bec39cab AC |
2888 | do |
2889 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2890 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
81ecdfbb RW |
2891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2892 | $as_echo_n "checking for $ac_word... " >&6; } | |
2893 | if test "${ac_cv_prog_CC+set}" = set; then : | |
2894 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
2895 | else |
2896 | if test -n "$CC"; then | |
2897 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2898 | else | |
bec39cab AC |
2899 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2900 | for as_dir in $PATH | |
2901 | do | |
2902 | IFS=$as_save_IFS | |
2903 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2904 | for ac_exec_ext in '' $ac_executable_extensions; do |
2905 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2906 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
81ecdfbb | 2907 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
2908 | break 2 |
2909 | fi | |
2910 | done | |
81ecdfbb RW |
2911 | done |
2912 | IFS=$as_save_IFS | |
bec39cab | 2913 | |
c906108c SS |
2914 | fi |
2915 | fi | |
bec39cab | 2916 | CC=$ac_cv_prog_CC |
c906108c | 2917 | if test -n "$CC"; then |
81ecdfbb RW |
2918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
2919 | $as_echo "$CC" >&6; } | |
c906108c | 2920 | else |
81ecdfbb RW |
2921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2922 | $as_echo "no" >&6; } | |
c906108c | 2923 | fi |
bec39cab | 2924 | |
81ecdfbb | 2925 | |
bec39cab AC |
2926 | test -n "$CC" && break |
2927 | done | |
2928 | fi | |
2929 | if test -z "$CC"; then | |
2930 | ac_ct_CC=$CC | |
81ecdfbb | 2931 | for ac_prog in cl.exe |
bec39cab AC |
2932 | do |
2933 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2934 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
2935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2936 | $as_echo_n "checking for $ac_word... " >&6; } | |
2937 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : | |
2938 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
2939 | else |
2940 | if test -n "$ac_ct_CC"; then | |
2941 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2942 | else | |
2943 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2944 | for as_dir in $PATH | |
2945 | do | |
2946 | IFS=$as_save_IFS | |
2947 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
2948 | for ac_exec_ext in '' $ac_executable_extensions; do |
2949 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 2950 | ac_cv_prog_ac_ct_CC="$ac_prog" |
81ecdfbb | 2951 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab | 2952 | break 2 |
c906108c | 2953 | fi |
bec39cab | 2954 | done |
81ecdfbb RW |
2955 | done |
2956 | IFS=$as_save_IFS | |
bec39cab AC |
2957 | |
2958 | fi | |
2959 | fi | |
2960 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2961 | if test -n "$ac_ct_CC"; then | |
81ecdfbb RW |
2962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
2963 | $as_echo "$ac_ct_CC" >&6; } | |
bec39cab | 2964 | else |
81ecdfbb RW |
2965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2966 | $as_echo "no" >&6; } | |
c906108c SS |
2967 | fi |
2968 | ||
81ecdfbb | 2969 | |
bec39cab AC |
2970 | test -n "$ac_ct_CC" && break |
2971 | done | |
c906108c | 2972 | |
81ecdfbb RW |
2973 | if test "x$ac_ct_CC" = x; then |
2974 | CC="" | |
2975 | else | |
2976 | case $cross_compiling:$ac_tool_warned in | |
2977 | yes:) | |
2978 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2979 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2980 | ac_tool_warned=yes ;; | |
2981 | esac | |
2982 | CC=$ac_ct_CC | |
2983 | fi | |
bec39cab AC |
2984 | fi |
2985 | ||
2986 | fi | |
2987 | ||
2988 | ||
81ecdfbb RW |
2989 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
2990 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2991 | as_fn_error "no acceptable C compiler found in \$PATH | |
2992 | See \`config.log' for more details." "$LINENO" 5; } | |
bec39cab AC |
2993 | |
2994 | # Provide some information about the compiler. | |
81ecdfbb RW |
2995 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
2996 | set X $ac_compile | |
2997 | ac_compiler=$2 | |
2998 | for ac_option in --version -v -V -qversion; do | |
2999 | { { ac_try="$ac_compiler $ac_option >&5" | |
3000 | case "(($ac_try" in | |
3001 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3002 | *) ac_try_echo=$ac_try;; | |
3003 | esac | |
3004 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3005 | $as_echo "$ac_try_echo"; } >&5 | |
3006 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
bec39cab | 3007 | ac_status=$? |
81ecdfbb RW |
3008 | if test -s conftest.err; then |
3009 | sed '10a\ | |
3010 | ... rest of stderr output deleted ... | |
3011 | 10q' conftest.err >conftest.er1 | |
3012 | cat conftest.er1 >&5 | |
3013 | rm -f conftest.er1 conftest.err | |
3014 | fi | |
3015 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3016 | test $ac_status = 0; } | |
3017 | done | |
bec39cab | 3018 | |
81ecdfbb | 3019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3020 | /* end confdefs.h. */ |
3021 | ||
3022 | int | |
3023 | main () | |
3024 | { | |
3025 | ||
3026 | ; | |
3027 | return 0; | |
3028 | } | |
3029 | _ACEOF | |
3030 | ac_clean_files_save=$ac_clean_files | |
81ecdfbb | 3031 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" |
bec39cab AC |
3032 | # Try to create an executable without -o first, disregard a.out. |
3033 | # It will help us diagnose broken compilers, and finding out an intuition | |
3034 | # of exeext. | |
81ecdfbb RW |
3035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
3036 | $as_echo_n "checking for C compiler default output file name... " >&6; } | |
3037 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
3038 | ||
3039 | # The possible output files: | |
3040 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
3041 | ||
3042 | ac_rmfiles= | |
3043 | for ac_file in $ac_files | |
3044 | do | |
3045 | case $ac_file in | |
3046 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
3047 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
3048 | esac | |
3049 | done | |
3050 | rm -f $ac_rmfiles | |
3051 | ||
3052 | if { { ac_try="$ac_link_default" | |
3053 | case "(($ac_try" in | |
3054 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3055 | *) ac_try_echo=$ac_try;; | |
3056 | esac | |
3057 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3058 | $as_echo "$ac_try_echo"; } >&5 | |
3059 | (eval "$ac_link_default") 2>&5 | |
3060 | ac_status=$? | |
3061 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3062 | test $ac_status = 0; }; then : | |
3063 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. | |
3064 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' | |
3065 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
3066 | # so that the user can short-circuit this test for compilers unknown to | |
3067 | # Autoconf. | |
3068 | for ac_file in $ac_files '' | |
bec39cab AC |
3069 | do |
3070 | test -f "$ac_file" || continue | |
3071 | case $ac_file in | |
81ecdfbb | 3072 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
b4e70030 JB |
3073 | ;; |
3074 | [ab].out ) | |
3075 | # We found the default executable, but exeext='' is most | |
3076 | # certainly right. | |
3077 | break;; | |
3078 | *.* ) | |
81ecdfbb RW |
3079 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
3080 | then :; else | |
3081 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
3082 | fi | |
3083 | # We set ac_cv_exeext here because the later test for it is not | |
3084 | # safe: cross compilers may not add the suffix if given an `-o' | |
3085 | # argument, so we may need to know it at that point already. | |
3086 | # Even if this section looks crufty: it has the advantage of | |
3087 | # actually working. | |
b4e70030 JB |
3088 | break;; |
3089 | * ) | |
3090 | break;; | |
bec39cab AC |
3091 | esac |
3092 | done | |
81ecdfbb RW |
3093 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
3094 | ||
bec39cab | 3095 | else |
81ecdfbb RW |
3096 | ac_file='' |
3097 | fi | |
3098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
3099 | $as_echo "$ac_file" >&6; } | |
3100 | if test -z "$ac_file"; then : | |
3101 | $as_echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
3102 | sed 's/^/| /' conftest.$ac_ext >&5 |
3103 | ||
81ecdfbb RW |
3104 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3105 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3106 | { as_fn_set_status 77 | |
3107 | as_fn_error "C compiler cannot create executables | |
3108 | See \`config.log' for more details." "$LINENO" 5; }; } | |
bec39cab | 3109 | fi |
b4e70030 | 3110 | ac_exeext=$ac_cv_exeext |
b4e70030 | 3111 | |
81ecdfbb | 3112 | # Check that the compiler produces executables we can run. If not, either |
bec39cab | 3113 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
3115 | $as_echo_n "checking whether the C compiler works... " >&6; } | |
bec39cab AC |
3116 | # If not cross compiling, check that we can run a simple program. |
3117 | if test "$cross_compiling" != yes; then | |
3118 | if { ac_try='./$ac_file' | |
81ecdfbb RW |
3119 | { { case "(($ac_try" in |
3120 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3121 | *) ac_try_echo=$ac_try;; | |
3122 | esac | |
3123 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3124 | $as_echo "$ac_try_echo"; } >&5 | |
3125 | (eval "$ac_try") 2>&5 | |
bec39cab | 3126 | ac_status=$? |
81ecdfbb RW |
3127 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3128 | test $ac_status = 0; }; }; then | |
bec39cab | 3129 | cross_compiling=no |
c906108c | 3130 | else |
bec39cab AC |
3131 | if test "$cross_compiling" = maybe; then |
3132 | cross_compiling=yes | |
3133 | else | |
81ecdfbb RW |
3134 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3135 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3136 | as_fn_error "cannot run C compiled programs. | |
bec39cab | 3137 | If you meant to cross compile, use \`--host'. |
81ecdfbb | 3138 | See \`config.log' for more details." "$LINENO" 5; } |
bec39cab | 3139 | fi |
c906108c | 3140 | fi |
bec39cab | 3141 | fi |
81ecdfbb RW |
3142 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3143 | $as_echo "yes" >&6; } | |
bec39cab | 3144 | |
81ecdfbb | 3145 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out |
b4e70030 | 3146 | ac_clean_files=$ac_clean_files_save |
81ecdfbb | 3147 | # Check that the compiler produces executables we can run. If not, either |
b4e70030 | 3148 | # the compiler is broken, or we cross compile. |
81ecdfbb RW |
3149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
3150 | $as_echo_n "checking whether we are cross compiling... " >&6; } | |
3151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
3152 | $as_echo "$cross_compiling" >&6; } | |
3153 | ||
3154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
3155 | $as_echo_n "checking for suffix of executables... " >&6; } | |
3156 | if { { ac_try="$ac_link" | |
3157 | case "(($ac_try" in | |
3158 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3159 | *) ac_try_echo=$ac_try;; | |
3160 | esac | |
3161 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3162 | $as_echo "$ac_try_echo"; } >&5 | |
3163 | (eval "$ac_link") 2>&5 | |
bec39cab | 3164 | ac_status=$? |
81ecdfbb RW |
3165 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
3166 | test $ac_status = 0; }; then : | |
b4e70030 JB |
3167 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
3168 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
3169 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
3170 | # `rm'. | |
3171 | for ac_file in conftest.exe conftest conftest.*; do | |
3172 | test -f "$ac_file" || continue | |
3173 | case $ac_file in | |
81ecdfbb | 3174 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
b4e70030 | 3175 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b4e70030 JB |
3176 | break;; |
3177 | * ) break;; | |
3178 | esac | |
3179 | done | |
c906108c | 3180 | else |
81ecdfbb RW |
3181 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3182 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3183 | as_fn_error "cannot compute suffix of executables: cannot compile and link | |
3184 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3185 | fi |
b4e70030 | 3186 | rm -f conftest$ac_cv_exeext |
81ecdfbb RW |
3187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
3188 | $as_echo "$ac_cv_exeext" >&6; } | |
c906108c | 3189 | |
b4e70030 | 3190 | rm -f conftest.$ac_ext |
bec39cab AC |
3191 | EXEEXT=$ac_cv_exeext |
3192 | ac_exeext=$EXEEXT | |
81ecdfbb RW |
3193 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
3194 | $as_echo_n "checking for suffix of object files... " >&6; } | |
3195 | if test "${ac_cv_objext+set}" = set; then : | |
3196 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3197 | else |
81ecdfbb | 3198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
3199 | /* end confdefs.h. */ |
3200 | ||
3201 | int | |
3202 | main () | |
3203 | { | |
3204 | ||
3205 | ; | |
3206 | return 0; | |
3207 | } | |
3208 | _ACEOF | |
3209 | rm -f conftest.o conftest.obj | |
81ecdfbb RW |
3210 | if { { ac_try="$ac_compile" |
3211 | case "(($ac_try" in | |
3212 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3213 | *) ac_try_echo=$ac_try;; | |
3214 | esac | |
3215 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3216 | $as_echo "$ac_try_echo"; } >&5 | |
3217 | (eval "$ac_compile") 2>&5 | |
3218 | ac_status=$? | |
3219 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3220 | test $ac_status = 0; }; then : | |
3221 | for ac_file in conftest.o conftest.obj conftest.*; do | |
3222 | test -f "$ac_file" || continue; | |
bec39cab | 3223 | case $ac_file in |
81ecdfbb | 3224 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
bec39cab AC |
3225 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
3226 | break;; | |
3227 | esac | |
3228 | done | |
c906108c | 3229 | else |
81ecdfbb | 3230 | $as_echo "$as_me: failed program was:" >&5 |
bec39cab AC |
3231 | sed 's/^/| /' conftest.$ac_ext >&5 |
3232 | ||
81ecdfbb RW |
3233 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3234 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3235 | as_fn_error "cannot compute suffix of object files: cannot compile | |
3236 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3237 | fi |
b4e70030 | 3238 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 3239 | fi |
81ecdfbb RW |
3240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
3241 | $as_echo "$ac_cv_objext" >&6; } | |
bec39cab AC |
3242 | OBJEXT=$ac_cv_objext |
3243 | ac_objext=$OBJEXT | |
81ecdfbb RW |
3244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
3245 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3246 | if test "${ac_cv_c_compiler_gnu+set}" = set; then : | |
3247 | $as_echo_n "(cached) " >&6 | |
c906108c | 3248 | else |
81ecdfbb | 3249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3250 | /* end confdefs.h. */ |
3251 | ||
3252 | int | |
3253 | main () | |
3254 | { | |
3255 | #ifndef __GNUC__ | |
3256 | choke me | |
3257 | #endif | |
3258 | ||
3259 | ; | |
3260 | return 0; | |
3261 | } | |
3262 | _ACEOF | |
81ecdfbb | 3263 | if ac_fn_c_try_compile "$LINENO"; then : |
bec39cab AC |
3264 | ac_compiler_gnu=yes |
3265 | else | |
81ecdfbb | 3266 | ac_compiler_gnu=no |
bec39cab | 3267 | fi |
81ecdfbb | 3268 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
3269 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
3270 | ||
3271 | fi | |
81ecdfbb RW |
3272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
3273 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3274 | if test $ac_compiler_gnu = yes; then | |
3275 | GCC=yes | |
3276 | else | |
3277 | GCC= | |
3278 | fi | |
bec39cab AC |
3279 | ac_test_CFLAGS=${CFLAGS+set} |
3280 | ac_save_CFLAGS=$CFLAGS | |
81ecdfbb RW |
3281 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
3282 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3283 | if test "${ac_cv_prog_cc_g+set}" = set; then : | |
3284 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3285 | else |
81ecdfbb RW |
3286 | ac_save_c_werror_flag=$ac_c_werror_flag |
3287 | ac_c_werror_flag=yes | |
3288 | ac_cv_prog_cc_g=no | |
3289 | CFLAGS="-g" | |
3290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab AC |
3291 | /* end confdefs.h. */ |
3292 | ||
3293 | int | |
3294 | main () | |
3295 | { | |
3296 | ||
3297 | ; | |
3298 | return 0; | |
3299 | } | |
3300 | _ACEOF | |
81ecdfbb | 3301 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
3302 | ac_cv_prog_cc_g=yes |
3303 | else | |
81ecdfbb RW |
3304 | CFLAGS="" |
3305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3306 | /* end confdefs.h. */ | |
3307 | ||
3308 | int | |
3309 | main () | |
3310 | { | |
3311 | ||
3312 | ; | |
3313 | return 0; | |
3314 | } | |
3315 | _ACEOF | |
3316 | if ac_fn_c_try_compile "$LINENO"; then : | |
3317 | ||
3318 | else | |
3319 | ac_c_werror_flag=$ac_save_c_werror_flag | |
3320 | CFLAGS="-g" | |
3321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3322 | /* end confdefs.h. */ | |
3323 | ||
3324 | int | |
3325 | main () | |
3326 | { | |
c906108c | 3327 | |
81ecdfbb RW |
3328 | ; |
3329 | return 0; | |
3330 | } | |
3331 | _ACEOF | |
3332 | if ac_fn_c_try_compile "$LINENO"; then : | |
3333 | ac_cv_prog_cc_g=yes | |
3334 | fi | |
3335 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3336 | fi | |
3337 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4e8d927d | 3338 | fi |
81ecdfbb RW |
3339 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3340 | ac_c_werror_flag=$ac_save_c_werror_flag | |
bec39cab | 3341 | fi |
81ecdfbb RW |
3342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
3343 | $as_echo "$ac_cv_prog_cc_g" >&6; } | |
c906108c | 3344 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 3345 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
3346 | elif test $ac_cv_prog_cc_g = yes; then |
3347 | if test "$GCC" = yes; then | |
3348 | CFLAGS="-g -O2" | |
3349 | else | |
3350 | CFLAGS="-g" | |
3351 | fi | |
3352 | else | |
3353 | if test "$GCC" = yes; then | |
3354 | CFLAGS="-O2" | |
3355 | else | |
3356 | CFLAGS= | |
3357 | fi | |
3358 | fi | |
81ecdfbb RW |
3359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
3360 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3361 | if test "${ac_cv_prog_cc_c89+set}" = set; then : | |
3362 | $as_echo_n "(cached) " >&6 | |
bec39cab | 3363 | else |
81ecdfbb | 3364 | ac_cv_prog_cc_c89=no |
bec39cab | 3365 | ac_save_CC=$CC |
81ecdfbb | 3366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3367 | /* end confdefs.h. */ |
c906108c SS |
3368 | #include <stdarg.h> |
3369 | #include <stdio.h> | |
3370 | #include <sys/types.h> | |
3371 | #include <sys/stat.h> | |
3372 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3373 | struct buf { int x; }; | |
3374 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3375 | static char *e (p, i) | |
3376 | char **p; | |
3377 | int i; | |
3378 | { | |
3379 | return p[i]; | |
3380 | } | |
3381 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3382 | { | |
3383 | char *s; | |
3384 | va_list v; | |
3385 | va_start (v,p); | |
3386 | s = g (p, va_arg (v,int)); | |
3387 | va_end (v); | |
3388 | return s; | |
3389 | } | |
bec39cab AC |
3390 | |
3391 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3392 | function prototypes and stuff, but not '\xHH' hex character constants. | |
3393 | These don't provoke an error unfortunately, instead are silently treated | |
81ecdfbb | 3394 | as 'x'. The following induces an error, until -std is added to get |
bec39cab AC |
3395 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
3396 | array size at least. It's necessary to write '\x00'==0 to get something | |
81ecdfbb | 3397 | that's true only with -std. */ |
bec39cab AC |
3398 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
3399 | ||
81ecdfbb RW |
3400 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
3401 | inside strings and character constants. */ | |
3402 | #define FOO(x) 'x' | |
3403 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3404 | ||
c906108c SS |
3405 | int test (int i, double x); |
3406 | struct s1 {int (*f) (int a);}; | |
3407 | struct s2 {int (*f) (double a);}; | |
3408 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3409 | int argc; | |
3410 | char **argv; | |
bec39cab AC |
3411 | int |
3412 | main () | |
3413 | { | |
c906108c | 3414 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
3415 | ; |
3416 | return 0; | |
3417 | } | |
3418 | _ACEOF | |
81ecdfbb RW |
3419 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
3420 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
3421 | do |
3422 | CC="$ac_save_CC $ac_arg" | |
81ecdfbb RW |
3423 | if ac_fn_c_try_compile "$LINENO"; then : |
3424 | ac_cv_prog_cc_c89=$ac_arg | |
c906108c | 3425 | fi |
81ecdfbb RW |
3426 | rm -f core conftest.err conftest.$ac_objext |
3427 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
c906108c | 3428 | done |
81ecdfbb | 3429 | rm -f conftest.$ac_ext |
bec39cab | 3430 | CC=$ac_save_CC |
c906108c SS |
3431 | |
3432 | fi | |
81ecdfbb RW |
3433 | # AC_CACHE_VAL |
3434 | case "x$ac_cv_prog_cc_c89" in | |
3435 | x) | |
3436 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3437 | $as_echo "none needed" >&6; } ;; | |
3438 | xno) | |
3439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3440 | $as_echo "unsupported" >&6; } ;; | |
bec39cab | 3441 | *) |
81ecdfbb RW |
3442 | CC="$CC $ac_cv_prog_cc_c89" |
3443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3444 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
c906108c | 3445 | esac |
81ecdfbb | 3446 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
c906108c | 3447 | |
b4e70030 JB |
3448 | fi |
3449 | ||
bec39cab AC |
3450 | ac_ext=c |
3451 | ac_cpp='$CPP $CPPFLAGS' | |
3452 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3453 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3454 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 3455 | |
60ca704f | 3456 | |
bec39cab AC |
3457 | ac_ext=c |
3458 | ac_cpp='$CPP $CPPFLAGS' | |
3459 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3460 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3461 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
81ecdfbb RW |
3462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
3463 | $as_echo_n "checking how to run the C preprocessor... " >&6; } | |
bec39cab AC |
3464 | # On Suns, sometimes $CPP names a directory. |
3465 | if test -n "$CPP" && test -d "$CPP"; then | |
3466 | CPP= | |
8bb2c122 | 3467 | fi |
bec39cab | 3468 | if test -z "$CPP"; then |
81ecdfbb RW |
3469 | if test "${ac_cv_prog_CPP+set}" = set; then : |
3470 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
3471 | else |
3472 | # Double quotes because CPP needs to be expanded | |
3473 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3474 | do | |
3475 | ac_preproc_ok=false | |
3476 | for ac_c_preproc_warn_flag in '' yes | |
3477 | do | |
3478 | # Use a header file that comes with gcc, so configuring glibc | |
3479 | # with a fresh cross-compiler works. | |
3480 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3481 | # <limits.h> exists even on freestanding compilers. | |
3482 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3483 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3484 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3485 | /* end confdefs.h. */ |
3486 | #ifdef __STDC__ | |
3487 | # include <limits.h> | |
3488 | #else | |
3489 | # include <assert.h> | |
3490 | #endif | |
3491 | Syntax error | |
3492 | _ACEOF | |
81ecdfbb | 3493 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3494 | |
81ecdfbb | 3495 | else |
bec39cab AC |
3496 | # Broken: fails on valid input. |
3497 | continue | |
3498 | fi | |
3499 | rm -f conftest.err conftest.$ac_ext | |
3500 | ||
81ecdfbb | 3501 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3502 | # can be detected and how. |
81ecdfbb | 3503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3504 | /* end confdefs.h. */ |
3505 | #include <ac_nonexistent.h> | |
3506 | _ACEOF | |
81ecdfbb | 3507 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3508 | # Broken: success on invalid input. |
3509 | continue | |
8bb2c122 | 3510 | else |
bec39cab AC |
3511 | # Passes both tests. |
3512 | ac_preproc_ok=: | |
3513 | break | |
8bb2c122 | 3514 | fi |
bec39cab | 3515 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 3516 | |
bec39cab AC |
3517 | done |
3518 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3519 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb | 3520 | if $ac_preproc_ok; then : |
bec39cab AC |
3521 | break |
3522 | fi | |
8bb2c122 | 3523 | |
bec39cab AC |
3524 | done |
3525 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 3526 | |
c906108c | 3527 | fi |
bec39cab AC |
3528 | CPP=$ac_cv_prog_CPP |
3529 | else | |
3530 | ac_cv_prog_CPP=$CPP | |
c906108c | 3531 | fi |
81ecdfbb RW |
3532 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
3533 | $as_echo "$CPP" >&6; } | |
bec39cab AC |
3534 | ac_preproc_ok=false |
3535 | for ac_c_preproc_warn_flag in '' yes | |
3536 | do | |
3537 | # Use a header file that comes with gcc, so configuring glibc | |
3538 | # with a fresh cross-compiler works. | |
3539 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3540 | # <limits.h> exists even on freestanding compilers. | |
3541 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3542 | # not just through cpp. "Syntax error" is here to catch this case. | |
81ecdfbb | 3543 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3544 | /* end confdefs.h. */ |
3545 | #ifdef __STDC__ | |
3546 | # include <limits.h> | |
3547 | #else | |
3548 | # include <assert.h> | |
3549 | #endif | |
3550 | Syntax error | |
3551 | _ACEOF | |
81ecdfbb | 3552 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab | 3553 | |
81ecdfbb | 3554 | else |
bec39cab AC |
3555 | # Broken: fails on valid input. |
3556 | continue | |
3557 | fi | |
3558 | rm -f conftest.err conftest.$ac_ext | |
3559 | ||
81ecdfbb | 3560 | # OK, works on sane cases. Now check whether nonexistent headers |
bec39cab | 3561 | # can be detected and how. |
81ecdfbb | 3562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
3563 | /* end confdefs.h. */ |
3564 | #include <ac_nonexistent.h> | |
3565 | _ACEOF | |
81ecdfbb | 3566 | if ac_fn_c_try_cpp "$LINENO"; then : |
bec39cab AC |
3567 | # Broken: success on invalid input. |
3568 | continue | |
c906108c | 3569 | else |
bec39cab AC |
3570 | # Passes both tests. |
3571 | ac_preproc_ok=: | |
3572 | break | |
c906108c | 3573 | fi |
bec39cab | 3574 | rm -f conftest.err conftest.$ac_ext |
c906108c | 3575 | |
bec39cab AC |
3576 | done |
3577 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3578 | rm -f conftest.err conftest.$ac_ext | |
81ecdfbb RW |
3579 | if $ac_preproc_ok; then : |
3580 | ||
c906108c | 3581 | else |
81ecdfbb RW |
3582 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3583 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3584 | as_fn_error "C preprocessor \"$CPP\" fails sanity check | |
3585 | See \`config.log' for more details." "$LINENO" 5; } | |
c906108c | 3586 | fi |
c906108c | 3587 | |
bec39cab AC |
3588 | ac_ext=c |
3589 | ac_cpp='$CPP $CPPFLAGS' | |
3590 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3591 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3592 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3593 | ||
3594 | ||
81ecdfbb RW |
3595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
3596 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
3597 | if test "${ac_cv_path_GREP+set}" = set; then : | |
3598 | $as_echo_n "(cached) " >&6 | |
4e8d927d | 3599 | else |
81ecdfbb RW |
3600 | if test -z "$GREP"; then |
3601 | ac_path_GREP_found=false | |
3602 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3603 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3604 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
3605 | do | |
3606 | IFS=$as_save_IFS | |
3607 | test -z "$as_dir" && as_dir=. | |
3608 | for ac_prog in grep ggrep; do | |
3609 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3610 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
3611 | { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue | |
3612 | # Check for GNU ac_path_GREP and select it if it is found. | |
3613 | # Check for GNU $ac_path_GREP | |
3614 | case `"$ac_path_GREP" --version 2>&1` in | |
3615 | *GNU*) | |
3616 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
3617 | *) | |
3618 | ac_count=0 | |
3619 | $as_echo_n 0123456789 >"conftest.in" | |
3620 | while : | |
3621 | do | |
3622 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3623 | mv "conftest.tmp" "conftest.in" | |
3624 | cp "conftest.in" "conftest.nl" | |
3625 | $as_echo 'GREP' >> "conftest.nl" | |
3626 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3627 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3628 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3629 | if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
3630 | # Best one so far, save it but keep looking for a better one | |
3631 | ac_cv_path_GREP="$ac_path_GREP" | |
3632 | ac_path_GREP_max=$ac_count | |
bec39cab | 3633 | fi |
81ecdfbb RW |
3634 | # 10*(2^10) chars as input seems more than enough |
3635 | test $ac_count -gt 10 && break | |
3636 | done | |
3637 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3638 | esac | |
bec39cab | 3639 | |
81ecdfbb RW |
3640 | $ac_path_GREP_found && break 3 |
3641 | done | |
3642 | done | |
3643 | done | |
3644 | IFS=$as_save_IFS | |
3645 | if test -z "$ac_cv_path_GREP"; then | |
3646 | as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3647 | fi | |
c906108c | 3648 | else |
81ecdfbb | 3649 | ac_cv_path_GREP=$GREP |
c906108c | 3650 | fi |
c906108c | 3651 | |
81ecdfbb RW |
3652 | fi |
3653 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
3654 | $as_echo "$ac_cv_path_GREP" >&6; } | |
3655 | GREP="$ac_cv_path_GREP" | |
c906108c | 3656 | |
c906108c | 3657 | |
81ecdfbb RW |
3658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
3659 | $as_echo_n "checking for egrep... " >&6; } | |
3660 | if test "${ac_cv_path_EGREP+set}" = set; then : | |
3661 | $as_echo_n "(cached) " >&6 | |
783e057b | 3662 | else |
81ecdfbb RW |
3663 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
3664 | then ac_cv_path_EGREP="$GREP -E" | |
3665 | else | |
3666 | if test -z "$EGREP"; then | |
3667 | ac_path_EGREP_found=false | |
3668 | # Loop through the user's path and test for each of PROGNAME-LIST | |
3669 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3670 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
783e057b DJ |
3671 | do |
3672 | IFS=$as_save_IFS | |
3673 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
3674 | for ac_prog in egrep; do |
3675 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3676 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
3677 | { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue | |
3678 | # Check for GNU ac_path_EGREP and select it if it is found. | |
3679 | # Check for GNU $ac_path_EGREP | |
3680 | case `"$ac_path_EGREP" --version 2>&1` in | |
3681 | *GNU*) | |
3682 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
3683 | *) | |
3684 | ac_count=0 | |
3685 | $as_echo_n 0123456789 >"conftest.in" | |
3686 | while : | |
3687 | do | |
3688 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
3689 | mv "conftest.tmp" "conftest.in" | |
3690 | cp "conftest.in" "conftest.nl" | |
3691 | $as_echo 'EGREP' >> "conftest.nl" | |
3692 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
3693 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
3694 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
3695 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
3696 | # Best one so far, save it but keep looking for a better one | |
3697 | ac_cv_path_EGREP="$ac_path_EGREP" | |
3698 | ac_path_EGREP_max=$ac_count | |
3699 | fi | |
3700 | # 10*(2^10) chars as input seems more than enough | |
3701 | test $ac_count -gt 10 && break | |
3702 | done | |
3703 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3704 | esac | |
bec39cab | 3705 | |
81ecdfbb RW |
3706 | $ac_path_EGREP_found && break 3 |
3707 | done | |
3708 | done | |
3709 | done | |
3710 | IFS=$as_save_IFS | |
3711 | if test -z "$ac_cv_path_EGREP"; then | |
3712 | as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
783e057b | 3713 | fi |
783e057b | 3714 | else |
81ecdfbb | 3715 | ac_cv_path_EGREP=$EGREP |
783e057b DJ |
3716 | fi |
3717 | ||
81ecdfbb | 3718 | fi |
783e057b | 3719 | fi |
81ecdfbb RW |
3720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
3721 | $as_echo "$ac_cv_path_EGREP" >&6; } | |
3722 | EGREP="$ac_cv_path_EGREP" | |
3723 | ||
783e057b | 3724 | |
81ecdfbb RW |
3725 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
3726 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
3727 | if test "${ac_cv_header_stdc+set}" = set; then : | |
3728 | $as_echo_n "(cached) " >&6 | |
783e057b | 3729 | else |
81ecdfbb | 3730 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 3731 | /* end confdefs.h. */ |
783e057b | 3732 | #include <stdlib.h> |
bec39cab | 3733 | #include <stdarg.h> |
783e057b DJ |
3734 | #include <string.h> |
3735 | #include <float.h> | |
c906108c | 3736 | |
bec39cab AC |
3737 | int |
3738 | main () | |
3739 | { | |
c906108c | 3740 | |
bec39cab AC |
3741 | ; |
3742 | return 0; | |
3743 | } | |
3744 | _ACEOF | |
81ecdfbb | 3745 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 3746 | ac_cv_header_stdc=yes |
c906108c | 3747 | else |
81ecdfbb | 3748 | ac_cv_header_stdc=no |
c906108c | 3749 | fi |
81ecdfbb | 3750 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 3751 | |
783e057b DJ |
3752 | if test $ac_cv_header_stdc = yes; then |
3753 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
81ecdfbb | 3754 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3755 | /* end confdefs.h. */ |
3756 | #include <string.h> | |
c906108c | 3757 | |
783e057b DJ |
3758 | _ACEOF |
3759 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3760 | $EGREP "memchr" >/dev/null 2>&1; then : |
3761 | ||
c906108c | 3762 | else |
783e057b | 3763 | ac_cv_header_stdc=no |
c906108c | 3764 | fi |
783e057b | 3765 | rm -f conftest* |
c906108c SS |
3766 | |
3767 | fi | |
3768 | ||
783e057b DJ |
3769 | if test $ac_cv_header_stdc = yes; then |
3770 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
81ecdfbb | 3771 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3772 | /* end confdefs.h. */ |
3773 | #include <stdlib.h> | |
bec39cab | 3774 | |
783e057b DJ |
3775 | _ACEOF |
3776 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb RW |
3777 | $EGREP "free" >/dev/null 2>&1; then : |
3778 | ||
bec39cab | 3779 | else |
783e057b | 3780 | ac_cv_header_stdc=no |
bec39cab | 3781 | fi |
783e057b | 3782 | rm -f conftest* |
bec39cab AC |
3783 | |
3784 | fi | |
bec39cab | 3785 | |
783e057b DJ |
3786 | if test $ac_cv_header_stdc = yes; then |
3787 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
81ecdfbb | 3788 | if test "$cross_compiling" = yes; then : |
783e057b | 3789 | : |
bec39cab | 3790 | else |
81ecdfbb | 3791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3792 | /* end confdefs.h. */ |
3793 | #include <ctype.h> | |
81ecdfbb | 3794 | #include <stdlib.h> |
783e057b DJ |
3795 | #if ((' ' & 0x0FF) == 0x020) |
3796 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3797 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3798 | #else | |
3799 | # define ISLOWER(c) \ | |
3800 | (('a' <= (c) && (c) <= 'i') \ | |
3801 | || ('j' <= (c) && (c) <= 'r') \ | |
3802 | || ('s' <= (c) && (c) <= 'z')) | |
3803 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3804 | #endif | |
3805 | ||
3806 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3807 | int | |
3808 | main () | |
3809 | { | |
3810 | int i; | |
3811 | for (i = 0; i < 256; i++) | |
3812 | if (XOR (islower (i), ISLOWER (i)) | |
3813 | || toupper (i) != TOUPPER (i)) | |
81ecdfbb RW |
3814 | return 2; |
3815 | return 0; | |
783e057b DJ |
3816 | } |
3817 | _ACEOF | |
81ecdfbb | 3818 | if ac_fn_c_try_run "$LINENO"; then : |
783e057b | 3819 | |
81ecdfbb RW |
3820 | else |
3821 | ac_cv_header_stdc=no | |
783e057b | 3822 | fi |
81ecdfbb RW |
3823 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
3824 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
783e057b | 3825 | fi |
81ecdfbb | 3826 | |
783e057b DJ |
3827 | fi |
3828 | fi | |
81ecdfbb RW |
3829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
3830 | $as_echo "$ac_cv_header_stdc" >&6; } | |
783e057b DJ |
3831 | if test $ac_cv_header_stdc = yes; then |
3832 | ||
81ecdfbb | 3833 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
783e057b DJ |
3834 | |
3835 | fi | |
3836 | ||
3837 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
783e057b DJ |
3838 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
3839 | inttypes.h stdint.h unistd.h | |
81ecdfbb RW |
3840 | do : |
3841 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3842 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
3843 | " | |
3844 | eval as_val=\$$as_ac_Header | |
3845 | if test "x$as_val" = x""yes; then : | |
783e057b | 3846 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 3847 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
783e057b DJ |
3848 | _ACEOF |
3849 | ||
3850 | fi | |
3851 | ||
3852 | done | |
3853 | ||
3854 | ||
3855 | ||
81ecdfbb RW |
3856 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
3857 | if test "x$ac_cv_header_minix_config_h" = x""yes; then : | |
783e057b DJ |
3858 | MINIX=yes |
3859 | else | |
3860 | MINIX= | |
3861 | fi | |
3862 | ||
3863 | ||
3864 | if test "$MINIX" = yes; then | |
3865 | ||
81ecdfbb | 3866 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
783e057b DJ |
3867 | |
3868 | ||
81ecdfbb | 3869 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
783e057b DJ |
3870 | |
3871 | ||
81ecdfbb | 3872 | $as_echo "#define _MINIX 1" >>confdefs.h |
783e057b DJ |
3873 | |
3874 | fi | |
3875 | ||
3876 | ||
81ecdfbb RW |
3877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
3878 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
3879 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : | |
3880 | $as_echo_n "(cached) " >&6 | |
783e057b | 3881 | else |
81ecdfbb | 3882 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
3883 | /* end confdefs.h. */ |
3884 | ||
c971b7fa PA |
3885 | # define __EXTENSIONS__ 1 |
3886 | $ac_includes_default | |
783e057b DJ |
3887 | int |
3888 | main () | |
3889 | { | |
3890 | ||
3891 | ; | |
3892 | return 0; | |
3893 | } | |
3894 | _ACEOF | |
81ecdfbb | 3895 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b DJ |
3896 | ac_cv_safe_to_define___extensions__=yes |
3897 | else | |
81ecdfbb | 3898 | ac_cv_safe_to_define___extensions__=no |
783e057b | 3899 | fi |
81ecdfbb | 3900 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b | 3901 | fi |
81ecdfbb RW |
3902 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
3903 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } | |
783e057b | 3904 | test $ac_cv_safe_to_define___extensions__ = yes && |
81ecdfbb | 3905 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
783e057b | 3906 | |
81ecdfbb | 3907 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
783e057b | 3908 | |
81ecdfbb | 3909 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
783e057b | 3910 | |
81ecdfbb | 3911 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
783e057b | 3912 | |
81ecdfbb | 3913 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
783e057b DJ |
3914 | |
3915 | ||
c971b7fa PA |
3916 | ac_aux_dir= |
3917 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do | |
3918 | for ac_t in install-sh install.sh shtool; do | |
3919 | if test -f "$ac_dir/$ac_t"; then | |
3920 | ac_aux_dir=$ac_dir | |
3921 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
3922 | break 2 | |
3923 | fi | |
3924 | done | |
3925 | done | |
3926 | if test -z "$ac_aux_dir"; then | |
3927 | as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 | |
3928 | fi | |
770d76d7 | 3929 | |
c971b7fa PA |
3930 | # These three variables are undocumented and unsupported, |
3931 | # and are intended to be withdrawn in a future Autoconf release. | |
3932 | # They can cause serious problems if a builder's source tree is in a directory | |
3933 | # whose full name contains unusual characters. | |
3934 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
3935 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
3936 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
770d76d7 | 3937 | |
770d76d7 | 3938 | |
c971b7fa PA |
3939 | # Make sure we can run config.sub. |
3940 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3941 | as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
770d76d7 | 3942 | |
c971b7fa PA |
3943 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
3944 | $as_echo_n "checking build system type... " >&6; } | |
3945 | if test "${ac_cv_build+set}" = set; then : | |
3946 | $as_echo_n "(cached) " >&6 | |
770d76d7 | 3947 | else |
c971b7fa PA |
3948 | ac_build_alias=$build_alias |
3949 | test "x$ac_build_alias" = x && | |
3950 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3951 | test "x$ac_build_alias" = x && | |
3952 | as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 | |
3953 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3954 | as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3955 | ||
770d76d7 | 3956 | fi |
c971b7fa PA |
3957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
3958 | $as_echo "$ac_cv_build" >&6; } | |
3959 | case $ac_cv_build in | |
3960 | *-*-*) ;; | |
3961 | *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; | |
770d76d7 | 3962 | esac |
c971b7fa PA |
3963 | build=$ac_cv_build |
3964 | ac_save_IFS=$IFS; IFS='-' | |
3965 | set x $ac_cv_build | |
3966 | shift | |
3967 | build_cpu=$1 | |
3968 | build_vendor=$2 | |
3969 | shift; shift | |
3970 | # Remember, the first character of IFS is used to create $*, | |
3971 | # except with old shells: | |
3972 | build_os=$* | |
3973 | IFS=$ac_save_IFS | |
3974 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
770d76d7 PA |
3975 | |
3976 | ||
c971b7fa PA |
3977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
3978 | $as_echo_n "checking host system type... " >&6; } | |
3979 | if test "${ac_cv_host+set}" = set; then : | |
81ecdfbb RW |
3980 | $as_echo_n "(cached) " >&6 |
3981 | else | |
c971b7fa PA |
3982 | if test "x$host_alias" = x; then |
3983 | ac_cv_host=$ac_cv_build | |
81ecdfbb | 3984 | else |
c971b7fa PA |
3985 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
3986 | as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
81ecdfbb | 3987 | fi |
81ecdfbb RW |
3988 | |
3989 | fi | |
c971b7fa PA |
3990 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
3991 | $as_echo "$ac_cv_host" >&6; } | |
3992 | case $ac_cv_host in | |
3993 | *-*-*) ;; | |
3994 | *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; | |
81ecdfbb | 3995 | esac |
c971b7fa PA |
3996 | host=$ac_cv_host |
3997 | ac_save_IFS=$IFS; IFS='-' | |
3998 | set x $ac_cv_host | |
3999 | shift | |
4000 | host_cpu=$1 | |
4001 | host_vendor=$2 | |
4002 | shift; shift | |
4003 | # Remember, the first character of IFS is used to create $*, | |
4004 | # except with old shells: | |
4005 | host_os=$* | |
4006 | IFS=$ac_save_IFS | |
4007 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
3388710e JM |
4008 | |
4009 | ||
4010 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 | |
4011 | $as_echo_n "checking target system type... " >&6; } | |
4012 | if test "${ac_cv_target+set}" = set; then : | |
4013 | $as_echo_n "(cached) " >&6 | |
4014 | else | |
4015 | if test "x$target_alias" = x; then | |
4016 | ac_cv_target=$ac_cv_host | |
4017 | else | |
4018 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || | |
4019 | as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 | |
4020 | fi | |
4021 | ||
4022 | fi | |
4023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 | |
4024 | $as_echo "$ac_cv_target" >&6; } | |
4025 | case $ac_cv_target in | |
4026 | *-*-*) ;; | |
4027 | *) as_fn_error "invalid value of canonical target" "$LINENO" 5;; | |
4028 | esac | |
4029 | target=$ac_cv_target | |
4030 | ac_save_IFS=$IFS; IFS='-' | |
4031 | set x $ac_cv_target | |
4032 | shift | |
4033 | target_cpu=$1 | |
4034 | target_vendor=$2 | |
4035 | shift; shift | |
4036 | # Remember, the first character of IFS is used to create $*, | |
4037 | # except with old shells: | |
4038 | target_os=$* | |
4039 | IFS=$ac_save_IFS | |
4040 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac | |
4041 | ||
4042 | ||
4043 | # The aliases save the names the user supplied, while $host etc. | |
4044 | # will get canonicalized. | |
4045 | test -n "$target_alias" && | |
4046 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
4047 | NONENONEs,x,x, && | |
4048 | program_prefix=${target_alias}- | |
4049 | ||
4050 | # The tests for host and target for $enable_largefile require | |
4051 | # canonical names. | |
4052 | ||
4053 | ||
81ecdfbb | 4054 | |
da2f07f1 JK |
4055 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
4056 | # even in directories otherwise not depending on the $plugins option. | |
4057 | ||
4058 | ||
4059 | # Check whether --enable-plugins was given. | |
4060 | if test "${enable_plugins+set}" = set; then : | |
4061 | enableval=$enable_plugins; case "${enableval}" in | |
4062 | yes | "") plugins=yes ;; | |
4063 | no) plugins=no ;; | |
4064 | *) plugins=yes ;; | |
4065 | esac | |
4066 | else | |
4067 | plugins=no | |
4068 | fi | |
4069 | ||
4070 | ||
4071 | ||
4072 | case "${host}" in | |
4073 | sparc-*-solaris*|i[3-7]86-*-solaris*) | |
4074 | # On native 32bit sparc and ia32 solaris, large-file and procfs support | |
4075 | # are mutually exclusive; and without procfs support, the bfd/ elf module | |
4076 | # cannot provide certain routines such as elfcore_write_prpsinfo | |
4077 | # or elfcore_write_prstatus. So unless the user explicitly requested | |
4078 | # large-file support through the --enable-largefile switch, disable | |
4079 | # large-file support in favor of procfs support. | |
4080 | test "${target}" = "${host}" -a "x$plugins" = xno \ | |
4081 | && : ${enable_largefile="no"} | |
4082 | ;; | |
4083 | esac | |
4084 | ||
4085 | # Check whether --enable-largefile was given. | |
4086 | if test "${enable_largefile+set}" = set; then : | |
4087 | enableval=$enable_largefile; | |
4088 | fi | |
4089 | ||
4090 | if test "$enable_largefile" != no; then | |
4091 | ||
4092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 | |
4093 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
4094 | if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
4095 | $as_echo_n "(cached) " >&6 | |
4096 | else | |
4097 | ac_cv_sys_largefile_CC=no | |
4098 | if test "$GCC" != yes; then | |
4099 | ac_save_CC=$CC | |
4100 | while :; do | |
4101 | # IRIX 6.2 and later do not support large files by default, | |
4102 | # so use the C compiler's -n32 option if that helps. | |
4103 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4104 | /* end confdefs.h. */ | |
4105 | #include <sys/types.h> | |
4106 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4107 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4108 | since some C++ compilers masquerading as C compilers | |
4109 | incorrectly reject 9223372036854775807. */ | |
4110 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4111 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4112 | && LARGE_OFF_T % 2147483647 == 1) | |
4113 | ? 1 : -1]; | |
4114 | int | |
4115 | main () | |
4116 | { | |
4117 | ||
4118 | ; | |
4119 | return 0; | |
4120 | } | |
4121 | _ACEOF | |
4122 | if ac_fn_c_try_compile "$LINENO"; then : | |
4123 | break | |
4124 | fi | |
4125 | rm -f core conftest.err conftest.$ac_objext | |
4126 | CC="$CC -n32" | |
4127 | if ac_fn_c_try_compile "$LINENO"; then : | |
4128 | ac_cv_sys_largefile_CC=' -n32'; break | |
4129 | fi | |
4130 | rm -f core conftest.err conftest.$ac_objext | |
4131 | break | |
4132 | done | |
4133 | CC=$ac_save_CC | |
4134 | rm -f conftest.$ac_ext | |
4135 | fi | |
4136 | fi | |
4137 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 | |
4138 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
4139 | if test "$ac_cv_sys_largefile_CC" != no; then | |
4140 | CC=$CC$ac_cv_sys_largefile_CC | |
4141 | fi | |
4142 | ||
4143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
4144 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
4145 | if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
4146 | $as_echo_n "(cached) " >&6 | |
4147 | else | |
4148 | while :; do | |
4149 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4150 | /* end confdefs.h. */ | |
4151 | #include <sys/types.h> | |
4152 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4153 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4154 | since some C++ compilers masquerading as C compilers | |
4155 | incorrectly reject 9223372036854775807. */ | |
4156 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4157 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4158 | && LARGE_OFF_T % 2147483647 == 1) | |
4159 | ? 1 : -1]; | |
4160 | int | |
4161 | main () | |
4162 | { | |
4163 | ||
4164 | ; | |
4165 | return 0; | |
4166 | } | |
4167 | _ACEOF | |
4168 | if ac_fn_c_try_compile "$LINENO"; then : | |
4169 | ac_cv_sys_file_offset_bits=no; break | |
4170 | fi | |
4171 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4173 | /* end confdefs.h. */ | |
4174 | #define _FILE_OFFSET_BITS 64 | |
4175 | #include <sys/types.h> | |
4176 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4177 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4178 | since some C++ compilers masquerading as C compilers | |
4179 | incorrectly reject 9223372036854775807. */ | |
4180 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4181 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4182 | && LARGE_OFF_T % 2147483647 == 1) | |
4183 | ? 1 : -1]; | |
4184 | int | |
4185 | main () | |
4186 | { | |
4187 | ||
4188 | ; | |
4189 | return 0; | |
4190 | } | |
4191 | _ACEOF | |
4192 | if ac_fn_c_try_compile "$LINENO"; then : | |
4193 | ac_cv_sys_file_offset_bits=64; break | |
4194 | fi | |
4195 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4196 | ac_cv_sys_file_offset_bits=unknown | |
4197 | break | |
4198 | done | |
4199 | fi | |
4200 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 | |
4201 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
4202 | case $ac_cv_sys_file_offset_bits in #( | |
4203 | no | unknown) ;; | |
4204 | *) | |
4205 | cat >>confdefs.h <<_ACEOF | |
4206 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
4207 | _ACEOF | |
4208 | ;; | |
4209 | esac | |
4210 | rm -rf conftest* | |
4211 | if test $ac_cv_sys_file_offset_bits = unknown; then | |
4212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
4213 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
4214 | if test "${ac_cv_sys_large_files+set}" = set; then : | |
4215 | $as_echo_n "(cached) " >&6 | |
4216 | else | |
4217 | while :; do | |
4218 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4219 | /* end confdefs.h. */ | |
4220 | #include <sys/types.h> | |
4221 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4222 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4223 | since some C++ compilers masquerading as C compilers | |
4224 | incorrectly reject 9223372036854775807. */ | |
4225 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4226 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4227 | && LARGE_OFF_T % 2147483647 == 1) | |
4228 | ? 1 : -1]; | |
4229 | int | |
4230 | main () | |
4231 | { | |
4232 | ||
4233 | ; | |
4234 | return 0; | |
4235 | } | |
4236 | _ACEOF | |
4237 | if ac_fn_c_try_compile "$LINENO"; then : | |
4238 | ac_cv_sys_large_files=no; break | |
4239 | fi | |
4240 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4242 | /* end confdefs.h. */ | |
4243 | #define _LARGE_FILES 1 | |
4244 | #include <sys/types.h> | |
4245 | /* Check that off_t can represent 2**63 - 1 correctly. | |
4246 | We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
4247 | since some C++ compilers masquerading as C compilers | |
4248 | incorrectly reject 9223372036854775807. */ | |
4249 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
4250 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
4251 | && LARGE_OFF_T % 2147483647 == 1) | |
4252 | ? 1 : -1]; | |
4253 | int | |
4254 | main () | |
4255 | { | |
4256 | ||
4257 | ; | |
4258 | return 0; | |
4259 | } | |
4260 | _ACEOF | |
4261 | if ac_fn_c_try_compile "$LINENO"; then : | |
4262 | ac_cv_sys_large_files=1; break | |
4263 | fi | |
4264 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4265 | ac_cv_sys_large_files=unknown | |
4266 | break | |
4267 | done | |
4268 | fi | |
4269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 | |
4270 | $as_echo "$ac_cv_sys_large_files" >&6; } | |
4271 | case $ac_cv_sys_large_files in #( | |
4272 | no | unknown) ;; | |
4273 | *) | |
4274 | cat >>confdefs.h <<_ACEOF | |
4275 | #define _LARGE_FILES $ac_cv_sys_large_files | |
4276 | _ACEOF | |
4277 | ;; | |
4278 | esac | |
4279 | rm -rf conftest* | |
4280 | fi | |
4281 | fi | |
4282 | ||
4283 | ||
4284 | ||
81ecdfbb RW |
4285 | |
4286 | ||
4287 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 | |
4288 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } | |
4289 | if test "${am_cv_prog_cc_stdc+set}" = set; then : | |
4290 | $as_echo_n "(cached) " >&6 | |
4291 | else | |
4292 | am_cv_prog_cc_stdc=no | |
4293 | ac_save_CC="$CC" | |
4294 | # Don't try gcc -ansi; that turns off useful extensions and | |
4295 | # breaks some systems' header files. | |
4296 | # AIX -qlanglvl=ansi | |
4297 | # Ultrix and OSF/1 -std1 | |
4298 | # HP-UX 10.20 and later -Ae | |
4299 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
4300 | # SVR4 -Xc -D__EXTENSIONS__ | |
4301 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4302 | do | |
783e057b | 4303 | CC="$ac_save_CC $ac_arg" |
81ecdfbb | 4304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
783e057b DJ |
4305 | /* end confdefs.h. */ |
4306 | #include <stdarg.h> | |
4307 | #include <stdio.h> | |
4308 | #include <sys/types.h> | |
4309 | #include <sys/stat.h> | |
4310 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
4311 | struct buf { int x; }; | |
4312 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
4313 | static char *e (p, i) | |
4314 | char **p; | |
4315 | int i; | |
4316 | { | |
4317 | return p[i]; | |
4318 | } | |
4319 | static char *f (char * (*g) (char **, int), char **p, ...) | |
4320 | { | |
4321 | char *s; | |
4322 | va_list v; | |
4323 | va_start (v,p); | |
4324 | s = g (p, va_arg (v,int)); | |
4325 | va_end (v); | |
4326 | return s; | |
4327 | } | |
4328 | int test (int i, double x); | |
4329 | struct s1 {int (*f) (int a);}; | |
4330 | struct s2 {int (*f) (double a);}; | |
4331 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4332 | int argc; | |
4333 | char **argv; | |
4334 | ||
4335 | int | |
4336 | main () | |
4337 | { | |
4338 | ||
4339 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4340 | ||
4341 | ; | |
4342 | return 0; | |
4343 | } | |
4344 | _ACEOF | |
81ecdfbb | 4345 | if ac_fn_c_try_compile "$LINENO"; then : |
783e057b | 4346 | am_cv_prog_cc_stdc="$ac_arg"; break |
783e057b | 4347 | fi |
81ecdfbb | 4348 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
783e057b DJ |
4349 | done |
4350 | CC="$ac_save_CC" | |
4351 | ||
4352 | fi | |
4353 | ||
4354 | if test -z "$am_cv_prog_cc_stdc"; then | |
81ecdfbb RW |
4355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4356 | $as_echo "none needed" >&6; } | |
783e057b | 4357 | else |
81ecdfbb RW |
4358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
4359 | $as_echo "$am_cv_prog_cc_stdc" >&6; } | |
783e057b DJ |
4360 | fi |
4361 | case "x$am_cv_prog_cc_stdc" in | |
4362 | x|xno) ;; | |
4363 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
4364 | esac | |
4365 | ||
4366 | ||
4367 | ac_aux_dir= | |
81ecdfbb RW |
4368 | for ac_dir in .. "$srcdir"/..; do |
4369 | for ac_t in install-sh install.sh shtool; do | |
4370 | if test -f "$ac_dir/$ac_t"; then | |
4371 | ac_aux_dir=$ac_dir | |
4372 | ac_install_sh="$ac_aux_dir/$ac_t -c" | |
4373 | break 2 | |
4374 | fi | |
4375 | done | |
783e057b DJ |
4376 | done |
4377 | if test -z "$ac_aux_dir"; then | |
81ecdfbb | 4378 | as_fn_error "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
783e057b | 4379 | fi |
81ecdfbb RW |
4380 | |
4381 | # These three variables are undocumented and unsupported, | |
4382 | # and are intended to be withdrawn in a future Autoconf release. | |
4383 | # They can cause serious problems if a builder's source tree is in a directory | |
4384 | # whose full name contains unusual characters. | |
4385 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. | |
4386 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | |
4387 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. | |
4388 | ||
783e057b | 4389 | |
783e057b | 4390 | |
9009e1ae MR |
4391 | test "$program_prefix" != NONE && |
4392 | program_transform_name="s&^&$program_prefix&;$program_transform_name" | |
4393 | # Use a double $ so make ignores it. | |
4394 | test "$program_suffix" != NONE && | |
4395 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" | |
4396 | # Double any \ or $. | |
4397 | # By default was `s,x,x', remove it if useless. | |
4398 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' | |
4399 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` | |
4400 | ||
81ecdfbb | 4401 | |
a417dc56 RW |
4402 | # Dependency checking. |
4403 | rm -rf .tst 2>/dev/null | |
4404 | mkdir .tst 2>/dev/null | |
4405 | if test -d .tst; then | |
4406 | am__leading_dot=. | |
4407 | else | |
4408 | am__leading_dot=_ | |
4409 | fi | |
4410 | rmdir .tst 2>/dev/null | |
4411 | ||
4412 | DEPDIR="${am__leading_dot}deps" | |
4413 | ||
81ecdfbb | 4414 | ac_config_commands="$ac_config_commands depdir" |
a417dc56 RW |
4415 | |
4416 | ||
4417 | depcc="$CC" am_compiler_list= | |
4418 | ||
4419 | am_depcomp=$ac_aux_dir/depcomp | |
81ecdfbb RW |
4420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
4421 | $as_echo_n "checking dependency style of $depcc... " >&6; } | |
4422 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : | |
4423 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4424 | else |
4425 | if test -f "$am_depcomp"; then | |
4426 | # We make a subdir and do the tests there. Otherwise we can end up | |
4427 | # making bogus files that we don't know about and never remove. For | |
4428 | # instance it was reported that on HP-UX the gcc test will end up | |
4429 | # making a dummy file named `D' -- because `-MD' means `put the output | |
4430 | # in D'. | |
4431 | mkdir conftest.dir | |
4432 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
4433 | # using a relative directory. | |
4434 | cp "$am_depcomp" conftest.dir | |
4435 | cd conftest.dir | |
4436 | # We will build objects and dependencies in a subdirectory because | |
4437 | # it helps to detect inapplicable dependency modes. For instance | |
4438 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
4439 | # side effect of compilation, but ICC will put the dependencies in | |
4440 | # the current directory while Tru64 will put them in the object | |
4441 | # directory. | |
4442 | mkdir sub | |
4443 | ||
4444 | am_cv_CC_dependencies_compiler_type=none | |
4445 | if test "$am_compiler_list" = ""; then | |
4446 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4447 | fi | |
4448 | for depmode in $am_compiler_list; do | |
4449 | if test $depmode = none; then break; fi | |
4450 | ||
81ecdfbb | 4451 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
a417dc56 RW |
4452 | # Setup a source with many dependencies, because some compilers |
4453 | # like to wrap large dependency lists on column 80 (with \), and | |
4454 | # we should not choose a depcomp mode which is confused by this. | |
4455 | # | |
4456 | # We need to recreate these files for each test, as the compiler may | |
4457 | # overwrite some of them when testing with obscure command lines. | |
4458 | # This happens at least with the AIX C compiler. | |
4459 | : > sub/conftest.c | |
4460 | for i in 1 2 3 4 5 6; do | |
4461 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4462 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
4463 | # Solaris 8's {/usr,}/bin/sh. | |
4464 | touch sub/conftst$i.h | |
4465 | done | |
4466 | echo "include sub/conftest.Po" > confmf | |
4467 | ||
4468 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
4469 | # mode. It turns out that the SunPro C++ compiler does not properly | |
4470 | # handle `-M -o', and we need to detect this. | |
4471 | depcmd="depmode=$depmode \ | |
4472 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
4473 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4474 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
4475 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
4476 | if env $depcmd > conftest.err 2>&1 && | |
4477 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
4478 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
4479 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
4480 | # icc doesn't choke on unknown options, it will just issue warnings | |
4481 | # or remarks (even with -Werror). So we grep stderr for any message | |
4482 | # that says an option was ignored or not supported. | |
4483 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4484 | # icc: Command line warning: ignoring option '-M'; no argument required | |
4485 | # The diagnosis changed in icc 8.0: | |
4486 | # icc: Command line remark: option '-MP' not supported | |
4487 | if (grep 'ignoring option' conftest.err || | |
4488 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4489 | am_cv_CC_dependencies_compiler_type=$depmode | |
81ecdfbb | 4490 | $as_echo "$as_me:$LINENO: success" >&5 |
a417dc56 RW |
4491 | break |
4492 | fi | |
4493 | fi | |
81ecdfbb | 4494 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
a417dc56 RW |
4495 | sed -e 's/^/| /' < conftest.err >&5 |
4496 | done | |
4497 | ||
4498 | cd .. | |
4499 | rm -rf conftest.dir | |
4500 | else | |
4501 | am_cv_CC_dependencies_compiler_type=none | |
4502 | fi | |
4503 | ||
4504 | fi | |
81ecdfbb RW |
4505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
4506 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
a417dc56 | 4507 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
81ecdfbb | 4508 | then as_fn_error "no usable dependency style found" "$LINENO" 5 |
a417dc56 RW |
4509 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
4510 | ||
4511 | fi | |
4512 | ||
4513 | ||
4514 | # Check for the 'make' the user wants to use. | |
4515 | for ac_prog in make | |
4516 | do | |
4517 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
4518 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
4519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4520 | $as_echo_n "checking for $ac_word... " >&6; } | |
4521 | if test "${ac_cv_prog_MAKE+set}" = set; then : | |
4522 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4523 | else |
4524 | if test -n "$MAKE"; then | |
4525 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
4526 | else | |
4527 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4528 | for as_dir in $PATH | |
4529 | do | |
4530 | IFS=$as_save_IFS | |
4531 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
4532 | for ac_exec_ext in '' $ac_executable_extensions; do |
4533 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
a417dc56 | 4534 | ac_cv_prog_MAKE="$ac_prog" |
81ecdfbb | 4535 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
a417dc56 RW |
4536 | break 2 |
4537 | fi | |
4538 | done | |
81ecdfbb RW |
4539 | done |
4540 | IFS=$as_save_IFS | |
a417dc56 RW |
4541 | |
4542 | fi | |
4543 | fi | |
4544 | MAKE=$ac_cv_prog_MAKE | |
4545 | if test -n "$MAKE"; then | |
81ecdfbb RW |
4546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 |
4547 | $as_echo "$MAKE" >&6; } | |
a417dc56 | 4548 | else |
81ecdfbb RW |
4549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4550 | $as_echo "no" >&6; } | |
a417dc56 RW |
4551 | fi |
4552 | ||
81ecdfbb | 4553 | |
a417dc56 RW |
4554 | test -n "$MAKE" && break |
4555 | done | |
4556 | ||
4557 | MAKE_IS_GNU= | |
4558 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
4559 | *GNU*) | |
4560 | MAKE_IS_GNU=yes | |
4561 | ;; | |
4562 | esac | |
81ecdfbb | 4563 | if test "$MAKE_IS_GNU" = yes; then |
a417dc56 RW |
4564 | GMAKE_TRUE= |
4565 | GMAKE_FALSE='#' | |
4566 | else | |
4567 | GMAKE_TRUE='#' | |
4568 | GMAKE_FALSE= | |
4569 | fi | |
4570 | ||
81ecdfbb RW |
4571 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4572 | $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
4573 | set x ${MAKE-make} | |
4574 | ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
4575 | if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : | |
4576 | $as_echo_n "(cached) " >&6 | |
a417dc56 RW |
4577 | else |
4578 | cat >conftest.make <<\_ACEOF | |
81ecdfbb | 4579 | SHELL = /bin/sh |
a417dc56 | 4580 | all: |
81ecdfbb | 4581 | @echo '@@@%%%=$(MAKE)=@@@%%%' |
a417dc56 RW |
4582 | _ACEOF |
4583 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
81ecdfbb RW |
4584 | case `${MAKE-make} -f conftest.make 2>/dev/null` in |
4585 | *@@@%%%=?*=@@@%%%*) | |
4586 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
4587 | *) | |
4588 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
4589 | esac | |
a417dc56 RW |
4590 | rm -f conftest.make |
4591 | fi | |
81ecdfbb RW |
4592 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
4593 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4594 | $as_echo "yes" >&6; } | |
a417dc56 RW |
4595 | SET_MAKE= |
4596 | else | |
81ecdfbb RW |
4597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4598 | $as_echo "no" >&6; } | |
a417dc56 RW |
4599 | SET_MAKE="MAKE=${MAKE-make}" |
4600 | fi | |
4601 | ||
4602 | ||
c971b7fa PA |
4603 | # Configure gnulib. We need to build gnulib under some other |
4604 | # directory not "gnulib", to avoid the problem of both GDB and | |
4605 | # GDBserver wanting to build it in the same directory, when building | |
4606 | # in the source dir. | |
783e057b | 4607 | |
c971b7fa PA |
4608 | in_src="gnulib" |
4609 | in_build="build-gnulib" | |
4610 | ||
4611 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments | |
4612 | # so they do not pile up. | |
4613 | ac_sub_configure_args= | |
4614 | ac_prev= | |
4615 | eval "set x $ac_configure_args" | |
4616 | shift | |
4617 | for ac_arg | |
4618 | do | |
4619 | if test -n "$ac_prev"; then | |
4620 | ac_prev= | |
4621 | continue | |
4622 | fi | |
4623 | case $ac_arg in | |
4624 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
4625 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
4626 | ac_prev=cache_file ;; | |
4627 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
4628 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | |
4629 | | --c=*) | |
4630 | ;; | |
4631 | --config-cache | -C) | |
4632 | ;; | |
4633 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
4634 | ac_prev=srcdir ;; | |
4635 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
4636 | ;; | |
4637 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
4638 | ac_prev=prefix ;; | |
4639 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
4640 | ;; | |
4641 | --disable-option-checking) | |
4642 | ;; | |
4643 | *) | |
4644 | case $ac_arg in | |
4645 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4646 | esac | |
4647 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; | |
4648 | esac | |
4649 | done | |
4650 | ||
4651 | # Always prepend --prefix to ensure using the same prefix | |
4652 | # in subdir configurations. | |
4653 | ac_arg="--prefix=$prefix" | |
4654 | case $ac_arg in | |
4655 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
4656 | esac | |
4657 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" | |
4658 | ||
4659 | # Pass --silent | |
4660 | if test "$silent" = yes; then | |
4661 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
4662 | fi | |
4663 | ||
4664 | # Always prepend --disable-option-checking to silence warnings, since | |
4665 | # different subdirs can have different --enable and --with options. | |
4666 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
4667 | ||
4668 | ac_popdir=`pwd` | |
4669 | ac_dir=$in_build | |
4670 | ||
4671 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" | |
4672 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
4673 | $as_echo "$ac_msg" >&6 | |
4674 | as_dir="$ac_dir"; as_fn_mkdir_p | |
4675 | ||
38ea300a PA |
4676 | case $srcdir in |
4677 | [\\/]* | ?:[\\/]* ) | |
4678 | ac_srcdir=$srcdir/$in_src ;; | |
4679 | *) # Relative name. | |
4680 | ac_srcdir=../$srcdir/$in_src ;; | |
4681 | esac | |
c971b7fa PA |
4682 | |
4683 | cd "$ac_dir" | |
4684 | ||
4685 | ac_sub_configure=$ac_srcdir/configure | |
4686 | ||
4687 | # Make the cache file name correct relative to the subdirectory. | |
4688 | case $cache_file in | |
4689 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
4690 | *) # Relative name. | |
4691 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
4692 | esac | |
4693 | ||
4694 | { $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 | |
4695 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
4696 | # The eval makes quoting arguments work. | |
4697 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ | |
4698 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
4699 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 | |
4700 | ||
4701 | cd "$ac_popdir" | |
783e057b | 4702 | |
c971b7fa PA |
4703 | |
4704 | ||
4705 | CONFIG_OBS= | |
4706 | CONFIG_DEPS= | |
4707 | CONFIG_SRCS= | |
4708 | ENABLE_CFLAGS= | |
4709 | ||
4710 | CONFIG_ALL= | |
4711 | CONFIG_CLEAN= | |
4712 | CONFIG_INSTALL= | |
4713 | CONFIG_UNINSTALL= | |
4714 | ||
4715 | # If we haven't got the data from the intl directory, | |
4716 | # assume NLS is disabled. | |
4717 | USE_NLS=no | |
4718 | LIBINTL= | |
4719 | LIBINTL_DEP= | |
4720 | INCINTL= | |
4721 | XGETTEXT= | |
4722 | GMSGFMT= | |
4723 | POSUB= | |
783e057b DJ |
4724 | |
4725 | if test -f ../intl/config.intl; then | |
4726 | . ../intl/config.intl | |
4727 | fi | |
81ecdfbb RW |
4728 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
4729 | $as_echo_n "checking whether NLS is requested... " >&6; } | |
783e057b | 4730 | if test x"$USE_NLS" != xyes; then |
81ecdfbb RW |
4731 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4732 | $as_echo "no" >&6; } | |
783e057b | 4733 | else |
81ecdfbb RW |
4734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
4735 | $as_echo "yes" >&6; } | |
783e057b | 4736 | |
81ecdfbb | 4737 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
783e057b DJ |
4738 | |
4739 | ||
81ecdfbb RW |
4740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
4741 | $as_echo_n "checking for catalogs to be installed... " >&6; } | |
783e057b DJ |
4742 | # Look for .po and .gmo files in the source directory. |
4743 | CATALOGS= | |
4744 | XLINGUAS= | |
4745 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
4746 | # If there aren't any .gmo files the shell will give us the | |
4747 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
4748 | # weeded out. | |
4749 | case "$cat" in *\**) | |
4750 | continue;; | |
4751 | esac | |
4752 | # The quadruple backslash is collapsed to a double backslash | |
4753 | # by the backticks, then collapsed again by the double quotes, | |
4754 | # leaving us with one backslash in the sed expression (right | |
4755 | # before the dot that mustn't act as a wildcard). | |
c971b7fa PA |
4756 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
4757 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
4758 | # The user is allowed to set LINGUAS to a list of languages to | |
4759 | # install catalogs for. If it's empty that means "all of them." | |
4760 | if test "x$LINGUAS" = x; then | |
4761 | CATALOGS="$CATALOGS $cat" | |
4762 | XLINGUAS="$XLINGUAS $lang" | |
4763 | else | |
4764 | case "$LINGUAS" in *$lang*) | |
4765 | CATALOGS="$CATALOGS $cat" | |
4766 | XLINGUAS="$XLINGUAS $lang" | |
4767 | ;; | |
4768 | esac | |
e28b3332 DJ |
4769 | fi |
4770 | done | |
c971b7fa PA |
4771 | LINGUAS="$XLINGUAS" |
4772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 | |
4773 | $as_echo "$LINGUAS" >&6; } | |
4774 | ||
4775 | ||
4776 | DATADIRNAME=share | |
4777 | ||
4778 | INSTOBJEXT=.mo | |
4779 | ||
4780 | GENCAT=gencat | |
4781 | ||
4782 | CATOBJEXT=.gmo | |
e28b3332 | 4783 | |
e28b3332 DJ |
4784 | fi |
4785 | ||
c971b7fa PA |
4786 | localedir='${datadir}/locale' |
4787 | ||
4788 | ||
4789 | if test x"$USE_NLS" = xyes; then | |
4790 | CONFIG_ALL="$CONFIG_ALL all-po" | |
4791 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
4792 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
4793 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
e28b3332 | 4794 | fi |
e28b3332 | 4795 | |
c971b7fa PA |
4796 | GNULIB=build-gnulib/import |
4797 | ||
4798 | # For Makefile dependencies. | |
4799 | GNULIB_STDINT_H= | |
4800 | if test x"$STDINT_H" != x; then | |
4801 | GNULIB_STDINT_H=$GNULIB/$STDINT_H | |
e28b3332 DJ |
4802 | fi |
4803 | ||
4804 | ||
c971b7fa PA |
4805 | PACKAGE=gdb |
4806 | ||
4807 | cat >>confdefs.h <<_ACEOF | |
4808 | #define PACKAGE "$PACKAGE" | |
4809 | _ACEOF | |
4810 | ||
4811 | ||
4812 | ||
4813 | # We never need to detect it in this sub-configure. | |
4814 | # But preserve it for config.status --recheck. | |
4815 | ||
4816 | ||
4817 | ||
4818 | MAKEINFO_EXTRA_FLAGS="" | |
4819 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 | |
4820 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } | |
4821 | if test "${gdb_cv_have_makeinfo_click+set}" = set; then : | |
4822 | $as_echo_n "(cached) " >&6 | |
4823 | else | |
4824 | echo '@clicksequence{a @click{} b}' >conftest.texinfo | |
4825 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then | |
4826 | gdb_cv_have_makeinfo_click=yes | |
4827 | else | |
4828 | gdb_cv_have_makeinfo_click=no | |
4829 | fi | |
4830 | fi | |
4831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 | |
4832 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } | |
4833 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then | |
4834 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" | |
4835 | fi | |
e28b3332 DJ |
4836 | |
4837 | ||
bec39cab AC |
4838 | |
4839 | ||
81ecdfbb RW |
4840 | # Check whether --with-separate-debug-dir was given. |
4841 | if test "${with_separate_debug_dir+set}" = set; then : | |
4842 | withval=$with_separate_debug_dir; | |
b14b1491 TT |
4843 | DEBUGDIR=$withval |
4844 | else | |
4845 | DEBUGDIR=${libdir}/debug | |
81ecdfbb RW |
4846 | fi |
4847 | ||
20e95c23 | 4848 | |
783e057b DJ |
4849 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4850 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 4851 | ac_define_dir=`eval echo $DEBUGDIR` |
783e057b | 4852 | ac_define_dir=`eval echo $ac_define_dir` |
20e95c23 | 4853 | |
783e057b DJ |
4854 | cat >>confdefs.h <<_ACEOF |
4855 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 4856 | _ACEOF |
20e95c23 | 4857 | |
20e95c23 | 4858 | |
20e95c23 | 4859 | |
0c4a4063 | 4860 | |
b14b1491 TT |
4861 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4862 | if test "x$prefix" = xNONE; then | |
4863 | test_prefix=/usr/local | |
4864 | else | |
4865 | test_prefix=$prefix | |
4866 | fi | |
783e057b | 4867 | else |
b14b1491 | 4868 | test_prefix=$exec_prefix |
783e057b | 4869 | fi |
b14b1491 TT |
4870 | value=0 |
4871 | case ${ac_define_dir} in | |
4872 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4873 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4874 | value=1 | |
4875 | ;; | |
4876 | esac | |
4877 | ||
4878 | cat >>confdefs.h <<_ACEOF | |
4879 | #define DEBUGDIR_RELOCATABLE $value | |
4880 | _ACEOF | |
4881 | ||
4882 | ||
4883 | ||
0c4a4063 | 4884 | |
f83d8a90 DE |
4885 | # We can't pass paths as command line arguments. |
4886 | # Mingw32 tries to be clever and will convert the paths for us. | |
4887 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get | |
4888 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". | |
4889 | # This breaks GDB's relocatable path conversions since paths passed in | |
4890 | # config.h would not get so translated, the path prefixes no longer match. | |
4891 | ||
4892 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4893 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4894 | ac_define_dir=`eval echo $bindir` | |
4895 | ac_define_dir=`eval echo $ac_define_dir` | |
4896 | ||
4897 | cat >>confdefs.h <<_ACEOF | |
4898 | #define BINDIR "$ac_define_dir" | |
4899 | _ACEOF | |
4900 | ||
4901 | ||
4902 | ||
b14b1491 TT |
4903 | # GDB's datadir relocation |
4904 | ||
4905 | ||
4906 | ||
81ecdfbb RW |
4907 | # Check whether --with-gdb-datadir was given. |
4908 | if test "${with_gdb_datadir+set}" = set; then : | |
4909 | withval=$with_gdb_datadir; | |
b14b1491 | 4910 | GDB_DATADIR=$withval |
20e95c23 | 4911 | else |
b14b1491 | 4912 | GDB_DATADIR=${datadir}/gdb |
81ecdfbb RW |
4913 | fi |
4914 | ||
20e95c23 | 4915 | |
b14b1491 TT |
4916 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
4917 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4918 | ac_define_dir=`eval echo $GDB_DATADIR` | |
4919 | ac_define_dir=`eval echo $ac_define_dir` | |
4920 | ||
4921 | cat >>confdefs.h <<_ACEOF | |
4922 | #define GDB_DATADIR "$ac_define_dir" | |
20e95c23 DJ |
4923 | _ACEOF |
4924 | ||
b14b1491 TT |
4925 | |
4926 | ||
0c4a4063 | 4927 | |
b14b1491 TT |
4928 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
4929 | if test "x$prefix" = xNONE; then | |
4930 | test_prefix=/usr/local | |
4931 | else | |
4932 | test_prefix=$prefix | |
4933 | fi | |
4934 | else | |
4935 | test_prefix=$exec_prefix | |
4936 | fi | |
4937 | value=0 | |
4938 | case ${ac_define_dir} in | |
4939 | "${test_prefix}"|"${test_prefix}/"*|\ | |
4940 | '${exec_prefix}'|'${exec_prefix}/'*) | |
4941 | value=1 | |
4942 | ;; | |
4943 | esac | |
4944 | ||
4945 | cat >>confdefs.h <<_ACEOF | |
4946 | #define GDB_DATADIR_RELOCATABLE $value | |
4947 | _ACEOF | |
4948 | ||
4949 | ||
783e057b | 4950 | |
20e95c23 | 4951 | |
0c4a4063 | 4952 | |
81ecdfbb RW |
4953 | # Check whether --with-relocated-sources was given. |
4954 | if test "${with_relocated_sources+set}" = set; then : | |
4955 | withval=$with_relocated_sources; reloc_srcdir="${withval}" | |
29b0e8a2 JM |
4956 | |
4957 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4958 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4959 | ac_define_dir=`eval echo $reloc_srcdir` | |
4960 | ac_define_dir=`eval echo $ac_define_dir` | |
4961 | ||
4962 | cat >>confdefs.h <<_ACEOF | |
4963 | #define RELOC_SRCDIR "$ac_define_dir" | |
4964 | _ACEOF | |
4965 | ||
4966 | ||
4967 | ||
81ecdfbb RW |
4968 | fi |
4969 | ||
29b0e8a2 | 4970 | |
7349ff92 JK |
4971 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
4972 | $as_echo_n "checking for default auto-load directory... " >&6; } | |
4973 | ||
4974 | # Check whether --with-auto-load-dir was given. | |
4975 | if test "${with_auto_load_dir+set}" = set; then : | |
4976 | withval=$with_auto_load_dir; | |
4977 | else | |
1564a261 | 4978 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
7349ff92 JK |
4979 | fi |
4980 | ||
1564a261 | 4981 | escape_dir=`echo $with_auto_load_dir | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
7349ff92 JK |
4982 | |
4983 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
4984 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
4985 | ac_define_dir=`eval echo $escape_dir` | |
4986 | ac_define_dir=`eval echo $ac_define_dir` | |
4987 | ||
4988 | cat >>confdefs.h <<_ACEOF | |
4989 | #define AUTO_LOAD_DIR "$ac_define_dir" | |
4990 | _ACEOF | |
4991 | ||
4992 | ||
4993 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 | |
4994 | $as_echo "$with_auto_load_dir" >&6; } | |
4995 | ||
bccbefd2 JK |
4996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
4997 | $as_echo_n "checking for default auto-load safe-path... " >&6; } | |
4998 | ||
4999 | # Check whether --with-auto-load-safe-path was given. | |
5000 | if test "${with_auto_load_safe_path+set}" = set; then : | |
5001 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then | |
6dea1fbd JK |
5002 | with_auto_load_safe_path="/" |
5003 | fi | |
bccbefd2 | 5004 | else |
7349ff92 | 5005 | with_auto_load_safe_path="$with_auto_load_dir" |
bccbefd2 JK |
5006 | fi |
5007 | ||
1564a261 | 5008 | escape_dir=`echo $with_auto_load_safe_path | sed 's/[$]\(datadir\|debugdir\)\>/\\\\\\\\\\\\&/g'` |
bccbefd2 JK |
5009 | |
5010 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
5011 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6dea1fbd | 5012 | ac_define_dir=`eval echo $escape_dir` |
bccbefd2 JK |
5013 | ac_define_dir=`eval echo $ac_define_dir` |
5014 | ||
5015 | cat >>confdefs.h <<_ACEOF | |
6dea1fbd | 5016 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
bccbefd2 JK |
5017 | _ACEOF |
5018 | ||
5019 | ||
5020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 | |
5021 | $as_echo "$with_auto_load_safe_path" >&6; } | |
5022 | ||
29b0e8a2 | 5023 | |
20e95c23 | 5024 | |
5ae98d25 | 5025 | subdirs="$subdirs testsuite" |
20e95c23 DJ |
5026 | |
5027 | ||
783e057b | 5028 | # Check whether to support alternative target configurations |
81ecdfbb RW |
5029 | # Check whether --enable-targets was given. |
5030 | if test "${enable_targets+set}" = set; then : | |
5031 | enableval=$enable_targets; case "${enableval}" in | |
5032 | yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 | |
783e057b DJ |
5033 | ;; |
5034 | no) enable_targets= ;; | |
5035 | *) enable_targets=$enableval ;; | |
5036 | esac | |
81ecdfbb RW |
5037 | fi |
5038 | ||
20e95c23 | 5039 | |
783e057b | 5040 | # Check whether to enable 64-bit support on 32-bit hosts |
81ecdfbb RW |
5041 | # Check whether --enable-64-bit-bfd was given. |
5042 | if test "${enable_64_bit_bfd+set}" = set; then : | |
5043 | enableval=$enable_64_bit_bfd; case "${enableval}" in | |
783e057b DJ |
5044 | yes) want64=true ;; |
5045 | no) want64=false ;; | |
81ecdfbb | 5046 | *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
783e057b DJ |
5047 | esac |
5048 | else | |
5049 | want64=false | |
81ecdfbb RW |
5050 | fi |
5051 | ||
783e057b DJ |
5052 | # Provide defaults for some variables set by the per-host and per-target |
5053 | # configuration. | |
5054 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 5055 | |
783e057b DJ |
5056 | if test "${target}" = "${host}"; then |
5057 | gdb_native=yes | |
5058 | else | |
5059 | gdb_native=no | |
5060 | fi | |
20e95c23 | 5061 | |
783e057b | 5062 | . $srcdir/configure.host |
20e95c23 | 5063 | |
783e057b | 5064 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 5065 | |
783e057b DJ |
5066 | TARGET_OBS= |
5067 | all_targets= | |
20e95c23 | 5068 | |
783e057b | 5069 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 5070 | do |
783e057b DJ |
5071 | if test "$targ_alias" = "all"; then |
5072 | all_targets=true | |
5073 | else | |
5074 | # Canonicalize the secondary target names. | |
5075 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
5076 | if test -n "$result"; then | |
5077 | targ=$result | |
5078 | else | |
5079 | targ=$targ_alias | |
5080 | fi | |
20e95c23 | 5081 | |
783e057b | 5082 | . ${srcdir}/configure.tgt |
20e95c23 | 5083 | |
bf307134 JB |
5084 | if test -z "${gdb_target_obs}"; then : |
5085 | as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5 | |
5086 | fi | |
5087 | ||
783e057b DJ |
5088 | # Target-specific object files |
5089 | for i in ${gdb_target_obs}; do | |
5090 | case " $TARGET_OBS " in | |
5091 | *" ${i} "*) ;; | |
5092 | *) | |
5093 | TARGET_OBS="$TARGET_OBS ${i}" | |
5094 | ;; | |
5095 | esac | |
5096 | done | |
20e95c23 | 5097 | |
783e057b DJ |
5098 | # Check whether this target needs 64-bit CORE_ADDR |
5099 | if test x${want64} = xfalse; then | |
5100 | . ${srcdir}/../bfd/config.bfd | |
5101 | fi | |
5102 | fi | |
20e95c23 DJ |
5103 | done |
5104 | ||
783e057b DJ |
5105 | if test x${all_targets} = xtrue; then |
5106 | ||
5107 | # We want all 64-bit targets if we either: | |
5108 | # - run on a 64-bit host or | |
5109 | # - already require 64-bit support for some other target or | |
5110 | # - the --enable-64-bit-bfd option was supplied | |
5111 | # Otherwise we only support all 32-bit targets. | |
5112 | # | |
5113 | # NOTE: This test must be in sync with the corresponding | |
5114 | # tests in BFD! | |
20e95c23 | 5115 | |
783e057b | 5116 | if test x${want64} = xfalse; then |
81ecdfbb RW |
5117 | # The cast to long int works around a bug in the HP C Compiler |
5118 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5119 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5120 | # This bug is HP SR number 8606223364. | |
5121 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
5122 | $as_echo_n "checking size of long... " >&6; } | |
5123 | if test "${ac_cv_sizeof_long+set}" = set; then : | |
5124 | $as_echo_n "(cached) " >&6 | |
c0993dbe | 5125 | else |
81ecdfbb | 5126 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
c0993dbe | 5127 | |
81ecdfbb RW |
5128 | else |
5129 | if test "$ac_cv_type_long" = yes; then | |
5130 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5131 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5132 | { as_fn_set_status 77 | |
5133 | as_fn_error "cannot compute sizeof (long) | |
5134 | See \`config.log' for more details." "$LINENO" 5; }; } | |
5135 | else | |
5136 | ac_cv_sizeof_long=0 | |
5137 | fi | |
c0993dbe | 5138 | fi |
81ecdfbb | 5139 | |
c0993dbe | 5140 | fi |
81ecdfbb RW |
5141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
5142 | $as_echo "$ac_cv_sizeof_long" >&6; } | |
c0993dbe | 5143 | |
c0993dbe | 5144 | |
c0993dbe | 5145 | |
c0993dbe UW |
5146 | cat >>confdefs.h <<_ACEOF |
5147 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5148 | _ACEOF | |
5149 | ||
5150 | ||
5151 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
5152 | want64=true | |
5153 | fi | |
5154 | fi | |
5155 | if test x${want64} = xtrue; then | |
5156 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
5157 | else | |
5158 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
5159 | fi | |
5160 | fi | |
5161 | ||
5162 | ||
5163 | ||
5164 | # For other settings, only the main target counts. | |
5165 | gdb_sim= | |
5166 | gdb_osabi= | |
5167 | build_gdbserver= | |
5168 | targ=$target; . ${srcdir}/configure.tgt | |
5169 | ||
5170 | # Fetch the default architecture and default target vector from BFD. | |
5171 | targ=$target; . $srcdir/../bfd/config.bfd | |
5172 | ||
5173 | # We only want the first architecture, so strip off the others if | |
5174 | # there is more than one. | |
5175 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
5176 | ||
5177 | if test "x$targ_archs" != x; then | |
5178 | ||
5179 | cat >>confdefs.h <<_ACEOF | |
5180 | #define DEFAULT_BFD_ARCH $targ_archs | |
5181 | _ACEOF | |
5182 | ||
5183 | fi | |
5184 | if test "x$targ_defvec" != x; then | |
5185 | ||
5186 | cat >>confdefs.h <<_ACEOF | |
5187 | #define DEFAULT_BFD_VEC $targ_defvec | |
5188 | _ACEOF | |
5189 | ||
5190 | fi | |
5191 | ||
c0993dbe UW |
5192 | # The CLI cannot be disabled yet, but may be in the future. |
5193 | ||
5194 | # Enable CLI. | |
81ecdfbb RW |
5195 | # Check whether --enable-gdbcli was given. |
5196 | if test "${enable_gdbcli+set}" = set; then : | |
5197 | enableval=$enable_gdbcli; case $enableval in | |
c0993dbe UW |
5198 | yes) |
5199 | ;; | |
5200 | no) | |
81ecdfbb | 5201 | as_fn_error "the command-line interface cannot be disabled yet" "$LINENO" 5 ;; |
c0993dbe | 5202 | *) |
81ecdfbb | 5203 | as_fn_error "bad value $enableval for --enable-gdbcli" "$LINENO" 5 ;; |
c0993dbe UW |
5204 | esac |
5205 | else | |
5206 | enable_gdbcli=yes | |
81ecdfbb RW |
5207 | fi |
5208 | ||
c0993dbe UW |
5209 | if test x"$enable_gdbcli" = xyes; then |
5210 | if test -d $srcdir/cli; then | |
5211 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
5212 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
5213 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
5214 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
5215 | fi | |
5216 | fi | |
5217 | ||
5218 | # Enable MI. | |
81ecdfbb RW |
5219 | # Check whether --enable-gdbmi was given. |
5220 | if test "${enable_gdbmi+set}" = set; then : | |
5221 | enableval=$enable_gdbmi; case $enableval in | |
c0993dbe UW |
5222 | yes | no) |
5223 | ;; | |
5224 | *) | |
81ecdfbb | 5225 | as_fn_error "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
c0993dbe UW |
5226 | esac |
5227 | else | |
5228 | enable_gdbmi=yes | |
81ecdfbb RW |
5229 | fi |
5230 | ||
c0993dbe UW |
5231 | if test x"$enable_gdbmi" = xyes; then |
5232 | if test -d $srcdir/mi; then | |
5233 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
5234 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
5235 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
5236 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
5237 | fi | |
5238 | fi | |
5239 | ||
5240 | # Enable TUI. | |
81ecdfbb RW |
5241 | # Check whether --enable-tui was given. |
5242 | if test "${enable_tui+set}" = set; then : | |
5243 | enableval=$enable_tui; case $enableval in | |
3ca64bd3 | 5244 | yes | no | auto) |
c0993dbe UW |
5245 | ;; |
5246 | *) | |
81ecdfbb | 5247 | as_fn_error "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
c0993dbe UW |
5248 | esac |
5249 | else | |
3ca64bd3 | 5250 | enable_tui=auto |
81ecdfbb RW |
5251 | fi |
5252 | ||
c0993dbe UW |
5253 | |
5254 | # Enable gdbtk. | |
81ecdfbb RW |
5255 | # Check whether --enable-gdbtk was given. |
5256 | if test "${enable_gdbtk+set}" = set; then : | |
5257 | enableval=$enable_gdbtk; case $enableval in | |
c0993dbe UW |
5258 | yes | no) |
5259 | ;; | |
5260 | *) | |
81ecdfbb | 5261 | as_fn_error "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
c0993dbe UW |
5262 | esac |
5263 | else | |
5062cc19 | 5264 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
5265 | enable_gdbtk=yes |
5266 | else | |
5267 | enable_gdbtk=no | |
5268 | fi | |
81ecdfbb RW |
5269 | fi |
5270 | ||
c0993dbe UW |
5271 | # We unconditionally disable gdbtk tests on selected platforms. |
5272 | case $host_os in | |
5273 | go32* | windows*) | |
81ecdfbb RW |
5274 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
5275 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
c0993dbe UW |
5276 | enable_gdbtk=no ;; |
5277 | esac | |
5278 | ||
05e7c244 | 5279 | # Libunwind support for ia64. |
bec39cab | 5280 | |
05e7c244 JK |
5281 | |
5282 | # Check whether --with-libunwind-ia64 was given. | |
5283 | if test "${with_libunwind_ia64+set}" = set; then : | |
5284 | withval=$with_libunwind_ia64; | |
bec39cab | 5285 | else |
05e7c244 JK |
5286 | with_libunwind_ia64=auto |
5287 | fi | |
bec39cab | 5288 | |
05e7c244 JK |
5289 | |
5290 | # Backward compatibility option. | |
5291 | if test "${with_libunwind+set}" = set; then | |
5292 | if test x"$with_libunwind_ia64" != xauto; then | |
5293 | as_fn_error "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 | |
5294 | fi | |
5295 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 | |
5296 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} | |
5297 | with_libunwind_ia64="$with_libunwind" | |
5298 | fi | |
5299 | ||
5300 | case "$with_libunwind_ia64" in | |
5301 | yes | no) | |
5302 | ;; | |
5303 | auto) | |
5304 | for ac_header in libunwind-ia64.h | |
81ecdfbb | 5305 | do : |
b54a8fd7 PA |
5306 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5307 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5308 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5309 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5310 | _ACEOF |
5311 | ||
5312 | fi | |
5313 | ||
5314 | done | |
5315 | ||
05e7c244 JK |
5316 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
5317 | ;; | |
5318 | *) | |
5319 | as_fn_error "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 | |
5320 | ;; | |
5321 | esac | |
bec39cab | 5322 | |
05e7c244 | 5323 | if test x"$with_libunwind_ia64" = xyes; then |
b54a8fd7 | 5324 | for ac_header in libunwind-ia64.h |
81ecdfbb | 5325 | do : |
b54a8fd7 PA |
5326 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
5327 | if test "x$ac_cv_header_libunwind_ia64_h" = x""yes; then : | |
bec39cab | 5328 | cat >>confdefs.h <<_ACEOF |
b54a8fd7 | 5329 | #define HAVE_LIBUNWIND_IA64_H 1 |
bec39cab AC |
5330 | _ACEOF |
5331 | ||
5332 | fi | |
5333 | ||
5334 | done | |
5335 | ||
05e7c244 JK |
5336 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
5337 | as_fn_error "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 | |
5338 | fi | |
5339 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" | |
5340 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" | |
5341 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" | |
a9322a30 TT |
5342 | fi |
5343 | ||
cb01cfba JB |
5344 | opt_curses=no |
5345 | ||
81ecdfbb RW |
5346 | # Check whether --with-curses was given. |
5347 | if test "${with_curses+set}" = set; then : | |
5348 | withval=$with_curses; opt_curses=$withval | |
5349 | fi | |
5350 | ||
cb01cfba | 5351 | |
76a39ba7 | 5352 | prefer_curses=no |
cb01cfba | 5353 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 5354 | prefer_curses=yes |
cb01cfba JB |
5355 | fi |
5356 | ||
a9322a30 | 5357 | # Profiling support. |
81ecdfbb RW |
5358 | # Check whether --enable-profiling was given. |
5359 | if test "${enable_profiling+set}" = set; then : | |
5360 | enableval=$enable_profiling; case $enableval in | |
a9322a30 TT |
5361 | yes | no) |
5362 | ;; | |
5363 | *) | |
81ecdfbb | 5364 | as_fn_error "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
a9322a30 TT |
5365 | esac |
5366 | else | |
5367 | enable_profiling=no | |
81ecdfbb | 5368 | fi |
bec39cab | 5369 | |
a9322a30 TT |
5370 | |
5371 | for ac_func in monstartup _mcleanup | |
81ecdfbb RW |
5372 | do : |
5373 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5374 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
5375 | eval as_val=\$$as_ac_var | |
5376 | if test "x$as_val" = x""yes; then : | |
5377 | cat >>confdefs.h <<_ACEOF | |
5378 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 5379 | _ACEOF |
a9322a30 | 5380 | |
81ecdfbb RW |
5381 | fi |
5382 | done | |
a9322a30 | 5383 | |
81ecdfbb RW |
5384 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
5385 | $as_echo_n "checking for _etext... " >&6; } | |
5386 | if test "${ac_cv_var__etext+set}" = set; then : | |
5387 | $as_echo_n "(cached) " >&6 | |
5388 | else | |
5389 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5390 | /* end confdefs.h. */ | |
5391 | #include <stdlib.h> | |
5392 | extern char _etext; | |
a9322a30 TT |
5393 | |
5394 | int | |
5395 | main () | |
5396 | { | |
5397 | free (&_etext); | |
5398 | ; | |
5399 | return 0; | |
5400 | } | |
bec39cab | 5401 | _ACEOF |
81ecdfbb | 5402 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5403 | ac_cv_var__etext=yes |
bec39cab | 5404 | else |
81ecdfbb | 5405 | ac_cv_var__etext=no |
bec39cab | 5406 | fi |
81ecdfbb RW |
5407 | rm -f core conftest.err conftest.$ac_objext \ |
5408 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5409 | fi |
81ecdfbb RW |
5410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
5411 | $as_echo "$ac_cv_var__etext" >&6; } | |
a9322a30 | 5412 | if test $ac_cv_var__etext = yes; then |
60ca704f | 5413 | |
81ecdfbb | 5414 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
bec39cab | 5415 | |
bec39cab | 5416 | fi |
81ecdfbb RW |
5417 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
5418 | $as_echo_n "checking for etext... " >&6; } | |
5419 | if test "${ac_cv_var_etext+set}" = set; then : | |
5420 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5421 | else |
81ecdfbb | 5422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5423 | /* end confdefs.h. */ |
a9322a30 TT |
5424 | #include <stdlib.h> |
5425 | extern char etext; | |
bec39cab AC |
5426 | |
5427 | int | |
5428 | main () | |
5429 | { | |
a9322a30 | 5430 | free (&etext); |
bec39cab AC |
5431 | ; |
5432 | return 0; | |
5433 | } | |
5434 | _ACEOF | |
81ecdfbb | 5435 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 5436 | ac_cv_var_etext=yes |
bec39cab | 5437 | else |
81ecdfbb | 5438 | ac_cv_var_etext=no |
bec39cab | 5439 | fi |
81ecdfbb RW |
5440 | rm -f core conftest.err conftest.$ac_objext \ |
5441 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 5442 | fi |
81ecdfbb RW |
5443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
5444 | $as_echo "$ac_cv_var_etext" >&6; } | |
a9322a30 TT |
5445 | if test $ac_cv_var_etext = yes; then |
5446 | ||
81ecdfbb | 5447 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
bec39cab AC |
5448 | |
5449 | fi | |
a9322a30 TT |
5450 | if test "$enable_profiling" = yes ; then |
5451 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
81ecdfbb | 5452 | as_fn_error "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
a9322a30 TT |
5453 | fi |
5454 | PROFILE_CFLAGS=-pg | |
5455 | OLD_CFLAGS="$CFLAGS" | |
5456 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 5457 | |
81ecdfbb RW |
5458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
5459 | $as_echo_n "checking whether $CC supports -pg... " >&6; } | |
5460 | if test "${ac_cv_cc_supports_pg+set}" = set; then : | |
5461 | $as_echo_n "(cached) " >&6 | |
bec39cab | 5462 | else |
81ecdfbb | 5463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 5464 | /* end confdefs.h. */ |
bec39cab AC |
5465 | |
5466 | int | |
5467 | main () | |
5468 | { | |
a9322a30 | 5469 | int x; |
bec39cab AC |
5470 | ; |
5471 | return 0; | |
5472 | } | |
5473 | _ACEOF | |
81ecdfbb | 5474 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 5475 | ac_cv_cc_supports_pg=yes |
bec39cab | 5476 | else |
81ecdfbb | 5477 | ac_cv_cc_supports_pg=no |
bec39cab | 5478 | fi |
81ecdfbb | 5479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 5480 | fi |
81ecdfbb RW |
5481 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
5482 | $as_echo "$ac_cv_cc_supports_pg" >&6; } | |
bec39cab | 5483 | |
a9322a30 | 5484 | if test $ac_cv_cc_supports_pg = no; then |
81ecdfbb | 5485 | as_fn_error "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
a9322a30 | 5486 | fi |
bec39cab | 5487 | |
a9322a30 | 5488 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
5489 | fi |
5490 | ||
c16158bc JM |
5491 | |
5492 | ||
81ecdfbb RW |
5493 | # Check whether --with-pkgversion was given. |
5494 | if test "${with_pkgversion+set}" = set; then : | |
5495 | withval=$with_pkgversion; case "$withval" in | |
5496 | yes) as_fn_error "package version not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5497 | no) PKGVERSION= ;; |
5498 | *) PKGVERSION="($withval) " ;; | |
5499 | esac | |
5500 | else | |
5501 | PKGVERSION="(GDB) " | |
5502 | ||
81ecdfbb | 5503 | fi |
c16158bc JM |
5504 | |
5505 | ||
5506 | ||
5507 | ||
81ecdfbb RW |
5508 | |
5509 | # Check whether --with-bugurl was given. | |
5510 | if test "${with_bugurl+set}" = set; then : | |
5511 | withval=$with_bugurl; case "$withval" in | |
5512 | yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; | |
c16158bc JM |
5513 | no) BUGURL= |
5514 | ;; | |
5515 | *) BUGURL="$withval" | |
5516 | ;; | |
5517 | esac | |
5518 | else | |
5519 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
5520 | ||
81ecdfbb RW |
5521 | fi |
5522 | ||
c16158bc JM |
5523 | case ${BUGURL} in |
5524 | "") | |
5525 | REPORT_BUGS_TO= | |
5526 | REPORT_BUGS_TEXI= | |
5527 | ;; | |
5528 | *) | |
5529 | REPORT_BUGS_TO="<$BUGURL>" | |
5530 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
5531 | ;; | |
5532 | esac; | |
5533 | ||
5534 | ||
5535 | ||
5536 | ||
5537 | cat >>confdefs.h <<_ACEOF | |
5538 | #define PKGVERSION "$PKGVERSION" | |
5539 | _ACEOF | |
5540 | ||
5541 | ||
5542 | cat >>confdefs.h <<_ACEOF | |
5543 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
5544 | _ACEOF | |
5545 | ||
5546 | ||
bec39cab AC |
5547 | # --------------------- # |
5548 | # Checks for programs. # | |
5549 | # --------------------- # | |
5550 | ||
5551 | for ac_prog in gawk mawk nawk awk | |
5552 | do | |
5553 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5554 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5555 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5556 | $as_echo_n "checking for $ac_word... " >&6; } | |
5557 | if test "${ac_cv_prog_AWK+set}" = set; then : | |
5558 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5559 | else |
5560 | if test -n "$AWK"; then | |
5561 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
5562 | else | |
5563 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5564 | for as_dir in $PATH | |
5565 | do | |
5566 | IFS=$as_save_IFS | |
5567 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5568 | for ac_exec_ext in '' $ac_executable_extensions; do |
5569 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5570 | ac_cv_prog_AWK="$ac_prog" |
81ecdfbb | 5571 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5572 | break 2 |
5573 | fi | |
5574 | done | |
81ecdfbb RW |
5575 | done |
5576 | IFS=$as_save_IFS | |
bec39cab AC |
5577 | |
5578 | fi | |
5579 | fi | |
5580 | AWK=$ac_cv_prog_AWK | |
5581 | if test -n "$AWK"; then | |
81ecdfbb RW |
5582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
5583 | $as_echo "$AWK" >&6; } | |
bec39cab | 5584 | else |
81ecdfbb RW |
5585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5586 | $as_echo "no" >&6; } | |
bec39cab AC |
5587 | fi |
5588 | ||
bec39cab | 5589 | |
81ecdfbb | 5590 | test -n "$AWK" && break |
bec39cab AC |
5591 | done |
5592 | ||
c971b7fa PA |
5593 | # Find a good install program. We prefer a C program (faster), |
5594 | # so one script is as good as another. But avoid the broken or | |
5595 | # incompatible versions: | |
5596 | # SysV /etc/install, /usr/sbin/install | |
5597 | # SunOS /usr/etc/install | |
5598 | # IRIX /sbin/install | |
5599 | # AIX /bin/install | |
5600 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
5601 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
5602 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5603 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5604 | # OS/2's system install, which has a completely different semantic | |
5605 | # ./install, which can be erroneously created by make from ./install.sh. | |
5606 | # Reject install programs that cannot install multiple files. | |
5607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
5608 | $as_echo_n "checking for a BSD-compatible install... " >&6; } | |
5609 | if test -z "$INSTALL"; then | |
5610 | if test "${ac_cv_path_install+set}" = set; then : | |
5611 | $as_echo_n "(cached) " >&6 | |
5612 | else | |
5613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5614 | for as_dir in $PATH | |
5615 | do | |
5616 | IFS=$as_save_IFS | |
5617 | test -z "$as_dir" && as_dir=. | |
5618 | # Account for people who put trailing slashes in PATH elements. | |
5619 | case $as_dir/ in #(( | |
5620 | ./ | .// | /[cC]/* | \ | |
5621 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
5622 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
5623 | /usr/ucb/* ) ;; | |
5624 | *) | |
5625 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5626 | # Don't use installbsd from OSF since it installs stuff as root | |
5627 | # by default. | |
5628 | for ac_prog in ginstall scoinst install; do | |
5629 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5630 | if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then | |
5631 | if test $ac_prog = install && | |
5632 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5633 | # AIX install. It has an incompatible calling convention. | |
5634 | : | |
5635 | elif test $ac_prog = install && | |
5636 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
5637 | # program-specific install script used by HP pwplus--don't use. | |
5638 | : | |
5639 | else | |
5640 | rm -rf conftest.one conftest.two conftest.dir | |
5641 | echo one > conftest.one | |
5642 | echo two > conftest.two | |
5643 | mkdir conftest.dir | |
5644 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
5645 | test -s conftest.one && test -s conftest.two && | |
5646 | test -s conftest.dir/conftest.one && | |
5647 | test -s conftest.dir/conftest.two | |
5648 | then | |
5649 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
5650 | break 3 | |
5651 | fi | |
5652 | fi | |
5653 | fi | |
5654 | done | |
5655 | done | |
5656 | ;; | |
5657 | esac | |
5658 | ||
5659 | done | |
5660 | IFS=$as_save_IFS | |
5661 | ||
5662 | rm -rf conftest.one conftest.two conftest.dir | |
5663 | ||
5664 | fi | |
5665 | if test "${ac_cv_path_install+set}" = set; then | |
5666 | INSTALL=$ac_cv_path_install | |
5667 | else | |
5668 | # As a last resort, use the slow shell script. Don't cache a | |
5669 | # value for INSTALL within a source directory, because that will | |
5670 | # break other packages using the cache if that directory is | |
5671 | # removed, or if the value is a relative name. | |
5672 | INSTALL=$ac_install_sh | |
5673 | fi | |
5674 | fi | |
5675 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
5676 | $as_echo "$INSTALL" >&6; } | |
5677 | ||
5678 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5679 | # It thinks the first close brace ends the variable substitution. | |
5680 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5681 | ||
5682 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
5683 | ||
5684 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
bec39cab | 5685 | |
81ecdfbb RW |
5686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
5687 | $as_echo_n "checking whether ln -s works... " >&6; } | |
bec39cab AC |
5688 | LN_S=$as_ln_s |
5689 | if test "$LN_S" = "ln -s"; then | |
81ecdfbb RW |
5690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
5691 | $as_echo "yes" >&6; } | |
bec39cab | 5692 | else |
81ecdfbb RW |
5693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
5694 | $as_echo "no, using $LN_S" >&6; } | |
bec39cab AC |
5695 | fi |
5696 | ||
5697 | if test -n "$ac_tool_prefix"; then | |
5698 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
5699 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
81ecdfbb RW |
5700 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5701 | $as_echo_n "checking for $ac_word... " >&6; } | |
5702 | if test "${ac_cv_prog_RANLIB+set}" = set; then : | |
5703 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5704 | else |
5705 | if test -n "$RANLIB"; then | |
5706 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
5707 | else | |
5708 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5709 | for as_dir in $PATH | |
5710 | do | |
5711 | IFS=$as_save_IFS | |
5712 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5713 | for ac_exec_ext in '' $ac_executable_extensions; do |
5714 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5715 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
81ecdfbb | 5716 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5717 | break 2 |
5718 | fi | |
5719 | done | |
81ecdfbb RW |
5720 | done |
5721 | IFS=$as_save_IFS | |
bec39cab AC |
5722 | |
5723 | fi | |
5724 | fi | |
5725 | RANLIB=$ac_cv_prog_RANLIB | |
5726 | if test -n "$RANLIB"; then | |
81ecdfbb RW |
5727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
5728 | $as_echo "$RANLIB" >&6; } | |
bec39cab | 5729 | else |
81ecdfbb RW |
5730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5731 | $as_echo "no" >&6; } | |
bec39cab AC |
5732 | fi |
5733 | ||
81ecdfbb | 5734 | |
bec39cab AC |
5735 | fi |
5736 | if test -z "$ac_cv_prog_RANLIB"; then | |
5737 | ac_ct_RANLIB=$RANLIB | |
5738 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5739 | set dummy ranlib; ac_word=$2 | |
81ecdfbb RW |
5740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5741 | $as_echo_n "checking for $ac_word... " >&6; } | |
5742 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : | |
5743 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5744 | else |
5745 | if test -n "$ac_ct_RANLIB"; then | |
5746 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5747 | else | |
5748 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5749 | for as_dir in $PATH | |
5750 | do | |
5751 | IFS=$as_save_IFS | |
5752 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5753 | for ac_exec_ext in '' $ac_executable_extensions; do |
5754 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5755 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
81ecdfbb | 5756 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5757 | break 2 |
5758 | fi | |
5759 | done | |
81ecdfbb RW |
5760 | done |
5761 | IFS=$as_save_IFS | |
bec39cab | 5762 | |
bec39cab AC |
5763 | fi |
5764 | fi | |
5765 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5766 | if test -n "$ac_ct_RANLIB"; then | |
81ecdfbb RW |
5767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
5768 | $as_echo "$ac_ct_RANLIB" >&6; } | |
bec39cab | 5769 | else |
81ecdfbb RW |
5770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5771 | $as_echo "no" >&6; } | |
bec39cab AC |
5772 | fi |
5773 | ||
81ecdfbb RW |
5774 | if test "x$ac_ct_RANLIB" = x; then |
5775 | RANLIB=":" | |
5776 | else | |
5777 | case $cross_compiling:$ac_tool_warned in | |
5778 | yes:) | |
5779 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5780 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5781 | ac_tool_warned=yes ;; | |
5782 | esac | |
5783 | RANLIB=$ac_ct_RANLIB | |
5784 | fi | |
bec39cab AC |
5785 | else |
5786 | RANLIB="$ac_cv_prog_RANLIB" | |
5787 | fi | |
5788 | ||
5789 | for ac_prog in 'bison -y' byacc | |
5790 | do | |
5791 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5792 | set dummy $ac_prog; ac_word=$2 | |
81ecdfbb RW |
5793 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5794 | $as_echo_n "checking for $ac_word... " >&6; } | |
5795 | if test "${ac_cv_prog_YACC+set}" = set; then : | |
5796 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5797 | else |
5798 | if test -n "$YACC"; then | |
5799 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
5800 | else | |
5801 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5802 | for as_dir in $PATH | |
5803 | do | |
5804 | IFS=$as_save_IFS | |
5805 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5806 | for ac_exec_ext in '' $ac_executable_extensions; do |
5807 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5808 | ac_cv_prog_YACC="$ac_prog" |
81ecdfbb | 5809 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5810 | break 2 |
5811 | fi | |
5812 | done | |
81ecdfbb RW |
5813 | done |
5814 | IFS=$as_save_IFS | |
bec39cab AC |
5815 | |
5816 | fi | |
5817 | fi | |
5818 | YACC=$ac_cv_prog_YACC | |
5819 | if test -n "$YACC"; then | |
81ecdfbb RW |
5820 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
5821 | $as_echo "$YACC" >&6; } | |
bec39cab | 5822 | else |
81ecdfbb RW |
5823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5824 | $as_echo "no" >&6; } | |
bec39cab AC |
5825 | fi |
5826 | ||
81ecdfbb | 5827 | |
bec39cab AC |
5828 | test -n "$YACC" && break |
5829 | done | |
5830 | test -n "$YACC" || YACC="yacc" | |
5831 | ||
5832 | ||
5833 | if test -n "$ac_tool_prefix"; then | |
5834 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
5835 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
81ecdfbb RW |
5836 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5837 | $as_echo_n "checking for $ac_word... " >&6; } | |
5838 | if test "${ac_cv_prog_AR+set}" = set; then : | |
5839 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5840 | else |
5841 | if test -n "$AR"; then | |
5842 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5843 | else | |
5844 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5845 | for as_dir in $PATH | |
5846 | do | |
5847 | IFS=$as_save_IFS | |
5848 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5849 | for ac_exec_ext in '' $ac_executable_extensions; do |
5850 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5851 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
81ecdfbb | 5852 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5853 | break 2 |
5854 | fi | |
5855 | done | |
81ecdfbb RW |
5856 | done |
5857 | IFS=$as_save_IFS | |
bec39cab AC |
5858 | |
5859 | fi | |
5860 | fi | |
5861 | AR=$ac_cv_prog_AR | |
5862 | if test -n "$AR"; then | |
81ecdfbb RW |
5863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
5864 | $as_echo "$AR" >&6; } | |
bec39cab | 5865 | else |
81ecdfbb RW |
5866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5867 | $as_echo "no" >&6; } | |
bec39cab AC |
5868 | fi |
5869 | ||
81ecdfbb | 5870 | |
bec39cab AC |
5871 | fi |
5872 | if test -z "$ac_cv_prog_AR"; then | |
5873 | ac_ct_AR=$AR | |
5874 | # Extract the first word of "ar", so it can be a program name with args. | |
5875 | set dummy ar; ac_word=$2 | |
81ecdfbb RW |
5876 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5877 | $as_echo_n "checking for $ac_word... " >&6; } | |
5878 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : | |
5879 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5880 | else |
5881 | if test -n "$ac_ct_AR"; then | |
5882 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
5883 | else | |
5884 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5885 | for as_dir in $PATH | |
5886 | do | |
5887 | IFS=$as_save_IFS | |
5888 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5889 | for ac_exec_ext in '' $ac_executable_extensions; do |
5890 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5891 | ac_cv_prog_ac_ct_AR="ar" |
81ecdfbb | 5892 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5893 | break 2 |
5894 | fi | |
5895 | done | |
81ecdfbb RW |
5896 | done |
5897 | IFS=$as_save_IFS | |
bec39cab AC |
5898 | |
5899 | fi | |
5900 | fi | |
5901 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
5902 | if test -n "$ac_ct_AR"; then | |
81ecdfbb RW |
5903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
5904 | $as_echo "$ac_ct_AR" >&6; } | |
bec39cab | 5905 | else |
81ecdfbb RW |
5906 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5907 | $as_echo "no" >&6; } | |
bec39cab AC |
5908 | fi |
5909 | ||
81ecdfbb RW |
5910 | if test "x$ac_ct_AR" = x; then |
5911 | AR="" | |
5912 | else | |
5913 | case $cross_compiling:$ac_tool_warned in | |
5914 | yes:) | |
5915 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
5916 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
5917 | ac_tool_warned=yes ;; | |
5918 | esac | |
5919 | AR=$ac_ct_AR | |
5920 | fi | |
bec39cab AC |
5921 | else |
5922 | AR="$ac_cv_prog_AR" | |
5923 | fi | |
5924 | ||
5925 | if test -n "$ac_tool_prefix"; then | |
5926 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
5927 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
81ecdfbb RW |
5928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5929 | $as_echo_n "checking for $ac_word... " >&6; } | |
5930 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then : | |
5931 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5932 | else |
5933 | if test -n "$DLLTOOL"; then | |
5934 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
5935 | else | |
5936 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5937 | for as_dir in $PATH | |
5938 | do | |
5939 | IFS=$as_save_IFS | |
5940 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5941 | for ac_exec_ext in '' $ac_executable_extensions; do |
5942 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5943 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
81ecdfbb | 5944 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5945 | break 2 |
5946 | fi | |
5947 | done | |
81ecdfbb RW |
5948 | done |
5949 | IFS=$as_save_IFS | |
bec39cab AC |
5950 | |
5951 | fi | |
5952 | fi | |
5953 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
5954 | if test -n "$DLLTOOL"; then | |
81ecdfbb RW |
5955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
5956 | $as_echo "$DLLTOOL" >&6; } | |
bec39cab | 5957 | else |
81ecdfbb RW |
5958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5959 | $as_echo "no" >&6; } | |
bec39cab AC |
5960 | fi |
5961 | ||
81ecdfbb | 5962 | |
bec39cab AC |
5963 | fi |
5964 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
5965 | ac_ct_DLLTOOL=$DLLTOOL | |
5966 | # Extract the first word of "dlltool", so it can be a program name with args. | |
5967 | set dummy dlltool; ac_word=$2 | |
81ecdfbb RW |
5968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
5969 | $as_echo_n "checking for $ac_word... " >&6; } | |
5970 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : | |
5971 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
5972 | else |
5973 | if test -n "$ac_ct_DLLTOOL"; then | |
5974 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
5975 | else | |
5976 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5977 | for as_dir in $PATH | |
5978 | do | |
5979 | IFS=$as_save_IFS | |
5980 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
5981 | for ac_exec_ext in '' $ac_executable_extensions; do |
5982 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 5983 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
81ecdfbb | 5984 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
5985 | break 2 |
5986 | fi | |
5987 | done | |
81ecdfbb RW |
5988 | done |
5989 | IFS=$as_save_IFS | |
bec39cab AC |
5990 | |
5991 | fi | |
5992 | fi | |
5993 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
5994 | if test -n "$ac_ct_DLLTOOL"; then | |
81ecdfbb RW |
5995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
5996 | $as_echo "$ac_ct_DLLTOOL" >&6; } | |
bec39cab | 5997 | else |
81ecdfbb RW |
5998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
5999 | $as_echo "no" >&6; } | |
bec39cab AC |
6000 | fi |
6001 | ||
81ecdfbb RW |
6002 | if test "x$ac_ct_DLLTOOL" = x; then |
6003 | DLLTOOL="" | |
6004 | else | |
6005 | case $cross_compiling:$ac_tool_warned in | |
6006 | yes:) | |
6007 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6008 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6009 | ac_tool_warned=yes ;; | |
6010 | esac | |
6011 | DLLTOOL=$ac_ct_DLLTOOL | |
6012 | fi | |
bec39cab AC |
6013 | else |
6014 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
6015 | fi | |
6016 | ||
6017 | if test -n "$ac_tool_prefix"; then | |
6018 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
6019 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
81ecdfbb RW |
6020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6021 | $as_echo_n "checking for $ac_word... " >&6; } | |
6022 | if test "${ac_cv_prog_WINDRES+set}" = set; then : | |
6023 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6024 | else |
6025 | if test -n "$WINDRES"; then | |
6026 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
6027 | else | |
6028 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6029 | for as_dir in $PATH | |
6030 | do | |
6031 | IFS=$as_save_IFS | |
6032 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6033 | for ac_exec_ext in '' $ac_executable_extensions; do |
6034 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6035 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
81ecdfbb | 6036 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6037 | break 2 |
6038 | fi | |
6039 | done | |
81ecdfbb RW |
6040 | done |
6041 | IFS=$as_save_IFS | |
bec39cab AC |
6042 | |
6043 | fi | |
6044 | fi | |
6045 | WINDRES=$ac_cv_prog_WINDRES | |
6046 | if test -n "$WINDRES"; then | |
81ecdfbb RW |
6047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
6048 | $as_echo "$WINDRES" >&6; } | |
bec39cab | 6049 | else |
81ecdfbb RW |
6050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6051 | $as_echo "no" >&6; } | |
bec39cab AC |
6052 | fi |
6053 | ||
81ecdfbb | 6054 | |
bec39cab AC |
6055 | fi |
6056 | if test -z "$ac_cv_prog_WINDRES"; then | |
6057 | ac_ct_WINDRES=$WINDRES | |
6058 | # Extract the first word of "windres", so it can be a program name with args. | |
6059 | set dummy windres; ac_word=$2 | |
81ecdfbb RW |
6060 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6061 | $as_echo_n "checking for $ac_word... " >&6; } | |
6062 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then : | |
6063 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6064 | else |
6065 | if test -n "$ac_ct_WINDRES"; then | |
6066 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
6067 | else | |
6068 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6069 | for as_dir in $PATH | |
6070 | do | |
6071 | IFS=$as_save_IFS | |
6072 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6073 | for ac_exec_ext in '' $ac_executable_extensions; do |
6074 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6075 | ac_cv_prog_ac_ct_WINDRES="windres" |
81ecdfbb | 6076 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6077 | break 2 |
6078 | fi | |
6079 | done | |
81ecdfbb RW |
6080 | done |
6081 | IFS=$as_save_IFS | |
bec39cab AC |
6082 | |
6083 | fi | |
6084 | fi | |
6085 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
6086 | if test -n "$ac_ct_WINDRES"; then | |
81ecdfbb RW |
6087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
6088 | $as_echo "$ac_ct_WINDRES" >&6; } | |
bec39cab | 6089 | else |
81ecdfbb RW |
6090 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6091 | $as_echo "no" >&6; } | |
c906108c | 6092 | fi |
bec39cab | 6093 | |
81ecdfbb RW |
6094 | if test "x$ac_ct_WINDRES" = x; then |
6095 | WINDRES="" | |
6096 | else | |
6097 | case $cross_compiling:$ac_tool_warned in | |
6098 | yes:) | |
6099 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6100 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6101 | ac_tool_warned=yes ;; | |
6102 | esac | |
6103 | WINDRES=$ac_ct_WINDRES | |
6104 | fi | |
c906108c | 6105 | else |
bec39cab | 6106 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
6107 | fi |
6108 | ||
bec39cab AC |
6109 | |
6110 | # Needed for GNU/Hurd. | |
6111 | if test -n "$ac_tool_prefix"; then | |
6112 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
6113 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
81ecdfbb RW |
6114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6115 | $as_echo_n "checking for $ac_word... " >&6; } | |
6116 | if test "${ac_cv_prog_MIG+set}" = set; then : | |
6117 | $as_echo_n "(cached) " >&6 | |
c906108c | 6118 | else |
bec39cab AC |
6119 | if test -n "$MIG"; then |
6120 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
6121 | else | |
6122 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6123 | for as_dir in $PATH | |
6124 | do | |
6125 | IFS=$as_save_IFS | |
6126 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6127 | for ac_exec_ext in '' $ac_executable_extensions; do |
6128 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6129 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
81ecdfbb | 6130 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6131 | break 2 |
6132 | fi | |
6133 | done | |
81ecdfbb RW |
6134 | done |
6135 | IFS=$as_save_IFS | |
bec39cab | 6136 | |
c906108c | 6137 | fi |
bec39cab AC |
6138 | fi |
6139 | MIG=$ac_cv_prog_MIG | |
6140 | if test -n "$MIG"; then | |
81ecdfbb RW |
6141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
6142 | $as_echo "$MIG" >&6; } | |
c906108c | 6143 | else |
81ecdfbb RW |
6144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6145 | $as_echo "no" >&6; } | |
c906108c SS |
6146 | fi |
6147 | ||
81ecdfbb | 6148 | |
bec39cab AC |
6149 | fi |
6150 | if test -z "$ac_cv_prog_MIG"; then | |
6151 | ac_ct_MIG=$MIG | |
6152 | # Extract the first word of "mig", so it can be a program name with args. | |
6153 | set dummy mig; ac_word=$2 | |
81ecdfbb RW |
6154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
6155 | $as_echo_n "checking for $ac_word... " >&6; } | |
6156 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then : | |
6157 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6158 | else |
6159 | if test -n "$ac_ct_MIG"; then | |
6160 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
6161 | else | |
6162 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6163 | for as_dir in $PATH | |
6164 | do | |
6165 | IFS=$as_save_IFS | |
6166 | test -z "$as_dir" && as_dir=. | |
81ecdfbb RW |
6167 | for ac_exec_ext in '' $ac_executable_extensions; do |
6168 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
bec39cab | 6169 | ac_cv_prog_ac_ct_MIG="mig" |
81ecdfbb | 6170 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
bec39cab AC |
6171 | break 2 |
6172 | fi | |
6173 | done | |
81ecdfbb RW |
6174 | done |
6175 | IFS=$as_save_IFS | |
c906108c | 6176 | |
bec39cab AC |
6177 | fi |
6178 | fi | |
6179 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
6180 | if test -n "$ac_ct_MIG"; then | |
81ecdfbb RW |
6181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
6182 | $as_echo "$ac_ct_MIG" >&6; } | |
bec39cab | 6183 | else |
81ecdfbb RW |
6184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
6185 | $as_echo "no" >&6; } | |
bec39cab | 6186 | fi |
c906108c | 6187 | |
81ecdfbb RW |
6188 | if test "x$ac_ct_MIG" = x; then |
6189 | MIG="" | |
6190 | else | |
6191 | case $cross_compiling:$ac_tool_warned in | |
6192 | yes:) | |
6193 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6194 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6195 | ac_tool_warned=yes ;; | |
6196 | esac | |
6197 | MIG=$ac_ct_MIG | |
6198 | fi | |
bec39cab AC |
6199 | else |
6200 | MIG="$ac_cv_prog_MIG" | |
6201 | fi | |
c906108c | 6202 | |
c906108c | 6203 | |
bec39cab AC |
6204 | # ---------------------- # |
6205 | # Checks for libraries. # | |
6206 | # ---------------------- # | |
c906108c | 6207 | |
bec39cab | 6208 | # We might need to link with -lm; most simulators need it. |
81ecdfbb RW |
6209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
6210 | $as_echo_n "checking for main in -lm... " >&6; } | |
6211 | if test "${ac_cv_lib_m_main+set}" = set; then : | |
6212 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6213 | else |
6214 | ac_check_lib_save_LIBS=$LIBS | |
6215 | LIBS="-lm $LIBS" | |
81ecdfbb | 6216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6217 | /* end confdefs.h. */ |
c906108c | 6218 | |
c906108c | 6219 | |
bec39cab AC |
6220 | int |
6221 | main () | |
6222 | { | |
81ecdfbb | 6223 | return main (); |
bec39cab AC |
6224 | ; |
6225 | return 0; | |
6226 | } | |
6227 | _ACEOF | |
81ecdfbb | 6228 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6229 | ac_cv_lib_m_main=yes |
6230 | else | |
81ecdfbb | 6231 | ac_cv_lib_m_main=no |
bec39cab | 6232 | fi |
81ecdfbb RW |
6233 | rm -f core conftest.err conftest.$ac_objext \ |
6234 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6235 | LIBS=$ac_check_lib_save_LIBS |
6236 | fi | |
81ecdfbb RW |
6237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
6238 | $as_echo "$ac_cv_lib_m_main" >&6; } | |
6239 | if test "x$ac_cv_lib_m_main" = x""yes; then : | |
bec39cab AC |
6240 | cat >>confdefs.h <<_ACEOF |
6241 | #define HAVE_LIBM 1 | |
6242 | _ACEOF | |
6243 | ||
6244 | LIBS="-lm $LIBS" | |
c906108c | 6245 | |
c906108c | 6246 | fi |
bec39cab AC |
6247 | |
6248 | ||
6249 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
6250 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
6251 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
6252 | # is known to have this problem). Therefore we avoid libw if we can. | |
81ecdfbb RW |
6253 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" |
6254 | if test "x$ac_cv_func_wctype" = x""yes; then : | |
bec39cab | 6255 | |
c906108c | 6256 | else |
81ecdfbb RW |
6257 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype in -lw" >&5 |
6258 | $as_echo_n "checking for wctype in -lw... " >&6; } | |
6259 | if test "${ac_cv_lib_w_wctype+set}" = set; then : | |
6260 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6261 | else |
6262 | ac_check_lib_save_LIBS=$LIBS | |
6263 | LIBS="-lw $LIBS" | |
81ecdfbb | 6264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6265 | /* end confdefs.h. */ |
c906108c | 6266 | |
81ecdfbb RW |
6267 | /* Override any GCC internal prototype to avoid an error. |
6268 | Use char because int might match the return type of a GCC | |
6269 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6270 | #ifdef __cplusplus |
6271 | extern "C" | |
6272 | #endif | |
bec39cab AC |
6273 | char wctype (); |
6274 | int | |
6275 | main () | |
6276 | { | |
81ecdfbb | 6277 | return wctype (); |
bec39cab AC |
6278 | ; |
6279 | return 0; | |
6280 | } | |
6281 | _ACEOF | |
81ecdfbb | 6282 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
6283 | ac_cv_lib_w_wctype=yes |
6284 | else | |
81ecdfbb | 6285 | ac_cv_lib_w_wctype=no |
bec39cab | 6286 | fi |
81ecdfbb RW |
6287 | rm -f core conftest.err conftest.$ac_objext \ |
6288 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
6289 | LIBS=$ac_check_lib_save_LIBS |
6290 | fi | |
81ecdfbb RW |
6291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wctype" >&5 |
6292 | $as_echo "$ac_cv_lib_w_wctype" >&6; } | |
6293 | if test "x$ac_cv_lib_w_wctype" = x""yes; then : | |
bec39cab AC |
6294 | cat >>confdefs.h <<_ACEOF |
6295 | #define HAVE_LIBW 1 | |
6296 | _ACEOF | |
c906108c | 6297 | |
bec39cab | 6298 | LIBS="-lw $LIBS" |
c906108c | 6299 | |
bec39cab | 6300 | fi |
c906108c | 6301 | |
bec39cab | 6302 | fi |
c906108c | 6303 | |
ddc9cd0f | 6304 | |
bec39cab | 6305 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
81ecdfbb RW |
6306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
6307 | $as_echo_n "checking for library containing gethostbyname... " >&6; } | |
6308 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6309 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6310 | else |
6311 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6313 | /* end confdefs.h. */ |
ddc9cd0f | 6314 | |
81ecdfbb RW |
6315 | /* Override any GCC internal prototype to avoid an error. |
6316 | Use char because int might match the return type of a GCC | |
6317 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6318 | #ifdef __cplusplus |
6319 | extern "C" | |
6320 | #endif | |
bec39cab AC |
6321 | char gethostbyname (); |
6322 | int | |
6323 | main () | |
6324 | { | |
81ecdfbb | 6325 | return gethostbyname (); |
bec39cab AC |
6326 | ; |
6327 | return 0; | |
6328 | } | |
6329 | _ACEOF | |
81ecdfbb RW |
6330 | for ac_lib in '' nsl; do |
6331 | if test -z "$ac_lib"; then | |
6332 | ac_res="none required" | |
6333 | else | |
6334 | ac_res=-l$ac_lib | |
b4e70030 | 6335 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6336 | fi |
6337 | if ac_fn_c_try_link "$LINENO"; then : | |
6338 | ac_cv_search_gethostbyname=$ac_res | |
6339 | fi | |
6340 | rm -f core conftest.err conftest.$ac_objext \ | |
6341 | conftest$ac_exeext | |
6342 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
6343 | break | |
6344 | fi | |
6345 | done | |
6346 | if test "${ac_cv_search_gethostbyname+set}" = set; then : | |
ddc9cd0f | 6347 | |
bec39cab | 6348 | else |
81ecdfbb | 6349 | ac_cv_search_gethostbyname=no |
bec39cab | 6350 | fi |
81ecdfbb | 6351 | rm conftest.$ac_ext |
bec39cab AC |
6352 | LIBS=$ac_func_search_save_LIBS |
6353 | fi | |
81ecdfbb RW |
6354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
6355 | $as_echo "$ac_cv_search_gethostbyname" >&6; } | |
6356 | ac_res=$ac_cv_search_gethostbyname | |
6357 | if test "$ac_res" != no; then : | |
6358 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
96baa820 | 6359 | |
bec39cab | 6360 | fi |
96baa820 | 6361 | |
c906108c | 6362 | |
b4e70030 | 6363 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
81ecdfbb RW |
6364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
6365 | $as_echo_n "checking for library containing socketpair... " >&6; } | |
6366 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6367 | $as_echo_n "(cached) " >&6 | |
b4e70030 JB |
6368 | else |
6369 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6371 | /* end confdefs.h. */ |
6372 | ||
81ecdfbb RW |
6373 | /* Override any GCC internal prototype to avoid an error. |
6374 | Use char because int might match the return type of a GCC | |
6375 | builtin and then its argument prototype would still apply. */ | |
b4e70030 JB |
6376 | #ifdef __cplusplus |
6377 | extern "C" | |
6378 | #endif | |
b4e70030 JB |
6379 | char socketpair (); |
6380 | int | |
6381 | main () | |
6382 | { | |
81ecdfbb | 6383 | return socketpair (); |
b4e70030 JB |
6384 | ; |
6385 | return 0; | |
6386 | } | |
6387 | _ACEOF | |
81ecdfbb RW |
6388 | for ac_lib in '' socket; do |
6389 | if test -z "$ac_lib"; then | |
6390 | ac_res="none required" | |
6391 | else | |
6392 | ac_res=-l$ac_lib | |
b4e70030 | 6393 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6394 | fi |
6395 | if ac_fn_c_try_link "$LINENO"; then : | |
6396 | ac_cv_search_socketpair=$ac_res | |
6397 | fi | |
6398 | rm -f core conftest.err conftest.$ac_objext \ | |
6399 | conftest$ac_exeext | |
6400 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
6401 | break | |
6402 | fi | |
6403 | done | |
6404 | if test "${ac_cv_search_socketpair+set}" = set; then : | |
b4e70030 | 6405 | |
b4e70030 | 6406 | else |
81ecdfbb | 6407 | ac_cv_search_socketpair=no |
b4e70030 | 6408 | fi |
81ecdfbb | 6409 | rm conftest.$ac_ext |
b4e70030 JB |
6410 | LIBS=$ac_func_search_save_LIBS |
6411 | fi | |
81ecdfbb RW |
6412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
6413 | $as_echo "$ac_cv_search_socketpair" >&6; } | |
6414 | ac_res=$ac_cv_search_socketpair | |
6415 | if test "$ac_res" != no; then : | |
6416 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
b4e70030 JB |
6417 | |
6418 | fi | |
6419 | ||
6420 | ||
233a11ab | 6421 | # Link in zlib if we can. This allows us to read compressed debug sections. |
b040ad30 JB |
6422 | |
6423 | # See if the user specified whether he wants zlib support or not. | |
6424 | ||
6425 | # Check whether --with-zlib was given. | |
6426 | if test "${with_zlib+set}" = set; then : | |
6427 | withval=$with_zlib; | |
6428 | else | |
6429 | with_zlib=auto | |
6430 | fi | |
6431 | ||
6432 | ||
6433 | if test "$with_zlib" != "no"; then | |
6434 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 | |
81ecdfbb RW |
6435 | $as_echo_n "checking for library containing zlibVersion... " >&6; } |
6436 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6437 | $as_echo_n "(cached) " >&6 | |
233a11ab CS |
6438 | else |
6439 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6440 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
233a11ab CS |
6441 | /* end confdefs.h. */ |
6442 | ||
81ecdfbb RW |
6443 | /* Override any GCC internal prototype to avoid an error. |
6444 | Use char because int might match the return type of a GCC | |
233a11ab | 6445 | builtin and then its argument prototype would still apply. */ |
233a11ab CS |
6446 | #ifdef __cplusplus |
6447 | extern "C" | |
6448 | #endif | |
233a11ab CS |
6449 | char zlibVersion (); |
6450 | int | |
6451 | main () | |
6452 | { | |
81ecdfbb | 6453 | return zlibVersion (); |
233a11ab CS |
6454 | ; |
6455 | return 0; | |
6456 | } | |
6457 | _ACEOF | |
81ecdfbb RW |
6458 | for ac_lib in '' z; do |
6459 | if test -z "$ac_lib"; then | |
6460 | ac_res="none required" | |
233a11ab | 6461 | else |
81ecdfbb RW |
6462 | ac_res=-l$ac_lib |
6463 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
233a11ab | 6464 | fi |
81ecdfbb RW |
6465 | if ac_fn_c_try_link "$LINENO"; then : |
6466 | ac_cv_search_zlibVersion=$ac_res | |
233a11ab | 6467 | fi |
81ecdfbb RW |
6468 | rm -f core conftest.err conftest.$ac_objext \ |
6469 | conftest$ac_exeext | |
6470 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
6471 | break | |
233a11ab | 6472 | fi |
81ecdfbb RW |
6473 | done |
6474 | if test "${ac_cv_search_zlibVersion+set}" = set; then : | |
233a11ab | 6475 | |
233a11ab | 6476 | else |
81ecdfbb | 6477 | ac_cv_search_zlibVersion=no |
233a11ab | 6478 | fi |
81ecdfbb RW |
6479 | rm conftest.$ac_ext |
6480 | LIBS=$ac_func_search_save_LIBS | |
233a11ab | 6481 | fi |
81ecdfbb RW |
6482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 |
6483 | $as_echo "$ac_cv_search_zlibVersion" >&6; } | |
6484 | ac_res=$ac_cv_search_zlibVersion | |
6485 | if test "$ac_res" != no; then : | |
6486 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6487 | for ac_header in zlib.h | |
6488 | do : | |
6489 | ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" | |
6490 | if test "x$ac_cv_header_zlib_h" = x""yes; then : | |
233a11ab | 6491 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 6492 | #define HAVE_ZLIB_H 1 |
233a11ab CS |
6493 | _ACEOF |
6494 | ||
6495 | fi | |
6496 | ||
6497 | done | |
6498 | ||
6499 | fi | |
6500 | ||
b040ad30 JB |
6501 | if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then |
6502 | as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5 | |
6503 | fi | |
6504 | fi | |
6505 | ||
233a11ab | 6506 | |
77f120bf | 6507 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
81ecdfbb RW |
6508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlgetmodinfo" >&5 |
6509 | $as_echo_n "checking for library containing dlgetmodinfo... " >&6; } | |
6510 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6511 | $as_echo_n "(cached) " >&6 | |
bec39cab AC |
6512 | else |
6513 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6515 | /* end confdefs.h. */ |
c906108c | 6516 | |
81ecdfbb RW |
6517 | /* Override any GCC internal prototype to avoid an error. |
6518 | Use char because int might match the return type of a GCC | |
6519 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
6520 | #ifdef __cplusplus |
6521 | extern "C" | |
6522 | #endif | |
77f120bf | 6523 | char dlgetmodinfo (); |
bec39cab AC |
6524 | int |
6525 | main () | |
6526 | { | |
81ecdfbb | 6527 | return dlgetmodinfo (); |
bec39cab AC |
6528 | ; |
6529 | return 0; | |
6530 | } | |
6531 | _ACEOF | |
81ecdfbb RW |
6532 | for ac_lib in '' dl xpdl; do |
6533 | if test -z "$ac_lib"; then | |
6534 | ac_res="none required" | |
6535 | else | |
6536 | ac_res=-l$ac_lib | |
b4e70030 | 6537 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6538 | fi |
6539 | if ac_fn_c_try_link "$LINENO"; then : | |
6540 | ac_cv_search_dlgetmodinfo=$ac_res | |
6541 | fi | |
6542 | rm -f core conftest.err conftest.$ac_objext \ | |
6543 | conftest$ac_exeext | |
6544 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
6545 | break | |
6546 | fi | |
6547 | done | |
6548 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then : | |
b4e70030 | 6549 | |
4e8d927d | 6550 | else |
81ecdfbb | 6551 | ac_cv_search_dlgetmodinfo=no |
1ba607ad | 6552 | fi |
81ecdfbb | 6553 | rm conftest.$ac_ext |
bec39cab AC |
6554 | LIBS=$ac_func_search_save_LIBS |
6555 | fi | |
81ecdfbb RW |
6556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlgetmodinfo" >&5 |
6557 | $as_echo "$ac_cv_search_dlgetmodinfo" >&6; } | |
6558 | ac_res=$ac_cv_search_dlgetmodinfo | |
6559 | if test "$ac_res" != no; then : | |
6560 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
c906108c | 6561 | |
8bb2c122 | 6562 | fi |
8bb2c122 | 6563 | |
8bb2c122 | 6564 | |
77f120bf | 6565 | |
77f120bf | 6566 | |
6c7a06a3 | 6567 | |
81ecdfbb RW |
6568 | # Check whether --with-libiconv-prefix was given. |
6569 | if test "${with_libiconv_prefix+set}" = set; then : | |
6570 | withval=$with_libiconv_prefix; | |
6c7a06a3 | 6571 | for dir in `echo "$withval" | tr : ' '`; do |
94ae1714 TT |
6572 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; fi |
6573 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; fi | |
6c7a06a3 TT |
6574 | done |
6575 | ||
81ecdfbb RW |
6576 | fi |
6577 | ||
6c7a06a3 | 6578 | |
f18c4681 | 6579 | BUILD_LIBICONV_LIBDIRS="../libiconv/lib/.libs ../libiconv/lib/_libs" |
6c7a06a3 TT |
6580 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" |
6581 | ||
81ecdfbb RW |
6582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
6583 | $as_echo_n "checking for iconv... " >&6; } | |
6584 | if test "${am_cv_func_iconv+set}" = set; then : | |
6585 | $as_echo_n "(cached) " >&6 | |
d542061a | 6586 | else |
6c7a06a3 TT |
6587 | |
6588 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
6589 | am_cv_lib_iconv=no | |
6590 | am_cv_use_build_libiconv=no | |
f0f20949 | 6591 | am_cv_build_libiconv_path= |
4edb1e84 JB |
6592 | |
6593 | # If libiconv is part of the build tree, then try using it over | |
6594 | # any system iconv. | |
6595 | if test -d ../libiconv; then | |
f18c4681 JB |
6596 | for lib_dir in $BUILD_LIBICONV_LIBDIRS; do |
6597 | am_save_LIBS="$LIBS" | |
6598 | am_save_CPPFLAGS="$CPPFLAGS" | |
6599 | LIBS="$LIBS $lib_dir/libiconv.a" | |
6600 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
6601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
d542061a | 6602 | /* end confdefs.h. */ |
6c7a06a3 TT |
6603 | #include <stdlib.h> |
6604 | #include <iconv.h> | |
d542061a UW |
6605 | int |
6606 | main () | |
6607 | { | |
6c7a06a3 | 6608 | iconv_t cd = iconv_open("",""); |
f18c4681 JB |
6609 | iconv(cd,NULL,NULL,NULL,NULL); |
6610 | iconv_close(cd); | |
d542061a UW |
6611 | ; |
6612 | return 0; | |
6613 | } | |
6614 | _ACEOF | |
81ecdfbb | 6615 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6616 | am_cv_use_build_libiconv=yes |
f0f20949 | 6617 | am_cv_build_libiconv_path=$lib_dir/libiconv.a |
f18c4681 JB |
6618 | am_cv_lib_iconv=yes |
6619 | am_cv_func_iconv=yes | |
d542061a | 6620 | fi |
81ecdfbb RW |
6621 | rm -f core conftest.err conftest.$ac_objext \ |
6622 | conftest$ac_exeext conftest.$ac_ext | |
f18c4681 JB |
6623 | LIBS="$am_save_LIBS" |
6624 | CPPFLAGS="$am_save_CPPFLAGS" | |
6625 | if test "$am_cv_use_build_libiconv" = "yes"; then | |
f18c4681 JB |
6626 | break |
6627 | fi | |
6628 | done | |
4edb1e84 | 6629 | fi |
94ae1714 | 6630 | |
4edb1e84 | 6631 | # Next, try to find iconv in libc. |
6c7a06a3 | 6632 | if test "$am_cv_func_iconv" != yes; then |
81ecdfbb | 6633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d542061a | 6634 | /* end confdefs.h. */ |
6c7a06a3 TT |
6635 | #include <stdlib.h> |
6636 | #include <iconv.h> | |
d542061a UW |
6637 | int |
6638 | main () | |
6639 | { | |
6c7a06a3 TT |
6640 | iconv_t cd = iconv_open("",""); |
6641 | iconv(cd,NULL,NULL,NULL,NULL); | |
6642 | iconv_close(cd); | |
d542061a UW |
6643 | ; |
6644 | return 0; | |
6645 | } | |
6646 | _ACEOF | |
81ecdfbb | 6647 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6648 | am_cv_func_iconv=yes |
d542061a | 6649 | fi |
81ecdfbb RW |
6650 | rm -f core conftest.err conftest.$ac_objext \ |
6651 | conftest$ac_exeext conftest.$ac_ext | |
77f120bf | 6652 | fi |
94ae1714 | 6653 | |
4edb1e84 JB |
6654 | # If iconv was not in libc, try -liconv. In this case, arrange to |
6655 | # look in the libiconv prefix, if it was specified by the user. | |
6656 | if test "$am_cv_func_iconv" != yes; then | |
6c7a06a3 | 6657 | am_save_CPPFLAGS="$CPPFLAGS" |
4edb1e84 JB |
6658 | am_save_LIBS="$LIBS" |
6659 | if test -n "$LIBICONV_INCLUDE"; then | |
6660 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6661 | LIBS="$LIBS $LIBICONV_LIBDIR" | |
6662 | fi | |
6663 | LIBS="$LIBS -liconv" | |
81ecdfbb | 6664 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 6665 | /* end confdefs.h. */ |
6c7a06a3 TT |
6666 | #include <stdlib.h> |
6667 | #include <iconv.h> | |
bec39cab AC |
6668 | int |
6669 | main () | |
6670 | { | |
6c7a06a3 TT |
6671 | iconv_t cd = iconv_open("",""); |
6672 | iconv(cd,NULL,NULL,NULL,NULL); | |
6673 | iconv_close(cd); | |
bec39cab AC |
6674 | ; |
6675 | return 0; | |
6676 | } | |
6677 | _ACEOF | |
81ecdfbb | 6678 | if ac_fn_c_try_link "$LINENO"; then : |
4edb1e84 | 6679 | am_cv_lib_iconv=yes |
6c7a06a3 | 6680 | am_cv_func_iconv=yes |
627af7ea | 6681 | fi |
81ecdfbb RW |
6682 | rm -f core conftest.err conftest.$ac_objext \ |
6683 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 6684 | LIBS="$am_save_LIBS" |
fc3b640d | 6685 | CPPFLAGS="$am_save_CPPFLAGS" |
6c7a06a3 TT |
6686 | fi |
6687 | ||
6688 | fi | |
81ecdfbb RW |
6689 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
6690 | $as_echo "$am_cv_func_iconv" >&6; } | |
94ae1714 TT |
6691 | |
6692 | # Set the various flags based on the cache variables. We can't rely | |
6693 | # on the flags to remain set from the above code, due to caching. | |
fc3b640d TT |
6694 | LIBICONV= |
6695 | if test "$am_cv_lib_iconv" = yes; then | |
6696 | LIBICONV="-liconv" | |
94ae1714 TT |
6697 | else |
6698 | LIBICONV_LIBDIR= | |
6699 | LIBICONV_INCLUDE= | |
fc3b640d TT |
6700 | fi |
6701 | if test "$am_cv_use_build_libiconv" = yes; then | |
f0f20949 | 6702 | LIBICONV="$am_cv_build_libiconv_path" |
f18c4681 | 6703 | LIBICONV_LIBDIR="" |
fc3b640d TT |
6704 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" |
6705 | fi | |
6706 | CPPFLAGS="$CPPFLAGS $LIBICONV_INCLUDE" | |
6707 | LIBS="$LIBS $LIBICONV_LIBDIR $LIBICONV" | |
94ae1714 | 6708 | |
6c7a06a3 TT |
6709 | if test "$am_cv_func_iconv" = yes; then |
6710 | ||
81ecdfbb | 6711 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
6c7a06a3 | 6712 | |
81ecdfbb RW |
6713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
6714 | $as_echo_n "checking for iconv declaration... " >&6; } | |
6715 | if test "${am_cv_proto_iconv+set}" = set; then : | |
6716 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6717 | else |
6718 | ||
81ecdfbb | 6719 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
b4e70030 JB |
6720 | /* end confdefs.h. */ |
6721 | ||
6c7a06a3 TT |
6722 | #include <stdlib.h> |
6723 | #include <iconv.h> | |
6724 | extern | |
b4e70030 | 6725 | #ifdef __cplusplus |
6c7a06a3 | 6726 | "C" |
b4e70030 | 6727 | #endif |
6c7a06a3 TT |
6728 | #if defined(__STDC__) || defined(__cplusplus) |
6729 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6730 | #else | |
6731 | size_t iconv(); | |
6732 | #endif | |
6733 | ||
b4e70030 JB |
6734 | int |
6735 | main () | |
6736 | { | |
6c7a06a3 | 6737 | |
b4e70030 JB |
6738 | ; |
6739 | return 0; | |
6740 | } | |
6741 | _ACEOF | |
81ecdfbb | 6742 | if ac_fn_c_try_compile "$LINENO"; then : |
6c7a06a3 | 6743 | am_cv_proto_iconv_arg1="" |
4e8d927d | 6744 | else |
81ecdfbb | 6745 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 6746 | fi |
81ecdfbb | 6747 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
6c7a06a3 TT |
6748 | 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);" |
6749 | fi | |
6750 | ||
6751 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
81ecdfbb | 6752 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
6c7a06a3 | 6753 | }$am_cv_proto_iconv" >&5 |
81ecdfbb RW |
6754 | $as_echo "${ac_t:- |
6755 | }$am_cv_proto_iconv" >&6; } | |
6c7a06a3 TT |
6756 | |
6757 | cat >>confdefs.h <<_ACEOF | |
6758 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
6759 | _ACEOF | |
6760 | ||
6761 | fi | |
6c7a06a3 TT |
6762 | |
6763 | ||
478aac75 DE |
6764 | # GDB may fork/exec the iconv program to get the list of supported character |
6765 | # sets. Allow the user to specify where to find it. | |
6766 | # There are several factors affecting the choice of option name: | |
6767 | # - There is already --with-libiconv-prefix but we can't use it, it specifies | |
6768 | # the build-time location of libiconv files. | |
6769 | # - The program we need to find is iconv, which comes with glibc. The user | |
6770 | # doesn't necessarily have libiconv installed. Therefore naming this | |
6771 | # --with-libiconv-foo feels wrong. | |
6772 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is | |
6773 | # defined to work on directories not files (though it really doesn't know | |
6774 | # the difference). | |
6775 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion | |
6776 | # with --with-libiconv-prefix. | |
6777 | # Putting these together is why the option name is --with-iconv-bin. | |
6778 | ||
6779 | ||
6780 | # Check whether --with-iconv-bin was given. | |
6781 | if test "${with_iconv_bin+set}" = set; then : | |
6782 | withval=$with_iconv_bin; iconv_bin="${withval}" | |
6783 | ||
6784 | cat >>confdefs.h <<_ACEOF | |
6785 | #define ICONV_BIN "${iconv_bin}" | |
6786 | _ACEOF | |
6787 | ||
6788 | ||
6789 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
6790 | if test "x$prefix" = xNONE; then | |
6791 | test_prefix=/usr/local | |
6792 | else | |
6793 | test_prefix=$prefix | |
6794 | fi | |
6795 | else | |
6796 | test_prefix=$exec_prefix | |
6797 | fi | |
6798 | value=0 | |
6799 | case ${iconv_bin} in | |
6800 | "${test_prefix}"|"${test_prefix}/"*|\ | |
6801 | '${exec_prefix}'|'${exec_prefix}/'*) | |
6802 | value=1 | |
6803 | ;; | |
6804 | esac | |
6805 | ||
6806 | cat >>confdefs.h <<_ACEOF | |
6807 | #define ICONV_BIN_RELOCATABLE $value | |
6808 | _ACEOF | |
6809 | ||
6810 | ||
6811 | ||
6812 | fi | |
6813 | ||
6814 | ||
6c7a06a3 TT |
6815 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. |
6816 | # There is a very specific comment in /usr/include/curses.h explaining that | |
6817 | # termcap routines built into libcurses must not be used. | |
6818 | # | |
6819 | # The symptoms we observed so far is GDB unexpectedly changing | |
6820 | # the terminal settings when tgetent is called - this is particularly | |
6821 | # visible as the output is missing carriage returns, and so rapidly | |
6822 | # becomes very hard to read. | |
6823 | # | |
6824 | # The readline configure script has already decided that libtermcap | |
6825 | # was enough for its purposes, and so decided to build readline using | |
6826 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
6827 | # TUI enabled results in both libraries to be used at the same time, | |
6828 | # which is not allowed. This basically means that GDB with TUI is | |
6829 | # broken on alpha-osf. | |
6830 | ||
6831 | case $host_os in | |
6bcc772d RO |
6832 | osf* ) |
6833 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6834 | as_fn_error "Building GDB with TUI mode is not supported on this host" "$LINENO" 5 |
6c7a06a3 | 6835 | fi |
6bcc772d | 6836 | if test x"$enable_tui" = xauto; then |
6c7a06a3 TT |
6837 | enable_tui=no |
6838 | fi | |
6839 | ;; | |
6840 | esac | |
6841 | ||
cb01cfba | 6842 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 6843 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
6844 | prefer_curses=yes |
6845 | fi | |
6846 | ||
6847 | curses_found=no | |
6848 | if test x"$prefer_curses" = xyes; then | |
6849 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
6850 | # curses library because the latter might not provide all the | |
6851 | # functionality we need. However, this leads to problems on systems | |
6852 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
6853 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
6854 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
6855 | # a situation. | |
81ecdfbb RW |
6856 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
6857 | $as_echo_n "checking for library containing waddstr... " >&6; } | |
6858 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6859 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6860 | else |
6861 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6863 | /* end confdefs.h. */ |
6864 | ||
81ecdfbb RW |
6865 | /* Override any GCC internal prototype to avoid an error. |
6866 | Use char because int might match the return type of a GCC | |
6867 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6868 | #ifdef __cplusplus |
6869 | extern "C" | |
6870 | #endif | |
6c7a06a3 TT |
6871 | char waddstr (); |
6872 | int | |
6873 | main () | |
6874 | { | |
81ecdfbb | 6875 | return waddstr (); |
6c7a06a3 TT |
6876 | ; |
6877 | return 0; | |
6878 | } | |
6879 | _ACEOF | |
81ecdfbb RW |
6880 | for ac_lib in '' ncurses cursesX curses; do |
6881 | if test -z "$ac_lib"; then | |
6882 | ac_res="none required" | |
6883 | else | |
6884 | ac_res=-l$ac_lib | |
6885 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6886 | fi | |
6887 | if ac_fn_c_try_link "$LINENO"; then : | |
6888 | ac_cv_search_waddstr=$ac_res | |
6889 | fi | |
6890 | rm -f core conftest.err conftest.$ac_objext \ | |
6891 | conftest$ac_exeext | |
6892 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6893 | break | |
6894 | fi | |
6895 | done | |
6896 | if test "${ac_cv_search_waddstr+set}" = set; then : | |
6897 | ||
6c7a06a3 | 6898 | else |
81ecdfbb RW |
6899 | ac_cv_search_waddstr=no |
6900 | fi | |
6901 | rm conftest.$ac_ext | |
6902 | LIBS=$ac_func_search_save_LIBS | |
6903 | fi | |
6904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 | |
6905 | $as_echo "$ac_cv_search_waddstr" >&6; } | |
6906 | ac_res=$ac_cv_search_waddstr | |
6907 | if test "$ac_res" != no; then : | |
6908 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 TT |
6909 | |
6910 | fi | |
6911 | ||
6912 | ||
cb01cfba JB |
6913 | if test "$ac_cv_search_waddstr" != no; then |
6914 | curses_found=yes | |
6915 | fi | |
6916 | fi | |
6917 | ||
6918 | # Check whether we should enable the TUI, but only do so if we really | |
6919 | # can. | |
6920 | if test x"$enable_tui" != xno; then | |
6921 | if test -d $srcdir/tui; then | |
6922 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
6923 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
6924 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
6925 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
6926 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
6c7a06a3 TT |
6927 | else |
6928 | if test x"$enable_tui" = xyes; then | |
81ecdfbb | 6929 | as_fn_error "no enhanced curses library found; disable TUI" "$LINENO" 5 |
6c7a06a3 | 6930 | else |
81ecdfbb RW |
6931 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
6932 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
6c7a06a3 TT |
6933 | fi |
6934 | fi | |
6935 | fi | |
6936 | fi | |
6937 | ||
6938 | # Since GDB uses Readline, we need termcap functionality. In many | |
6939 | # cases this will be provided by the curses library, but some systems | |
6940 | # have a seperate termcap library, or no curses library at all. | |
6941 | ||
6942 | case $host_os in | |
6943 | cygwin*) | |
6944 | if test -d $srcdir/libtermcap; then | |
6945 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
6946 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
6947 | fi ;; | |
6948 | go32* | *djgpp*) | |
6949 | ac_cv_search_tgetent="none required" | |
6950 | ;; | |
6951 | *mingw32*) | |
6952 | ac_cv_search_tgetent="none required" | |
6953 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
6954 | ;; | |
6955 | esac | |
6956 | ||
6957 | # These are the libraries checked by Readline. | |
81ecdfbb RW |
6958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
6959 | $as_echo_n "checking for library containing tgetent... " >&6; } | |
6960 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6961 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 TT |
6962 | else |
6963 | ac_func_search_save_LIBS=$LIBS | |
81ecdfbb | 6964 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
6965 | /* end confdefs.h. */ |
6966 | ||
81ecdfbb RW |
6967 | /* Override any GCC internal prototype to avoid an error. |
6968 | Use char because int might match the return type of a GCC | |
6969 | builtin and then its argument prototype would still apply. */ | |
6c7a06a3 TT |
6970 | #ifdef __cplusplus |
6971 | extern "C" | |
6972 | #endif | |
6c7a06a3 TT |
6973 | char tgetent (); |
6974 | int | |
6975 | main () | |
6976 | { | |
81ecdfbb | 6977 | return tgetent (); |
6c7a06a3 TT |
6978 | ; |
6979 | return 0; | |
6980 | } | |
6981 | _ACEOF | |
81ecdfbb RW |
6982 | for ac_lib in '' termcap tinfo curses ncurses; do |
6983 | if test -z "$ac_lib"; then | |
6984 | ac_res="none required" | |
6985 | else | |
6986 | ac_res=-l$ac_lib | |
6c7a06a3 | 6987 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
81ecdfbb RW |
6988 | fi |
6989 | if ac_fn_c_try_link "$LINENO"; then : | |
6990 | ac_cv_search_tgetent=$ac_res | |
6991 | fi | |
6992 | rm -f core conftest.err conftest.$ac_objext \ | |
6993 | conftest$ac_exeext | |
6994 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6995 | break | |
6996 | fi | |
6997 | done | |
6998 | if test "${ac_cv_search_tgetent+set}" = set; then : | |
6c7a06a3 | 6999 | |
6c7a06a3 | 7000 | else |
81ecdfbb | 7001 | ac_cv_search_tgetent=no |
6c7a06a3 | 7002 | fi |
81ecdfbb | 7003 | rm conftest.$ac_ext |
6c7a06a3 TT |
7004 | LIBS=$ac_func_search_save_LIBS |
7005 | fi | |
81ecdfbb RW |
7006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
7007 | $as_echo "$ac_cv_search_tgetent" >&6; } | |
7008 | ac_res=$ac_cv_search_tgetent | |
7009 | if test "$ac_res" != no; then : | |
7010 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6c7a06a3 | 7011 | |
06825bd1 MK |
7012 | fi |
7013 | ||
06825bd1 | 7014 | |
bec39cab | 7015 | if test "$ac_cv_search_tgetent" = no; then |
81ecdfbb | 7016 | as_fn_error "no termcap library found" "$LINENO" 5 |
8ee53726 MK |
7017 | fi |
7018 | ||
3841debe | 7019 | |
81ecdfbb RW |
7020 | # Check whether --with-system-readline was given. |
7021 | if test "${with_system_readline+set}" = set; then : | |
7022 | withval=$with_system_readline; | |
7023 | fi | |
6a30b0a5 | 7024 | |
6a30b0a5 AS |
7025 | |
7026 | if test "$with_system_readline" = yes; then | |
7027 | READLINE=-lreadline | |
7028 | READLINE_DEPS= | |
7029 | READLINE_CFLAGS= | |
39037522 | 7030 | READLINE_TEXI_INCFLAG= |
6a30b0a5 AS |
7031 | else |
7032 | READLINE='$(READLINE_DIR)/libreadline.a' | |
7033 | READLINE_DEPS='$(READLINE)' | |
7034 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
39037522 | 7035 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
6a30b0a5 AS |
7036 | fi |
7037 | ||
7038 | ||
7039 | ||
7040 | ||
7041 | ||
a68ffae9 JK |
7042 | if $development; then |
7043 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 | |
7044 | $as_echo_n "checking for main in -lmcheck... " >&6; } | |
7045 | if test "${ac_cv_lib_mcheck_main+set}" = set; then : | |
7046 | $as_echo_n "(cached) " >&6 | |
7047 | else | |
7048 | ac_check_lib_save_LIBS=$LIBS | |
7049 | LIBS="-lmcheck $LIBS" | |
7050 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7051 | /* end confdefs.h. */ | |
7052 | ||
7053 | ||
7054 | int | |
7055 | main () | |
7056 | { | |
7057 | return main (); | |
7058 | ; | |
7059 | return 0; | |
7060 | } | |
7061 | _ACEOF | |
7062 | if ac_fn_c_try_link "$LINENO"; then : | |
7063 | ac_cv_lib_mcheck_main=yes | |
7064 | else | |
7065 | ac_cv_lib_mcheck_main=no | |
7066 | fi | |
7067 | rm -f core conftest.err conftest.$ac_objext \ | |
7068 | conftest$ac_exeext conftest.$ac_ext | |
7069 | LIBS=$ac_check_lib_save_LIBS | |
7070 | fi | |
7071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 | |
7072 | $as_echo "$ac_cv_lib_mcheck_main" >&6; } | |
7073 | if test "x$ac_cv_lib_mcheck_main" = x""yes; then : | |
7074 | cat >>confdefs.h <<_ACEOF | |
7075 | #define HAVE_LIBMCHECK 1 | |
7076 | _ACEOF | |
7077 | ||
7078 | LIBS="-lmcheck $LIBS" | |
7079 | ||
7080 | fi | |
7081 | ||
7082 | fi | |
7083 | ||
f997c383 SD |
7084 | # Generate jit-reader.h |
7085 | ||
7086 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h | |
7087 | TARGET_PTR= | |
7088 | ||
7089 | # The cast to long int works around a bug in the HP C Compiler | |
7090 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7091 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7092 | # This bug is HP SR number 8606223364. | |
7093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 | |
7094 | $as_echo_n "checking size of unsigned long long... " >&6; } | |
7095 | if test "${ac_cv_sizeof_unsigned_long_long+set}" = set; then : | |
7096 | $as_echo_n "(cached) " >&6 | |
7097 | else | |
7098 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : | |
7099 | ||
7100 | else | |
7101 | if test "$ac_cv_type_unsigned_long_long" = yes; then | |
7102 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7103 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7104 | { as_fn_set_status 77 | |
7105 | as_fn_error "cannot compute sizeof (unsigned long long) | |
7106 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7107 | else | |
7108 | ac_cv_sizeof_unsigned_long_long=0 | |
7109 | fi | |
7110 | fi | |
7111 | ||
7112 | fi | |
7113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 | |
7114 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } | |
7115 | ||
7116 | ||
7117 | ||
7118 | cat >>confdefs.h <<_ACEOF | |
7119 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long | |
7120 | _ACEOF | |
7121 | ||
7122 | ||
7123 | # The cast to long int works around a bug in the HP C Compiler | |
7124 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7125 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7126 | # This bug is HP SR number 8606223364. | |
7127 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 | |
7128 | $as_echo_n "checking size of unsigned long... " >&6; } | |
7129 | if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : | |
7130 | $as_echo_n "(cached) " >&6 | |
7131 | else | |
7132 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : | |
7133 | ||
7134 | else | |
7135 | if test "$ac_cv_type_unsigned_long" = yes; then | |
7136 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7137 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7138 | { as_fn_set_status 77 | |
7139 | as_fn_error "cannot compute sizeof (unsigned long) | |
7140 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7141 | else | |
7142 | ac_cv_sizeof_unsigned_long=0 | |
7143 | fi | |
7144 | fi | |
7145 | ||
7146 | fi | |
7147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 | |
7148 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } | |
7149 | ||
7150 | ||
7151 | ||
7152 | cat >>confdefs.h <<_ACEOF | |
7153 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long | |
7154 | _ACEOF | |
7155 | ||
7156 | ||
7157 | # The cast to long int works around a bug in the HP C Compiler | |
7158 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7159 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7160 | # This bug is HP SR number 8606223364. | |
7161 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 | |
7162 | $as_echo_n "checking size of unsigned __int128... " >&6; } | |
7163 | if test "${ac_cv_sizeof_unsigned___int128+set}" = set; then : | |
7164 | $as_echo_n "(cached) " >&6 | |
7165 | else | |
7166 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : | |
7167 | ||
7168 | else | |
7169 | if test "$ac_cv_type_unsigned___int128" = yes; then | |
7170 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
7171 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7172 | { as_fn_set_status 77 | |
7173 | as_fn_error "cannot compute sizeof (unsigned __int128) | |
7174 | See \`config.log' for more details." "$LINENO" 5; }; } | |
7175 | else | |
7176 | ac_cv_sizeof_unsigned___int128=0 | |
7177 | fi | |
7178 | fi | |
7179 | ||
7180 | fi | |
7181 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 | |
7182 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } | |
7183 | ||
7184 | ||
7185 | ||
7186 | cat >>confdefs.h <<_ACEOF | |
7187 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 | |
7188 | _ACEOF | |
7189 | ||
7190 | ||
7191 | ||
7192 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then | |
7193 | TARGET_PTR="unsigned long" | |
7194 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then | |
7195 | TARGET_PTR="unsigned long long" | |
7196 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then | |
7197 | TARGET_PTR="unsigned __int128" | |
7198 | else | |
7199 | TARGET_PTR="unsigned long" | |
7200 | fi | |
7201 | ||
7202 | ||
7203 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" | |
7204 | ||
7205 | ||
a2d08b9e SD |
7206 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
7207 | $as_echo_n "checking for library containing dlopen... " >&6; } | |
7208 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7209 | $as_echo_n "(cached) " >&6 | |
7210 | else | |
7211 | ac_func_search_save_LIBS=$LIBS | |
7212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7213 | /* end confdefs.h. */ | |
7214 | ||
7215 | /* Override any GCC internal prototype to avoid an error. | |
7216 | Use char because int might match the return type of a GCC | |
7217 | builtin and then its argument prototype would still apply. */ | |
7218 | #ifdef __cplusplus | |
7219 | extern "C" | |
7220 | #endif | |
7221 | char dlopen (); | |
7222 | int | |
7223 | main () | |
7224 | { | |
7225 | return dlopen (); | |
7226 | ; | |
7227 | return 0; | |
7228 | } | |
7229 | _ACEOF | |
7230 | for ac_lib in '' dl; do | |
7231 | if test -z "$ac_lib"; then | |
7232 | ac_res="none required" | |
7233 | else | |
7234 | ac_res=-l$ac_lib | |
7235 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7236 | fi | |
7237 | if ac_fn_c_try_link "$LINENO"; then : | |
7238 | ac_cv_search_dlopen=$ac_res | |
7239 | fi | |
7240 | rm -f core conftest.err conftest.$ac_objext \ | |
7241 | conftest$ac_exeext | |
7242 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7243 | break | |
7244 | fi | |
7245 | done | |
7246 | if test "${ac_cv_search_dlopen+set}" = set; then : | |
7247 | ||
7248 | else | |
7249 | ac_cv_search_dlopen=no | |
7250 | fi | |
7251 | rm conftest.$ac_ext | |
7252 | LIBS=$ac_func_search_save_LIBS | |
7253 | fi | |
7254 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 | |
7255 | $as_echo "$ac_cv_search_dlopen" >&6; } | |
7256 | ac_res=$ac_cv_search_dlopen | |
7257 | if test "$ac_res" != no; then : | |
7258 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
7259 | ||
7260 | fi | |
7261 | ||
7262 | ||
39037522 | 7263 | |
b8e0a31c SD |
7264 | |
7265 | # Check whether --with-jit-reader-dir was given. | |
7266 | if test "${with_jit_reader_dir+set}" = set; then : | |
7267 | withval=$with_jit_reader_dir; | |
7268 | JIT_READER_DIR=$withval | |
7269 | else | |
7270 | JIT_READER_DIR=${libdir}/gdb | |
7271 | fi | |
7272 | ||
7273 | ||
7274 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
7275 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7276 | ac_define_dir=`eval echo $JIT_READER_DIR` | |
7277 | ac_define_dir=`eval echo $ac_define_dir` | |
7278 | ||
7279 | cat >>confdefs.h <<_ACEOF | |
7280 | #define JIT_READER_DIR "$ac_define_dir" | |
7281 | _ACEOF | |
7282 | ||
7283 | ||
7284 | ||
7285 | ||
7286 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
7287 | if test "x$prefix" = xNONE; then | |
7288 | test_prefix=/usr/local | |
7289 | else | |
7290 | test_prefix=$prefix | |
7291 | fi | |
7292 | else | |
7293 | test_prefix=$exec_prefix | |
7294 | fi | |
7295 | value=0 | |
7296 | case ${ac_define_dir} in | |
7297 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7298 | '${exec_prefix}'|'${exec_prefix}/'*) | |
7299 | value=1 | |
7300 | ;; | |
7301 | esac | |
7302 | ||
7303 | cat >>confdefs.h <<_ACEOF | |
7304 | #define JIT_READER_DIR_RELOCATABLE $value | |
7305 | _ACEOF | |
7306 | ||
7307 | ||
7308 | ||
7309 | ||
7310 | ||
81ecdfbb RW |
7311 | # Check whether --with-expat was given. |
7312 | if test "${with_expat+set}" = set; then : | |
7313 | withval=$with_expat; | |
5c39566f DJ |
7314 | else |
7315 | with_expat=auto | |
81ecdfbb RW |
7316 | fi |
7317 | ||
7318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 | |
7319 | $as_echo_n "checking whether to use expat... " >&6; } | |
7320 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 | |
7321 | $as_echo "$with_expat" >&6; } | |
5c39566f DJ |
7322 | |
7323 | if test "${with_expat}" = no; then | |
81ecdfbb RW |
7324 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
7325 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
5c39566f DJ |
7326 | HAVE_LIBEXPAT=no |
7327 | else | |
7328 | ||
3841debe DJ |
7329 | if test "X$prefix" = "XNONE"; then |
7330 | acl_final_prefix="$ac_default_prefix" | |
7331 | else | |
7332 | acl_final_prefix="$prefix" | |
7333 | fi | |
7334 | if test "X$exec_prefix" = "XNONE"; then | |
7335 | acl_final_exec_prefix='${prefix}' | |
7336 | else | |
7337 | acl_final_exec_prefix="$exec_prefix" | |
7338 | fi | |
7339 | acl_save_prefix="$prefix" | |
7340 | prefix="$acl_final_prefix" | |
7341 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
7342 | prefix="$acl_save_prefix" | |
7343 | ||
7344 | ||
81ecdfbb RW |
7345 | # Check whether --with-gnu-ld was given. |
7346 | if test "${with_gnu_ld+set}" = set; then : | |
7347 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
3841debe DJ |
7348 | else |
7349 | with_gnu_ld=no | |
81ecdfbb RW |
7350 | fi |
7351 | ||
3841debe DJ |
7352 | # Prepare PATH_SEPARATOR. |
7353 | # The user is always right. | |
7354 | if test "${PATH_SEPARATOR+set}" != set; then | |
7355 | echo "#! /bin/sh" >conf$$.sh | |
7356 | echo "exit 0" >>conf$$.sh | |
7357 | chmod +x conf$$.sh | |
7358 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
7359 | PATH_SEPARATOR=';' | |
7360 | else | |
7361 | PATH_SEPARATOR=: | |
7362 | fi | |
7363 | rm -f conf$$.sh | |
7364 | fi | |
7365 | ac_prog=ld | |
7366 | if test "$GCC" = yes; then | |
7367 | # Check if gcc -print-prog-name=ld gives a path. | |
81ecdfbb RW |
7368 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
7369 | $as_echo_n "checking for ld used by GCC... " >&6; } | |
3841debe DJ |
7370 | case $host in |
7371 | *-*-mingw*) | |
7372 | # gcc leaves a trailing carriage return which upsets mingw | |
7373 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
7374 | *) | |
7375 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
7376 | esac | |
7377 | case $ac_prog in | |
7378 | # Accept absolute paths. | |
7379 | [\\/]* | [A-Za-z]:[\\/]*) | |
7380 | re_direlt='/[^/][^/]*/\.\./' | |
7381 | # Canonicalize the path of ld | |
7382 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
7383 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
7384 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
7385 | done | |
7386 | test -z "$LD" && LD="$ac_prog" | |
7387 | ;; | |
7388 | "") | |
7389 | # If it fails, then pretend we aren't using GCC. | |
7390 | ac_prog=ld | |
7391 | ;; | |
7392 | *) | |
7393 | # If it is relative, then search for the first ld in PATH. | |
7394 | with_gnu_ld=unknown | |
7395 | ;; | |
7396 | esac | |
7397 | elif test "$with_gnu_ld" = yes; then | |
81ecdfbb RW |
7398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
7399 | $as_echo_n "checking for GNU ld... " >&6; } | |
3841debe | 7400 | else |
81ecdfbb RW |
7401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
7402 | $as_echo_n "checking for non-GNU ld... " >&6; } | |
3841debe | 7403 | fi |
81ecdfbb RW |
7404 | if test "${acl_cv_path_LD+set}" = set; then : |
7405 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7406 | else |
7407 | if test -z "$LD"; then | |
7408 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
7409 | for ac_dir in $PATH; do | |
7410 | test -z "$ac_dir" && ac_dir=. | |
7411 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
7412 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
7413 | # Check to see if the program is GNU ld. I'd rather use --version, | |
7414 | # but apparently some GNU ld's only accept -v. | |
7415 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
7416 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
7417 | test "$with_gnu_ld" != no && break | |
7418 | else | |
7419 | test "$with_gnu_ld" != yes && break | |
7420 | fi | |
7421 | fi | |
7422 | done | |
7423 | IFS="$ac_save_ifs" | |
7424 | else | |
7425 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
7426 | fi | |
7427 | fi | |
7428 | ||
7429 | LD="$acl_cv_path_LD" | |
7430 | if test -n "$LD"; then | |
81ecdfbb RW |
7431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
7432 | $as_echo "$LD" >&6; } | |
3841debe | 7433 | else |
81ecdfbb RW |
7434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7435 | $as_echo "no" >&6; } | |
3841debe | 7436 | fi |
81ecdfbb RW |
7437 | test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 |
7438 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
7439 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } | |
7440 | if test "${acl_cv_prog_gnu_ld+set}" = set; then : | |
7441 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7442 | else |
7443 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
7444 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
7445 | acl_cv_prog_gnu_ld=yes | |
7446 | else | |
7447 | acl_cv_prog_gnu_ld=no | |
7448 | fi | |
7449 | fi | |
81ecdfbb RW |
7450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
7451 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } | |
3841debe DJ |
7452 | with_gnu_ld=$acl_cv_prog_gnu_ld |
7453 | ||
7454 | ||
7455 | ||
81ecdfbb RW |
7456 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
7457 | $as_echo_n "checking for shared library run path origin... " >&6; } | |
7458 | if test "${acl_cv_rpath+set}" = set; then : | |
7459 | $as_echo_n "(cached) " >&6 | |
3841debe DJ |
7460 | else |
7461 | ||
7462 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
7463 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
7464 | . ./conftest.sh | |
7465 | rm -f ./conftest.sh | |
7466 | acl_cv_rpath=done | |
7467 | ||
7468 | fi | |
81ecdfbb RW |
7469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
7470 | $as_echo "$acl_cv_rpath" >&6; } | |
3841debe DJ |
7471 | wl="$acl_cv_wl" |
7472 | libext="$acl_cv_libext" | |
7473 | shlibext="$acl_cv_shlibext" | |
7474 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
7475 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
7476 | hardcode_direct="$acl_cv_hardcode_direct" | |
7477 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
81ecdfbb RW |
7478 | # Check whether --enable-rpath was given. |
7479 | if test "${enable_rpath+set}" = set; then : | |
7480 | enableval=$enable_rpath; : | |
3841debe DJ |
7481 | else |
7482 | enable_rpath=yes | |
81ecdfbb RW |
7483 | fi |
7484 | ||
3841debe DJ |
7485 | |
7486 | ||
7487 | ||
7488 | ||
7489 | ||
7490 | ||
7491 | ||
7492 | ||
7493 | ||
7494 | use_additional=yes | |
7495 | ||
7496 | acl_save_prefix="$prefix" | |
7497 | prefix="$acl_final_prefix" | |
7498 | acl_save_exec_prefix="$exec_prefix" | |
7499 | exec_prefix="$acl_final_exec_prefix" | |
7500 | ||
7501 | eval additional_includedir=\"$includedir\" | |
7502 | eval additional_libdir=\"$libdir\" | |
7503 | ||
7504 | exec_prefix="$acl_save_exec_prefix" | |
7505 | prefix="$acl_save_prefix" | |
7506 | ||
7507 | ||
81ecdfbb RW |
7508 | # Check whether --with-libexpat-prefix was given. |
7509 | if test "${with_libexpat_prefix+set}" = set; then : | |
7510 | withval=$with_libexpat_prefix; | |
3841debe DJ |
7511 | if test "X$withval" = "Xno"; then |
7512 | use_additional=no | |
7513 | else | |
7514 | if test "X$withval" = "X"; then | |
7515 | ||
7516 | acl_save_prefix="$prefix" | |
7517 | prefix="$acl_final_prefix" | |
7518 | acl_save_exec_prefix="$exec_prefix" | |
7519 | exec_prefix="$acl_final_exec_prefix" | |
7520 | ||
7521 | eval additional_includedir=\"$includedir\" | |
7522 | eval additional_libdir=\"$libdir\" | |
7523 | ||
7524 | exec_prefix="$acl_save_exec_prefix" | |
7525 | prefix="$acl_save_prefix" | |
7526 | ||
7527 | else | |
7528 | additional_includedir="$withval/include" | |
7529 | additional_libdir="$withval/lib" | |
7530 | fi | |
7531 | fi | |
7532 | ||
81ecdfbb RW |
7533 | fi |
7534 | ||
3841debe DJ |
7535 | LIBEXPAT= |
7536 | LTLIBEXPAT= | |
7537 | INCEXPAT= | |
7538 | rpathdirs= | |
7539 | ltrpathdirs= | |
7540 | names_already_handled= | |
7541 | names_next_round='expat ' | |
7542 | while test -n "$names_next_round"; do | |
7543 | names_this_round="$names_next_round" | |
7544 | names_next_round= | |
7545 | for name in $names_this_round; do | |
7546 | already_handled= | |
7547 | for n in $names_already_handled; do | |
7548 | if test "$n" = "$name"; then | |
7549 | already_handled=yes | |
7550 | break | |
7551 | fi | |
7552 | done | |
7553 | if test -z "$already_handled"; then | |
7554 | names_already_handled="$names_already_handled $name" | |
7555 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
7556 | eval value=\"\$HAVE_LIB$uppername\" | |
7557 | if test -n "$value"; then | |
7558 | if test "$value" = yes; then | |
7559 | eval value=\"\$LIB$uppername\" | |
7560 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
7561 | eval value=\"\$LTLIB$uppername\" | |
7562 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
7563 | else | |
7564 | : | |
7565 | fi | |
7566 | else | |
7567 | found_dir= | |
7568 | found_la= | |
7569 | found_so= | |
7570 | found_a= | |
7571 | if test $use_additional = yes; then | |
7572 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
7573 | found_dir="$additional_libdir" | |
7574 | found_so="$additional_libdir/lib$name.$shlibext" | |
7575 | if test -f "$additional_libdir/lib$name.la"; then | |
7576 | found_la="$additional_libdir/lib$name.la" | |
7577 | fi | |
7578 | else | |
7579 | if test -f "$additional_libdir/lib$name.$libext"; then | |
7580 | found_dir="$additional_libdir" | |
7581 | found_a="$additional_libdir/lib$name.$libext" | |
7582 | if test -f "$additional_libdir/lib$name.la"; then | |
7583 | found_la="$additional_libdir/lib$name.la" | |
7584 | fi | |
7585 | fi | |
7586 | fi | |
7587 | fi | |
7588 | if test "X$found_dir" = "X"; then | |
7589 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7590 | ||
7591 | acl_save_prefix="$prefix" | |
7592 | prefix="$acl_final_prefix" | |
7593 | acl_save_exec_prefix="$exec_prefix" | |
7594 | exec_prefix="$acl_final_exec_prefix" | |
7595 | eval x=\"$x\" | |
7596 | exec_prefix="$acl_save_exec_prefix" | |
7597 | prefix="$acl_save_prefix" | |
7598 | ||
7599 | case "$x" in | |
7600 | -L*) | |
7601 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
7602 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
7603 | found_dir="$dir" | |
7604 | found_so="$dir/lib$name.$shlibext" | |
7605 | if test -f "$dir/lib$name.la"; then | |
7606 | found_la="$dir/lib$name.la" | |
7607 | fi | |
7608 | else | |
7609 | if test -f "$dir/lib$name.$libext"; then | |
7610 | found_dir="$dir" | |
7611 | found_a="$dir/lib$name.$libext" | |
7612 | if test -f "$dir/lib$name.la"; then | |
7613 | found_la="$dir/lib$name.la" | |
7614 | fi | |
7615 | fi | |
7616 | fi | |
7617 | ;; | |
7618 | esac | |
7619 | if test "X$found_dir" != "X"; then | |
7620 | break | |
7621 | fi | |
7622 | done | |
7623 | fi | |
7624 | if test "X$found_dir" != "X"; then | |
7625 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
7626 | if test "X$found_so" != "X"; then | |
7627 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
7628 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7629 | else | |
7630 | haveit= | |
7631 | for x in $ltrpathdirs; do | |
7632 | if test "X$x" = "X$found_dir"; then | |
7633 | haveit=yes | |
7634 | break | |
7635 | fi | |
7636 | done | |
7637 | if test -z "$haveit"; then | |
7638 | ltrpathdirs="$ltrpathdirs $found_dir" | |
7639 | fi | |
7640 | if test "$hardcode_direct" = yes; then | |
7641 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7642 | else | |
7643 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
7644 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7645 | haveit= | |
7646 | for x in $rpathdirs; do | |
7647 | if test "X$x" = "X$found_dir"; then | |
7648 | haveit=yes | |
7649 | break | |
7650 | fi | |
7651 | done | |
7652 | if test -z "$haveit"; then | |
7653 | rpathdirs="$rpathdirs $found_dir" | |
7654 | fi | |
7655 | else | |
7656 | haveit= | |
7657 | for x in $LDFLAGS $LIBEXPAT; do | |
7658 | ||
7659 | acl_save_prefix="$prefix" | |
7660 | prefix="$acl_final_prefix" | |
7661 | acl_save_exec_prefix="$exec_prefix" | |
7662 | exec_prefix="$acl_final_exec_prefix" | |
7663 | eval x=\"$x\" | |
7664 | exec_prefix="$acl_save_exec_prefix" | |
7665 | prefix="$acl_save_prefix" | |
7666 | ||
7667 | if test "X$x" = "X-L$found_dir"; then | |
7668 | haveit=yes | |
7669 | break | |
7670 | fi | |
7671 | done | |
7672 | if test -z "$haveit"; then | |
7673 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
7674 | fi | |
7675 | if test "$hardcode_minus_L" != no; then | |
7676 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
7677 | else | |
7678 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7679 | fi | |
7680 | fi | |
7681 | fi | |
7682 | fi | |
7683 | else | |
7684 | if test "X$found_a" != "X"; then | |
7685 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
7686 | else | |
7687 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
7688 | fi | |
7689 | fi | |
7690 | additional_includedir= | |
7691 | case "$found_dir" in | |
7692 | */lib | */lib/) | |
7693 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
7694 | additional_includedir="$basedir/include" | |
7695 | ;; | |
7696 | esac | |
7697 | if test "X$additional_includedir" != "X"; then | |
7698 | if test "X$additional_includedir" != "X/usr/include"; then | |
7699 | haveit= | |
7700 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
7701 | if test -n "$GCC"; then | |
7702 | case $host_os in | |
7703 | linux*) haveit=yes;; | |
7704 | esac | |
7705 | fi | |
7706 | fi | |
7707 | if test -z "$haveit"; then | |
7708 | for x in $CPPFLAGS $INCEXPAT; do | |
7709 | ||
7710 | acl_save_prefix="$prefix" | |
7711 | prefix="$acl_final_prefix" | |
7712 | acl_save_exec_prefix="$exec_prefix" | |
7713 | exec_prefix="$acl_final_exec_prefix" | |
7714 | eval x=\"$x\" | |
7715 | exec_prefix="$acl_save_exec_prefix" | |
7716 | prefix="$acl_save_prefix" | |
7717 | ||
7718 | if test "X$x" = "X-I$additional_includedir"; then | |
7719 | haveit=yes | |
7720 | break | |
7721 | fi | |
7722 | done | |
7723 | if test -z "$haveit"; then | |
7724 | if test -d "$additional_includedir"; then | |
7725 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
7726 | fi | |
7727 | fi | |
7728 | fi | |
7729 | fi | |
7730 | fi | |
7731 | if test -n "$found_la"; then | |
7732 | save_libdir="$libdir" | |
7733 | case "$found_la" in | |
7734 | */* | *\\*) . "$found_la" ;; | |
7735 | *) . "./$found_la" ;; | |
7736 | esac | |
7737 | libdir="$save_libdir" | |
7738 | for dep in $dependency_libs; do | |
7739 | case "$dep" in | |
7740 | -L*) | |
7741 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
7742 | if test "X$additional_libdir" != "X/usr/lib"; then | |
7743 | haveit= | |
7744 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
7745 | if test -n "$GCC"; then | |
7746 | case $host_os in | |
7747 | linux*) haveit=yes;; | |
7748 | esac | |
7749 | fi | |
7750 | fi | |
7751 | if test -z "$haveit"; then | |
7752 | haveit= | |
7753 | for x in $LDFLAGS $LIBEXPAT; do | |
7754 | ||
7755 | acl_save_prefix="$prefix" | |
7756 | prefix="$acl_final_prefix" | |
7757 | acl_save_exec_prefix="$exec_prefix" | |
7758 | exec_prefix="$acl_final_exec_prefix" | |
7759 | eval x=\"$x\" | |
7760 | exec_prefix="$acl_save_exec_prefix" | |
7761 | prefix="$acl_save_prefix" | |
7762 | ||
7763 | if test "X$x" = "X-L$additional_libdir"; then | |
7764 | haveit=yes | |
7765 | break | |
7766 | fi | |
7767 | done | |
7768 | if test -z "$haveit"; then | |
7769 | if test -d "$additional_libdir"; then | |
7770 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
7771 | fi | |
7772 | fi | |
7773 | haveit= | |
7774 | for x in $LDFLAGS $LTLIBEXPAT; do | |
7775 | ||
7776 | acl_save_prefix="$prefix" | |
7777 | prefix="$acl_final_prefix" | |
7778 | acl_save_exec_prefix="$exec_prefix" | |
7779 | exec_prefix="$acl_final_exec_prefix" | |
7780 | eval x=\"$x\" | |
7781 | exec_prefix="$acl_save_exec_prefix" | |
7782 | prefix="$acl_save_prefix" | |
7783 | ||
7784 | if test "X$x" = "X-L$additional_libdir"; then | |
7785 | haveit=yes | |
7786 | break | |
7787 | fi | |
7788 | done | |
7789 | if test -z "$haveit"; then | |
7790 | if test -d "$additional_libdir"; then | |
7791 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
7792 | fi | |
7793 | fi | |
7794 | fi | |
7795 | fi | |
7796 | ;; | |
7797 | -R*) | |
7798 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
7799 | if test "$enable_rpath" != no; then | |
7800 | haveit= | |
7801 | for x in $rpathdirs; do | |
7802 | if test "X$x" = "X$dir"; then | |
7803 | haveit=yes | |
7804 | break | |
7805 | fi | |
7806 | done | |
7807 | if test -z "$haveit"; then | |
7808 | rpathdirs="$rpathdirs $dir" | |
7809 | fi | |
7810 | haveit= | |
7811 | for x in $ltrpathdirs; do | |
7812 | if test "X$x" = "X$dir"; then | |
7813 | haveit=yes | |
7814 | break | |
7815 | fi | |
7816 | done | |
7817 | if test -z "$haveit"; then | |
7818 | ltrpathdirs="$ltrpathdirs $dir" | |
7819 | fi | |
7820 | fi | |
7821 | ;; | |
7822 | -l*) | |
7823 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
7824 | ;; | |
7825 | *.la) | |
7826 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
7827 | ;; | |
7828 | *) | |
7829 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
7830 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
7831 | ;; | |
81ecdfbb RW |
7832 | esac |
7833 | done | |
7834 | fi | |
7835 | else | |
7836 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
7837 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
7838 | fi | |
7839 | fi | |
7840 | fi | |
7841 | done | |
7842 | done | |
7843 | if test "X$rpathdirs" != "X"; then | |
7844 | if test -n "$hardcode_libdir_separator"; then | |
7845 | alldirs= | |
7846 | for found_dir in $rpathdirs; do | |
7847 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
7848 | done | |
7849 | acl_save_libdir="$libdir" | |
7850 | libdir="$alldirs" | |
7851 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7852 | libdir="$acl_save_libdir" | |
7853 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7854 | else | |
7855 | for found_dir in $rpathdirs; do | |
7856 | acl_save_libdir="$libdir" | |
7857 | libdir="$found_dir" | |
7858 | eval flag=\"$hardcode_libdir_flag_spec\" | |
7859 | libdir="$acl_save_libdir" | |
7860 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
7861 | done | |
7862 | fi | |
7863 | fi | |
7864 | if test "X$ltrpathdirs" != "X"; then | |
7865 | for found_dir in $ltrpathdirs; do | |
7866 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
7867 | done | |
7868 | fi | |
a9322a30 TT |
7869 | |
7870 | ||
81ecdfbb | 7871 | ac_save_CPPFLAGS="$CPPFLAGS" |
a9322a30 | 7872 | |
81ecdfbb RW |
7873 | for element in $INCEXPAT; do |
7874 | haveit= | |
7875 | for x in $CPPFLAGS; do | |
a9322a30 | 7876 | |
81ecdfbb RW |
7877 | acl_save_prefix="$prefix" |
7878 | prefix="$acl_final_prefix" | |
7879 | acl_save_exec_prefix="$exec_prefix" | |
7880 | exec_prefix="$acl_final_exec_prefix" | |
7881 | eval x=\"$x\" | |
7882 | exec_prefix="$acl_save_exec_prefix" | |
7883 | prefix="$acl_save_prefix" | |
a8111142 | 7884 | |
81ecdfbb RW |
7885 | if test "X$x" = "X$element"; then |
7886 | haveit=yes | |
7887 | break | |
7888 | fi | |
7889 | done | |
7890 | if test -z "$haveit"; then | |
7891 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
7892 | fi | |
7893 | done | |
a9322a30 TT |
7894 | |
7895 | ||
81ecdfbb RW |
7896 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
7897 | $as_echo_n "checking for libexpat... " >&6; } | |
7898 | if test "${ac_cv_libexpat+set}" = set; then : | |
7899 | $as_echo_n "(cached) " >&6 | |
bec39cab | 7900 | else |
bec39cab | 7901 | |
81ecdfbb RW |
7902 | ac_save_LIBS="$LIBS" |
7903 | LIBS="$LIBS $LIBEXPAT" | |
7904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 7905 | /* end confdefs.h. */ |
81ecdfbb RW |
7906 | #include "expat.h" |
7907 | int | |
7908 | main () | |
7909 | { | |
7910 | XML_Parser p = XML_ParserCreate (0); | |
7911 | ; | |
7912 | return 0; | |
7913 | } | |
bec39cab | 7914 | _ACEOF |
81ecdfbb RW |
7915 | if ac_fn_c_try_link "$LINENO"; then : |
7916 | ac_cv_libexpat=yes | |
c906108c | 7917 | else |
81ecdfbb | 7918 | ac_cv_libexpat=no |
bec39cab | 7919 | fi |
81ecdfbb RW |
7920 | rm -f core conftest.err conftest.$ac_objext \ |
7921 | conftest$ac_exeext conftest.$ac_ext | |
7922 | LIBS="$ac_save_LIBS" | |
c906108c | 7923 | |
95ca63c4 | 7924 | fi |
81ecdfbb RW |
7925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
7926 | $as_echo "$ac_cv_libexpat" >&6; } | |
7927 | if test "$ac_cv_libexpat" = yes; then | |
7928 | HAVE_LIBEXPAT=yes | |
bec39cab | 7929 | |
81ecdfbb | 7930 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
bec39cab | 7931 | |
81ecdfbb RW |
7932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
7933 | $as_echo_n "checking how to link with libexpat... " >&6; } | |
7934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 | |
7935 | $as_echo "$LIBEXPAT" >&6; } | |
7936 | else | |
7937 | HAVE_LIBEXPAT=no | |
7938 | CPPFLAGS="$ac_save_CPPFLAGS" | |
7939 | LIBEXPAT= | |
7940 | LTLIBEXPAT= | |
7941 | fi | |
95ca63c4 CF |
7942 | |
7943 | ||
7944 | ||
7cb9022a MK |
7945 | |
7946 | ||
bec39cab | 7947 | |
81ecdfbb RW |
7948 | if test "$HAVE_LIBEXPAT" != yes; then |
7949 | if test "$with_expat" = yes; then | |
7950 | as_fn_error "expat is missing or unusable" "$LINENO" 5 | |
7951 | else | |
7952 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
7953 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
7954 | fi | |
7955 | else | |
7956 | save_LIBS=$LIBS | |
7957 | LIBS="$LIBS $LIBEXPAT" | |
7958 | for ac_func in XML_StopParser | |
7959 | do : | |
7960 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" | |
7961 | if test "x$ac_cv_func_XML_StopParser" = x""yes; then : | |
bec39cab | 7962 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 7963 | #define HAVE_XML_STOPPARSER 1 |
bec39cab | 7964 | _ACEOF |
95ca63c4 | 7965 | |
bec39cab | 7966 | fi |
bec39cab | 7967 | done |
95ca63c4 | 7968 | |
81ecdfbb RW |
7969 | LIBS=$save_LIBS |
7970 | fi | |
a9322a30 TT |
7971 | fi |
7972 | ||
a9322a30 | 7973 | |
a9322a30 TT |
7974 | |
7975 | ||
ec685c5e | 7976 | |
0c4a4063 | 7977 | |
81ecdfbb RW |
7978 | # Check whether --with-python was given. |
7979 | if test "${with_python+set}" = set; then : | |
7980 | withval=$with_python; | |
bec39cab | 7981 | else |
81ecdfbb | 7982 | with_python=auto |
bec39cab | 7983 | fi |
bec39cab | 7984 | |
81ecdfbb RW |
7985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
7986 | $as_echo_n "checking whether to use python... " >&6; } | |
7987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 | |
7988 | $as_echo "$with_python" >&6; } | |
9a156167 | 7989 | |
81ecdfbb RW |
7990 | if test "${with_python}" = no; then |
7991 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 | |
7992 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
7993 | have_libpython=no | |
bec39cab | 7994 | else |
81ecdfbb | 7995 | case "${with_python}" in |
8c85a4e2 | 7996 | [\\/]* | ?:[\\/]*) |
ec685c5e DE |
7997 | if test -d ${with_python}; then |
7998 | # Assume the python binary is ${with_python}/bin/python. | |
ec685c5e | 7999 | python_prog="${with_python}/bin/python" |
0c4a4063 | 8000 | python_prefix= |
9c4ea6c5 JB |
8001 | # If python does not exit ${with_python}/bin, then try in |
8002 | # ${with_python}. On Windows/MinGW, this is where the Python | |
8003 | # executable is. | |
8004 | if test ! -x "${python_prog}"; then | |
8005 | python_prog="${with_python}/python" | |
8006 | python_prefix= | |
8007 | fi | |
e7a30f46 | 8008 | if test ! -x "${python_prog}"; then |
ec685c5e DE |
8009 | # Fall back to gdb 7.0/7.1 behaviour. |
8010 | python_prog=missing | |
0c4a4063 | 8011 | python_prefix=${with_python} |
ec685c5e | 8012 | fi |
e7a30f46 | 8013 | elif test -x "${with_python}"; then |
ec685c5e DE |
8014 | # While we can't run python compiled for $host (unless host == build), |
8015 | # the user could write a script that provides the needed information, | |
8016 | # so we support that. | |
ec685c5e | 8017 | python_prog=${with_python} |
0c4a4063 | 8018 | python_prefix= |
ec685c5e DE |
8019 | else |
8020 | as_fn_error "invalid value for --with-python" "$LINENO" 5 | |
8021 | fi | |
81ecdfbb | 8022 | ;; |
ec685c5e DE |
8023 | */*) |
8024 | # Disallow --with-python=foo/bar. | |
81ecdfbb RW |
8025 | as_fn_error "invalid value for --with-python" "$LINENO" 5 |
8026 | ;; | |
ec685c5e DE |
8027 | *) |
8028 | # The user has either specified auto, yes, or the name of the python | |
8029 | # program assumed to be in $PATH. | |
8030 | python_prefix= | |
8031 | case "${with_python}" in | |
8032 | yes | auto) | |
8033 | if test ${build} = ${host}; then | |
8034 | # Extract the first word of "python", so it can be a program name with args. | |
8035 | set dummy python; ac_word=$2 | |
8036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8037 | $as_echo_n "checking for $ac_word... " >&6; } | |
8038 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8039 | $as_echo_n "(cached) " >&6 | |
8040 | else | |
8041 | case $python_prog_path in | |
8042 | [\\/]* | ?:[\\/]*) | |
8043 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8044 | ;; | |
8045 | *) | |
8046 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8047 | for as_dir in $PATH | |
8048 | do | |
8049 | IFS=$as_save_IFS | |
8050 | test -z "$as_dir" && as_dir=. | |
8051 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8052 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8053 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8054 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8055 | break 2 | |
8056 | fi | |
8057 | done | |
8058 | done | |
8059 | IFS=$as_save_IFS | |
8060 | ||
8061 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8062 | ;; | |
8063 | esac | |
8064 | fi | |
8065 | python_prog_path=$ac_cv_path_python_prog_path | |
8066 | if test -n "$python_prog_path"; then | |
8067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8068 | $as_echo "$python_prog_path" >&6; } | |
8069 | else | |
8070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8071 | $as_echo "no" >&6; } | |
8072 | fi | |
8073 | ||
8074 | ||
8075 | if test "${python_prog_path}" = missing; then | |
8076 | python_prog=missing | |
8077 | else | |
8078 | python_prog=${python_prog_path} | |
8079 | fi | |
8080 | else | |
8081 | # Not much we can do except assume the cross-compiler will find the | |
8082 | # right files. | |
8083 | python_prog=missing | |
8084 | fi | |
8085 | ;; | |
8086 | *) | |
8087 | # While we can't run python compiled for $host (unless host == build), | |
8088 | # the user could write a script that provides the needed information, | |
8089 | # so we support that. | |
8090 | python_prog="${with_python}" | |
8091 | # Extract the first word of "${python_prog}", so it can be a program name with args. | |
8092 | set dummy ${python_prog}; ac_word=$2 | |
8093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
8094 | $as_echo_n "checking for $ac_word... " >&6; } | |
8095 | if test "${ac_cv_path_python_prog_path+set}" = set; then : | |
8096 | $as_echo_n "(cached) " >&6 | |
8097 | else | |
8098 | case $python_prog_path in | |
8099 | [\\/]* | ?:[\\/]*) | |
8100 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. | |
8101 | ;; | |
8102 | *) | |
8103 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8104 | for as_dir in $PATH | |
8105 | do | |
8106 | IFS=$as_save_IFS | |
8107 | test -z "$as_dir" && as_dir=. | |
8108 | for ac_exec_ext in '' $ac_executable_extensions; do | |
8109 | if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then | |
8110 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" | |
8111 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8112 | break 2 | |
8113 | fi | |
8114 | done | |
8115 | done | |
8116 | IFS=$as_save_IFS | |
8117 | ||
8118 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" | |
8119 | ;; | |
8120 | esac | |
8121 | fi | |
8122 | python_prog_path=$ac_cv_path_python_prog_path | |
8123 | if test -n "$python_prog_path"; then | |
8124 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 | |
8125 | $as_echo "$python_prog_path" >&6; } | |
8126 | else | |
8127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8128 | $as_echo "no" >&6; } | |
8129 | fi | |
8130 | ||
8131 | ||
8132 | if test "${python_prog_path}" = missing; then | |
8133 | as_fn_error "unable to find python program ${python_prog}" "$LINENO" 5 | |
8134 | fi | |
8135 | ;; | |
8136 | esac | |
81ecdfbb RW |
8137 | esac |
8138 | ||
ec685c5e | 8139 | if test "${python_prog}" != missing; then |
e7a30f46 DE |
8140 | # We have a python program to use, but it may be too old. |
8141 | # Don't flag an error for --with-python=auto (the default). | |
8142 | have_python_config=yes | |
ec685c5e DE |
8143 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
8144 | if test $? != 0; then | |
e7a30f46 DE |
8145 | have_python_config=failed |
8146 | if test "${with_python}" != auto; then | |
8147 | as_fn_error "failure running python-config --includes" "$LINENO" 5 | |
8148 | fi | |
ec685c5e DE |
8149 | fi |
8150 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` | |
8151 | if test $? != 0; then | |
e7a30f46 DE |
8152 | have_python_config=failed |
8153 | if test "${with_python}" != auto; then | |
8154 | as_fn_error "failure running python-config --ldflags" "$LINENO" 5 | |
8155 | fi | |
ec685c5e | 8156 | fi |
0c4a4063 DE |
8157 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
8158 | if test $? != 0; then | |
e7a30f46 DE |
8159 | have_python_config=failed |
8160 | if test "${with_python}" != auto; then | |
8161 | as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5 | |
8162 | fi | |
0c4a4063 | 8163 | fi |
ec685c5e | 8164 | else |
ac534cba JB |
8165 | # We do not have a python executable we can use to determine where |
8166 | # to find the Python headers and libs. We cannot guess the include | |
8167 | # path from the python_prefix either, because that include path | |
8168 | # depends on the Python version. So, there is nothing much we can | |
8169 | # do except assume that the compiler will be able to find those files. | |
8170 | python_includes= | |
8171 | python_libs= | |
0c4a4063 | 8172 | have_python_config=no |
ec685c5e | 8173 | fi |
bec39cab | 8174 | |
ec685c5e DE |
8175 | # If we have python-config, only try the configuration it provides. |
8176 | # Otherwise fallback on the old way of trying different versions of | |
8177 | # python in turn. | |
81ecdfbb | 8178 | |
ec685c5e DE |
8179 | have_libpython=no |
8180 | if test "${have_python_config}" = yes; then | |
c1039e3c JB |
8181 | # Determine the Python version by extracting "-lpython<version>" |
8182 | # part of the python_libs. <version> is usually X.Y with X and Y | |
8183 | # being decimal numbers, but can also be XY (seen on Windows). | |
8184 | # | |
8185 | # The extraction is performed using sed with a regular expression. | |
8186 | # Initially, the regexp used was using the '?' quantifier to make | |
8187 | # the dot in the version number optional. Unfortunately, this | |
8188 | # does not work with non-GNU versions of sed because, because of | |
8189 | # what looks like a limitation (the '?' quantifier does not work | |
8190 | # with back-references). We work around this limitation by using | |
8191 | # the '*' quantifier instead. It means that, in theory, we might | |
8192 | # match unexpected version strings such as "-lpython2..7", but | |
8193 | # this seems unlikely in practice. And even if that happens, | |
8194 | # an error will be triggered later on, when checking that version | |
8195 | # number. | |
ec685c5e | 8196 | python_version=`echo " ${python_libs} " \ |
c1039e3c | 8197 | | sed -e 's,^.* -l\(python[0-9]*[.]*[0-9]*\).*$,\1,'` |
0c4a4063 DE |
8198 | case "${python_version}" in |
8199 | python*) | |
ec685c5e DE |
8200 | |
8201 | version=${python_version} | |
8202 | ||
8203 | new_CPPFLAGS=${python_includes} | |
8204 | new_LIBS=${python_libs} | |
81ecdfbb RW |
8205 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8206 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8207 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8208 | save_LIBS=$LIBS |
ec685c5e DE |
8209 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8210 | LIBS="$LIBS $new_LIBS" | |
8211 | found_usable_python=no | |
81ecdfbb | 8212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8213 | /* end confdefs.h. */ |
ac534cba | 8214 | #include "Python.h" |
81ecdfbb RW |
8215 | int |
8216 | main () | |
8217 | { | |
8218 | Py_Initialize (); | |
8219 | ; | |
8220 | return 0; | |
8221 | } | |
bec39cab | 8222 | _ACEOF |
81ecdfbb | 8223 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8224 | have_libpython=${version} |
8225 | found_usable_python=yes | |
ac534cba JB |
8226 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8227 | PYTHON_LIBS=$new_LIBS | |
9a156167 | 8228 | fi |
81ecdfbb RW |
8229 | rm -f core conftest.err conftest.$ac_objext \ |
8230 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8231 | CPPFLAGS=$save_CPPFLAGS |
8232 | LIBS=$save_LIBS | |
ec685c5e DE |
8233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8234 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8235 | |
0c4a4063 DE |
8236 | ;; |
8237 | *) | |
ec685c5e | 8238 | as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5 |
0c4a4063 DE |
8239 | ;; |
8240 | esac | |
e7a30f46 | 8241 | elif test "${have_python_config}" != failed; then |
ec685c5e | 8242 | if test "${have_libpython}" = no; then |
9a156167 | 8243 | |
420697bb TT |
8244 | version=python2.7 |
8245 | ||
8246 | new_CPPFLAGS=${python_includes} | |
8247 | new_LIBS="${python_libs} -lpython2.7" | |
8248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8249 | $as_echo_n "checking for ${version}... " >&6; } | |
8250 | save_CPPFLAGS=$CPPFLAGS | |
8251 | save_LIBS=$LIBS | |
8252 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8253 | LIBS="$LIBS $new_LIBS" | |
8254 | found_usable_python=no | |
8255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8256 | /* end confdefs.h. */ | |
ac534cba | 8257 | #include "Python.h" |
420697bb TT |
8258 | int |
8259 | main () | |
8260 | { | |
8261 | Py_Initialize (); | |
8262 | ; | |
8263 | return 0; | |
8264 | } | |
8265 | _ACEOF | |
8266 | if ac_fn_c_try_link "$LINENO"; then : | |
8267 | have_libpython=${version} | |
8268 | found_usable_python=yes | |
ac534cba JB |
8269 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8270 | PYTHON_LIBS=$new_LIBS | |
420697bb TT |
8271 | fi |
8272 | rm -f core conftest.err conftest.$ac_objext \ | |
8273 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8274 | CPPFLAGS=$save_CPPFLAGS |
8275 | LIBS=$save_LIBS | |
420697bb TT |
8276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8277 | $as_echo "${found_usable_python}" >&6; } | |
8278 | ||
8279 | fi | |
8280 | if test "${have_libpython}" = no; then | |
8281 | ||
ec685c5e DE |
8282 | version=python2.6 |
8283 | ||
8284 | new_CPPFLAGS=${python_includes} | |
8285 | new_LIBS="${python_libs} -lpython2.6" | |
8286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 | |
8287 | $as_echo_n "checking for ${version}... " >&6; } | |
8288 | save_CPPFLAGS=$CPPFLAGS | |
8289 | save_LIBS=$LIBS | |
8290 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" | |
8291 | LIBS="$LIBS $new_LIBS" | |
8292 | found_usable_python=no | |
8293 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8294 | /* end confdefs.h. */ | |
ac534cba | 8295 | #include "Python.h" |
ec685c5e DE |
8296 | int |
8297 | main () | |
8298 | { | |
8299 | Py_Initialize (); | |
8300 | ; | |
8301 | return 0; | |
8302 | } | |
8303 | _ACEOF | |
8304 | if ac_fn_c_try_link "$LINENO"; then : | |
8305 | have_libpython=${version} | |
8306 | found_usable_python=yes | |
ac534cba JB |
8307 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8308 | PYTHON_LIBS=$new_LIBS | |
ec685c5e DE |
8309 | fi |
8310 | rm -f core conftest.err conftest.$ac_objext \ | |
8311 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8312 | CPPFLAGS=$save_CPPFLAGS |
8313 | LIBS=$save_LIBS | |
ec685c5e DE |
8314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8315 | $as_echo "${found_usable_python}" >&6; } | |
9a156167 | 8316 | |
81ecdfbb | 8317 | fi |
ec685c5e | 8318 | if test ${have_libpython} = no; then |
9a156167 | 8319 | |
81ecdfbb | 8320 | version=python2.5 |
9a156167 | 8321 | |
ec685c5e DE |
8322 | new_CPPFLAGS=${python_includes} |
8323 | new_LIBS="${python_libs} -lpython2.5" | |
81ecdfbb RW |
8324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8325 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8326 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8327 | save_LIBS=$LIBS |
ec685c5e DE |
8328 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8329 | LIBS="$LIBS $new_LIBS" | |
8330 | found_usable_python=no | |
81ecdfbb | 8331 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8332 | /* end confdefs.h. */ |
ac534cba | 8333 | #include "Python.h" |
81ecdfbb RW |
8334 | int |
8335 | main () | |
8336 | { | |
8337 | Py_Initialize (); | |
8338 | ; | |
8339 | return 0; | |
8340 | } | |
436868fb | 8341 | _ACEOF |
81ecdfbb | 8342 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8343 | have_libpython=${version} |
8344 | found_usable_python=yes | |
ac534cba JB |
8345 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8346 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8347 | fi |
81ecdfbb RW |
8348 | rm -f core conftest.err conftest.$ac_objext \ |
8349 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8350 | CPPFLAGS=$save_CPPFLAGS |
8351 | LIBS=$save_LIBS | |
ec685c5e DE |
8352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8353 | $as_echo "${found_usable_python}" >&6; } | |
a9322a30 | 8354 | |
81ecdfbb | 8355 | fi |
ec685c5e | 8356 | if test ${have_libpython} = no; then |
a9322a30 | 8357 | |
81ecdfbb | 8358 | version=python2.4 |
a9322a30 | 8359 | |
ec685c5e DE |
8360 | new_CPPFLAGS=${python_includes} |
8361 | new_LIBS="${python_libs} -lpython2.4" | |
81ecdfbb RW |
8362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${version}" >&5 |
8363 | $as_echo_n "checking for ${version}... " >&6; } | |
ec685c5e | 8364 | save_CPPFLAGS=$CPPFLAGS |
81ecdfbb | 8365 | save_LIBS=$LIBS |
ec685c5e DE |
8366 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
8367 | LIBS="$LIBS $new_LIBS" | |
8368 | found_usable_python=no | |
81ecdfbb | 8369 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
436868fb | 8370 | /* end confdefs.h. */ |
ac534cba | 8371 | #include "Python.h" |
a9322a30 TT |
8372 | int |
8373 | main () | |
8374 | { | |
81ecdfbb | 8375 | Py_Initialize (); |
a9322a30 TT |
8376 | ; |
8377 | return 0; | |
8378 | } | |
436868fb | 8379 | _ACEOF |
81ecdfbb | 8380 | if ac_fn_c_try_link "$LINENO"; then : |
ec685c5e DE |
8381 | have_libpython=${version} |
8382 | found_usable_python=yes | |
ac534cba JB |
8383 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
8384 | PYTHON_LIBS=$new_LIBS | |
436868fb | 8385 | fi |
81ecdfbb RW |
8386 | rm -f core conftest.err conftest.$ac_objext \ |
8387 | conftest$ac_exeext conftest.$ac_ext | |
ac534cba JB |
8388 | CPPFLAGS=$save_CPPFLAGS |
8389 | LIBS=$save_LIBS | |
ec685c5e DE |
8390 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
8391 | $as_echo "${found_usable_python}" >&6; } | |
81ecdfbb | 8392 | |
ec685c5e DE |
8393 | fi |
8394 | fi | |
9c4ea6c5 | 8395 | if test "${have_libpython}" = python2.7 -o "${have_libpython}" = python27; then |
11763c18 TT |
8396 | |
8397 | $as_echo "#define HAVE_LIBPYTHON2_7 1" >>confdefs.h | |
8398 | ||
9c4ea6c5 | 8399 | elif test "${have_libpython}" = python2.6 -o "${have_libpython}" = python26; then |
ec685c5e DE |
8400 | |
8401 | $as_echo "#define HAVE_LIBPYTHON2_6 1" >>confdefs.h | |
8402 | ||
9c4ea6c5 | 8403 | elif test "${have_libpython}" = python2.5 -o "${have_libpython}" = python25; then |
ec685c5e DE |
8404 | |
8405 | $as_echo "#define HAVE_LIBPYTHON2_5 1" >>confdefs.h | |
8406 | ||
9c4ea6c5 | 8407 | elif test "${have_libpython}" = python2.4 -o "${have_libpython}" = python24; then |
81ecdfbb RW |
8408 | |
8409 | $as_echo "#define HAVE_LIBPYTHON2_4 1" >>confdefs.h | |
8410 | ||
81ecdfbb | 8411 | fi |
ec685c5e DE |
8412 | |
8413 | if test "${have_libpython}" = no; then | |
81ecdfbb RW |
8414 | case "${with_python}" in |
8415 | yes) | |
8416 | as_fn_error "python is missing or unusable" "$LINENO" 5 | |
8417 | ;; | |
8418 | auto) | |
8419 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
8420 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
8421 | ;; | |
8422 | *) | |
8423 | as_fn_error "no usable python found at ${with_python}" "$LINENO" 5 | |
8424 | ;; | |
8425 | esac | |
0c4a4063 DE |
8426 | else |
8427 | if test -n "${python_prefix}"; then | |
8428 | ||
8429 | cat >>confdefs.h <<_ACEOF | |
8430 | #define WITH_PYTHON_PATH "${python_prefix}" | |
8431 | _ACEOF | |
8432 | ||
8433 | ||
8434 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
8435 | if test "x$prefix" = xNONE; then | |
8436 | test_prefix=/usr/local | |
8437 | else | |
8438 | test_prefix=$prefix | |
8439 | fi | |
8440 | else | |
8441 | test_prefix=$exec_prefix | |
8442 | fi | |
8443 | value=0 | |
8444 | case ${python_prefix} in | |
8445 | "${test_prefix}"|"${test_prefix}/"*|\ | |
8446 | '${exec_prefix}'|'${exec_prefix}/'*) | |
8447 | value=1 | |
8448 | ;; | |
8449 | esac | |
8450 | ||
8451 | cat >>confdefs.h <<_ACEOF | |
8452 | #define PYTHON_PATH_RELOCATABLE $value | |
8453 | _ACEOF | |
8454 | ||
8455 | ||
8456 | fi | |
81ecdfbb | 8457 | fi |
436868fb | 8458 | fi |
436868fb | 8459 | |
ec685c5e | 8460 | if test "${have_libpython}" != no; then |
436868fb | 8461 | |
81ecdfbb | 8462 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
436868fb | 8463 | |
81ecdfbb RW |
8464 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
8465 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
8466 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
94f7449c | 8467 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
81ecdfbb | 8468 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
436868fb | 8469 | |
81ecdfbb RW |
8470 | # Flags needed to compile Python code (taken from python-config --cflags). |
8471 | # We cannot call python-config directly because it will output whatever was | |
8472 | # used when compiling the Python interpreter itself, including flags which | |
8473 | # would make the python-related objects be compiled differently from the | |
8474 | # rest of GDB (e.g., -O2 and -fPIC). | |
8475 | if test "${GCC}" = yes; then | |
8476 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
8477 | fi | |
436868fb | 8478 | |
81ecdfbb RW |
8479 | if test "x${tentative_python_cflags}" != x; then |
8480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 | |
8481 | $as_echo_n "checking compiler flags for python code... " >&6; } | |
8482 | for flag in ${tentative_python_cflags}; do | |
8483 | # Check that the compiler accepts it | |
8484 | saved_CFLAGS="$CFLAGS" | |
8485 | CFLAGS="$CFLAGS $flag" | |
8486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8487 | /* end confdefs.h. */ |
81ecdfbb | 8488 | |
a9322a30 TT |
8489 | int |
8490 | main () | |
8491 | { | |
a9322a30 TT |
8492 | |
8493 | ; | |
8494 | return 0; | |
8495 | } | |
bec39cab | 8496 | _ACEOF |
81ecdfbb RW |
8497 | if ac_fn_c_try_compile "$LINENO"; then : |
8498 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
bec39cab | 8499 | fi |
81ecdfbb RW |
8500 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8501 | CFLAGS="$saved_CFLAGS" | |
8502 | done | |
8503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 | |
8504 | $as_echo "${PYTHON_CFLAGS}" >&6; } | |
8505 | fi | |
043b6510 JB |
8506 | |
8507 | # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides: | |
8508 | # #if _SGIAPI | |
8509 | # #define siginfo __siginfo | |
8510 | # #endif | |
8511 | # The problem is that including Python causes some XOPEN macros to be | |
8512 | # unilaterally defined, and that in turn causes _SGIAPI to evaluate | |
8513 | # to false. So, we work around this issue by defining siginfo ourself | |
8514 | # though the command-line. | |
8515 | case "$gdb_host" in | |
8516 | irix*) if test "${GCC}" = yes; then | |
8517 | CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo" | |
8518 | fi | |
8519 | ;; | |
8520 | esac | |
81ecdfbb RW |
8521 | else |
8522 | # Even if Python support is not compiled in, we need to have these files | |
88a1906b DE |
8523 | # included. |
8524 | CONFIG_OBS="$CONFIG_OBS python.o py-value.o py-prettyprint.o py-auto-load.o" | |
8525 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/py-value.c \ | |
8526 | python/py-prettyprint.c python/py-auto-load.c" | |
a9322a30 | 8527 | fi |
9a156167 | 8528 | |
9a156167 | 8529 | |
ac534cba JB |
8530 | |
8531 | ||
81ecdfbb RW |
8532 | # ------------------------- # |
8533 | # Checks for header files. # | |
8534 | # ------------------------- # | |
c890192f | 8535 | |
81ecdfbb RW |
8536 | ac_header_dirent=no |
8537 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
8538 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
8539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
8540 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } | |
8541 | if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : | |
8542 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8543 | else |
81ecdfbb | 8544 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8545 | /* end confdefs.h. */ |
81ecdfbb RW |
8546 | #include <sys/types.h> |
8547 | #include <$ac_hdr> | |
8548 | ||
a9322a30 TT |
8549 | int |
8550 | main () | |
8551 | { | |
81ecdfbb RW |
8552 | if ((DIR *) 0) |
8553 | return 0; | |
a9322a30 TT |
8554 | ; |
8555 | return 0; | |
8556 | } | |
bec39cab | 8557 | _ACEOF |
81ecdfbb RW |
8558 | if ac_fn_c_try_compile "$LINENO"; then : |
8559 | eval "$as_ac_Header=yes" | |
bec39cab | 8560 | else |
81ecdfbb | 8561 | eval "$as_ac_Header=no" |
bec39cab | 8562 | fi |
81ecdfbb | 8563 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 8564 | fi |
81ecdfbb RW |
8565 | eval ac_res=\$$as_ac_Header |
8566 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
8567 | $as_echo "$ac_res" >&6; } | |
8568 | eval as_val=\$$as_ac_Header | |
8569 | if test "x$as_val" = x""yes; then : | |
8570 | cat >>confdefs.h <<_ACEOF | |
8571 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
bec39cab | 8572 | _ACEOF |
bec39cab | 8573 | |
81ecdfbb RW |
8574 | ac_header_dirent=$ac_hdr; break |
8575 | fi | |
bec39cab | 8576 | |
81ecdfbb RW |
8577 | done |
8578 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
8579 | if test $ac_header_dirent = dirent.h; then | |
8580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
8581 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8582 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8583 | $as_echo_n "(cached) " >&6 | |
c890192f | 8584 | else |
81ecdfbb RW |
8585 | ac_func_search_save_LIBS=$LIBS |
8586 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8587 | /* end confdefs.h. */ | |
8588 | ||
8589 | /* Override any GCC internal prototype to avoid an error. | |
8590 | Use char because int might match the return type of a GCC | |
8591 | builtin and then its argument prototype would still apply. */ | |
8592 | #ifdef __cplusplus | |
8593 | extern "C" | |
8594 | #endif | |
8595 | char opendir (); | |
8596 | int | |
8597 | main () | |
8598 | { | |
8599 | return opendir (); | |
8600 | ; | |
8601 | return 0; | |
8602 | } | |
bec39cab | 8603 | _ACEOF |
81ecdfbb RW |
8604 | for ac_lib in '' dir; do |
8605 | if test -z "$ac_lib"; then | |
8606 | ac_res="none required" | |
8607 | else | |
8608 | ac_res=-l$ac_lib | |
8609 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8610 | fi | |
8611 | if ac_fn_c_try_link "$LINENO"; then : | |
8612 | ac_cv_search_opendir=$ac_res | |
8613 | fi | |
8614 | rm -f core conftest.err conftest.$ac_objext \ | |
8615 | conftest$ac_exeext | |
8616 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8617 | break | |
8618 | fi | |
8619 | done | |
8620 | if test "${ac_cv_search_opendir+set}" = set; then : | |
c890192f | 8621 | |
81ecdfbb RW |
8622 | else |
8623 | ac_cv_search_opendir=no | |
8624 | fi | |
8625 | rm conftest.$ac_ext | |
8626 | LIBS=$ac_func_search_save_LIBS | |
8627 | fi | |
8628 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
8629 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8630 | ac_res=$ac_cv_search_opendir | |
8631 | if test "$ac_res" != no; then : | |
8632 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8633 | |
bec39cab | 8634 | fi |
81ecdfbb | 8635 | |
bec39cab | 8636 | else |
81ecdfbb RW |
8637 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
8638 | $as_echo_n "checking for library containing opendir... " >&6; } | |
8639 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8640 | $as_echo_n "(cached) " >&6 | |
8641 | else | |
8642 | ac_func_search_save_LIBS=$LIBS | |
8643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 8644 | /* end confdefs.h. */ |
81ecdfbb RW |
8645 | |
8646 | /* Override any GCC internal prototype to avoid an error. | |
8647 | Use char because int might match the return type of a GCC | |
8648 | builtin and then its argument prototype would still apply. */ | |
8649 | #ifdef __cplusplus | |
8650 | extern "C" | |
8651 | #endif | |
8652 | char opendir (); | |
a9322a30 TT |
8653 | int |
8654 | main () | |
8655 | { | |
81ecdfbb | 8656 | return opendir (); |
a9322a30 TT |
8657 | ; |
8658 | return 0; | |
8659 | } | |
bec39cab | 8660 | _ACEOF |
81ecdfbb RW |
8661 | for ac_lib in '' x; do |
8662 | if test -z "$ac_lib"; then | |
8663 | ac_res="none required" | |
8664 | else | |
8665 | ac_res=-l$ac_lib | |
8666 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8667 | fi | |
8668 | if ac_fn_c_try_link "$LINENO"; then : | |
8669 | ac_cv_search_opendir=$ac_res | |
8670 | fi | |
8671 | rm -f core conftest.err conftest.$ac_objext \ | |
8672 | conftest$ac_exeext | |
8673 | if test "${ac_cv_search_opendir+set}" = set; then : | |
8674 | break | |
8675 | fi | |
8676 | done | |
8677 | if test "${ac_cv_search_opendir+set}" = set; then : | |
bec39cab | 8678 | |
81ecdfbb RW |
8679 | else |
8680 | ac_cv_search_opendir=no | |
bec39cab | 8681 | fi |
81ecdfbb RW |
8682 | rm conftest.$ac_ext |
8683 | LIBS=$ac_func_search_save_LIBS | |
a9322a30 | 8684 | fi |
81ecdfbb RW |
8685 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
8686 | $as_echo "$ac_cv_search_opendir" >&6; } | |
8687 | ac_res=$ac_cv_search_opendir | |
8688 | if test "$ac_res" != no; then : | |
8689 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
bec39cab | 8690 | |
81ecdfbb | 8691 | fi |
bec39cab | 8692 | |
81ecdfbb | 8693 | fi |
bec39cab | 8694 | |
81ecdfbb RW |
8695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 |
8696 | $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } | |
8697 | if test "${ac_cv_header_stat_broken+set}" = set; then : | |
8698 | $as_echo_n "(cached) " >&6 | |
9a156167 | 8699 | else |
81ecdfbb RW |
8700 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
8701 | /* end confdefs.h. */ | |
8702 | #include <sys/types.h> | |
8703 | #include <sys/stat.h> | |
8704 | ||
8705 | #if defined S_ISBLK && defined S_IFDIR | |
8706 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
8707 | #endif | |
8708 | ||
8709 | #if defined S_ISBLK && defined S_IFCHR | |
8710 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
8711 | #endif | |
8712 | ||
8713 | #if defined S_ISLNK && defined S_IFREG | |
8714 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
8715 | #endif | |
8716 | ||
8717 | #if defined S_ISSOCK && defined S_IFREG | |
8718 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
8719 | #endif | |
8720 | ||
bec39cab | 8721 | _ACEOF |
81ecdfbb RW |
8722 | if ac_fn_c_try_compile "$LINENO"; then : |
8723 | ac_cv_header_stat_broken=no | |
8724 | else | |
8725 | ac_cv_header_stat_broken=yes | |
8726 | fi | |
8727 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
8728 | fi | |
8729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
8730 | $as_echo "$ac_cv_header_stat_broken" >&6; } | |
8731 | if test $ac_cv_header_stat_broken = yes; then | |
9a156167 | 8732 | |
81ecdfbb | 8733 | $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h |
06825bd1 | 8734 | |
bec39cab | 8735 | fi |
81ecdfbb RW |
8736 | |
8737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
8738 | $as_echo_n "checking for ANSI C header files... " >&6; } | |
8739 | if test "${ac_cv_header_stdc+set}" = set; then : | |
8740 | $as_echo_n "(cached) " >&6 | |
bec39cab | 8741 | else |
81ecdfbb | 8742 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8743 | /* end confdefs.h. */ |
81ecdfbb RW |
8744 | #include <stdlib.h> |
8745 | #include <stdarg.h> | |
8746 | #include <string.h> | |
8747 | #include <float.h> | |
8748 | ||
a9322a30 TT |
8749 | int |
8750 | main () | |
8751 | { | |
a9322a30 TT |
8752 | |
8753 | ; | |
8754 | return 0; | |
8755 | } | |
bec39cab | 8756 | _ACEOF |
81ecdfbb RW |
8757 | if ac_fn_c_try_compile "$LINENO"; then : |
8758 | ac_cv_header_stdc=yes | |
bec39cab | 8759 | else |
81ecdfbb | 8760 | ac_cv_header_stdc=no |
a9322a30 | 8761 | fi |
81ecdfbb | 8762 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8763 | |
81ecdfbb RW |
8764 | if test $ac_cv_header_stdc = yes; then |
8765 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
8766 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8767 | /* end confdefs.h. */ | |
8768 | #include <string.h> | |
bec39cab | 8769 | |
81ecdfbb RW |
8770 | _ACEOF |
8771 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
8772 | $EGREP "memchr" >/dev/null 2>&1; then : | |
bec39cab | 8773 | |
bec39cab | 8774 | else |
81ecdfbb RW |
8775 | ac_cv_header_stdc=no |
8776 | fi | |
8777 | rm -f conftest* | |
8778 | ||
8779 | fi | |
8780 | ||
8781 | if test $ac_cv_header_stdc = yes; then | |
8782 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
8783 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8784 | /* end confdefs.h. */ | |
8785 | #include <stdlib.h> | |
8786 | ||
bec39cab | 8787 | _ACEOF |
81ecdfbb RW |
8788 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
8789 | $EGREP "free" >/dev/null 2>&1; then : | |
06825bd1 | 8790 | |
81ecdfbb RW |
8791 | else |
8792 | ac_cv_header_stdc=no | |
8793 | fi | |
8794 | rm -f conftest* | |
bec39cab | 8795 | |
bec39cab | 8796 | fi |
81ecdfbb RW |
8797 | |
8798 | if test $ac_cv_header_stdc = yes; then | |
8799 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
8800 | if test "$cross_compiling" = yes; then : | |
8801 | : | |
bec39cab | 8802 | else |
81ecdfbb | 8803 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 8804 | /* end confdefs.h. */ |
81ecdfbb RW |
8805 | #include <ctype.h> |
8806 | #include <stdlib.h> | |
8807 | #if ((' ' & 0x0FF) == 0x020) | |
8808 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8809 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8810 | #else | |
8811 | # define ISLOWER(c) \ | |
8812 | (('a' <= (c) && (c) <= 'i') \ | |
8813 | || ('j' <= (c) && (c) <= 'r') \ | |
8814 | || ('s' <= (c) && (c) <= 'z')) | |
8815 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
8816 | #endif | |
8817 | ||
8818 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
a9322a30 TT |
8819 | int |
8820 | main () | |
8821 | { | |
81ecdfbb RW |
8822 | int i; |
8823 | for (i = 0; i < 256; i++) | |
8824 | if (XOR (islower (i), ISLOWER (i)) | |
8825 | || toupper (i) != TOUPPER (i)) | |
8826 | return 2; | |
a9322a30 TT |
8827 | return 0; |
8828 | } | |
bec39cab | 8829 | _ACEOF |
81ecdfbb RW |
8830 | if ac_fn_c_try_run "$LINENO"; then : |
8831 | ||
bec39cab | 8832 | else |
81ecdfbb RW |
8833 | ac_cv_header_stdc=no |
8834 | fi | |
8835 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
8836 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
8837 | fi | |
bec39cab | 8838 | |
bec39cab | 8839 | fi |
a9322a30 | 8840 | fi |
81ecdfbb RW |
8841 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
8842 | $as_echo "$ac_cv_header_stdc" >&6; } | |
8843 | if test $ac_cv_header_stdc = yes; then | |
bec39cab | 8844 | |
81ecdfbb | 8845 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
5ee754fc | 8846 | |
81ecdfbb | 8847 | fi |
bec39cab | 8848 | |
81ecdfbb RW |
8849 | # elf_hp.h is for HP/UX 64-bit shared library support. |
8850 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
8851 | # unconditionally, so what's the point in checking these? | |
8852 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
8853 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
8854 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
8855 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
8856 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
8857 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
8858 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
a2d08b9e | 8859 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h \ |
2fa291ac | 8860 | dlfcn.h sys/socket.h sys/un.h |
81ecdfbb RW |
8861 | do : |
8862 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8863 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8864 | eval as_val=\$$as_ac_Header | |
8865 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8866 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8867 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8868 | _ACEOF |
c906108c | 8869 | |
bec39cab | 8870 | fi |
81ecdfbb RW |
8871 | |
8872 | done | |
8873 | ||
8874 | for ac_header in link.h | |
8875 | do : | |
8876 | ac_fn_c_check_header_compile "$LINENO" "link.h" "ac_cv_header_link_h" "#if HAVE_SYS_TYPES_H | |
8877 | # include <sys/types.h> | |
8878 | #endif | |
8879 | #if HAVE_NLIST_H | |
8880 | # include <nlist.h> | |
a9322a30 TT |
8881 | #endif |
8882 | ||
81ecdfbb RW |
8883 | " |
8884 | if test "x$ac_cv_header_link_h" = x""yes; then : | |
8885 | cat >>confdefs.h <<_ACEOF | |
8886 | #define HAVE_LINK_H 1 | |
bec39cab | 8887 | _ACEOF |
bec39cab | 8888 | |
a9322a30 | 8889 | fi |
bec39cab | 8890 | |
81ecdfbb | 8891 | done |
c906108c | 8892 | |
81ecdfbb RW |
8893 | for ac_header in sys/proc.h |
8894 | do : | |
8895 | ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "#if HAVE_SYS_PARAM_H | |
8896 | # include <sys/param.h> | |
8897 | #endif | |
c906108c | 8898 | |
81ecdfbb RW |
8899 | " |
8900 | if test "x$ac_cv_header_sys_proc_h" = x""yes; then : | |
bec39cab | 8901 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8902 | #define HAVE_SYS_PROC_H 1 |
bec39cab | 8903 | _ACEOF |
5ee754fc | 8904 | |
bec39cab | 8905 | fi |
81ecdfbb RW |
8906 | |
8907 | done | |
8908 | ||
8909 | for ac_header in sys/user.h | |
8910 | do : | |
8911 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H | |
8912 | # include <sys/param.h> | |
a9322a30 TT |
8913 | #endif |
8914 | ||
81ecdfbb RW |
8915 | " |
8916 | if test "x$ac_cv_header_sys_user_h" = x""yes; then : | |
8917 | cat >>confdefs.h <<_ACEOF | |
8918 | #define HAVE_SYS_USER_H 1 | |
bec39cab | 8919 | _ACEOF |
bec39cab | 8920 | |
a9322a30 | 8921 | fi |
bec39cab | 8922 | |
81ecdfbb | 8923 | done |
5ee754fc | 8924 | |
5ee754fc | 8925 | |
81ecdfbb RW |
8926 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash |
8927 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
8928 | # think that we don't have <curses.h> if we're using GCC. | |
8929 | case $host_os in | |
8930 | solaris2.[789]) | |
8931 | if test "$GCC" = yes; then | |
8932 | ||
8933 | $as_echo "#define _MSE_INT_H 1" >>confdefs.h | |
8934 | ||
8935 | fi ;; | |
8936 | esac | |
8937 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h | |
8938 | do : | |
8939 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8940 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
8941 | eval as_val=\$$as_ac_Header | |
8942 | if test "x$as_val" = x""yes; then : | |
bec39cab | 8943 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 8944 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 8945 | _ACEOF |
5ee754fc MK |
8946 | |
8947 | fi | |
8948 | ||
81ecdfbb | 8949 | done |
bec39cab | 8950 | |
81ecdfbb RW |
8951 | for ac_header in term.h |
8952 | do : | |
8953 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H | |
8954 | # include <curses.h> | |
8955 | #endif | |
bec39cab | 8956 | |
81ecdfbb RW |
8957 | " |
8958 | if test "x$ac_cv_header_term_h" = x""yes; then : | |
8959 | cat >>confdefs.h <<_ACEOF | |
8960 | #define HAVE_TERM_H 1 | |
a8111142 | 8961 | _ACEOF |
a8111142 | 8962 | |
a8111142 | 8963 | fi |
a8111142 | 8964 | |
81ecdfbb | 8965 | done |
a8111142 TT |
8966 | |
8967 | ||
81ecdfbb RW |
8968 | # ------------------------- # |
8969 | # Checks for declarations. # | |
8970 | # ------------------------- # | |
a9322a30 | 8971 | |
81ecdfbb RW |
8972 | ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" |
8973 | if test "x$ac_cv_have_decl_free" = x""yes; then : | |
8974 | ac_have_decl=1 | |
bec39cab | 8975 | else |
81ecdfbb RW |
8976 | ac_have_decl=0 |
8977 | fi | |
8978 | ||
8979 | cat >>confdefs.h <<_ACEOF | |
8980 | #define HAVE_DECL_FREE $ac_have_decl | |
bec39cab | 8981 | _ACEOF |
81ecdfbb RW |
8982 | ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" |
8983 | if test "x$ac_cv_have_decl_malloc" = x""yes; then : | |
8984 | ac_have_decl=1 | |
8985 | else | |
8986 | ac_have_decl=0 | |
8987 | fi | |
8988 | ||
8989 | cat >>confdefs.h <<_ACEOF | |
8990 | #define HAVE_DECL_MALLOC $ac_have_decl | |
bec39cab | 8991 | _ACEOF |
81ecdfbb RW |
8992 | ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" |
8993 | if test "x$ac_cv_have_decl_realloc" = x""yes; then : | |
8994 | ac_have_decl=1 | |
bec39cab | 8995 | else |
81ecdfbb RW |
8996 | ac_have_decl=0 |
8997 | fi | |
bec39cab | 8998 | |
81ecdfbb RW |
8999 | cat >>confdefs.h <<_ACEOF |
9000 | #define HAVE_DECL_REALLOC $ac_have_decl | |
bec39cab | 9001 | _ACEOF |
81ecdfbb RW |
9002 | ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" |
9003 | if test "x$ac_cv_have_decl_strerror" = x""yes; then : | |
9004 | ac_have_decl=1 | |
9005 | else | |
9006 | ac_have_decl=0 | |
9007 | fi | |
9008 | ||
9009 | cat >>confdefs.h <<_ACEOF | |
9010 | #define HAVE_DECL_STRERROR $ac_have_decl | |
bec39cab | 9011 | _ACEOF |
81ecdfbb RW |
9012 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
9013 | if test "x$ac_cv_have_decl_strstr" = x""yes; then : | |
9014 | ac_have_decl=1 | |
bec39cab | 9015 | else |
81ecdfbb RW |
9016 | ac_have_decl=0 |
9017 | fi | |
5ee754fc | 9018 | |
81ecdfbb RW |
9019 | cat >>confdefs.h <<_ACEOF |
9020 | #define HAVE_DECL_STRSTR $ac_have_decl | |
9021 | _ACEOF | |
9022 | ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default" | |
9023 | if test "x$ac_cv_have_decl_getopt" = x""yes; then : | |
9024 | ac_have_decl=1 | |
9025 | else | |
9026 | ac_have_decl=0 | |
5ee754fc | 9027 | fi |
81ecdfbb RW |
9028 | |
9029 | cat >>confdefs.h <<_ACEOF | |
9030 | #define HAVE_DECL_GETOPT $ac_have_decl | |
9031 | _ACEOF | |
9032 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" | |
9033 | if test "x$ac_cv_have_decl_snprintf" = x""yes; then : | |
9034 | ac_have_decl=1 | |
9035 | else | |
9036 | ac_have_decl=0 | |
5ee754fc | 9037 | fi |
81ecdfbb RW |
9038 | |
9039 | cat >>confdefs.h <<_ACEOF | |
9040 | #define HAVE_DECL_SNPRINTF $ac_have_decl | |
9041 | _ACEOF | |
9042 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" | |
9043 | if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : | |
9044 | ac_have_decl=1 | |
9045 | else | |
9046 | ac_have_decl=0 | |
5ee754fc MK |
9047 | fi |
9048 | ||
a9322a30 | 9049 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9050 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
a9322a30 | 9051 | _ACEOF |
5ee754fc | 9052 | |
5ee754fc | 9053 | |
81ecdfbb RW |
9054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
9055 | $as_echo_n "checking for LC_MESSAGES... " >&6; } | |
9056 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then : | |
9057 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9058 | else |
81ecdfbb | 9059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9060 | /* end confdefs.h. */ |
81ecdfbb | 9061 | #include <locale.h> |
a9322a30 TT |
9062 | int |
9063 | main () | |
9064 | { | |
81ecdfbb | 9065 | return LC_MESSAGES |
a9322a30 TT |
9066 | ; |
9067 | return 0; | |
9068 | } | |
bec39cab | 9069 | _ACEOF |
81ecdfbb RW |
9070 | if ac_fn_c_try_link "$LINENO"; then : |
9071 | am_cv_val_LC_MESSAGES=yes | |
bec39cab | 9072 | else |
81ecdfbb RW |
9073 | am_cv_val_LC_MESSAGES=no |
9074 | fi | |
9075 | rm -f core conftest.err conftest.$ac_objext \ | |
9076 | conftest$ac_exeext conftest.$ac_ext | |
9077 | fi | |
9078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 | |
9079 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } | |
9080 | if test $am_cv_val_LC_MESSAGES = yes; then | |
bec39cab | 9081 | |
81ecdfbb RW |
9082 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
9083 | ||
9084 | fi | |
9085 | ||
9086 | ||
9087 | # ----------------------- # | |
9088 | # Checks for structures. # | |
9089 | # ----------------------- # | |
9090 | ||
9091 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
9092 | if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : | |
9093 | ||
9094 | cat >>confdefs.h <<_ACEOF | |
9095 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
7eb368b3 | 9096 | _ACEOF |
7eb368b3 | 9097 | |
81ecdfbb | 9098 | |
7eb368b3 | 9099 | fi |
81ecdfbb RW |
9100 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
9101 | if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : | |
7eb368b3 | 9102 | |
a9322a30 TT |
9103 | cat >>confdefs.h <<_ACEOF |
9104 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
9105 | _ACEOF |
9106 | ||
a9322a30 | 9107 | |
7eb368b3 NR |
9108 | fi |
9109 | ||
7eb368b3 | 9110 | |
a9322a30 TT |
9111 | # ------------------ # |
9112 | # Checks for types. # | |
9113 | # ------------------ # | |
7eb368b3 | 9114 | |
81ecdfbb RW |
9115 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
9116 | $as_echo_n "checking return type of signal handlers... " >&6; } | |
9117 | if test "${ac_cv_type_signal+set}" = set; then : | |
9118 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9119 | else |
81ecdfbb | 9120 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9121 | /* end confdefs.h. */ |
a9322a30 TT |
9122 | #include <sys/types.h> |
9123 | #include <signal.h> | |
7cb9022a | 9124 | |
a9322a30 TT |
9125 | int |
9126 | main () | |
9127 | { | |
81ecdfbb | 9128 | return *(signal (0, 0)) (0) == 1; |
a9322a30 TT |
9129 | ; |
9130 | return 0; | |
9131 | } | |
bec39cab | 9132 | _ACEOF |
81ecdfbb RW |
9133 | if ac_fn_c_try_compile "$LINENO"; then : |
9134 | ac_cv_type_signal=int | |
bec39cab | 9135 | else |
81ecdfbb | 9136 | ac_cv_type_signal=void |
bec39cab | 9137 | fi |
81ecdfbb | 9138 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9139 | fi |
81ecdfbb RW |
9140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 |
9141 | $as_echo "$ac_cv_type_signal" >&6; } | |
bec39cab | 9142 | |
a9322a30 TT |
9143 | cat >>confdefs.h <<_ACEOF |
9144 | #define RETSIGTYPE $ac_cv_type_signal | |
9145 | _ACEOF | |
5ee754fc | 9146 | |
bec39cab | 9147 | |
81ecdfbb | 9148 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
a9322a30 TT |
9149 | #include <sys/socket.h> |
9150 | ||
81ecdfbb RW |
9151 | " |
9152 | if test "x$ac_cv_type_socklen_t" = x""yes; then : | |
bec39cab | 9153 | |
a9322a30 TT |
9154 | cat >>confdefs.h <<_ACEOF |
9155 | #define HAVE_SOCKLEN_T 1 | |
9156 | _ACEOF | |
9157 | ||
9158 | ||
9159 | fi | |
9160 | ||
9161 | ||
9162 | # ------------------------------------- # | |
9163 | # Checks for compiler characteristics. # | |
9164 | # ------------------------------------- # | |
9165 | ||
81ecdfbb RW |
9166 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
9167 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } | |
9168 | if test "${ac_cv_c_const+set}" = set; then : | |
9169 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9170 | else |
81ecdfbb | 9171 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9172 | /* end confdefs.h. */ |
a9322a30 TT |
9173 | |
9174 | int | |
9175 | main () | |
9176 | { | |
9177 | /* FIXME: Include the comments suggested by Paul. */ | |
9178 | #ifndef __cplusplus | |
9179 | /* Ultrix mips cc rejects this. */ | |
9180 | typedef int charset[2]; | |
81ecdfbb | 9181 | const charset cs; |
a9322a30 | 9182 | /* SunOS 4.1.1 cc rejects this. */ |
81ecdfbb RW |
9183 | char const *const *pcpcc; |
9184 | char **ppc; | |
a9322a30 TT |
9185 | /* NEC SVR4.0.2 mips cc rejects this. */ |
9186 | struct point {int x, y;}; | |
9187 | static struct point const zero = {0,0}; | |
9188 | /* AIX XL C 1.02.0.0 rejects this. | |
9189 | It does not let you subtract one const X* pointer from another in | |
9190 | an arm of an if-expression whose if-part is not a constant | |
9191 | expression */ | |
9192 | const char *g = "string"; | |
81ecdfbb | 9193 | pcpcc = &g + (g ? g-g : 0); |
a9322a30 | 9194 | /* HPUX 7.0 cc rejects these. */ |
81ecdfbb RW |
9195 | ++pcpcc; |
9196 | ppc = (char**) pcpcc; | |
9197 | pcpcc = (char const *const *) ppc; | |
a9322a30 TT |
9198 | { /* SCO 3.2v4 cc rejects this. */ |
9199 | char *t; | |
9200 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
9201 | ||
9202 | *t++ = 0; | |
81ecdfbb | 9203 | if (s) return 0; |
a9322a30 TT |
9204 | } |
9205 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
9206 | int x[] = {25, 17}; | |
9207 | const int *foo = &x[0]; | |
9208 | ++foo; | |
9209 | } | |
9210 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
9211 | typedef const int *iptr; | |
9212 | iptr p = 0; | |
9213 | ++p; | |
9214 | } | |
9215 | { /* AIX XL C 1.02.0.0 rejects this saying | |
9216 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
9217 | struct s { int j; const int *ap[3]; }; | |
9218 | struct s *b; b->j = 5; | |
9219 | } | |
9220 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
9221 | const int foo = 10; | |
81ecdfbb | 9222 | if (!foo) return 0; |
a9322a30 | 9223 | } |
81ecdfbb | 9224 | return !cs[0] && !zero.x; |
a9322a30 TT |
9225 | #endif |
9226 | ||
9227 | ; | |
9228 | return 0; | |
9229 | } | |
bec39cab | 9230 | _ACEOF |
81ecdfbb | 9231 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9232 | ac_cv_c_const=yes |
5ee754fc | 9233 | else |
81ecdfbb | 9234 | ac_cv_c_const=no |
5ee754fc | 9235 | fi |
81ecdfbb | 9236 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 9237 | fi |
81ecdfbb RW |
9238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
9239 | $as_echo "$ac_cv_c_const" >&6; } | |
a9322a30 | 9240 | if test $ac_cv_c_const = no; then |
bec39cab | 9241 | |
81ecdfbb | 9242 | $as_echo "#define const /**/" >>confdefs.h |
bec39cab | 9243 | |
5ee754fc | 9244 | fi |
bec39cab | 9245 | |
81ecdfbb RW |
9246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
9247 | $as_echo_n "checking for inline... " >&6; } | |
9248 | if test "${ac_cv_c_inline+set}" = set; then : | |
9249 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9250 | else |
a9322a30 TT |
9251 | ac_cv_c_inline=no |
9252 | for ac_kw in inline __inline__ __inline; do | |
81ecdfbb | 9253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9254 | /* end confdefs.h. */ |
a9322a30 TT |
9255 | #ifndef __cplusplus |
9256 | typedef int foo_t; | |
9257 | static $ac_kw foo_t static_foo () {return 0; } | |
9258 | $ac_kw foo_t foo () {return 0; } | |
9259 | #endif | |
9260 | ||
bec39cab | 9261 | _ACEOF |
81ecdfbb RW |
9262 | if ac_fn_c_try_compile "$LINENO"; then : |
9263 | ac_cv_c_inline=$ac_kw | |
bec39cab | 9264 | fi |
81ecdfbb RW |
9265 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9266 | test "$ac_cv_c_inline" != no && break | |
a9322a30 | 9267 | done |
bec39cab | 9268 | |
5ee754fc | 9269 | fi |
81ecdfbb RW |
9270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
9271 | $as_echo "$ac_cv_c_inline" >&6; } | |
5ee754fc | 9272 | |
a9322a30 TT |
9273 | case $ac_cv_c_inline in |
9274 | inline | yes) ;; | |
9275 | *) | |
9276 | case $ac_cv_c_inline in | |
9277 | no) ac_val=;; | |
9278 | *) ac_val=$ac_cv_c_inline;; | |
9279 | esac | |
9280 | cat >>confdefs.h <<_ACEOF | |
9281 | #ifndef __cplusplus | |
9282 | #define inline $ac_val | |
9283 | #endif | |
9284 | _ACEOF | |
bec39cab AC |
9285 | ;; |
9286 | esac | |
bec39cab | 9287 | |
81ecdfbb RW |
9288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
9289 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } | |
9290 | if test "${ac_cv_c_bigendian+set}" = set; then : | |
9291 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9292 | else |
81ecdfbb RW |
9293 | ac_cv_c_bigendian=unknown |
9294 | # See if we're dealing with a universal compiler. | |
9295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9296 | /* end confdefs.h. */ | |
9297 | #ifndef __APPLE_CC__ | |
9298 | not a universal capable compiler | |
9299 | #endif | |
9300 | typedef int dummy; | |
9301 | ||
9302 | _ACEOF | |
9303 | if ac_fn_c_try_compile "$LINENO"; then : | |
9304 | ||
9305 | # Check for potential -arch flags. It is not universal unless | |
9306 | # there are at least two -arch flags with different values. | |
9307 | ac_arch= | |
9308 | ac_prev= | |
9309 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
9310 | if test -n "$ac_prev"; then | |
9311 | case $ac_word in | |
9312 | i?86 | x86_64 | ppc | ppc64) | |
9313 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
9314 | ac_arch=$ac_word | |
9315 | else | |
9316 | ac_cv_c_bigendian=universal | |
9317 | break | |
9318 | fi | |
9319 | ;; | |
9320 | esac | |
9321 | ac_prev= | |
9322 | elif test "x$ac_word" = "x-arch"; then | |
9323 | ac_prev=arch | |
9324 | fi | |
9325 | done | |
9326 | fi | |
9327 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9328 | if test $ac_cv_c_bigendian = unknown; then | |
9329 | # See if sys/param.h defines the BYTE_ORDER macro. | |
9330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 9331 | /* end confdefs.h. */ |
a9322a30 | 9332 | #include <sys/types.h> |
81ecdfbb | 9333 | #include <sys/param.h> |
a9322a30 TT |
9334 | |
9335 | int | |
9336 | main () | |
9337 | { | |
81ecdfbb RW |
9338 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
9339 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ | |
9340 | && LITTLE_ENDIAN) | |
9341 | bogus endian macros | |
9342 | #endif | |
a9322a30 TT |
9343 | |
9344 | ; | |
9345 | return 0; | |
9346 | } | |
bec39cab | 9347 | _ACEOF |
81ecdfbb | 9348 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9349 | # It does; now see whether it defined to BIG_ENDIAN or not. |
81ecdfbb | 9350 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9351 | /* end confdefs.h. */ |
a9322a30 | 9352 | #include <sys/types.h> |
81ecdfbb | 9353 | #include <sys/param.h> |
a9322a30 TT |
9354 | |
9355 | int | |
9356 | main () | |
9357 | { | |
9358 | #if BYTE_ORDER != BIG_ENDIAN | |
81ecdfbb RW |
9359 | not big endian |
9360 | #endif | |
a9322a30 TT |
9361 | |
9362 | ; | |
9363 | return 0; | |
9364 | } | |
bec39cab | 9365 | _ACEOF |
81ecdfbb | 9366 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9367 | ac_cv_c_bigendian=yes |
5ee754fc | 9368 | else |
81ecdfbb | 9369 | ac_cv_c_bigendian=no |
5ee754fc | 9370 | fi |
81ecdfbb RW |
9371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9372 | fi | |
9373 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
9374 | fi | |
9375 | if test $ac_cv_c_bigendian = unknown; then | |
9376 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
9377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9378 | /* end confdefs.h. */ | |
9379 | #include <limits.h> | |
bec39cab | 9380 | |
81ecdfbb RW |
9381 | int |
9382 | main () | |
9383 | { | |
9384 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
9385 | bogus endian macros | |
9386 | #endif | |
9387 | ||
9388 | ; | |
9389 | return 0; | |
9390 | } | |
7eb368b3 | 9391 | _ACEOF |
81ecdfbb RW |
9392 | if ac_fn_c_try_compile "$LINENO"; then : |
9393 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
9394 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7eb368b3 | 9395 | /* end confdefs.h. */ |
81ecdfbb RW |
9396 | #include <limits.h> |
9397 | ||
7eb368b3 NR |
9398 | int |
9399 | main () | |
9400 | { | |
81ecdfbb RW |
9401 | #ifndef _BIG_ENDIAN |
9402 | not big endian | |
9403 | #endif | |
9404 | ||
7eb368b3 NR |
9405 | ; |
9406 | return 0; | |
9407 | } | |
9408 | _ACEOF | |
81ecdfbb | 9409 | if ac_fn_c_try_compile "$LINENO"; then : |
a9322a30 | 9410 | ac_cv_c_bigendian=yes |
81ecdfbb RW |
9411 | else |
9412 | ac_cv_c_bigendian=no | |
a9322a30 | 9413 | fi |
81ecdfbb | 9414 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a9322a30 | 9415 | fi |
81ecdfbb RW |
9416 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
9417 | fi | |
9418 | if test $ac_cv_c_bigendian = unknown; then | |
9419 | # Compile a test program. | |
9420 | if test "$cross_compiling" = yes; then : | |
9421 | # Try to guess by grepping values from an object file. | |
9422 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
9423 | /* end confdefs.h. */ | |
9424 | short int ascii_mm[] = | |
9425 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
9426 | short int ascii_ii[] = | |
9427 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9428 | int use_ascii (int i) { | |
9429 | return ascii_mm[i] + ascii_ii[i]; | |
9430 | } | |
9431 | short int ebcdic_ii[] = | |
9432 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
9433 | short int ebcdic_mm[] = | |
9434 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9435 | int use_ebcdic (int i) { | |
9436 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
9437 | } | |
9438 | extern int foo; | |
7eb368b3 | 9439 | |
81ecdfbb RW |
9440 | int |
9441 | main () | |
9442 | { | |
9443 | return use_ascii (foo) == use_ebcdic (foo); | |
9444 | ; | |
9445 | return 0; | |
9446 | } | |
9447 | _ACEOF | |
9448 | if ac_fn_c_try_compile "$LINENO"; then : | |
9449 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then | |
9450 | ac_cv_c_bigendian=yes | |
9451 | fi | |
9452 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
9453 | if test "$ac_cv_c_bigendian" = unknown; then | |
9454 | ac_cv_c_bigendian=no | |
9455 | else | |
9456 | # finding both strings is unlikely to happen, but who knows? | |
9457 | ac_cv_c_bigendian=unknown | |
9458 | fi | |
9459 | fi | |
7eb368b3 | 9460 | fi |
81ecdfbb | 9461 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 9462 | else |
81ecdfbb | 9463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9464 | /* end confdefs.h. */ |
81ecdfbb | 9465 | $ac_includes_default |
d3ea6809 MM |
9466 | int |
9467 | main () | |
9468 | { | |
81ecdfbb RW |
9469 | |
9470 | /* Are we little or big endian? From Harbison&Steele. */ | |
9471 | union | |
9472 | { | |
9473 | long int l; | |
9474 | char c[sizeof (long int)]; | |
9475 | } u; | |
9476 | u.l = 1; | |
9477 | return u.c[sizeof (long int) - 1] == 1; | |
9478 | ||
9479 | ; | |
9480 | return 0; | |
d3ea6809 MM |
9481 | } |
9482 | _ACEOF | |
81ecdfbb | 9483 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9484 | ac_cv_c_bigendian=no |
d3ea6809 | 9485 | else |
81ecdfbb | 9486 | ac_cv_c_bigendian=yes |
d3ea6809 | 9487 | fi |
81ecdfbb RW |
9488 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9489 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9490 | fi |
a9322a30 | 9491 | |
81ecdfbb RW |
9492 | fi |
9493 | fi | |
9494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
9495 | $as_echo "$ac_cv_c_bigendian" >&6; } | |
9496 | case $ac_cv_c_bigendian in #( | |
9497 | yes) | |
9498 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
9499 | ;; #( | |
9500 | no) | |
9501 | ;; #( | |
9502 | universal) | |
9503 | ||
9504 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
9505 | ||
9506 | ;; #( | |
9507 | *) | |
9508 | as_fn_error "unknown endianness | |
9509 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
9510 | esac | |
d3ea6809 MM |
9511 | |
9512 | ||
a9322a30 TT |
9513 | # ------------------------------ # |
9514 | # Checks for library functions. # | |
9515 | # ------------------------------ # | |
d3ea6809 | 9516 | |
a9322a30 TT |
9517 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
9518 | # for constant arguments. Useless! | |
81ecdfbb RW |
9519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
9520 | $as_echo_n "checking for working alloca.h... " >&6; } | |
9521 | if test "${ac_cv_working_alloca_h+set}" = set; then : | |
9522 | $as_echo_n "(cached) " >&6 | |
d3ea6809 | 9523 | else |
81ecdfbb | 9524 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
d3ea6809 | 9525 | /* end confdefs.h. */ |
a9322a30 | 9526 | #include <alloca.h> |
bec39cab AC |
9527 | int |
9528 | main () | |
9529 | { | |
a9322a30 | 9530 | char *p = (char *) alloca (2 * sizeof (int)); |
81ecdfbb | 9531 | if (p) return 0; |
bec39cab AC |
9532 | ; |
9533 | return 0; | |
9534 | } | |
9535 | _ACEOF | |
81ecdfbb | 9536 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9537 | ac_cv_working_alloca_h=yes |
bec39cab | 9538 | else |
81ecdfbb | 9539 | ac_cv_working_alloca_h=no |
bec39cab | 9540 | fi |
81ecdfbb RW |
9541 | rm -f core conftest.err conftest.$ac_objext \ |
9542 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9543 | fi |
81ecdfbb RW |
9544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
9545 | $as_echo "$ac_cv_working_alloca_h" >&6; } | |
a9322a30 TT |
9546 | if test $ac_cv_working_alloca_h = yes; then |
9547 | ||
81ecdfbb | 9548 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
c906108c | 9549 | |
c906108c | 9550 | fi |
bec39cab | 9551 | |
81ecdfbb RW |
9552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
9553 | $as_echo_n "checking for alloca... " >&6; } | |
9554 | if test "${ac_cv_func_alloca_works+set}" = set; then : | |
9555 | $as_echo_n "(cached) " >&6 | |
bec39cab | 9556 | else |
81ecdfbb | 9557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9558 | /* end confdefs.h. */ |
a9322a30 TT |
9559 | #ifdef __GNUC__ |
9560 | # define alloca __builtin_alloca | |
b4e70030 | 9561 | #else |
a9322a30 TT |
9562 | # ifdef _MSC_VER |
9563 | # include <malloc.h> | |
9564 | # define alloca _alloca | |
9565 | # else | |
81ecdfbb | 9566 | # ifdef HAVE_ALLOCA_H |
a9322a30 TT |
9567 | # include <alloca.h> |
9568 | # else | |
9569 | # ifdef _AIX | |
9570 | #pragma alloca | |
9571 | # else | |
9572 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
9573 | char *alloca (); | |
9574 | # endif | |
9575 | # endif | |
9576 | # endif | |
9577 | # endif | |
c906108c | 9578 | #endif |
97bf5e38 | 9579 | |
bec39cab AC |
9580 | int |
9581 | main () | |
9582 | { | |
a9322a30 | 9583 | char *p = (char *) alloca (1); |
81ecdfbb | 9584 | if (p) return 0; |
bec39cab AC |
9585 | ; |
9586 | return 0; | |
9587 | } | |
9588 | _ACEOF | |
81ecdfbb | 9589 | if ac_fn_c_try_link "$LINENO"; then : |
a9322a30 | 9590 | ac_cv_func_alloca_works=yes |
bec39cab | 9591 | else |
81ecdfbb | 9592 | ac_cv_func_alloca_works=no |
bec39cab | 9593 | fi |
81ecdfbb RW |
9594 | rm -f core conftest.err conftest.$ac_objext \ |
9595 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 9596 | fi |
81ecdfbb RW |
9597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
9598 | $as_echo "$ac_cv_func_alloca_works" >&6; } | |
a9322a30 TT |
9599 | |
9600 | if test $ac_cv_func_alloca_works = yes; then | |
9601 | ||
81ecdfbb | 9602 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
c906108c | 9603 | |
a9322a30 TT |
9604 | else |
9605 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
9606 | # that cause trouble. Some versions do not even contain alloca or | |
9607 | # contain a buggy version. If you still want to use their alloca, | |
9608 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
9609 | ||
81ecdfbb | 9610 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
a9322a30 | 9611 | |
81ecdfbb | 9612 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
c906108c | 9613 | |
bec39cab | 9614 | |
81ecdfbb RW |
9615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
9616 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } | |
9617 | if test "${ac_cv_os_cray+set}" = set; then : | |
9618 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9619 | else |
81ecdfbb | 9620 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 | 9621 | /* end confdefs.h. */ |
81ecdfbb | 9622 | #if defined CRAY && ! defined CRAY2 |
a9322a30 TT |
9623 | webecray |
9624 | #else | |
9625 | wenotbecray | |
9626 | #endif | |
9627 | ||
9628 | _ACEOF | |
9629 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
81ecdfbb | 9630 | $EGREP "webecray" >/dev/null 2>&1; then : |
a9322a30 TT |
9631 | ac_cv_os_cray=yes |
9632 | else | |
81ecdfbb | 9633 | ac_cv_os_cray=no |
bec39cab | 9634 | fi |
81ecdfbb RW |
9635 | rm -f conftest* |
9636 | ||
bec39cab | 9637 | fi |
81ecdfbb RW |
9638 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
9639 | $as_echo "$ac_cv_os_cray" >&6; } | |
9640 | if test $ac_cv_os_cray = yes; then | |
9641 | for ac_func in _getb67 GETB67 getb67; do | |
9642 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9643 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9644 | eval as_val=\$$as_ac_var | |
9645 | if test "x$as_val" = x""yes; then : | |
a9322a30 TT |
9646 | |
9647 | cat >>confdefs.h <<_ACEOF | |
9648 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 9649 | _ACEOF |
c906108c | 9650 | |
a9322a30 | 9651 | break |
c906108c SS |
9652 | fi |
9653 | ||
a9322a30 TT |
9654 | done |
9655 | fi | |
bec39cab | 9656 | |
81ecdfbb RW |
9657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
9658 | $as_echo_n "checking stack direction for C alloca... " >&6; } | |
9659 | if test "${ac_cv_c_stack_direction+set}" = set; then : | |
9660 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9661 | else |
81ecdfbb | 9662 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9663 | ac_cv_c_stack_direction=0 |
bec39cab | 9664 | else |
81ecdfbb | 9665 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9666 | /* end confdefs.h. */ |
81ecdfbb | 9667 | $ac_includes_default |
a9322a30 TT |
9668 | int |
9669 | find_stack_direction () | |
b4e70030 | 9670 | { |
a9322a30 TT |
9671 | static char *addr = 0; |
9672 | auto char dummy; | |
9673 | if (addr == 0) | |
9674 | { | |
9675 | addr = &dummy; | |
9676 | return find_stack_direction (); | |
9677 | } | |
9678 | else | |
9679 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 9680 | } |
b757528f | 9681 | |
bec39cab AC |
9682 | int |
9683 | main () | |
9684 | { | |
81ecdfbb | 9685 | return find_stack_direction () < 0; |
bec39cab AC |
9686 | } |
9687 | _ACEOF | |
81ecdfbb | 9688 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9689 | ac_cv_c_stack_direction=1 |
9690 | else | |
81ecdfbb | 9691 | ac_cv_c_stack_direction=-1 |
a9322a30 | 9692 | fi |
81ecdfbb RW |
9693 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9694 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9695 | fi |
a9322a30 | 9696 | |
81ecdfbb RW |
9697 | fi |
9698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
9699 | $as_echo "$ac_cv_c_stack_direction" >&6; } | |
a9322a30 TT |
9700 | cat >>confdefs.h <<_ACEOF |
9701 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
9702 | _ACEOF | |
9703 | ||
9704 | ||
9705 | fi | |
9706 | ||
a9322a30 | 9707 | for ac_header in stdlib.h unistd.h |
81ecdfbb RW |
9708 | do : |
9709 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9710 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
9711 | eval as_val=\$$as_ac_Header | |
9712 | if test "x$as_val" = x""yes; then : | |
bec39cab | 9713 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9714 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 9715 | _ACEOF |
b757528f | 9716 | |
b757528f | 9717 | fi |
bec39cab | 9718 | |
a9322a30 | 9719 | done |
a3828db0 | 9720 | |
a9322a30 | 9721 | for ac_func in getpagesize |
81ecdfbb RW |
9722 | do : |
9723 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
9724 | if test "x$ac_cv_func_getpagesize" = x""yes; then : | |
bec39cab | 9725 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9726 | #define HAVE_GETPAGESIZE 1 |
bec39cab | 9727 | _ACEOF |
bcb3dc3d | 9728 | |
bcb3dc3d MK |
9729 | fi |
9730 | done | |
9731 | ||
81ecdfbb RW |
9732 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
9733 | $as_echo_n "checking for working mmap... " >&6; } | |
9734 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : | |
9735 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9736 | else |
81ecdfbb | 9737 | if test "$cross_compiling" = yes; then : |
a9322a30 | 9738 | ac_cv_func_mmap_fixed_mapped=no |
bec39cab | 9739 | else |
81ecdfbb | 9740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 9741 | /* end confdefs.h. */ |
a9322a30 TT |
9742 | $ac_includes_default |
9743 | /* malloc might have been renamed as rpl_malloc. */ | |
9744 | #undef malloc | |
bec39cab | 9745 | |
a9322a30 TT |
9746 | /* Thanks to Mike Haertel and Jim Avera for this test. |
9747 | Here is a matrix of mmap possibilities: | |
9748 | mmap private not fixed | |
9749 | mmap private fixed at somewhere currently unmapped | |
9750 | mmap private fixed at somewhere already mapped | |
9751 | mmap shared not fixed | |
9752 | mmap shared fixed at somewhere currently unmapped | |
9753 | mmap shared fixed at somewhere already mapped | |
9754 | For private mappings, we should verify that changes cannot be read() | |
9755 | back from the file, nor mmap's back from the file at a different | |
9756 | address. (There have been systems where private was not correctly | |
9757 | implemented like the infamous i386 svr4.0, and systems where the | |
9758 | VM page cache was not coherent with the file system buffer cache | |
9759 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
9760 | For shared mappings, we should conversely verify that changes get | |
9761 | propagated back to all the places they're supposed to be. | |
bec39cab | 9762 | |
a9322a30 TT |
9763 | Grep wants private fixed already mapped. |
9764 | The main things grep needs to know about mmap are: | |
9765 | * does it exist and is it safe to write into the mmap'd area | |
9766 | * how to use it (BSD variants) */ | |
8b9cf735 | 9767 | |
a9322a30 TT |
9768 | #include <fcntl.h> |
9769 | #include <sys/mman.h> | |
8b9cf735 | 9770 | |
81ecdfbb | 9771 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
a9322a30 | 9772 | char *malloc (); |
a3828db0 MK |
9773 | #endif |
9774 | ||
a9322a30 | 9775 | /* This mess was copied from the GNU getpagesize.h. */ |
81ecdfbb | 9776 | #ifndef HAVE_GETPAGESIZE |
a9322a30 | 9777 | /* Assume that all systems that can run configure have sys/param.h. */ |
81ecdfbb | 9778 | # ifndef HAVE_SYS_PARAM_H |
a9322a30 TT |
9779 | # define HAVE_SYS_PARAM_H 1 |
9780 | # endif | |
9781 | ||
9782 | # ifdef _SC_PAGESIZE | |
9783 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
9784 | # else /* no _SC_PAGESIZE */ | |
81ecdfbb | 9785 | # ifdef HAVE_SYS_PARAM_H |
a9322a30 TT |
9786 | # include <sys/param.h> |
9787 | # ifdef EXEC_PAGESIZE | |
9788 | # define getpagesize() EXEC_PAGESIZE | |
9789 | # else /* no EXEC_PAGESIZE */ | |
9790 | # ifdef NBPG | |
9791 | # define getpagesize() NBPG * CLSIZE | |
9792 | # ifndef CLSIZE | |
9793 | # define CLSIZE 1 | |
9794 | # endif /* no CLSIZE */ | |
9795 | # else /* no NBPG */ | |
9796 | # ifdef NBPC | |
9797 | # define getpagesize() NBPC | |
9798 | # else /* no NBPC */ | |
9799 | # ifdef PAGESIZE | |
9800 | # define getpagesize() PAGESIZE | |
9801 | # endif /* PAGESIZE */ | |
9802 | # endif /* no NBPC */ | |
9803 | # endif /* no NBPG */ | |
9804 | # endif /* no EXEC_PAGESIZE */ | |
9805 | # else /* no HAVE_SYS_PARAM_H */ | |
9806 | # define getpagesize() 8192 /* punt totally */ | |
9807 | # endif /* no HAVE_SYS_PARAM_H */ | |
9808 | # endif /* no _SC_PAGESIZE */ | |
9809 | ||
9810 | #endif /* no HAVE_GETPAGESIZE */ | |
9811 | ||
bec39cab AC |
9812 | int |
9813 | main () | |
9814 | { | |
a9322a30 TT |
9815 | char *data, *data2, *data3; |
9816 | int i, pagesize; | |
9817 | int fd; | |
9818 | ||
9819 | pagesize = getpagesize (); | |
9820 | ||
9821 | /* First, make a file with some known garbage in it. */ | |
9822 | data = (char *) malloc (pagesize); | |
9823 | if (!data) | |
81ecdfbb | 9824 | return 1; |
a9322a30 TT |
9825 | for (i = 0; i < pagesize; ++i) |
9826 | *(data + i) = rand (); | |
9827 | umask (0); | |
9828 | fd = creat ("conftest.mmap", 0600); | |
9829 | if (fd < 0) | |
81ecdfbb | 9830 | return 1; |
a9322a30 | 9831 | if (write (fd, data, pagesize) != pagesize) |
81ecdfbb | 9832 | return 1; |
a9322a30 TT |
9833 | close (fd); |
9834 | ||
9835 | /* Next, try to mmap the file at a fixed address which already has | |
9836 | something else allocated at it. If we can, also make sure that | |
9837 | we see the same garbage. */ | |
9838 | fd = open ("conftest.mmap", O_RDWR); | |
9839 | if (fd < 0) | |
81ecdfbb | 9840 | return 1; |
a9322a30 TT |
9841 | data2 = (char *) malloc (2 * pagesize); |
9842 | if (!data2) | |
81ecdfbb RW |
9843 | return 1; |
9844 | data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); | |
a9322a30 TT |
9845 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
9846 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
81ecdfbb | 9847 | return 1; |
a9322a30 TT |
9848 | for (i = 0; i < pagesize; ++i) |
9849 | if (*(data + i) != *(data2 + i)) | |
81ecdfbb | 9850 | return 1; |
a9322a30 TT |
9851 | |
9852 | /* Finally, make sure that changes to the mapped area do not | |
9853 | percolate back to the file as seen by read(). (This is a bug on | |
9854 | some variants of i386 svr4.0.) */ | |
9855 | for (i = 0; i < pagesize; ++i) | |
9856 | *(data2 + i) = *(data2 + i) + 1; | |
9857 | data3 = (char *) malloc (pagesize); | |
9858 | if (!data3) | |
81ecdfbb | 9859 | return 1; |
a9322a30 | 9860 | if (read (fd, data3, pagesize) != pagesize) |
81ecdfbb | 9861 | return 1; |
a9322a30 TT |
9862 | for (i = 0; i < pagesize; ++i) |
9863 | if (*(data + i) != *(data3 + i)) | |
81ecdfbb | 9864 | return 1; |
a9322a30 | 9865 | close (fd); |
81ecdfbb | 9866 | return 0; |
bec39cab AC |
9867 | } |
9868 | _ACEOF | |
81ecdfbb | 9869 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 | 9870 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 9871 | else |
81ecdfbb | 9872 | ac_cv_func_mmap_fixed_mapped=no |
a3828db0 | 9873 | fi |
81ecdfbb RW |
9874 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9875 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a3828db0 | 9876 | fi |
81ecdfbb | 9877 | |
a9322a30 | 9878 | fi |
81ecdfbb RW |
9879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
9880 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
a9322a30 TT |
9881 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
9882 | ||
81ecdfbb | 9883 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
a3828db0 | 9884 | |
086ec9eb | 9885 | fi |
a9322a30 | 9886 | rm -f conftest.mmap |
a3828db0 | 9887 | |
81ecdfbb RW |
9888 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
9889 | if test "x$ac_cv_type_pid_t" = x""yes; then : | |
bec39cab | 9890 | |
a9322a30 TT |
9891 | else |
9892 | ||
9893 | cat >>confdefs.h <<_ACEOF | |
9894 | #define pid_t int | |
bec39cab | 9895 | _ACEOF |
086ec9eb MK |
9896 | |
9897 | fi | |
9898 | ||
81ecdfbb RW |
9899 | for ac_header in vfork.h |
9900 | do : | |
9901 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" | |
9902 | if test "x$ac_cv_header_vfork_h" = x""yes; then : | |
a3828db0 | 9903 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9904 | #define HAVE_VFORK_H 1 |
bec39cab | 9905 | _ACEOF |
c906108c SS |
9906 | |
9907 | fi | |
a9322a30 | 9908 | |
a3828db0 | 9909 | done |
c906108c | 9910 | |
a9322a30 | 9911 | for ac_func in fork vfork |
81ecdfbb RW |
9912 | do : |
9913 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
9914 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
9915 | eval as_val=\$$as_ac_var | |
9916 | if test "x$as_val" = x""yes; then : | |
a3828db0 | 9917 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 9918 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab | 9919 | _ACEOF |
b83266a0 | 9920 | |
97bf5e38 | 9921 | fi |
a3828db0 | 9922 | done |
b83266a0 | 9923 | |
a9322a30 | 9924 | if test "x$ac_cv_func_fork" = xyes; then |
81ecdfbb RW |
9925 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
9926 | $as_echo_n "checking for working fork... " >&6; } | |
9927 | if test "${ac_cv_func_fork_works+set}" = set; then : | |
9928 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9929 | else |
81ecdfbb | 9930 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9931 | ac_cv_func_fork_works=cross |
9932 | else | |
81ecdfbb RW |
9933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
9934 | /* end confdefs.h. */ | |
9935 | $ac_includes_default | |
9936 | int | |
9937 | main () | |
9938 | { | |
9939 | ||
9940 | /* By Ruediger Kuhlmann. */ | |
9941 | return fork () < 0; | |
9942 | ||
9943 | ; | |
9944 | return 0; | |
9945 | } | |
a9322a30 | 9946 | _ACEOF |
81ecdfbb | 9947 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
9948 | ac_cv_func_fork_works=yes |
9949 | else | |
81ecdfbb | 9950 | ac_cv_func_fork_works=no |
a9322a30 | 9951 | fi |
81ecdfbb RW |
9952 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
9953 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 9954 | fi |
81ecdfbb | 9955 | |
a9322a30 | 9956 | fi |
81ecdfbb RW |
9957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
9958 | $as_echo "$ac_cv_func_fork_works" >&6; } | |
a9322a30 TT |
9959 | |
9960 | else | |
9961 | ac_cv_func_fork_works=$ac_cv_func_fork | |
9962 | fi | |
9963 | if test "x$ac_cv_func_fork_works" = xcross; then | |
9964 | case $host in | |
9965 | *-*-amigaos* | *-*-msdosdjgpp*) | |
9966 | # Override, as these systems have only a dummy fork() stub | |
9967 | ac_cv_func_fork_works=no | |
9968 | ;; | |
9969 | *) | |
9970 | ac_cv_func_fork_works=yes | |
9971 | ;; | |
9972 | esac | |
81ecdfbb RW |
9973 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
9974 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
9975 | fi |
9976 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
9977 | if test "x$ac_cv_func_vfork" = xyes; then | |
81ecdfbb RW |
9978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
9979 | $as_echo_n "checking for working vfork... " >&6; } | |
9980 | if test "${ac_cv_func_vfork_works+set}" = set; then : | |
9981 | $as_echo_n "(cached) " >&6 | |
a9322a30 | 9982 | else |
81ecdfbb | 9983 | if test "$cross_compiling" = yes; then : |
a9322a30 TT |
9984 | ac_cv_func_vfork_works=cross |
9985 | else | |
81ecdfbb | 9986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
a9322a30 TT |
9987 | /* end confdefs.h. */ |
9988 | /* Thanks to Paul Eggert for this test. */ | |
81ecdfbb | 9989 | $ac_includes_default |
a9322a30 | 9990 | #include <sys/wait.h> |
81ecdfbb | 9991 | #ifdef HAVE_VFORK_H |
a9322a30 TT |
9992 | # include <vfork.h> |
9993 | #endif | |
9994 | /* On some sparc systems, changes by the child to local and incoming | |
9995 | argument registers are propagated back to the parent. The compiler | |
9996 | is told about this with #include <vfork.h>, but some compilers | |
9997 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
9998 | static variable whose address is put into a register that is | |
9999 | clobbered by the vfork. */ | |
10000 | static void | |
10001 | #ifdef __cplusplus | |
10002 | sparc_address_test (int arg) | |
10003 | # else | |
10004 | sparc_address_test (arg) int arg; | |
10005 | #endif | |
10006 | { | |
10007 | static pid_t child; | |
10008 | if (!child) { | |
10009 | child = vfork (); | |
10010 | if (child < 0) { | |
10011 | perror ("vfork"); | |
10012 | _exit(2); | |
10013 | } | |
10014 | if (!child) { | |
10015 | arg = getpid(); | |
10016 | write(-1, "", 0); | |
10017 | _exit (arg); | |
10018 | } | |
10019 | } | |
10020 | } | |
10021 | ||
10022 | int | |
10023 | main () | |
10024 | { | |
10025 | pid_t parent = getpid (); | |
10026 | pid_t child; | |
10027 | ||
10028 | sparc_address_test (0); | |
10029 | ||
10030 | child = vfork (); | |
10031 | ||
10032 | if (child == 0) { | |
10033 | /* Here is another test for sparc vfork register problems. This | |
10034 | test uses lots of local variables, at least as many local | |
10035 | variables as main has allocated so far including compiler | |
10036 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10037 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10038 | reuse the register of parent for one of the local variables, | |
10039 | since it will think that parent can't possibly be used any more | |
10040 | in this routine. Assigning to the local variable will thus | |
10041 | munge parent in the parent process. */ | |
10042 | pid_t | |
10043 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10044 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10045 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10046 | use the same hardware register for all 8 local variables. */ | |
10047 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10048 | || p != p5 || p != p6 || p != p7) | |
10049 | _exit(1); | |
10050 | ||
10051 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
10052 | from child file descriptors. If the child closes a descriptor | |
10053 | before it execs or exits, this munges the parent's descriptor | |
10054 | as well. Test for this by closing stdout in the child. */ | |
10055 | _exit(close(fileno(stdout)) != 0); | |
10056 | } else { | |
10057 | int status; | |
10058 | struct stat st; | |
10059 | ||
10060 | while (wait(&status) != child) | |
10061 | ; | |
81ecdfbb | 10062 | return ( |
a9322a30 TT |
10063 | /* Was there some problem with vforking? */ |
10064 | child < 0 | |
10065 | ||
10066 | /* Did the child fail? (This shouldn't happen.) */ | |
10067 | || status | |
10068 | ||
10069 | /* Did the vfork/compiler bug occur? */ | |
10070 | || parent != getpid() | |
10071 | ||
10072 | /* Did the file descriptor bug occur? */ | |
10073 | || fstat(fileno(stdout), &st) != 0 | |
10074 | ); | |
10075 | } | |
10076 | } | |
10077 | _ACEOF | |
81ecdfbb | 10078 | if ac_fn_c_try_run "$LINENO"; then : |
a9322a30 TT |
10079 | ac_cv_func_vfork_works=yes |
10080 | else | |
81ecdfbb | 10081 | ac_cv_func_vfork_works=no |
a9322a30 | 10082 | fi |
81ecdfbb RW |
10083 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10084 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
a9322a30 | 10085 | fi |
81ecdfbb | 10086 | |
a9322a30 | 10087 | fi |
81ecdfbb RW |
10088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
10089 | $as_echo "$ac_cv_func_vfork_works" >&6; } | |
a9322a30 TT |
10090 | |
10091 | fi; | |
10092 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10093 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
81ecdfbb RW |
10094 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10095 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
a9322a30 TT |
10096 | fi |
10097 | ||
10098 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
10099 | ||
81ecdfbb | 10100 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
a9322a30 TT |
10101 | |
10102 | else | |
10103 | ||
81ecdfbb | 10104 | $as_echo "#define vfork fork" >>confdefs.h |
a9322a30 TT |
10105 | |
10106 | fi | |
10107 | if test "x$ac_cv_func_fork_works" = xyes; then | |
10108 | ||
81ecdfbb | 10109 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
a9322a30 TT |
10110 | |
10111 | fi | |
10112 | ||
7313baad | 10113 | for ac_func in canonicalize_file_name realpath getrusage getuid getgid \ |
b9e7b9c3 | 10114 | pipe poll pread pread64 pwrite readlink resize_term \ |
7313baad | 10115 | sbrk setpgid setpgrp setsid \ |
a9322a30 | 10116 | sigaction sigprocmask sigsetmask socketpair syscall \ |
110ed339 | 10117 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
1db33378 | 10118 | setrlimit getrlimit posix_madvise waitpid lstat |
81ecdfbb RW |
10119 | do : |
10120 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10121 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" | |
10122 | eval as_val=\$$as_ac_var | |
10123 | if test "x$as_val" = x""yes; then : | |
6c7a06a3 | 10124 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10125 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
6c7a06a3 TT |
10126 | _ACEOF |
10127 | ||
10128 | fi | |
10129 | done | |
10130 | ||
10131 | ||
81ecdfbb RW |
10132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
10133 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } | |
10134 | if test "${am_cv_langinfo_codeset+set}" = set; then : | |
10135 | $as_echo_n "(cached) " >&6 | |
6c7a06a3 | 10136 | else |
81ecdfbb | 10137 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6c7a06a3 TT |
10138 | /* end confdefs.h. */ |
10139 | #include <langinfo.h> | |
10140 | int | |
10141 | main () | |
10142 | { | |
10143 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
10144 | ; |
10145 | return 0; | |
10146 | } | |
10147 | _ACEOF | |
81ecdfbb | 10148 | if ac_fn_c_try_link "$LINENO"; then : |
6c7a06a3 | 10149 | am_cv_langinfo_codeset=yes |
a4db0f07 | 10150 | else |
81ecdfbb | 10151 | am_cv_langinfo_codeset=no |
a4db0f07 | 10152 | fi |
81ecdfbb RW |
10153 | rm -f core conftest.err conftest.$ac_objext \ |
10154 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10155 | |
a4db0f07 | 10156 | fi |
81ecdfbb RW |
10157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
10158 | $as_echo "$am_cv_langinfo_codeset" >&6; } | |
6c7a06a3 TT |
10159 | if test $am_cv_langinfo_codeset = yes; then |
10160 | ||
81ecdfbb | 10161 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
a4db0f07 | 10162 | |
6c7a06a3 | 10163 | fi |
c906108c | 10164 | |
06825bd1 | 10165 | |
a3828db0 MK |
10166 | # Check the return and argument types of ptrace. No canned test for |
10167 | # this, so roll our own. | |
10168 | gdb_ptrace_headers=' | |
10169 | #if HAVE_SYS_TYPES_H | |
10170 | # include <sys/types.h> | |
10171 | #endif | |
10172 | #if HAVE_SYS_PTRACE_H | |
10173 | # include <sys/ptrace.h> | |
10174 | #endif | |
10175 | #if HAVE_UNISTD_H | |
10176 | # include <unistd.h> | |
10177 | #endif | |
10178 | ' | |
10179 | # There is no point in checking if we don't have a prototype. | |
81ecdfbb RW |
10180 | ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers |
10181 | " | |
10182 | if test "x$ac_cv_have_decl_ptrace" = x""yes; then : | |
10183 | ac_have_decl=1 | |
06825bd1 | 10184 | else |
81ecdfbb | 10185 | ac_have_decl=0 |
06825bd1 | 10186 | fi |
06825bd1 | 10187 | |
a3828db0 | 10188 | cat >>confdefs.h <<_ACEOF |
81ecdfbb | 10189 | #define HAVE_DECL_PTRACE $ac_have_decl |
a3828db0 | 10190 | _ACEOF |
81ecdfbb | 10191 | if test $ac_have_decl = 1; then : |
bec39cab | 10192 | |
a3828db0 | 10193 | else |
a3828db0 MK |
10194 | |
10195 | : ${gdb_cv_func_ptrace_ret='int'} | |
10196 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10197 | ||
06825bd1 MK |
10198 | fi |
10199 | ||
064ef605 DJ |
10200 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
10201 | # empty argument list, so check for that explicitly. | |
81ecdfbb RW |
10202 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
10203 | $as_echo_n "checking return type of ptrace... " >&6; } | |
10204 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then : | |
10205 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10206 | else |
81ecdfbb | 10207 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10208 | /* end confdefs.h. */ |
a3828db0 | 10209 | $gdb_ptrace_headers |
bec39cab AC |
10210 | int |
10211 | main () | |
10212 | { | |
064ef605 DJ |
10213 | extern long ptrace (enum __ptrace_request, ...); |
10214 | ; | |
10215 | return 0; | |
10216 | } | |
10217 | _ACEOF | |
81ecdfbb | 10218 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10219 | gdb_cv_func_ptrace_ret='long' |
10220 | else | |
81ecdfbb | 10221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10222 | /* end confdefs.h. */ |
10223 | $gdb_ptrace_headers | |
10224 | int | |
10225 | main () | |
10226 | { | |
a3828db0 | 10227 | extern int ptrace (); |
bec39cab AC |
10228 | ; |
10229 | return 0; | |
10230 | } | |
10231 | _ACEOF | |
81ecdfbb | 10232 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10233 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 10234 | else |
81ecdfbb | 10235 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 10236 | fi |
81ecdfbb | 10237 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 10238 | fi |
81ecdfbb | 10239 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
064ef605 | 10240 | fi |
81ecdfbb RW |
10241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
10242 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } | |
bec39cab | 10243 | |
a3828db0 MK |
10244 | cat >>confdefs.h <<_ACEOF |
10245 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 10246 | _ACEOF |
70f9f479 | 10247 | |
a3828db0 | 10248 | # Check argument types. |
81ecdfbb RW |
10249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
10250 | $as_echo_n "checking types of arguments for ptrace... " >&6; } | |
10251 | if test "${gdb_cv_func_ptrace_args+set}" = set; then : | |
10252 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10253 | else |
a3828db0 | 10254 | |
81ecdfbb | 10255 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
064ef605 DJ |
10256 | /* end confdefs.h. */ |
10257 | $gdb_ptrace_headers | |
10258 | int | |
10259 | main () | |
10260 | { | |
10261 | extern long ptrace (enum __ptrace_request, ...); | |
10262 | ; | |
10263 | return 0; | |
10264 | } | |
10265 | _ACEOF | |
81ecdfbb | 10266 | if ac_fn_c_try_compile "$LINENO"; then : |
064ef605 DJ |
10267 | gdb_cv_func_ptrace_args='int,int,long,long' |
10268 | else | |
064ef605 | 10269 | |
a3828db0 MK |
10270 | for gdb_arg1 in 'int' 'long'; do |
10271 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 10272 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 | 10273 | for gdb_arg4 in 'int' 'long'; do |
81ecdfbb | 10274 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10275 | /* end confdefs.h. */ |
a3828db0 | 10276 | $gdb_ptrace_headers |
bec39cab AC |
10277 | int |
10278 | main () | |
10279 | { | |
a3828db0 MK |
10280 | |
10281 | extern $gdb_cv_func_ptrace_ret | |
10282 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
10283 | ||
bec39cab AC |
10284 | ; |
10285 | return 0; | |
10286 | } | |
10287 | _ACEOF | |
81ecdfbb | 10288 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10289 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
10290 | break 4; | |
5c7f2947 | 10291 | fi |
81ecdfbb | 10292 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 10293 | for gdb_arg5 in 'int *' 'int' 'long'; do |
81ecdfbb | 10294 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10295 | /* end confdefs.h. */ |
a3828db0 | 10296 | $gdb_ptrace_headers |
bec39cab AC |
10297 | int |
10298 | main () | |
10299 | { | |
a3828db0 MK |
10300 | |
10301 | extern $gdb_cv_func_ptrace_ret | |
10302 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
10303 | ||
bec39cab AC |
10304 | ; |
10305 | return 0; | |
10306 | } | |
10307 | _ACEOF | |
81ecdfbb | 10308 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 MK |
10309 | |
10310 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
10311 | break 5; | |
78434e59 | 10312 | fi |
81ecdfbb | 10313 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
10314 | done |
10315 | done | |
10316 | done | |
10317 | done | |
10318 | done | |
10319 | # Provide a safe default value. | |
10320 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
10321 | ||
064ef605 | 10322 | fi |
81ecdfbb | 10323 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
78434e59 | 10324 | fi |
81ecdfbb RW |
10325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
10326 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } | |
a3828db0 MK |
10327 | ac_save_IFS=$IFS; IFS=',' |
10328 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
10329 | IFS=$ac_save_IFS | |
10330 | shift | |
bec39cab | 10331 | |
a3828db0 MK |
10332 | cat >>confdefs.h <<_ACEOF |
10333 | #define PTRACE_TYPE_ARG3 $3 | |
10334 | _ACEOF | |
10335 | ||
10336 | if test -n "$5"; then | |
10337 | ||
10338 | cat >>confdefs.h <<_ACEOF | |
10339 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 10340 | _ACEOF |
78434e59 MK |
10341 | |
10342 | fi | |
10343 | ||
a3828db0 | 10344 | if test "$cross_compiling" = no; then |
81ecdfbb RW |
10345 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10346 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10347 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10348 | $as_echo_n "(cached) " >&6 | |
a3828db0 | 10349 | else |
81ecdfbb RW |
10350 | if test "$cross_compiling" = yes; then : |
10351 | as_fn_error "cannot check setpgrp when cross compiling" "$LINENO" 5 | |
bec39cab | 10352 | else |
81ecdfbb | 10353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10354 | /* end confdefs.h. */ |
81ecdfbb | 10355 | $ac_includes_default |
bec39cab AC |
10356 | int |
10357 | main () | |
10358 | { | |
a3828db0 MK |
10359 | /* If this system has a BSD-style setpgrp which takes arguments, |
10360 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
10361 | exit successfully. */ | |
81ecdfbb | 10362 | return setpgrp (1,1) != -1; |
bec39cab AC |
10363 | ; |
10364 | return 0; | |
10365 | } | |
10366 | _ACEOF | |
81ecdfbb | 10367 | if ac_fn_c_try_run "$LINENO"; then : |
a3828db0 | 10368 | ac_cv_func_setpgrp_void=no |
c906108c | 10369 | else |
81ecdfbb | 10370 | ac_cv_func_setpgrp_void=yes |
c906108c | 10371 | fi |
81ecdfbb RW |
10372 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
10373 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 10374 | fi |
81ecdfbb | 10375 | |
a3828db0 | 10376 | fi |
81ecdfbb RW |
10377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10378 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 MK |
10379 | if test $ac_cv_func_setpgrp_void = yes; then |
10380 | ||
81ecdfbb | 10381 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
97bf5e38 MK |
10382 | |
10383 | fi | |
a3828db0 MK |
10384 | |
10385 | else | |
81ecdfbb RW |
10386 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
10387 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } | |
10388 | if test "${ac_cv_func_setpgrp_void+set}" = set; then : | |
10389 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 10390 | else |
81ecdfbb | 10391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10392 | /* end confdefs.h. */ |
a3828db0 MK |
10393 | |
10394 | #include <unistd.h> | |
10395 | ||
bec39cab AC |
10396 | int |
10397 | main () | |
10398 | { | |
a3828db0 MK |
10399 | |
10400 | if (setpgrp(1,1) == -1) | |
10401 | exit (0); | |
10402 | else | |
10403 | exit (1); | |
10404 | ||
bec39cab AC |
10405 | ; |
10406 | return 0; | |
10407 | } | |
10408 | _ACEOF | |
81ecdfbb | 10409 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10410 | ac_cv_func_setpgrp_void=no |
c906108c | 10411 | else |
81ecdfbb | 10412 | ac_cv_func_setpgrp_void=yes |
c906108c | 10413 | fi |
81ecdfbb | 10414 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10415 | fi |
81ecdfbb RW |
10416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
10417 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } | |
a3828db0 | 10418 | if test $ac_cv_func_setpgrp_void = yes; then |
81ecdfbb | 10419 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
c3f6f71d | 10420 | |
a3828db0 | 10421 | fi |
c906108c SS |
10422 | fi |
10423 | ||
a3828db0 MK |
10424 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
10425 | # since sigsetjmp might only be defined as a macro. | |
81ecdfbb RW |
10426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
10427 | $as_echo_n "checking for sigsetjmp... " >&6; } | |
10428 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then : | |
10429 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10430 | else |
81ecdfbb | 10431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10432 | /* end confdefs.h. */ |
a3828db0 MK |
10433 | |
10434 | #include <setjmp.h> | |
10435 | ||
bec39cab AC |
10436 | int |
10437 | main () | |
10438 | { | |
a3828db0 | 10439 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
10440 | ; |
10441 | return 0; | |
10442 | } | |
10443 | _ACEOF | |
81ecdfbb | 10444 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10445 | gdb_cv_func_sigsetjmp=yes |
c906108c | 10446 | else |
81ecdfbb | 10447 | gdb_cv_func_sigsetjmp=no |
c906108c | 10448 | fi |
81ecdfbb | 10449 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10450 | fi |
81ecdfbb RW |
10451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
10452 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } | |
a3828db0 | 10453 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 10454 | |
81ecdfbb | 10455 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
c906108c | 10456 | |
97bf5e38 | 10457 | fi |
c906108c | 10458 | |
a3828db0 MK |
10459 | # Assume we'll default to using the included libiberty regex. |
10460 | gdb_use_included_regex=yes | |
10461 | ||
10462 | # However, if the system regex is GNU regex, then default to *not* | |
10463 | # using the included regex. | |
81ecdfbb RW |
10464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
10465 | $as_echo_n "checking for GNU regex... " >&6; } | |
10466 | if test "${gdb_cv_have_gnu_regex+set}" = set; then : | |
10467 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10468 | else |
81ecdfbb | 10469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10470 | /* end confdefs.h. */ |
a3828db0 | 10471 | #include <gnu-versions.h> |
bec39cab AC |
10472 | int |
10473 | main () | |
10474 | { | |
81ecdfbb RW |
10475 | #define REGEX_INTERFACE_VERSION 1 |
10476 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
10477 | # error "Version mismatch" | |
10478 | #endif | |
5c45e068 MK |
10479 | ; |
10480 | return 0; | |
10481 | } | |
10482 | _ACEOF | |
81ecdfbb RW |
10483 | if ac_fn_c_try_compile "$LINENO"; then : |
10484 | gdb_cv_have_gnu_regex=yes | |
5c45e068 | 10485 | else |
81ecdfbb RW |
10486 | gdb_cv_have_gnu_regex=no |
10487 | fi | |
10488 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
10489 | fi | |
10490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 | |
10491 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } | |
10492 | if test $gdb_cv_have_gnu_regex = yes; then | |
10493 | gdb_use_included_regex=no | |
5c45e068 | 10494 | fi |
81ecdfbb RW |
10495 | |
10496 | ||
10497 | # Check whether --with-included-regex was given. | |
10498 | if test "${with_included_regex+set}" = set; then : | |
10499 | withval=$with_included_regex; gdb_with_regex=$withval | |
10500 | else | |
10501 | gdb_with_regex=$gdb_use_included_regex | |
c906108c | 10502 | fi |
81ecdfbb RW |
10503 | |
10504 | if test "$gdb_with_regex" = yes; then | |
10505 | ||
10506 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h | |
10507 | ||
c906108c | 10508 | fi |
81ecdfbb RW |
10509 | |
10510 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. | |
10511 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> | |
10512 | #include <sys/proc.h> | |
10513 | ||
10514 | " | |
10515 | if test "x$ac_cv_member_struct_thread_td_pcb" = x""yes; then : | |
c906108c | 10516 | |
5c45e068 | 10517 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 10518 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 10519 | _ACEOF |
c906108c | 10520 | |
5c45e068 | 10521 | |
97bf5e38 | 10522 | fi |
c906108c | 10523 | |
5c45e068 | 10524 | |
a3828db0 | 10525 | # See if <sys/lwp.h> defines `struct lwp`. |
81ecdfbb RW |
10526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
10527 | $as_echo_n "checking for struct lwp... " >&6; } | |
10528 | if test "${gdb_cv_struct_lwp+set}" = set; then : | |
10529 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10530 | else |
81ecdfbb | 10531 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10532 | /* end confdefs.h. */ |
a3828db0 MK |
10533 | #include <sys/param.h> |
10534 | #include <sys/lwp.h> | |
bec39cab AC |
10535 | int |
10536 | main () | |
10537 | { | |
a3828db0 | 10538 | struct lwp l; |
bec39cab AC |
10539 | ; |
10540 | return 0; | |
10541 | } | |
10542 | _ACEOF | |
81ecdfbb | 10543 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10544 | gdb_cv_struct_lwp=yes |
c906108c | 10545 | else |
81ecdfbb | 10546 | gdb_cv_struct_lwp=no |
c906108c | 10547 | fi |
81ecdfbb | 10548 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 10549 | fi |
81ecdfbb RW |
10550 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
10551 | $as_echo "$gdb_cv_struct_lwp" >&6; } | |
a3828db0 | 10552 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 10553 | |
81ecdfbb | 10554 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
c906108c | 10555 | |
97bf5e38 | 10556 | fi |
c906108c | 10557 | |
a3828db0 | 10558 | # See if <machine/reg.h> degines `struct reg'. |
81ecdfbb RW |
10559 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
10560 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } | |
10561 | if test "${gdb_cv_struct_reg+set}" = set; then : | |
10562 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10563 | else |
81ecdfbb | 10564 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10565 | /* end confdefs.h. */ |
a3828db0 MK |
10566 | #include <sys/types.h> |
10567 | #include <machine/reg.h> | |
bec39cab AC |
10568 | int |
10569 | main () | |
10570 | { | |
a3828db0 | 10571 | struct reg r; |
bec39cab AC |
10572 | ; |
10573 | return 0; | |
10574 | } | |
10575 | _ACEOF | |
81ecdfbb | 10576 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10577 | gdb_cv_struct_reg=yes |
27ca5dad | 10578 | else |
81ecdfbb | 10579 | gdb_cv_struct_reg=no |
27ca5dad | 10580 | fi |
81ecdfbb | 10581 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 10582 | fi |
81ecdfbb RW |
10583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
10584 | $as_echo "$gdb_cv_struct_reg" >&6; } | |
a3828db0 | 10585 | if test $gdb_cv_struct_reg = yes; then |
bec39cab | 10586 | |
81ecdfbb | 10587 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
27ca5dad MC |
10588 | |
10589 | fi | |
97bf5e38 | 10590 | |
a3828db0 MK |
10591 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
10592 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
81ecdfbb RW |
10593 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h> |
10594 | " | |
10595 | if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then : | |
5c45e068 MK |
10596 | |
10597 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10598 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 10599 | _ACEOF |
3862412b | 10600 | |
5c45e068 | 10601 | |
97bf5e38 | 10602 | fi |
81ecdfbb RW |
10603 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h> |
10604 | " | |
10605 | if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then : | |
5c45e068 MK |
10606 | |
10607 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 10608 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 10609 | _ACEOF |
3862412b | 10610 | |
5c45e068 | 10611 | |
97bf5e38 | 10612 | fi |
3862412b | 10613 | |
5c45e068 | 10614 | |
a3828db0 | 10615 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
81ecdfbb RW |
10616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
10617 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } | |
10618 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then : | |
10619 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10620 | else |
81ecdfbb | 10621 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10622 | /* end confdefs.h. */ |
a3828db0 | 10623 | #include <sys/ptrace.h> |
bec39cab AC |
10624 | int |
10625 | main () | |
10626 | { | |
a3828db0 | 10627 | PTRACE_GETREGS; |
bec39cab AC |
10628 | ; |
10629 | return 0; | |
10630 | } | |
10631 | _ACEOF | |
81ecdfbb | 10632 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10633 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 10634 | else |
81ecdfbb | 10635 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 10636 | fi |
81ecdfbb | 10637 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10638 | fi |
10639 | ||
81ecdfbb RW |
10640 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
10641 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } | |
a3828db0 | 10642 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f | 10643 | |
81ecdfbb | 10644 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
451928c5 | 10645 | |
97bf5e38 | 10646 | fi |
451928c5 | 10647 | |
a3828db0 | 10648 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
81ecdfbb RW |
10649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
10650 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } | |
10651 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then : | |
10652 | $as_echo_n "(cached) " >&6 | |
451928c5 | 10653 | else |
81ecdfbb | 10654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10655 | /* end confdefs.h. */ |
a3828db0 | 10656 | #include <sys/ptrace.h> |
bec39cab AC |
10657 | int |
10658 | main () | |
10659 | { | |
a3828db0 | 10660 | PTRACE_GETFPXREGS; |
bec39cab AC |
10661 | ; |
10662 | return 0; | |
10663 | } | |
10664 | _ACEOF | |
81ecdfbb | 10665 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10666 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 10667 | else |
81ecdfbb | 10668 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 10669 | fi |
81ecdfbb | 10670 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
10671 | fi |
10672 | ||
81ecdfbb RW |
10673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
10674 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } | |
a3828db0 | 10675 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f | 10676 | |
81ecdfbb | 10677 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
451928c5 | 10678 | |
97bf5e38 | 10679 | fi |
451928c5 | 10680 | |
a3828db0 | 10681 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
81ecdfbb RW |
10682 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
10683 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } | |
10684 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then : | |
10685 | $as_echo_n "(cached) " >&6 | |
3862412b | 10686 | else |
81ecdfbb | 10687 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10688 | /* end confdefs.h. */ |
a3828db0 MK |
10689 | #include <sys/types.h> |
10690 | #include <sys/ptrace.h> | |
bec39cab AC |
10691 | int |
10692 | main () | |
10693 | { | |
a3828db0 | 10694 | PT_GETDBREGS; |
bec39cab AC |
10695 | ; |
10696 | return 0; | |
10697 | } | |
10698 | _ACEOF | |
81ecdfbb | 10699 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10700 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 10701 | else |
81ecdfbb | 10702 | gdb_cv_have_pt_getdbregs=no |
3862412b | 10703 | fi |
81ecdfbb | 10704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10705 | fi |
10706 | ||
81ecdfbb RW |
10707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
10708 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } | |
a3828db0 | 10709 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f | 10710 | |
81ecdfbb | 10711 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
3862412b | 10712 | |
97bf5e38 | 10713 | fi |
3862412b | 10714 | |
a3828db0 | 10715 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
81ecdfbb RW |
10716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
10717 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } | |
10718 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then : | |
10719 | $as_echo_n "(cached) " >&6 | |
3862412b | 10720 | else |
81ecdfbb | 10721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10722 | /* end confdefs.h. */ |
a3828db0 MK |
10723 | #include <sys/types.h> |
10724 | #include <sys/ptrace.h> | |
bec39cab AC |
10725 | int |
10726 | main () | |
10727 | { | |
a3828db0 | 10728 | PT_GETXMMREGS; |
bec39cab AC |
10729 | ; |
10730 | return 0; | |
10731 | } | |
10732 | _ACEOF | |
81ecdfbb | 10733 | if ac_fn_c_try_compile "$LINENO"; then : |
a3828db0 | 10734 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 10735 | else |
81ecdfbb | 10736 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 10737 | fi |
81ecdfbb | 10738 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
10739 | fi |
10740 | ||
81ecdfbb RW |
10741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
10742 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } | |
a3828db0 | 10743 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f | 10744 | |
81ecdfbb | 10745 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
3862412b | 10746 | |
97bf5e38 | 10747 | fi |
3862412b | 10748 | |
eb368090 | 10749 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
10750 | |
10751 | if test "${target}" = "${host}"; then | |
10752 | case "${host}" in | |
97bf5e38 | 10753 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f | 10754 | |
81ecdfbb | 10755 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
97bf5e38 MK |
10756 | |
10757 | ;; | |
c162e8c9 | 10758 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f | 10759 | |
81ecdfbb | 10760 | $as_echo "#define NEW_PROC_API 1" >>confdefs.h |
c960c18f AC |
10761 | |
10762 | ;; | |
10763 | mips-sgi-irix5*) | |
10764 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f | 10765 | |
81ecdfbb | 10766 | $as_echo "#define _KMEMUSER 1" >>confdefs.h |
97bf5e38 MK |
10767 | |
10768 | ;; | |
10769 | esac | |
10770 | fi | |
10771 | ||
10772 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
81ecdfbb RW |
10773 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 |
10774 | $as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } | |
10775 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : | |
10776 | $as_echo_n "(cached) " >&6 | |
bec39cab | 10777 | else |
81ecdfbb | 10778 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10779 | /* end confdefs.h. */ |
596c9d4b KB |
10780 | |
10781 | #define _SYSCALL32 | |
d30c5336 JK |
10782 | /* Needed for new procfs interface on sparc-solaris. */ |
10783 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10784 | #include <sys/procfs.h> |
bec39cab AC |
10785 | int |
10786 | main () | |
10787 | { | |
97bf5e38 | 10788 | pstatus_t avar |
bec39cab AC |
10789 | ; |
10790 | return 0; | |
10791 | } | |
10792 | _ACEOF | |
81ecdfbb | 10793 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10794 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 10795 | else |
81ecdfbb | 10796 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 10797 | |
596c9d4b | 10798 | fi |
81ecdfbb | 10799 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10800 | fi |
10801 | ||
97bf5e38 | 10802 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab | 10803 | |
81ecdfbb | 10804 | $as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h |
596c9d4b KB |
10805 | |
10806 | fi | |
81ecdfbb RW |
10807 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
10808 | $as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } | |
596c9d4b | 10809 | |
81ecdfbb RW |
10810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prrun_t in sys/procfs.h" >&5 |
10811 | $as_echo_n "checking for prrun_t in sys/procfs.h... " >&6; } | |
10812 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then : | |
10813 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10814 | else |
81ecdfbb | 10815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10816 | /* end confdefs.h. */ |
596c9d4b KB |
10817 | |
10818 | #define _SYSCALL32 | |
d30c5336 JK |
10819 | /* Needed for new procfs interface on sparc-solaris. */ |
10820 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10821 | #include <sys/procfs.h> |
bec39cab AC |
10822 | int |
10823 | main () | |
10824 | { | |
97bf5e38 | 10825 | prrun_t avar |
bec39cab AC |
10826 | ; |
10827 | return 0; | |
10828 | } | |
10829 | _ACEOF | |
81ecdfbb | 10830 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10831 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 10832 | else |
81ecdfbb | 10833 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 10834 | |
596c9d4b | 10835 | fi |
81ecdfbb | 10836 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10837 | fi |
10838 | ||
97bf5e38 | 10839 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab | 10840 | |
81ecdfbb | 10841 | $as_echo "#define HAVE_PRRUN_T 1" >>confdefs.h |
596c9d4b KB |
10842 | |
10843 | fi | |
81ecdfbb RW |
10844 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
10845 | $as_echo "$bfd_cv_have_sys_procfs_type_prrun_t" >&6; } | |
596c9d4b | 10846 | |
81ecdfbb RW |
10847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
10848 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } | |
10849 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then : | |
10850 | $as_echo_n "(cached) " >&6 | |
596c9d4b | 10851 | else |
81ecdfbb | 10852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10853 | /* end confdefs.h. */ |
596c9d4b KB |
10854 | |
10855 | #define _SYSCALL32 | |
d30c5336 JK |
10856 | /* Needed for new procfs interface on sparc-solaris. */ |
10857 | #define _STRUCTURED_PROC 1 | |
596c9d4b | 10858 | #include <sys/procfs.h> |
bec39cab AC |
10859 | int |
10860 | main () | |
10861 | { | |
97bf5e38 | 10862 | gregset_t avar |
bec39cab AC |
10863 | ; |
10864 | return 0; | |
10865 | } | |
10866 | _ACEOF | |
81ecdfbb | 10867 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10868 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 10869 | else |
81ecdfbb | 10870 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 10871 | |
596c9d4b | 10872 | fi |
81ecdfbb | 10873 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
10874 | fi |
10875 | ||
97bf5e38 | 10876 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab | 10877 | |
81ecdfbb | 10878 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
596c9d4b KB |
10879 | |
10880 | fi | |
81ecdfbb RW |
10881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
10882 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } | |
451928c5 | 10883 | |
81ecdfbb RW |
10884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
10885 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } | |
10886 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then : | |
10887 | $as_echo_n "(cached) " >&6 | |
d84dd0c5 | 10888 | else |
81ecdfbb | 10889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10890 | /* end confdefs.h. */ |
97bf5e38 MK |
10891 | |
10892 | #define _SYSCALL32 | |
d30c5336 JK |
10893 | /* Needed for new procfs interface on sparc-solaris. */ |
10894 | #define _STRUCTURED_PROC 1 | |
d84dd0c5 | 10895 | #include <sys/procfs.h> |
bec39cab AC |
10896 | int |
10897 | main () | |
10898 | { | |
97bf5e38 | 10899 | fpregset_t avar |
bec39cab AC |
10900 | ; |
10901 | return 0; | |
10902 | } | |
10903 | _ACEOF | |
81ecdfbb | 10904 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10905 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 10906 | else |
81ecdfbb | 10907 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 10908 | |
d84dd0c5 | 10909 | fi |
81ecdfbb | 10910 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
10911 | fi |
10912 | ||
97bf5e38 | 10913 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab | 10914 | |
81ecdfbb | 10915 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
d84dd0c5 | 10916 | |
97bf5e38 | 10917 | fi |
81ecdfbb RW |
10918 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
10919 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } | |
d84dd0c5 | 10920 | |
81ecdfbb RW |
10921 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
10922 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } | |
10923 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then : | |
10924 | $as_echo_n "(cached) " >&6 | |
c906108c | 10925 | else |
81ecdfbb | 10926 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10927 | /* end confdefs.h. */ |
c906108c | 10928 | |
97bf5e38 | 10929 | #define _SYSCALL32 |
d30c5336 JK |
10930 | /* Needed for new procfs interface on sparc-solaris. */ |
10931 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10932 | #include <sys/procfs.h> |
bec39cab AC |
10933 | int |
10934 | main () | |
10935 | { | |
97bf5e38 | 10936 | prgregset_t avar |
bec39cab AC |
10937 | ; |
10938 | return 0; | |
10939 | } | |
10940 | _ACEOF | |
81ecdfbb | 10941 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10942 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 10943 | else |
81ecdfbb | 10944 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 10945 | |
c906108c | 10946 | fi |
81ecdfbb | 10947 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
10948 | fi |
10949 | ||
97bf5e38 | 10950 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab | 10951 | |
81ecdfbb | 10952 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
c906108c | 10953 | |
97bf5e38 | 10954 | fi |
81ecdfbb RW |
10955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
10956 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } | |
c906108c | 10957 | |
81ecdfbb RW |
10958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
10959 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } | |
10960 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then : | |
10961 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10962 | else |
81ecdfbb | 10963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 10964 | /* end confdefs.h. */ |
97bf5e38 MK |
10965 | |
10966 | #define _SYSCALL32 | |
d30c5336 JK |
10967 | /* Needed for new procfs interface on sparc-solaris. */ |
10968 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 10969 | #include <sys/procfs.h> |
bec39cab AC |
10970 | int |
10971 | main () | |
10972 | { | |
97bf5e38 | 10973 | prfpregset_t avar |
bec39cab AC |
10974 | ; |
10975 | return 0; | |
10976 | } | |
10977 | _ACEOF | |
81ecdfbb | 10978 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 10979 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 10980 | else |
81ecdfbb | 10981 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 10982 | |
d45fe813 | 10983 | fi |
81ecdfbb | 10984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
10985 | fi |
10986 | ||
97bf5e38 | 10987 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab | 10988 | |
81ecdfbb | 10989 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
d45fe813 | 10990 | |
97bf5e38 | 10991 | fi |
81ecdfbb RW |
10992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
10993 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } | |
d45fe813 | 10994 | |
81ecdfbb RW |
10995 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
10996 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } | |
10997 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then : | |
10998 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 10999 | else |
81ecdfbb | 11000 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11001 | /* end confdefs.h. */ |
97bf5e38 MK |
11002 | |
11003 | #define _SYSCALL32 | |
d30c5336 JK |
11004 | /* Needed for new procfs interface on sparc-solaris. */ |
11005 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11006 | #include <sys/procfs.h> |
bec39cab AC |
11007 | int |
11008 | main () | |
11009 | { | |
97bf5e38 | 11010 | prgregset32_t avar |
bec39cab AC |
11011 | ; |
11012 | return 0; | |
11013 | } | |
11014 | _ACEOF | |
81ecdfbb | 11015 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11016 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 11017 | else |
81ecdfbb | 11018 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 11019 | |
d45fe813 | 11020 | fi |
81ecdfbb | 11021 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11022 | fi |
11023 | ||
97bf5e38 | 11024 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab | 11025 | |
81ecdfbb | 11026 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
d45fe813 | 11027 | |
97bf5e38 | 11028 | fi |
81ecdfbb RW |
11029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
11030 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } | |
d45fe813 | 11031 | |
81ecdfbb RW |
11032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset32_t in sys/procfs.h" >&5 |
11033 | $as_echo_n "checking for prfpregset32_t in sys/procfs.h... " >&6; } | |
11034 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then : | |
11035 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11036 | else |
81ecdfbb | 11037 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11038 | /* end confdefs.h. */ |
97bf5e38 MK |
11039 | |
11040 | #define _SYSCALL32 | |
d30c5336 JK |
11041 | /* Needed for new procfs interface on sparc-solaris. */ |
11042 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11043 | #include <sys/procfs.h> |
bec39cab AC |
11044 | int |
11045 | main () | |
11046 | { | |
97bf5e38 | 11047 | prfpregset32_t avar |
bec39cab AC |
11048 | ; |
11049 | return 0; | |
11050 | } | |
11051 | _ACEOF | |
81ecdfbb | 11052 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11053 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 11054 | else |
81ecdfbb | 11055 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 11056 | |
d45fe813 | 11057 | fi |
81ecdfbb | 11058 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11059 | fi |
11060 | ||
97bf5e38 | 11061 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab | 11062 | |
81ecdfbb | 11063 | $as_echo "#define HAVE_PRFPREGSET32_T 1" >>confdefs.h |
d45fe813 | 11064 | |
97bf5e38 | 11065 | fi |
81ecdfbb RW |
11066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
11067 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6; } | |
d45fe813 | 11068 | |
81ecdfbb RW |
11069 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
11070 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } | |
11071 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then : | |
11072 | $as_echo_n "(cached) " >&6 | |
d45fe813 | 11073 | else |
81ecdfbb | 11074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11075 | /* end confdefs.h. */ |
97bf5e38 | 11076 | |
d45fe813 | 11077 | #define _SYSCALL32 |
d30c5336 JK |
11078 | /* Needed for new procfs interface on sparc-solaris. */ |
11079 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11080 | #include <sys/procfs.h> |
bec39cab AC |
11081 | int |
11082 | main () | |
11083 | { | |
97bf5e38 | 11084 | lwpid_t avar |
bec39cab AC |
11085 | ; |
11086 | return 0; | |
11087 | } | |
11088 | _ACEOF | |
81ecdfbb | 11089 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11090 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 11091 | else |
81ecdfbb | 11092 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 11093 | |
d45fe813 | 11094 | fi |
81ecdfbb | 11095 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
11096 | fi |
11097 | ||
97bf5e38 | 11098 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab | 11099 | |
81ecdfbb | 11100 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
d45fe813 | 11101 | |
97bf5e38 | 11102 | fi |
81ecdfbb RW |
11103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
11104 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } | |
c906108c | 11105 | |
81ecdfbb RW |
11106 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
11107 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } | |
11108 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then : | |
11109 | $as_echo_n "(cached) " >&6 | |
c906108c | 11110 | else |
81ecdfbb | 11111 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11112 | /* end confdefs.h. */ |
c906108c | 11113 | |
97bf5e38 | 11114 | #define _SYSCALL32 |
d30c5336 JK |
11115 | /* Needed for new procfs interface on sparc-solaris. */ |
11116 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11117 | #include <sys/procfs.h> |
bec39cab AC |
11118 | int |
11119 | main () | |
11120 | { | |
97bf5e38 | 11121 | psaddr_t avar |
bec39cab AC |
11122 | ; |
11123 | return 0; | |
11124 | } | |
11125 | _ACEOF | |
81ecdfbb | 11126 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11127 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 11128 | else |
81ecdfbb | 11129 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 11130 | |
c906108c | 11131 | fi |
81ecdfbb | 11132 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11133 | fi |
11134 | ||
97bf5e38 | 11135 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab | 11136 | |
81ecdfbb | 11137 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
c906108c | 11138 | |
97bf5e38 | 11139 | fi |
81ecdfbb RW |
11140 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
11141 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } | |
c906108c | 11142 | |
81ecdfbb RW |
11143 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prsysent_t in sys/procfs.h" >&5 |
11144 | $as_echo_n "checking for prsysent_t in sys/procfs.h... " >&6; } | |
11145 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then : | |
11146 | $as_echo_n "(cached) " >&6 | |
c906108c | 11147 | else |
81ecdfbb | 11148 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11149 | /* end confdefs.h. */ |
c906108c | 11150 | |
97bf5e38 | 11151 | #define _SYSCALL32 |
d30c5336 JK |
11152 | /* Needed for new procfs interface on sparc-solaris. */ |
11153 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11154 | #include <sys/procfs.h> |
bec39cab AC |
11155 | int |
11156 | main () | |
11157 | { | |
97bf5e38 | 11158 | prsysent_t avar |
bec39cab AC |
11159 | ; |
11160 | return 0; | |
11161 | } | |
11162 | _ACEOF | |
81ecdfbb | 11163 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11164 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 11165 | else |
81ecdfbb | 11166 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 11167 | |
c906108c | 11168 | fi |
81ecdfbb | 11169 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11170 | fi |
11171 | ||
97bf5e38 | 11172 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab | 11173 | |
81ecdfbb | 11174 | $as_echo "#define HAVE_PRSYSENT_T 1" >>confdefs.h |
c906108c | 11175 | |
97bf5e38 | 11176 | fi |
81ecdfbb RW |
11177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
11178 | $as_echo "$bfd_cv_have_sys_procfs_type_prsysent_t" >&6; } | |
c906108c | 11179 | |
81ecdfbb RW |
11180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigset_t in sys/procfs.h" >&5 |
11181 | $as_echo_n "checking for pr_sigset_t in sys/procfs.h... " >&6; } | |
11182 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then : | |
11183 | $as_echo_n "(cached) " >&6 | |
c906108c | 11184 | else |
81ecdfbb | 11185 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11186 | /* end confdefs.h. */ |
c906108c | 11187 | |
97bf5e38 | 11188 | #define _SYSCALL32 |
d30c5336 JK |
11189 | /* Needed for new procfs interface on sparc-solaris. */ |
11190 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11191 | #include <sys/procfs.h> |
bec39cab AC |
11192 | int |
11193 | main () | |
11194 | { | |
97bf5e38 | 11195 | pr_sigset_t avar |
bec39cab AC |
11196 | ; |
11197 | return 0; | |
11198 | } | |
11199 | _ACEOF | |
81ecdfbb | 11200 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11201 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 11202 | else |
81ecdfbb | 11203 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 11204 | |
c906108c | 11205 | fi |
81ecdfbb | 11206 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11207 | fi |
11208 | ||
97bf5e38 | 11209 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab | 11210 | |
81ecdfbb | 11211 | $as_echo "#define HAVE_PR_SIGSET_T 1" >>confdefs.h |
c906108c | 11212 | |
97bf5e38 | 11213 | fi |
81ecdfbb RW |
11214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
11215 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6; } | |
c906108c | 11216 | |
81ecdfbb RW |
11217 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
11218 | $as_echo_n "checking for pr_sigaction64_t in sys/procfs.h... " >&6; } | |
11219 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then : | |
11220 | $as_echo_n "(cached) " >&6 | |
c906108c | 11221 | else |
81ecdfbb | 11222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11223 | /* end confdefs.h. */ |
c906108c | 11224 | |
97bf5e38 | 11225 | #define _SYSCALL32 |
d30c5336 JK |
11226 | /* Needed for new procfs interface on sparc-solaris. */ |
11227 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11228 | #include <sys/procfs.h> |
bec39cab AC |
11229 | int |
11230 | main () | |
11231 | { | |
97bf5e38 | 11232 | pr_sigaction64_t avar |
bec39cab AC |
11233 | ; |
11234 | return 0; | |
11235 | } | |
11236 | _ACEOF | |
81ecdfbb | 11237 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11238 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 11239 | else |
81ecdfbb | 11240 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 11241 | |
c906108c | 11242 | fi |
81ecdfbb | 11243 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11244 | fi |
11245 | ||
97bf5e38 | 11246 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab | 11247 | |
81ecdfbb | 11248 | $as_echo "#define HAVE_PR_SIGACTION64_T 1" >>confdefs.h |
c906108c | 11249 | |
97bf5e38 | 11250 | fi |
81ecdfbb RW |
11251 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
11252 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6; } | |
97bf5e38 | 11253 | |
81ecdfbb RW |
11254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
11255 | $as_echo_n "checking for pr_siginfo64_t in sys/procfs.h... " >&6; } | |
11256 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then : | |
11257 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11258 | else |
81ecdfbb | 11259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11260 | /* end confdefs.h. */ |
97bf5e38 MK |
11261 | |
11262 | #define _SYSCALL32 | |
d30c5336 JK |
11263 | /* Needed for new procfs interface on sparc-solaris. */ |
11264 | #define _STRUCTURED_PROC 1 | |
97bf5e38 | 11265 | #include <sys/procfs.h> |
bec39cab AC |
11266 | int |
11267 | main () | |
11268 | { | |
97bf5e38 | 11269 | pr_siginfo64_t avar |
bec39cab AC |
11270 | ; |
11271 | return 0; | |
11272 | } | |
11273 | _ACEOF | |
81ecdfbb | 11274 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11275 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
11276 | else | |
81ecdfbb | 11277 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 11278 | |
97bf5e38 | 11279 | fi |
81ecdfbb | 11280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11281 | fi |
c906108c | 11282 | |
97bf5e38 | 11283 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab | 11284 | |
81ecdfbb | 11285 | $as_echo "#define HAVE_PR_SIGINFO64_T 1" >>confdefs.h |
c906108c | 11286 | |
97bf5e38 | 11287 | fi |
81ecdfbb RW |
11288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
11289 | $as_echo "$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6; } | |
bec39cab AC |
11290 | |
11291 | ||
97bf5e38 MK |
11292 | |
11293 | ||
11294 | ||
97bf5e38 | 11295 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
81ecdfbb RW |
11296 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether prfpregset_t type is broken" >&5 |
11297 | $as_echo_n "checking whether prfpregset_t type is broken... " >&6; } | |
11298 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then : | |
11299 | $as_echo_n "(cached) " >&6 | |
c906108c | 11300 | else |
81ecdfbb | 11301 | if test "$cross_compiling" = yes; then : |
97bf5e38 | 11302 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 11303 | else |
81ecdfbb | 11304 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11305 | /* end confdefs.h. */ |
97bf5e38 MK |
11306 | #include <sys/procfs.h> |
11307 | int main () | |
11308 | { | |
11309 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
11310 | return 1; | |
11311 | return 0; | |
11312 | } | |
bec39cab | 11313 | _ACEOF |
81ecdfbb | 11314 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11315 | gdb_cv_prfpregset_t_broken=no |
81ecdfbb RW |
11316 | else |
11317 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 11318 | fi |
81ecdfbb RW |
11319 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11320 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11321 | fi |
81ecdfbb | 11322 | |
c906108c SS |
11323 | fi |
11324 | ||
81ecdfbb RW |
11325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_prfpregset_t_broken" >&5 |
11326 | $as_echo "$gdb_cv_prfpregset_t_broken" >&6; } | |
97bf5e38 | 11327 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f | 11328 | |
81ecdfbb | 11329 | $as_echo "#define PRFPREGSET_T_BROKEN 1" >>confdefs.h |
c906108c | 11330 | |
97bf5e38 MK |
11331 | fi |
11332 | fi | |
c906108c | 11333 | |
bec39cab | 11334 | |
81ecdfbb RW |
11335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
11336 | $as_echo_n "checking for PIOCSET ioctl entry in sys/procfs.h... " >&6; } | |
11337 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then : | |
11338 | $as_echo_n "(cached) " >&6 | |
c906108c | 11339 | else |
81ecdfbb | 11340 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11341 | /* end confdefs.h. */ |
97bf5e38 MK |
11342 | #include <unistd.h> |
11343 | #include <sys/types.h> | |
11344 | #include <sys/procfs.h> | |
11345 | ||
bec39cab AC |
11346 | int |
11347 | main () | |
11348 | { | |
97bf5e38 MK |
11349 | |
11350 | int dummy;; | |
11351 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
11352 | |
11353 | ; | |
11354 | return 0; | |
11355 | } | |
11356 | _ACEOF | |
81ecdfbb | 11357 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11358 | gdb_cv_have_procfs_piocset=yes |
c906108c | 11359 | else |
81ecdfbb | 11360 | gdb_cv_have_procfs_piocset=no |
c906108c | 11361 | fi |
81ecdfbb | 11362 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11363 | fi |
97bf5e38 | 11364 | |
81ecdfbb RW |
11365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_procfs_piocset" >&5 |
11366 | $as_echo "$gdb_cv_have_procfs_piocset" >&6; } | |
97bf5e38 | 11367 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f | 11368 | |
81ecdfbb | 11369 | $as_echo "#define HAVE_PROCFS_PIOCSET 1" >>confdefs.h |
97bf5e38 MK |
11370 | |
11371 | fi | |
c906108c | 11372 | fi |
c906108c | 11373 | |
97bf5e38 | 11374 | if test ${host} = ${target} ; then |
bec39cab | 11375 | |
81ecdfbb RW |
11376 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member l_addr in struct link_map" >&5 |
11377 | $as_echo_n "checking for member l_addr in struct link_map... " >&6; } | |
11378 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then : | |
11379 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11380 | else |
81ecdfbb | 11381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11382 | /* end confdefs.h. */ |
97bf5e38 | 11383 | #include <link.h> |
bec39cab AC |
11384 | int |
11385 | main () | |
11386 | { | |
97bf5e38 | 11387 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
11388 | ; |
11389 | return 0; | |
11390 | } | |
11391 | _ACEOF | |
81ecdfbb | 11392 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 | 11393 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 11394 | else |
81ecdfbb | 11395 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 11396 | fi |
81ecdfbb | 11397 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
11398 | fi |
11399 | ||
81ecdfbb RW |
11400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
11401 | $as_echo "$gdb_cv_have_struct_link_map_with_l_members" >&6; } | |
97bf5e38 | 11402 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f | 11403 | |
81ecdfbb | 11404 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11405 | |
11406 | fi | |
11407 | ||
bec39cab | 11408 | |
81ecdfbb RW |
11409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member lm_addr in struct link_map" >&5 |
11410 | $as_echo_n "checking for member lm_addr in struct link_map... " >&6; } | |
11411 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then : | |
11412 | $as_echo_n "(cached) " >&6 | |
c906108c | 11413 | else |
81ecdfbb | 11414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11415 | /* end confdefs.h. */ |
97bf5e38 MK |
11416 | #include <sys/types.h> |
11417 | #include <link.h> | |
bec39cab AC |
11418 | int |
11419 | main () | |
11420 | { | |
97bf5e38 | 11421 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
11422 | ; |
11423 | return 0; | |
11424 | } | |
11425 | _ACEOF | |
81ecdfbb | 11426 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11427 | gdb_cv_have_struct_link_map_with_lm_members=yes |
11428 | else | |
81ecdfbb | 11429 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 11430 | fi |
81ecdfbb | 11431 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 11432 | fi |
c906108c | 11433 | |
81ecdfbb RW |
11434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
11435 | $as_echo "$gdb_cv_have_struct_link_map_with_lm_members" >&6; } | |
97bf5e38 | 11436 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f | 11437 | |
81ecdfbb | 11438 | $as_echo "#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1" >>confdefs.h |
97bf5e38 MK |
11439 | |
11440 | fi | |
11441 | ||
bec39cab | 11442 | |
81ecdfbb RW |
11443 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for member som_addr in struct so_map" >&5 |
11444 | $as_echo_n "checking for member som_addr in struct so_map... " >&6; } | |
11445 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then : | |
11446 | $as_echo_n "(cached) " >&6 | |
c906108c | 11447 | else |
81ecdfbb | 11448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11449 | /* end confdefs.h. */ |
97bf5e38 MK |
11450 | #include <sys/types.h> |
11451 | #ifdef HAVE_NLIST_H | |
11452 | #include <nlist.h> | |
11453 | #endif | |
11454 | #include <link.h> | |
bec39cab AC |
11455 | int |
11456 | main () | |
11457 | { | |
97bf5e38 | 11458 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
11459 | ; |
11460 | return 0; | |
11461 | } | |
11462 | _ACEOF | |
81ecdfbb | 11463 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11464 | gdb_cv_have_struct_so_map_with_som_members=yes |
11465 | else | |
81ecdfbb | 11466 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 11467 | fi |
81ecdfbb | 11468 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11469 | fi |
c906108c | 11470 | |
81ecdfbb RW |
11471 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
11472 | $as_echo "$gdb_cv_have_struct_so_map_with_som_members" >&6; } | |
97bf5e38 | 11473 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f | 11474 | |
81ecdfbb | 11475 | $as_echo "#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1" >>confdefs.h |
c906108c | 11476 | |
97bf5e38 | 11477 | fi |
c906108c | 11478 | |
bec39cab | 11479 | |
81ecdfbb RW |
11480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct link_map32 in sys/link.h" >&5 |
11481 | $as_echo_n "checking for struct link_map32 in sys/link.h... " >&6; } | |
11482 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then : | |
11483 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11484 | else |
81ecdfbb | 11485 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11486 | /* end confdefs.h. */ |
97bf5e38 MK |
11487 | #define _SYSCALL32 |
11488 | #include <sys/link.h> | |
bec39cab AC |
11489 | int |
11490 | main () | |
11491 | { | |
97bf5e38 | 11492 | struct link_map32 l; |
bec39cab AC |
11493 | ; |
11494 | return 0; | |
11495 | } | |
11496 | _ACEOF | |
81ecdfbb | 11497 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11498 | gdb_cv_have_struct_link_map32=yes |
11499 | else | |
81ecdfbb | 11500 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 11501 | fi |
81ecdfbb | 11502 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11503 | fi |
c906108c | 11504 | |
81ecdfbb RW |
11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_struct_link_map32" >&5 |
11506 | $as_echo "$gdb_cv_have_struct_link_map32" >&6; } | |
97bf5e38 | 11507 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f | 11508 | |
81ecdfbb | 11509 | $as_echo "#define HAVE_STRUCT_LINK_MAP32 1" >>confdefs.h |
c906108c | 11510 | |
60ca704f | 11511 | |
81ecdfbb | 11512 | $as_echo "#define _SYSCALL32 1" >>confdefs.h |
c906108c | 11513 | |
97bf5e38 MK |
11514 | fi |
11515 | fi | |
c906108c | 11516 | |
bc8bcb4b | 11517 | # Check if the compiler supports the `long long' type. |
c906108c | 11518 | |
81ecdfbb RW |
11519 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
11520 | $as_echo_n "checking for long long support in compiler... " >&6; } | |
11521 | if test "${gdb_cv_c_long_long+set}" = set; then : | |
11522 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11523 | else |
81ecdfbb | 11524 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11525 | /* end confdefs.h. */ |
bc8bcb4b | 11526 | extern long long foo; |
bec39cab AC |
11527 | int |
11528 | main () | |
11529 | { | |
bc8bcb4b | 11530 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
11531 | ; |
11532 | return 0; | |
11533 | } | |
11534 | _ACEOF | |
81ecdfbb | 11535 | if ac_fn_c_try_compile "$LINENO"; then : |
97bf5e38 MK |
11536 | gdb_cv_c_long_long=yes |
11537 | else | |
81ecdfbb | 11538 | gdb_cv_c_long_long=no |
97bf5e38 | 11539 | fi |
81ecdfbb | 11540 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11541 | fi |
81ecdfbb RW |
11542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
11543 | $as_echo "$gdb_cv_c_long_long" >&6; } | |
97bf5e38 | 11544 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b | 11545 | |
81ecdfbb | 11546 | $as_echo "#define CC_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11547 | |
11548 | fi | |
11549 | ||
bc8bcb4b | 11550 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 11551 | |
81ecdfbb RW |
11552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
11553 | $as_echo_n "checking for long long support in printf... " >&6; } | |
11554 | if test "${gdb_cv_printf_has_long_long+set}" = set; then : | |
11555 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11556 | else |
81ecdfbb | 11557 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11558 | gdb_cv_printf_has_long_long=no |
11559 | else | |
81ecdfbb | 11560 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11561 | /* end confdefs.h. */ |
bc8bcb4b MK |
11562 | $ac_includes_default |
11563 | int | |
11564 | main () | |
11565 | { | |
11566 | char buf[32]; | |
97bf5e38 MK |
11567 | long long l = 0; |
11568 | l = (l << 16) + 0x0123; | |
11569 | l = (l << 16) + 0x4567; | |
11570 | l = (l << 16) + 0x89ab; | |
11571 | l = (l << 16) + 0xcdef; | |
11572 | sprintf (buf, "0x%016llx", l); | |
11573 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
11574 | ; |
11575 | return 0; | |
c906108c | 11576 | } |
bec39cab | 11577 | _ACEOF |
81ecdfbb | 11578 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11579 | gdb_cv_printf_has_long_long=yes |
11580 | else | |
81ecdfbb | 11581 | gdb_cv_printf_has_long_long=no |
97bf5e38 | 11582 | fi |
81ecdfbb RW |
11583 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11584 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11585 | fi |
81ecdfbb | 11586 | |
97bf5e38 | 11587 | fi |
81ecdfbb RW |
11588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
11589 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } | |
97bf5e38 | 11590 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b | 11591 | |
81ecdfbb | 11592 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
97bf5e38 MK |
11593 | |
11594 | fi | |
97bf5e38 | 11595 | |
1a619819 LM |
11596 | # Check if the compiler and runtime support printing decfloats. |
11597 | ||
81ecdfbb RW |
11598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
11599 | $as_echo_n "checking for decfloat support in printf... " >&6; } | |
11600 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then : | |
11601 | $as_echo_n "(cached) " >&6 | |
1a619819 | 11602 | else |
81ecdfbb | 11603 | if test "$cross_compiling" = yes; then : |
1a619819 LM |
11604 | gdb_cv_printf_has_decfloat=no |
11605 | else | |
81ecdfbb | 11606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1a619819 LM |
11607 | /* end confdefs.h. */ |
11608 | $ac_includes_default | |
11609 | int | |
11610 | main () | |
11611 | { | |
11612 | char buf[64]; | |
11613 | _Decimal32 d32 = 1.2345df; | |
11614 | _Decimal64 d64 = 1.2345dd; | |
11615 | _Decimal128 d128 = 1.2345dl; | |
11616 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
11617 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
11618 | ; | |
11619 | return 0; | |
11620 | } | |
11621 | _ACEOF | |
81ecdfbb | 11622 | if ac_fn_c_try_run "$LINENO"; then : |
1a619819 LM |
11623 | gdb_cv_printf_has_decfloat=yes |
11624 | else | |
81ecdfbb | 11625 | gdb_cv_printf_has_decfloat=no |
1a619819 | 11626 | fi |
81ecdfbb RW |
11627 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11628 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
1a619819 | 11629 | fi |
81ecdfbb | 11630 | |
1a619819 | 11631 | fi |
81ecdfbb RW |
11632 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
11633 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } | |
1a619819 LM |
11634 | if test $gdb_cv_printf_has_decfloat = yes; then |
11635 | ||
81ecdfbb | 11636 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
1a619819 LM |
11637 | |
11638 | fi | |
11639 | ||
bc8bcb4b MK |
11640 | # Check if the compiler supports the `long double' type. We can't use |
11641 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
11642 | # constants defined in <float.h> that fail on some systems, | |
11643 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 11644 | |
81ecdfbb RW |
11645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
11646 | $as_echo_n "checking for long double support in compiler... " >&6; } | |
11647 | if test "${gdb_cv_c_long_double+set}" = set; then : | |
11648 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11649 | else |
81ecdfbb | 11650 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11651 | /* end confdefs.h. */ |
97bf5e38 | 11652 | long double foo; |
bec39cab | 11653 | _ACEOF |
81ecdfbb | 11654 | if ac_fn_c_try_compile "$LINENO"; then : |
bc8bcb4b | 11655 | gdb_cv_c_long_double=yes |
97bf5e38 | 11656 | else |
81ecdfbb | 11657 | gdb_cv_c_long_double=no |
97bf5e38 | 11658 | fi |
81ecdfbb | 11659 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 11660 | fi |
81ecdfbb RW |
11661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
11662 | $as_echo "$gdb_cv_c_long_double" >&6; } | |
bc8bcb4b | 11663 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 11664 | |
81ecdfbb | 11665 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11666 | |
11667 | fi | |
11668 | ||
bc8bcb4b | 11669 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 11670 | |
81ecdfbb RW |
11671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
11672 | $as_echo_n "checking for long double support in printf... " >&6; } | |
11673 | if test "${gdb_cv_printf_has_long_double+set}" = set; then : | |
11674 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11675 | else |
81ecdfbb | 11676 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11677 | gdb_cv_printf_has_long_double=no |
11678 | else | |
81ecdfbb | 11679 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11680 | /* end confdefs.h. */ |
bc8bcb4b MK |
11681 | $ac_includes_default |
11682 | int | |
11683 | main () | |
11684 | { | |
11685 | char buf[16]; | |
97bf5e38 MK |
11686 | long double f = 3.141592653; |
11687 | sprintf (buf, "%Lg", f); | |
11688 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
11689 | ; |
11690 | return 0; | |
97bf5e38 | 11691 | } |
bec39cab | 11692 | _ACEOF |
81ecdfbb | 11693 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 | 11694 | gdb_cv_printf_has_long_double=yes |
c906108c | 11695 | else |
81ecdfbb | 11696 | gdb_cv_printf_has_long_double=no |
c906108c | 11697 | fi |
81ecdfbb RW |
11698 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11699 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
c906108c | 11700 | fi |
81ecdfbb | 11701 | |
c906108c | 11702 | fi |
81ecdfbb RW |
11703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
11704 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } | |
97bf5e38 | 11705 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b | 11706 | |
81ecdfbb | 11707 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11708 | |
11709 | fi | |
97bf5e38 | 11710 | |
bc8bcb4b | 11711 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 11712 | |
81ecdfbb RW |
11713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
11714 | $as_echo_n "checking for long double support in scanf... " >&6; } | |
11715 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then : | |
11716 | $as_echo_n "(cached) " >&6 | |
97bf5e38 | 11717 | else |
81ecdfbb | 11718 | if test "$cross_compiling" = yes; then : |
97bf5e38 MK |
11719 | gdb_cv_scanf_has_long_double=no |
11720 | else | |
81ecdfbb | 11721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11722 | /* end confdefs.h. */ |
bc8bcb4b MK |
11723 | #include <stdio.h> |
11724 | int | |
11725 | main () | |
11726 | { | |
11727 | char *buf = "3.141592653"; | |
97bf5e38 MK |
11728 | long double f = 0; |
11729 | sscanf (buf, "%Lg", &f); | |
11730 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
11731 | ; |
11732 | return 0; | |
97bf5e38 | 11733 | } |
bec39cab | 11734 | _ACEOF |
81ecdfbb | 11735 | if ac_fn_c_try_run "$LINENO"; then : |
97bf5e38 MK |
11736 | gdb_cv_scanf_has_long_double=yes |
11737 | else | |
81ecdfbb | 11738 | gdb_cv_scanf_has_long_double=no |
97bf5e38 | 11739 | fi |
81ecdfbb RW |
11740 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
11741 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
97bf5e38 | 11742 | fi |
81ecdfbb | 11743 | |
c906108c | 11744 | fi |
81ecdfbb RW |
11745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
11746 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } | |
97bf5e38 | 11747 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b | 11748 | |
81ecdfbb | 11749 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
97bf5e38 MK |
11750 | |
11751 | fi | |
c906108c | 11752 | |
438013df AO |
11753 | case ${host_os} in |
11754 | aix*) | |
81ecdfbb RW |
11755 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
11756 | $as_echo_n "checking for -bbigtoc option... " >&6; } | |
11757 | if test "${gdb_cv_bigtoc+set}" = set; then : | |
11758 | $as_echo_n "(cached) " >&6 | |
438013df | 11759 | else |
bec39cab | 11760 | |
438013df AO |
11761 | SAVE_LDFLAGS=$LDFLAGS |
11762 | ||
11763 | case $GCC in | |
11764 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
11765 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
11766 | esac | |
11767 | ||
11768 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
81ecdfbb | 11769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11770 | /* end confdefs.h. */ |
438013df | 11771 | |
bec39cab AC |
11772 | int |
11773 | main () | |
11774 | { | |
438013df | 11775 | int i; |
bec39cab AC |
11776 | ; |
11777 | return 0; | |
11778 | } | |
11779 | _ACEOF | |
81ecdfbb | 11780 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 11781 | |
81ecdfbb RW |
11782 | else |
11783 | gdb_cv_bigtoc= | |
438013df | 11784 | fi |
81ecdfbb RW |
11785 | rm -f core conftest.err conftest.$ac_objext \ |
11786 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 11787 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 11788 | |
bec39cab | 11789 | fi |
81ecdfbb RW |
11790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
11791 | $as_echo "$gdb_cv_bigtoc" >&6; } | |
438013df AO |
11792 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
11793 | ;; | |
11794 | esac | |
11795 | ||
38f6b338 | 11796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
f6528abd | 11797 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
38f6b338 JK |
11798 | dynamic_list=false |
11799 | if test "${gdb_native}" = yes; then | |
11800 | # The dynamically loaded libthread_db needs access to symbols in the gdb | |
11801 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list | |
11802 | # may not be supported there. | |
11803 | old_LDFLAGS="$LDFLAGS" | |
11804 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. | |
11805 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" | |
11806 | LDFLAGS="$LDFLAGS $RDYNAMIC" | |
11807 | if test "${have_libpython}" = no; then | |
11808 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
f6528abd JK |
11809 | /* end confdefs.h. */ |
11810 | ||
11811 | int | |
11812 | main () | |
11813 | { | |
11814 | ||
11815 | ; | |
11816 | return 0; | |
11817 | } | |
11818 | _ACEOF | |
11819 | if ac_fn_c_try_link "$LINENO"; then : | |
3bebe2f2 JK |
11820 | dynamic_list=true |
11821 | fi | |
11822 | rm -f core conftest.err conftest.$ac_objext \ | |
11823 | conftest$ac_exeext conftest.$ac_ext | |
38f6b338 JK |
11824 | else |
11825 | # Workaround http://bugs.python.org/issue4434 where static | |
11826 | # libpythonX.Y.a would get its symbols required for | |
11827 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. | |
11828 | # Problem does not happen for the recommended libpythonX.Y.so linkage. | |
11829 | old_CFLAGS="$CFLAGS" | |
11830 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" | |
11831 | if test "$cross_compiling" = yes; then : | |
3bebe2f2 | 11832 | true |
f6528abd | 11833 | else |
3bebe2f2 JK |
11834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
11835 | /* end confdefs.h. */ | |
11836 | #include "${have_libpython}/Python.h" | |
11837 | int | |
11838 | main () | |
11839 | { | |
11840 | int err; | |
38f6b338 JK |
11841 | Py_Initialize (); |
11842 | err = PyRun_SimpleString ("import itertools\n"); | |
11843 | Py_Finalize (); | |
11844 | return err == 0 ? 0 : 1; | |
3bebe2f2 JK |
11845 | ; |
11846 | return 0; | |
11847 | } | |
11848 | _ACEOF | |
11849 | if ac_fn_c_try_run "$LINENO"; then : | |
11850 | dynamic_list=true | |
11851 | fi | |
11852 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
11853 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
11854 | fi | |
11855 | ||
38f6b338 JK |
11856 | CFLAGS="$old_CFLAGS" |
11857 | fi | |
11858 | LDFLAGS="$old_LDFLAGS" | |
11859 | fi | |
11860 | if $dynamic_list; then | |
11861 | found="-Wl,--dynamic-list" | |
11862 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' | |
f6528abd | 11863 | else |
38f6b338 JK |
11864 | found="-rdynamic" |
11865 | RDYNAMIC="-rdynamic" | |
f6528abd | 11866 | fi |
f6528abd | 11867 | |
38f6b338 | 11868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
f6528abd | 11869 | $as_echo "$found" >&6; } |
0407b3f1 | 11870 | |
f6528abd | 11871 | |
0407b3f1 | 11872 | if test ${build} = ${host} -a ${host} = ${target} ; then |
c906108c | 11873 | case ${host_os} in |
c906108c | 11874 | solaris*) |
d92419e5 JB |
11875 | # See if thread_db library is around for Solaris thread debugging. |
11876 | # Note that we must explicitly test for version 1 of the library | |
11877 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
11878 | # the same API. | |
81ecdfbb RW |
11879 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris thread debugging library" >&5 |
11880 | $as_echo_n "checking for Solaris thread debugging library... " >&6; } | |
c906108c | 11881 | if test -f /usr/lib/libthread_db.so.1 ; then |
81ecdfbb RW |
11882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11883 | $as_echo "yes" >&6; } | |
60ca704f | 11884 | |
81ecdfbb | 11885 | $as_echo "#define HAVE_THREAD_DB_LIB 1" >>confdefs.h |
c906108c | 11886 | |
3483b318 | 11887 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 11888 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
81ecdfbb RW |
11889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
11890 | $as_echo_n "checking for dlopen in -ldl... " >&6; } | |
11891 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then : | |
11892 | $as_echo_n "(cached) " >&6 | |
c906108c | 11893 | else |
bec39cab | 11894 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 11895 | LIBS="-ldl $LIBS" |
81ecdfbb | 11896 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab AC |
11897 | /* end confdefs.h. */ |
11898 | ||
81ecdfbb RW |
11899 | /* Override any GCC internal prototype to avoid an error. |
11900 | Use char because int might match the return type of a GCC | |
11901 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
11902 | #ifdef __cplusplus |
11903 | extern "C" | |
11904 | #endif | |
bec39cab AC |
11905 | char dlopen (); |
11906 | int | |
11907 | main () | |
11908 | { | |
81ecdfbb | 11909 | return dlopen (); |
bec39cab AC |
11910 | ; |
11911 | return 0; | |
11912 | } | |
11913 | _ACEOF | |
81ecdfbb | 11914 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab AC |
11915 | ac_cv_lib_dl_dlopen=yes |
11916 | else | |
81ecdfbb | 11917 | ac_cv_lib_dl_dlopen=no |
bec39cab | 11918 | fi |
81ecdfbb RW |
11919 | rm -f core conftest.err conftest.$ac_objext \ |
11920 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab AC |
11921 | LIBS=$ac_check_lib_save_LIBS |
11922 | fi | |
81ecdfbb RW |
11923 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
11924 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } | |
11925 | if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : | |
bec39cab AC |
11926 | cat >>confdefs.h <<_ACEOF |
11927 | #define HAVE_LIBDL 1 | |
11928 | _ACEOF | |
c906108c SS |
11929 | |
11930 | LIBS="-ldl $LIBS" | |
11931 | ||
c906108c SS |
11932 | fi |
11933 | ||
f6528abd | 11934 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC" |
c906108c SS |
11935 | # Sun randomly tweaked the prototypes in <proc_service.h> |
11936 | # at one point. | |
81ecdfbb RW |
11937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5 |
11938 | $as_echo_n "checking if <proc_service.h> is old... " >&6; } | |
11939 | if test "${gdb_cv_proc_service_is_old+set}" = set; then : | |
11940 | $as_echo_n "(cached) " >&6 | |
c906108c | 11941 | else |
bec39cab | 11942 | |
81ecdfbb | 11943 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11944 | /* end confdefs.h. */ |
c906108c SS |
11945 | |
11946 | #include <proc_service.h> | |
11947 | ps_err_e ps_pdwrite | |
11948 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 11949 | |
bec39cab AC |
11950 | int |
11951 | main () | |
11952 | { | |
11953 | ||
11954 | ; | |
11955 | return 0; | |
11956 | } | |
11957 | _ACEOF | |
81ecdfbb | 11958 | if ac_fn_c_try_compile "$LINENO"; then : |
c906108c SS |
11959 | gdb_cv_proc_service_is_old=no |
11960 | else | |
81ecdfbb | 11961 | gdb_cv_proc_service_is_old=yes |
c906108c | 11962 | fi |
81ecdfbb | 11963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 11964 | |
c906108c SS |
11965 | fi |
11966 | ||
81ecdfbb RW |
11967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_proc_service_is_old" >&5 |
11968 | $as_echo "$gdb_cv_proc_service_is_old" >&6; } | |
c906108c | 11969 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f | 11970 | |
81ecdfbb | 11971 | $as_echo "#define PROC_SERVICE_IS_OLD 1" >>confdefs.h |
c906108c SS |
11972 | |
11973 | fi | |
11974 | else | |
81ecdfbb RW |
11975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
11976 | $as_echo "no" >&6; } | |
c906108c SS |
11977 | fi |
11978 | ;; | |
d92419e5 | 11979 | aix*) |
81ecdfbb RW |
11980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
11981 | $as_echo_n "checking for AiX thread debugging library... " >&6; } | |
11982 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then : | |
11983 | $as_echo_n "(cached) " >&6 | |
bec39cab | 11984 | else |
81ecdfbb | 11985 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 11986 | /* end confdefs.h. */ |
d92419e5 | 11987 | #include <sys/pthdebug.h> |
bec39cab AC |
11988 | int |
11989 | main () | |
11990 | { | |
d92419e5 JB |
11991 | #ifndef PTHDB_VERSION_3 |
11992 | #error | |
11993 | #endif | |
bec39cab AC |
11994 | ; |
11995 | return 0; | |
11996 | } | |
11997 | _ACEOF | |
81ecdfbb | 11998 | if ac_fn_c_try_compile "$LINENO"; then : |
d92419e5 JB |
11999 | gdb_cv_have_aix_thread_debug=yes |
12000 | else | |
81ecdfbb | 12001 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 12002 | fi |
81ecdfbb | 12003 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
12004 | fi |
12005 | ||
81ecdfbb RW |
12006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
12007 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } | |
d92419e5 JB |
12008 | if test $gdb_cv_have_aix_thread_debug = yes; then |
12009 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 12010 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
7f533142 | 12011 | LIBS="$LIBS -lpthdebug" |
d645e32e JB |
12012 | |
12013 | # Older versions of AIX do not provide the declaration for | |
12014 | # the getthrds function (it appears that it was introduced | |
12015 | # with AIX 6.x). | |
12016 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> | |
12017 | " | |
12018 | if test "x$ac_cv_have_decl_getthrds" = x""yes; then : | |
12019 | ac_have_decl=1 | |
12020 | else | |
12021 | ac_have_decl=0 | |
12022 | fi | |
12023 | ||
12024 | cat >>confdefs.h <<_ACEOF | |
12025 | #define HAVE_DECL_GETTHRDS $ac_have_decl | |
12026 | _ACEOF | |
12027 | ||
d92419e5 JB |
12028 | fi |
12029 | ;; | |
c906108c | 12030 | esac |
bec39cab | 12031 | |
c906108c SS |
12032 | fi |
12033 | ||
3f47be5c | 12034 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
81ecdfbb RW |
12035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
12036 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } | |
12037 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then : | |
12038 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12039 | else |
81ecdfbb | 12040 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12041 | /* end confdefs.h. */ |
3f47be5c | 12042 | #include <thread_db.h> |
bec39cab AC |
12043 | int |
12044 | main () | |
12045 | { | |
3f47be5c | 12046 | int i = TD_NOTALLOC; |
bec39cab AC |
12047 | ; |
12048 | return 0; | |
12049 | } | |
12050 | _ACEOF | |
81ecdfbb | 12051 | if ac_fn_c_try_compile "$LINENO"; then : |
3f47be5c EZ |
12052 | gdb_cv_thread_db_h_has_td_notalloc=yes |
12053 | else | |
81ecdfbb | 12054 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 12055 | |
3f47be5c | 12056 | fi |
81ecdfbb | 12057 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 12058 | |
bec39cab | 12059 | fi |
81ecdfbb RW |
12060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
12061 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } | |
12062 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 | |
12063 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } | |
12064 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then : | |
12065 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12066 | else |
81ecdfbb | 12067 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12068 | /* end confdefs.h. */ |
12069 | #include <thread_db.h> | |
12070 | int | |
12071 | main () | |
12072 | { | |
12073 | int i = TD_VERSION; | |
12074 | ; | |
12075 | return 0; | |
12076 | } | |
12077 | _ACEOF | |
81ecdfbb | 12078 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12079 | gdb_cv_thread_db_h_has_td_version=yes |
12080 | else | |
81ecdfbb | 12081 | gdb_cv_thread_db_h_has_td_version=no |
59f80f10 DJ |
12082 | |
12083 | fi | |
81ecdfbb | 12084 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12085 | |
12086 | fi | |
81ecdfbb RW |
12087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
12088 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } | |
12089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
12090 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } | |
12091 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then : | |
12092 | $as_echo_n "(cached) " >&6 | |
59f80f10 | 12093 | else |
81ecdfbb | 12094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
59f80f10 DJ |
12095 | /* end confdefs.h. */ |
12096 | #include <thread_db.h> | |
12097 | int | |
12098 | main () | |
12099 | { | |
12100 | int i = TD_NOTLS; | |
12101 | ; | |
12102 | return 0; | |
12103 | } | |
12104 | _ACEOF | |
81ecdfbb | 12105 | if ac_fn_c_try_compile "$LINENO"; then : |
59f80f10 DJ |
12106 | gdb_cv_thread_db_h_has_td_notls=yes |
12107 | else | |
81ecdfbb | 12108 | gdb_cv_thread_db_h_has_td_notls=no |
59f80f10 DJ |
12109 | |
12110 | fi | |
81ecdfbb | 12111 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
59f80f10 DJ |
12112 | |
12113 | fi | |
81ecdfbb RW |
12114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
12115 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } | |
3f47be5c EZ |
12116 | fi |
12117 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab | 12118 | |
81ecdfbb | 12119 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
3f47be5c | 12120 | |
59f80f10 DJ |
12121 | fi |
12122 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
12123 | ||
81ecdfbb | 12124 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
59f80f10 DJ |
12125 | |
12126 | fi | |
12127 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
12128 | ||
81ecdfbb | 12129 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
59f80f10 | 12130 | |
3f47be5c EZ |
12131 | fi |
12132 | ||
b757528f | 12133 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
81ecdfbb RW |
12134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
12135 | $as_echo_n "checking whether <sys/syscall.h> has __NR_tkill... " >&6; } | |
12136 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then : | |
12137 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12138 | else |
81ecdfbb | 12139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12140 | /* end confdefs.h. */ |
b757528f | 12141 | #include <sys/syscall.h> |
bec39cab AC |
12142 | int |
12143 | main () | |
12144 | { | |
b757528f | 12145 | int i = __NR_tkill; |
bec39cab AC |
12146 | ; |
12147 | return 0; | |
12148 | } | |
12149 | _ACEOF | |
81ecdfbb | 12150 | if ac_fn_c_try_compile "$LINENO"; then : |
b757528f JJ |
12151 | gdb_cv_sys_syscall_h_has_tkill=yes |
12152 | else | |
81ecdfbb | 12153 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 12154 | |
b757528f | 12155 | fi |
81ecdfbb | 12156 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 12157 | |
bec39cab | 12158 | fi |
81ecdfbb RW |
12159 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
12160 | $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; } | |
b757528f JJ |
12161 | fi |
12162 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab | 12163 | |
81ecdfbb | 12164 | $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h |
b757528f JJ |
12165 | |
12166 | fi | |
12167 | ||
81ecdfbb RW |
12168 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
12169 | " | |
12170 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = x""yes; then : | |
12171 | ac_have_decl=1 | |
10568435 | 12172 | else |
81ecdfbb | 12173 | ac_have_decl=0 |
10568435 | 12174 | fi |
10568435 JK |
12175 | |
12176 | cat >>confdefs.h <<_ACEOF | |
81ecdfbb | 12177 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
10568435 JK |
12178 | _ACEOF |
12179 | ||
12180 | ||
81ecdfbb RW |
12181 | if test "$cross_compiling" = yes; then : |
12182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
10568435 JK |
12183 | /* end confdefs.h. */ |
12184 | #include <sys/personality.h> | |
12185 | int | |
12186 | main () | |
12187 | { | |
12188 | ||
12189 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12190 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12191 | # endif | |
12192 | /* Test the flag could be set and stays set. */ | |
12193 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12194 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12195 | return 1 | |
12196 | ; | |
12197 | return 0; | |
12198 | } | |
12199 | _ACEOF | |
81ecdfbb | 12200 | if ac_fn_c_try_link "$LINENO"; then : |
10568435 JK |
12201 | have_personality=true |
12202 | else | |
81ecdfbb | 12203 | have_personality=false |
10568435 | 12204 | fi |
81ecdfbb RW |
12205 | rm -f core conftest.err conftest.$ac_objext \ |
12206 | conftest$ac_exeext conftest.$ac_ext | |
10568435 | 12207 | else |
81ecdfbb | 12208 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
10568435 JK |
12209 | /* end confdefs.h. */ |
12210 | #include <sys/personality.h> | |
12211 | int | |
12212 | main () | |
12213 | { | |
12214 | ||
12215 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
12216 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
12217 | # endif | |
12218 | /* Test the flag could be set and stays set. */ | |
12219 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
12220 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
12221 | return 1 | |
12222 | ; | |
12223 | return 0; | |
12224 | } | |
12225 | _ACEOF | |
81ecdfbb | 12226 | if ac_fn_c_try_run "$LINENO"; then : |
10568435 JK |
12227 | have_personality=true |
12228 | else | |
81ecdfbb | 12229 | have_personality=false |
10568435 | 12230 | fi |
81ecdfbb RW |
12231 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
12232 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
10568435 | 12233 | fi |
81ecdfbb | 12234 | |
10568435 JK |
12235 | if $have_personality |
12236 | then | |
12237 | ||
81ecdfbb | 12238 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
10568435 JK |
12239 | |
12240 | fi | |
12241 | ||
fb40c209 | 12242 | |
f83d8a90 DE |
12243 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
12244 | # except that the argument to --with-sysroot is optional. | |
12245 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. | |
12246 | if test "x$with_sysroot" = xyes; then | |
12247 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" | |
12248 | fi | |
bec39cab | 12249 | |
81ecdfbb RW |
12250 | # Check whether --with-sysroot was given. |
12251 | if test "${with_sysroot+set}" = set; then : | |
f83d8a90 DE |
12252 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
12253 | else | |
12254 | TARGET_SYSTEM_ROOT= | |
12255 | fi | |
030292b7 | 12256 | |
030292b7 | 12257 | |
f83d8a90 DE |
12258 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
12259 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12260 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` | |
12261 | ac_define_dir=`eval echo $ac_define_dir` | |
030292b7 | 12262 | |
f83d8a90 DE |
12263 | cat >>confdefs.h <<_ACEOF |
12264 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" | |
12265 | _ACEOF | |
bec39cab | 12266 | |
030292b7 | 12267 | |
b14b1491 | 12268 | |
f83d8a90 DE |
12269 | |
12270 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
12271 | if test "x$prefix" = xNONE; then | |
12272 | test_prefix=/usr/local | |
12273 | else | |
12274 | test_prefix=$prefix | |
12275 | fi | |
12276 | else | |
12277 | test_prefix=$exec_prefix | |
12278 | fi | |
12279 | value=0 | |
12280 | case ${ac_define_dir} in | |
12281 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12282 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12283 | value=1 | |
12284 | ;; | |
12285 | esac | |
12286 | ||
12287 | cat >>confdefs.h <<_ACEOF | |
12288 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value | |
12289 | _ACEOF | |
030292b7 DJ |
12290 | |
12291 | ||
12292 | ||
16e7150e | 12293 | |
16e7150e | 12294 | |
81ecdfbb RW |
12295 | # Check whether --with-system-gdbinit was given. |
12296 | if test "${with_system_gdbinit+set}" = set; then : | |
12297 | withval=$with_system_gdbinit; | |
b14b1491 TT |
12298 | SYSTEM_GDBINIT=$withval |
12299 | else | |
12300 | SYSTEM_GDBINIT= | |
81ecdfbb RW |
12301 | fi |
12302 | ||
16e7150e JG |
12303 | |
12304 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
12305 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
b14b1491 | 12306 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
16e7150e JG |
12307 | ac_define_dir=`eval echo $ac_define_dir` |
12308 | ||
12309 | cat >>confdefs.h <<_ACEOF | |
12310 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
12311 | _ACEOF | |
12312 | ||
12313 | ||
12314 | ||
0c4a4063 | 12315 | |
b14b1491 TT |
12316 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
12317 | if test "x$prefix" = xNONE; then | |
12318 | test_prefix=/usr/local | |
12319 | else | |
12320 | test_prefix=$prefix | |
12321 | fi | |
12322 | else | |
12323 | test_prefix=$exec_prefix | |
12324 | fi | |
12325 | value=0 | |
12326 | case ${ac_define_dir} in | |
12327 | "${test_prefix}"|"${test_prefix}/"*|\ | |
12328 | '${exec_prefix}'|'${exec_prefix}/'*) | |
12329 | value=1 | |
12330 | ;; | |
12331 | esac | |
16e7150e | 12332 | |
b14b1491 TT |
12333 | cat >>confdefs.h <<_ACEOF |
12334 | #define SYSTEM_GDBINIT_RELOCATABLE $value | |
16e7150e JG |
12335 | _ACEOF |
12336 | ||
b14b1491 | 12337 | |
16e7150e | 12338 | |
0c4a4063 | 12339 | |
81ecdfbb RW |
12340 | # Check whether --enable-werror was given. |
12341 | if test "${enable_werror+set}" = set; then : | |
12342 | enableval=$enable_werror; case "${enableval}" in | |
094a342e MK |
12343 | yes | y) ERROR_ON_WARNING="yes" ;; |
12344 | no | n) ERROR_ON_WARNING="no" ;; | |
81ecdfbb | 12345 | *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
094a342e | 12346 | esac |
81ecdfbb RW |
12347 | fi |
12348 | ||
094a342e | 12349 | |
a68ffae9 JK |
12350 | # Enable -Werror by default when using gcc. Turn it off for releases. |
12351 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then | |
094a342e MK |
12352 | ERROR_ON_WARNING=yes |
12353 | fi | |
12354 | ||
12355 | WERROR_CFLAGS="" | |
12356 | if test "${ERROR_ON_WARNING}" = yes ; then | |
12357 | WERROR_CFLAGS="-Werror" | |
12358 | fi | |
12359 | ||
aa79a185 DJ |
12360 | # The entries after -Wno-pointer-sign are disabled warnings which may |
12361 | # be enabled in the future, which can not currently be used to build | |
12362 | # GDB. | |
12363 | # NOTE: If you change this list, remember to update | |
3b851bce | 12364 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
12365 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
12366 | -Wformat-nonliteral -Wno-pointer-sign \ | |
1cb5e2a4 | 12367 | -Wno-unused -Wunused-value -Wunused-function \ |
352b3eda JB |
12368 | -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \ |
12369 | -Wdeclaration-after-statement" | |
a3b362c4 | 12370 | |
3526781e DJ |
12371 | # Enable -Wno-format by default when using gcc on mingw since many |
12372 | # GCC versions complain about %I64. | |
12373 | case "${host}" in | |
12374 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
12375 | esac | |
12376 | ||
81ecdfbb RW |
12377 | # Check whether --enable-build-warnings was given. |
12378 | if test "${enable_build_warnings+set}" = set; then : | |
12379 | enableval=$enable_build_warnings; case "${enableval}" in | |
c906108c SS |
12380 | yes) ;; |
12381 | no) build_warnings="-w";; | |
12382 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12383 | build_warnings="${build_warnings} ${t}";; | |
12384 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12385 | build_warnings="${t} ${build_warnings}";; | |
12386 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12387 | esac | |
d4f3574e | 12388 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 12389 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 12390 | fi |
81ecdfbb RW |
12391 | fi |
12392 | # Check whether --enable-gdb-build-warnings was given. | |
12393 | if test "${enable_gdb_build_warnings+set}" = set; then : | |
12394 | enableval=$enable_gdb_build_warnings; case "${enableval}" in | |
3b851bce AC |
12395 | yes) ;; |
12396 | no) build_warnings="-w";; | |
12397 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12398 | build_warnings="${build_warnings} ${t}";; | |
12399 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
12400 | build_warnings="${t} ${build_warnings}";; | |
12401 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
12402 | esac | |
12403 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
12404 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
12405 | fi | |
81ecdfbb RW |
12406 | fi |
12407 | WARN_CFLAGS="" | |
c906108c SS |
12408 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
12409 | then | |
81ecdfbb RW |
12410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
12411 | $as_echo_n "checking compiler warning flags... " >&6; } | |
746a987d AC |
12412 | # Separate out the -Werror flag as some files just cannot be |
12413 | # compiled with it enabled. | |
12414 | for w in ${build_warnings}; do | |
12415 | case $w in | |
12416 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
12417 | *) # Check that GCC accepts it | |
4536bbc6 AC |
12418 | saved_CFLAGS="$CFLAGS" |
12419 | CFLAGS="$CFLAGS $w" | |
81ecdfbb | 12420 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12421 | /* end confdefs.h. */ |
4536bbc6 | 12422 | |
bec39cab AC |
12423 | int |
12424 | main () | |
12425 | { | |
4536bbc6 | 12426 | |
bec39cab AC |
12427 | ; |
12428 | return 0; | |
12429 | } | |
12430 | _ACEOF | |
81ecdfbb | 12431 | if ac_fn_c_try_compile "$LINENO"; then : |
4536bbc6 | 12432 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
4536bbc6 | 12433 | fi |
81ecdfbb | 12434 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 12435 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
12436 | esac |
12437 | done | |
81ecdfbb RW |
12438 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
12439 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } | |
c906108c SS |
12440 | fi |
12441 | ||
12442 | ||
104c1213 | 12443 | |
7a292a7a | 12444 | # In the Cygwin environment, we need some additional flags. |
81ecdfbb RW |
12445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
12446 | $as_echo_n "checking for cygwin... " >&6; } | |
12447 | if test "${gdb_cv_os_cygwin+set}" = set; then : | |
12448 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12449 | else |
81ecdfbb | 12450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 12451 | /* end confdefs.h. */ |
7a292a7a SS |
12452 | |
12453 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
12454 | lose | |
12455 | #endif | |
bec39cab | 12456 | _ACEOF |
7a292a7a | 12457 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
81ecdfbb | 12458 | $EGREP "lose" >/dev/null 2>&1; then : |
7a292a7a SS |
12459 | gdb_cv_os_cygwin=yes |
12460 | else | |
7a292a7a SS |
12461 | gdb_cv_os_cygwin=no |
12462 | fi | |
12463 | rm -f conftest* | |
12464 | ||
12465 | fi | |
81ecdfbb RW |
12466 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
12467 | $as_echo "$gdb_cv_os_cygwin" >&6; } | |
7a292a7a | 12468 | |
aff38e61 | 12469 | |
3eb25fda | 12470 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 12471 | case ${host} in |
95cbc983 AC |
12472 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
12473 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 12474 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
12475 | esac |
12476 | ||
12477 | ||
cd0fc7c3 SS |
12478 | # libreadline needs libuser32.a in a cygwin environment |
12479 | WIN32LIBS= | |
12480 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
12481 | WIN32LIBS="-luser32" |
12482 | case "${target}" in | |
12483 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
12484 | ;; | |
12485 | esac | |
cd0fc7c3 | 12486 | fi |
c906108c | 12487 | |
b4505029 MM |
12488 | # The ser-tcp.c module requires sockets. |
12489 | case ${host} in | |
12490 | *mingw32*) | |
12491 | ||
81ecdfbb | 12492 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
b4505029 MM |
12493 | |
12494 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
12495 | ;; | |
12496 | esac | |
12497 | ||
7a292a7a | 12498 | |
31d99776 DJ |
12499 | # Add ELF support to GDB, but only if BFD includes ELF support. |
12500 | OLD_CFLAGS=$CFLAGS | |
12501 | OLD_LDFLAGS=$LDFLAGS | |
12502 | OLD_LIBS=$LIBS | |
12cd34f3 PA |
12503 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
12504 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We | |
12505 | # always want our bfd. | |
12506 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" | |
5579a92e | 12507 | LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" |
7b3200f9 | 12508 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
075ff26d JK |
12509 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12510 | if test "$plugins" = "yes"; then | |
12511 | LIBS="-ldl $LIBS" | |
12512 | fi | |
0f72fb1c | 12513 | LIBS="-lbfd -liberty $intl $LIBS" |
81ecdfbb RW |
12514 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
12515 | $as_echo_n "checking for ELF support in BFD... " >&6; } | |
12516 | if test "${gdb_cv_var_elf+set}" = set; then : | |
12517 | $as_echo_n "(cached) " >&6 | |
31d99776 | 12518 | else |
81ecdfbb | 12519 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
31d99776 DJ |
12520 | /* end confdefs.h. */ |
12521 | #include <stdlib.h> | |
12522 | #include "bfd.h" | |
12523 | #include "elf-bfd.h" | |
12524 | ||
12525 | int | |
12526 | main () | |
12527 | { | |
12528 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
12529 | ; | |
12530 | return 0; | |
12531 | } | |
12532 | _ACEOF | |
81ecdfbb | 12533 | if ac_fn_c_try_link "$LINENO"; then : |
31d99776 DJ |
12534 | gdb_cv_var_elf=yes |
12535 | else | |
81ecdfbb | 12536 | gdb_cv_var_elf=no |
31d99776 | 12537 | fi |
81ecdfbb RW |
12538 | rm -f core conftest.err conftest.$ac_objext \ |
12539 | conftest$ac_exeext conftest.$ac_ext | |
31d99776 | 12540 | fi |
81ecdfbb RW |
12541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
12542 | $as_echo "$gdb_cv_var_elf" >&6; } | |
31d99776 | 12543 | if test $gdb_cv_var_elf = yes; then |
55aa24fb | 12544 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o" |
31d99776 | 12545 | |
81ecdfbb | 12546 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
31d99776 | 12547 | |
075ff26d JK |
12548 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
12549 | if test "$plugins" = "yes"; then | |
12550 | OLD_LIBS="-ldl $OLD_LIBS" | |
12551 | fi | |
31d99776 DJ |
12552 | fi |
12553 | CFLAGS=$OLD_CFLAGS | |
12554 | LDFLAGS=$OLD_LDFLAGS | |
12555 | LIBS=$OLD_LIBS | |
12556 | ||
121ce6e5 DJ |
12557 | # Add any host-specific objects to GDB. |
12558 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
12559 | ||
3fc11d3e JM |
12560 | LIBGUI="../libgui/src/libgui.a" |
12561 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
12562 | ||
12563 | ||
7a292a7a | 12564 | |
3fc11d3e JM |
12565 | WIN32LDAPP= |
12566 | ||
12567 | ||
12568 | ||
d91670b9 | 12569 | case "${host}" in |
686a5eed | 12570 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
12571 | configdir="win" |
12572 | ;; | |
12573 | *) | |
12574 | configdir="unix" | |
12575 | ;; | |
12576 | esac | |
3fc11d3e JM |
12577 | |
12578 | GDBTKLIBS= | |
12579 | if test "${enable_gdbtk}" = "yes"; then | |
12580 | ||
d1c3b63a KS |
12581 | # Gdbtk must have an absolute path to srcdir in order to run |
12582 | # properly when not installed. | |
12583 | here=`pwd` | |
12584 | cd ${srcdir} | |
12585 | GDBTK_SRC_DIR=`pwd` | |
12586 | cd $here | |
12587 | ||
bec39cab | 12588 | |
5062cc19 KS |
12589 | # |
12590 | # Ok, lets find the tcl configuration | |
12591 | # First, look for one uninstalled. | |
12592 | # the alternative search directory is invoked by --with-tcl | |
12593 | # | |
3fc11d3e | 12594 | |
5062cc19 KS |
12595 | if test x"${no_tcl}" = x ; then |
12596 | # we reset no_tcl in case something fails here | |
12597 | no_tcl=true | |
bec39cab | 12598 | |
81ecdfbb RW |
12599 | # Check whether --with-tcl was given. |
12600 | if test "${with_tcl+set}" = set; then : | |
12601 | withval=$with_tcl; with_tclconfig=${withval} | |
12602 | fi | |
12603 | ||
12604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 | |
12605 | $as_echo_n "checking for Tcl configuration... " >&6; } | |
12606 | if test "${ac_cv_c_tclconfig+set}" = set; then : | |
12607 | $as_echo_n "(cached) " >&6 | |
3fc11d3e | 12608 | else |
bec39cab | 12609 | |
3fc11d3e | 12610 | |
5062cc19 KS |
12611 | # First check to see if --with-tcl was specified. |
12612 | case "${host}" in | |
12613 | *-*-cygwin*) platDir="win" ;; | |
12614 | *) platDir="unix" ;; | |
12615 | esac | |
12616 | if test x"${with_tclconfig}" != x ; then | |
12617 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
12618 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
12619 | else | |
81ecdfbb | 12620 | as_fn_error "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
5062cc19 KS |
12621 | fi |
12622 | fi | |
12623 | ||
12624 | # then check for a private Tcl installation | |
12625 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12626 | for i in \ | |
12627 | ../tcl \ | |
12628 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12629 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
12630 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
12631 | ../../tcl \ | |
12632 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12633 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
12634 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
12635 | ../../../tcl \ | |
12636 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12637 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
12638 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
12639 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
12640 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
12641 | break | |
12642 | fi | |
12643 | done | |
12644 | fi | |
12645 | ||
12646 | # on Darwin, check in Framework installation locations | |
12647 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
12648 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
12649 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
12650 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
12651 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
12652 | ; do | |
12653 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
12654 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
12655 | break | |
12656 | fi | |
12657 | done | |
12658 | fi | |
12659 | ||
12660 | # check in a few common install locations | |
12661 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12662 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
12663 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
12664 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
12665 | `ls -d /usr/local/lib 2>/dev/null` \ | |
12666 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
12667 | `ls -d /usr/lib 2>/dev/null` \ | |
12668 | ; do | |
12669 | if test -f "$i/tclConfig.sh" ; then | |
12670 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
12671 | break | |
12672 | fi | |
12673 | done | |
12674 | fi | |
3fc11d3e | 12675 | |
5062cc19 KS |
12676 | # check in a few other private locations |
12677 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12678 | for i in \ | |
12679 | ${srcdir}/../tcl \ | |
12680 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12681 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
12682 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
12683 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
12684 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
12685 | break | |
12686 | fi | |
12687 | done | |
12688 | fi | |
bec39cab | 12689 | |
3fc11d3e JM |
12690 | fi |
12691 | ||
5062cc19 KS |
12692 | |
12693 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
12694 | TCL_BIN_DIR="# no Tcl configs found" | |
81ecdfbb RW |
12695 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
12696 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} | |
5062cc19 KS |
12697 | else |
12698 | no_tcl= | |
12699 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
81ecdfbb RW |
12700 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12701 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
5062cc19 KS |
12702 | fi |
12703 | fi | |
3fc11d3e | 12704 | |
bec39cab | 12705 | |
85541719 DE |
12706 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
12707 | # point to doing Tcl. | |
bec39cab | 12708 | |
5062cc19 KS |
12709 | # |
12710 | # Ok, lets find the tk configuration | |
12711 | # First, look for one uninstalled. | |
12712 | # the alternative search directory is invoked by --with-tk | |
12713 | # | |
3fc11d3e | 12714 | |
5062cc19 KS |
12715 | if test x"${no_tk}" = x ; then |
12716 | # we reset no_tk in case something fails here | |
12717 | no_tk=true | |
bec39cab | 12718 | |
81ecdfbb RW |
12719 | # Check whether --with-tk was given. |
12720 | if test "${with_tk+set}" = set; then : | |
12721 | withval=$with_tk; with_tkconfig=${withval} | |
12722 | fi | |
12723 | ||
12724 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 | |
12725 | $as_echo_n "checking for Tk configuration... " >&6; } | |
12726 | if test "${ac_cv_c_tkconfig+set}" = set; then : | |
12727 | $as_echo_n "(cached) " >&6 | |
bec39cab | 12728 | else |
3fc11d3e JM |
12729 | |
12730 | ||
5062cc19 KS |
12731 | # First check to see if --with-tkconfig was specified. |
12732 | if test x"${with_tkconfig}" != x ; then | |
12733 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
12734 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
12735 | else | |
81ecdfbb | 12736 | as_fn_error "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
5062cc19 KS |
12737 | fi |
12738 | fi | |
3fc11d3e | 12739 | |
5062cc19 KS |
12740 | # then check for a private Tk library |
12741 | case "${host}" in | |
12742 | *-*-cygwin*) platDir="win" ;; | |
12743 | *) platDir="unix" ;; | |
12744 | esac | |
12745 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12746 | for i in \ | |
12747 | ../tk \ | |
12748 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12749 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
12750 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
12751 | ../../tk \ | |
12752 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12753 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
12754 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
12755 | ../../../tk \ | |
12756 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12757 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
12758 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
12759 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
12760 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
12761 | break | |
12762 | fi | |
12763 | done | |
12764 | fi | |
12765 | ||
12766 | # on Darwin, check in Framework installation locations | |
12767 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
12768 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
12769 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
12770 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
12771 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
12772 | ; do | |
12773 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
12774 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
12775 | break | |
12776 | fi | |
12777 | done | |
12778 | fi | |
12779 | ||
12780 | # check in a few common install locations | |
12781 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12782 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
12783 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
12784 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
12785 | `ls -d /usr/local/lib 2>/dev/null` \ | |
12786 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
12787 | `ls -d /usr/lib 2>/dev/null` \ | |
12788 | ; do | |
12789 | if test -f "$i/tkConfig.sh" ; then | |
12790 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
12791 | break | |
12792 | fi | |
12793 | done | |
12794 | fi | |
12795 | # check in a few other private locations | |
12796 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
12797 | for i in \ | |
12798 | ${srcdir}/../tk \ | |
12799 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
12800 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
12801 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
12802 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
12803 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
12804 | break | |
12805 | fi | |
12806 | done | |
12807 | fi | |
3fc11d3e | 12808 | |
3fc11d3e JM |
12809 | fi |
12810 | ||
12811 | ||
5062cc19 KS |
12812 | if test x"${ac_cv_c_tkconfig}" = x ; then |
12813 | TK_BIN_DIR="# no Tk configs found" | |
81ecdfbb RW |
12814 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
12815 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
12816 | else |
12817 | no_tk= | |
12818 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
81ecdfbb RW |
12819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12820 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
5062cc19 | 12821 | fi |
3fc11d3e | 12822 | fi |
dd2504ab | 12823 | |
dd2504ab | 12824 | |
85541719 DE |
12825 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
12826 | ||
81ecdfbb RW |
12827 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12828 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } | |
85541719 DE |
12829 | |
12830 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
81ecdfbb RW |
12831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
12832 | $as_echo "loading" >&6; } | |
85541719 DE |
12833 | . ${TCL_BIN_DIR}/tclConfig.sh |
12834 | else | |
81ecdfbb RW |
12835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
12836 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } | |
85541719 DE |
12837 | fi |
12838 | ||
12839 | # eval is required to do the TCL_DBGX substitution | |
12840 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
12841 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
12842 | ||
12843 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
12844 | # then set the common variable name to the value of the build variables. | |
12845 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
12846 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
12847 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
12848 | # installed and uninstalled version of Tcl. | |
12849 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
12850 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
12851 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
12852 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
12853 | elif test "`uname -s`" = "Darwin"; then | |
12854 | # If Tcl was built as a framework, attempt to use the libraries | |
12855 | # from the framework at the given location so that linking works | |
a68ffae9 | 12856 | # against Tcl.framework installed in an arbitrary location. |
85541719 DE |
12857 | case ${TCL_DEFS} in |
12858 | *TCL_FRAMEWORK*) | |
12859 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
12860 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
12861 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
12862 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
12863 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
12864 | break | |
12865 | fi | |
12866 | done | |
12867 | fi | |
12868 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
12869 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
12870 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
12871 | fi | |
12872 | ;; | |
12873 | esac | |
12874 | fi | |
12875 | ||
12876 | # eval is required to do the TCL_DBGX substitution | |
12877 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
12878 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
12879 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
12880 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
12881 | ||
12882 | ||
12883 | ||
12884 | ||
12885 | ||
12886 | ||
12887 | ||
12888 | ||
12889 | ||
12890 | ||
12891 | ||
12892 | ||
12893 | ||
12894 | ||
12895 | ||
12896 | # Check for in-tree tcl | |
12897 | here=`pwd` | |
12898 | cd ${srcdir}/.. | |
12899 | topdir=`pwd` | |
12900 | cd ${here} | |
12901 | ||
12902 | intree="no" | |
12903 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
12904 | intree="yes" | |
12905 | fi | |
12906 | ||
12907 | # Find Tcl private headers | |
12908 | if test x"${intree}" = xno; then | |
12909 | ||
81ecdfbb RW |
12910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
12911 | $as_echo_n "checking for Tcl private headers... " >&6; } | |
85541719 DE |
12912 | private_dir="" |
12913 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
12914 | if test -f ${dir}/tclInt.h ; then | |
12915 | private_dir=${dir} | |
12916 | fi | |
12917 | ||
12918 | if test x"${private_dir}" = x; then | |
81ecdfbb | 12919 | as_fn_error "could not find private Tcl headers" "$LINENO" 5 |
85541719 DE |
12920 | else |
12921 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
81ecdfbb RW |
12922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
12923 | $as_echo "${private_dir}" >&6; } | |
85541719 DE |
12924 | fi |
12925 | ||
12926 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
12927 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
12928 | TCL_DEPS="" | |
12929 | else | |
12930 | # If building tcl in the same src tree, private headers | |
12931 | # are not needed, but we need to be sure to use the right | |
12932 | # headers library | |
12933 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
12934 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
12935 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
12936 | fi | |
12937 | ||
12938 | ||
12939 | ||
12940 | ||
12941 | ||
81ecdfbb RW |
12942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12943 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } | |
dd2504ab | 12944 | |
5062cc19 | 12945 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
81ecdfbb RW |
12946 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
12947 | $as_echo "loading" >&6; } | |
5062cc19 | 12948 | . ${TK_BIN_DIR}/tkConfig.sh |
3fc11d3e | 12949 | else |
81ecdfbb RW |
12950 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
12951 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } | |
3fc11d3e | 12952 | fi |
bec39cab | 12953 | |
5062cc19 KS |
12954 | # eval is required to do the TK_DBGX substitution |
12955 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
12956 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
12957 | ||
12958 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
12959 | # then set the common variable name to the value of the build variables. | |
12960 | # For example, the variable TK_LIB_SPEC will be set to the value | |
12961 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
12962 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
12963 | # installed and uninstalled version of Tcl. | |
85541719 | 12964 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
12965 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
12966 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
12967 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
12968 | elif test "`uname -s`" = "Darwin"; then | |
12969 | # If Tk was built as a framework, attempt to use the libraries | |
12970 | # from the framework at the given location so that linking works | |
a68ffae9 | 12971 | # against Tk.framework installed in an arbitrary location. |
5062cc19 KS |
12972 | case ${TK_DEFS} in |
12973 | *TK_FRAMEWORK*) | |
85541719 | 12974 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
12975 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
12976 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
12977 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
12978 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
12979 | break | |
12980 | fi | |
12981 | done | |
12982 | fi | |
85541719 | 12983 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
12984 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
12985 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
12986 | fi | |
12987 | ;; | |
12988 | esac | |
3fc11d3e JM |
12989 | fi |
12990 | ||
5062cc19 KS |
12991 | # eval is required to do the TK_DBGX substitution |
12992 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
12993 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
12994 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
12995 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 12996 | |
3fc11d3e JM |
12997 | |
12998 | ||
bec39cab AC |
12999 | |
13000 | ||
13001 | ||
13002 | ||
13003 | ||
13004 | ||
13005 | ||
3fc11d3e | 13006 | |
3fc11d3e | 13007 | |
bec39cab | 13008 | |
bec39cab | 13009 | |
85541719 DE |
13010 | # Check for in-tree Tk |
13011 | intree="no" | |
13012 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
13013 | intree="yes" | |
13014 | fi | |
3fc11d3e | 13015 | |
85541719 DE |
13016 | # Find Tk private headers |
13017 | if test x"${intree}" = xno; then | |
3fc11d3e | 13018 | |
81ecdfbb RW |
13019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
13020 | $as_echo_n "checking for Tk private headers... " >&6; } | |
5062cc19 KS |
13021 | private_dir="" |
13022 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
13023 | if test -f ${dir}/tkInt.h; then | |
13024 | private_dir=${dir} | |
3fc11d3e | 13025 | fi |
bec39cab | 13026 | |
5062cc19 | 13027 | if test x"${private_dir}" = x; then |
81ecdfbb | 13028 | as_fn_error "could not find Tk private headers" "$LINENO" 5 |
3fc11d3e | 13029 | else |
5062cc19 | 13030 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
81ecdfbb RW |
13031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
13032 | $as_echo "${private_dir}" >&6; } | |
3fc11d3e | 13033 | fi |
3fc11d3e | 13034 | |
85541719 DE |
13035 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
13036 | TK_LIBRARY=${TK_LIB_SPEC} | |
13037 | TK_DEPS="" | |
13038 | else | |
13039 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
13040 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
13041 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
13042 | fi | |
3fc11d3e JM |
13043 | |
13044 | ||
3fc11d3e JM |
13045 | |
13046 | ||
3fc11d3e | 13047 | |
85541719 | 13048 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 13049 | |
85541719 DE |
13050 | # Include some libraries that Tcl and Tk want. |
13051 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
13052 | # Yes, the ordering seems wrong here. But it isn't. | |
13053 | # TK_LIBS is the list of libraries that need to be linked | |
13054 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
13055 | # were in LIBS then any link tests after this point would | |
13056 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
13057 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 13058 | |
85541719 DE |
13059 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
13060 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
13061 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
13062 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
13063 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
13064 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
13065 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 13066 | |
85541719 DE |
13067 | if test x$gdb_cv_os_cygwin = xyes; then |
13068 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
13069 | WIN32LDAPP="-Wl,--subsystem,console" | |
13070 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 13071 | fi |
ffc6a242 | 13072 | |
81ecdfbb | 13073 | subdirs="$subdirs gdbtk" |
3ace7edb | 13074 | |
85541719 | 13075 | fi |
3fc11d3e JM |
13076 | fi |
13077 | ||
13078 | ||
13079 | ||
13080 | ||
13081 | ||
13082 | ||
13083 | ||
13084 | ||
81ecdfbb RW |
13085 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
13086 | $as_echo_n "checking for X... " >&6; } | |
bec39cab | 13087 | |
c906108c | 13088 | |
81ecdfbb RW |
13089 | # Check whether --with-x was given. |
13090 | if test "${with_x+set}" = set; then : | |
13091 | withval=$with_x; | |
13092 | fi | |
c906108c SS |
13093 | |
13094 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
13095 | if test "x$with_x" = xno; then | |
13096 | # The user explicitly disabled X. | |
13097 | have_x=disabled | |
13098 | else | |
81ecdfbb RW |
13099 | case $x_includes,$x_libraries in #( |
13100 | *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( | |
13101 | *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : | |
13102 | $as_echo_n "(cached) " >&6 | |
c906108c SS |
13103 | else |
13104 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 13105 | ac_x_includes=no ac_x_libraries=no |
81ecdfbb | 13106 | rm -f -r conftest.dir |
bec39cab AC |
13107 | if mkdir conftest.dir; then |
13108 | cd conftest.dir | |
bec39cab | 13109 | cat >Imakefile <<'_ACEOF' |
81ecdfbb RW |
13110 | incroot: |
13111 | @echo incroot='${INCROOT}' | |
13112 | usrlibdir: | |
13113 | @echo usrlibdir='${USRLIBDIR}' | |
13114 | libdir: | |
13115 | @echo libdir='${LIBDIR}' | |
13116 | _ACEOF | |
13117 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
c906108c | 13118 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
81ecdfbb RW |
13119 | for ac_var in incroot usrlibdir libdir; do |
13120 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
13121 | done | |
c906108c | 13122 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
81ecdfbb RW |
13123 | for ac_extension in a so sl dylib la dll; do |
13124 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
13125 | test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
bec39cab | 13126 | ac_im_usrlibdir=$ac_im_libdir; break |
c906108c SS |
13127 | fi |
13128 | done | |
13129 | # Screen out bogus values from the imake configuration. They are | |
13130 | # bogus both because they are the default anyway, and because | |
13131 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 13132 | case $ac_im_incroot in |
81ecdfbb | 13133 | /usr/include) ac_x_includes= ;; |
bec39cab | 13134 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 13135 | esac |
bec39cab | 13136 | case $ac_im_usrlibdir in |
81ecdfbb | 13137 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
bec39cab | 13138 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
13139 | esac |
13140 | fi | |
13141 | cd .. | |
81ecdfbb | 13142 | rm -f -r conftest.dir |
c906108c SS |
13143 | fi |
13144 | ||
bec39cab AC |
13145 | # Standard set of common directories for X headers. |
13146 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
13147 | ac_x_header_dirs=' | |
13148 | /usr/X11/include | |
81ecdfbb | 13149 | /usr/X11R7/include |
bec39cab AC |
13150 | /usr/X11R6/include |
13151 | /usr/X11R5/include | |
13152 | /usr/X11R4/include | |
13153 | ||
13154 | /usr/include/X11 | |
81ecdfbb | 13155 | /usr/include/X11R7 |
bec39cab AC |
13156 | /usr/include/X11R6 |
13157 | /usr/include/X11R5 | |
13158 | /usr/include/X11R4 | |
13159 | ||
13160 | /usr/local/X11/include | |
81ecdfbb | 13161 | /usr/local/X11R7/include |
bec39cab AC |
13162 | /usr/local/X11R6/include |
13163 | /usr/local/X11R5/include | |
13164 | /usr/local/X11R4/include | |
13165 | ||
13166 | /usr/local/include/X11 | |
81ecdfbb | 13167 | /usr/local/include/X11R7 |
bec39cab AC |
13168 | /usr/local/include/X11R6 |
13169 | /usr/local/include/X11R5 | |
13170 | /usr/local/include/X11R4 | |
13171 | ||
13172 | /usr/X386/include | |
13173 | /usr/x386/include | |
13174 | /usr/XFree86/include/X11 | |
13175 | ||
13176 | /usr/include | |
13177 | /usr/local/include | |
13178 | /usr/unsupported/include | |
13179 | /usr/athena/include | |
13180 | /usr/local/x11r5/include | |
13181 | /usr/lpp/Xamples/include | |
13182 | ||
13183 | /usr/openwin/include | |
13184 | /usr/openwin/share/include' | |
13185 | ||
13186 | if test "$ac_x_includes" = no; then | |
81ecdfbb | 13187 | # Guess where to find include files, by looking for Xlib.h. |
c906108c | 13188 | # First, try using that file with no special directory specified. |
81ecdfbb | 13189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
bec39cab | 13190 | /* end confdefs.h. */ |
81ecdfbb | 13191 | #include <X11/Xlib.h> |
bec39cab | 13192 | _ACEOF |
81ecdfbb | 13193 | if ac_fn_c_try_cpp "$LINENO"; then : |
c906108c SS |
13194 | # We can compile using X headers with no special include directory. |
13195 | ac_x_includes= | |
13196 | else | |
bec39cab | 13197 | for ac_dir in $ac_x_header_dirs; do |
81ecdfbb | 13198 | if test -r "$ac_dir/X11/Xlib.h"; then |
bec39cab AC |
13199 | ac_x_includes=$ac_dir |
13200 | break | |
13201 | fi | |
13202 | done | |
c906108c | 13203 | fi |
bec39cab AC |
13204 | rm -f conftest.err conftest.$ac_ext |
13205 | fi # $ac_x_includes = no | |
c906108c | 13206 | |
bec39cab | 13207 | if test "$ac_x_libraries" = no; then |
c906108c | 13208 | # Check for the libraries. |
c906108c SS |
13209 | # See if we find them without any special options. |
13210 | # Don't add to $LIBS permanently. | |
bec39cab | 13211 | ac_save_LIBS=$LIBS |
81ecdfbb RW |
13212 | LIBS="-lX11 $LIBS" |
13213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
bec39cab | 13214 | /* end confdefs.h. */ |
81ecdfbb | 13215 | #include <X11/Xlib.h> |
bec39cab AC |
13216 | int |
13217 | main () | |
13218 | { | |
81ecdfbb | 13219 | XrmInitialize () |
bec39cab AC |
13220 | ; |
13221 | return 0; | |
13222 | } | |
13223 | _ACEOF | |
81ecdfbb | 13224 | if ac_fn_c_try_link "$LINENO"; then : |
bec39cab | 13225 | LIBS=$ac_save_LIBS |
c906108c SS |
13226 | # We can link X programs with no special library path. |
13227 | ac_x_libraries= | |
13228 | else | |
81ecdfbb RW |
13229 | LIBS=$ac_save_LIBS |
13230 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
c906108c | 13231 | do |
bec39cab | 13232 | # Don't even attempt the hair of trying to link an X program! |
81ecdfbb RW |
13233 | for ac_extension in a so sl dylib la dll; do |
13234 | if test -r "$ac_dir/libX11.$ac_extension"; then | |
c906108c SS |
13235 | ac_x_libraries=$ac_dir |
13236 | break 2 | |
13237 | fi | |
13238 | done | |
13239 | done | |
13240 | fi | |
81ecdfbb RW |
13241 | rm -f core conftest.err conftest.$ac_objext \ |
13242 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 13243 | fi # $ac_x_libraries = no |
c906108c | 13244 | |
81ecdfbb RW |
13245 | case $ac_x_includes,$ac_x_libraries in #( |
13246 | no,* | *,no | *\'*) | |
13247 | # Didn't find X, or a directory has "'" in its name. | |
13248 | ac_cv_have_x="have_x=no";; #( | |
13249 | *) | |
13250 | # Record where we found X for the cache. | |
13251 | ac_cv_have_x="have_x=yes\ | |
13252 | ac_x_includes='$ac_x_includes'\ | |
13253 | ac_x_libraries='$ac_x_libraries'" | |
13254 | esac | |
c906108c | 13255 | fi |
81ecdfbb RW |
13256 | ;; #( |
13257 | *) have_x=yes;; | |
13258 | esac | |
c906108c SS |
13259 | eval "$ac_cv_have_x" |
13260 | fi # $with_x != no | |
13261 | ||
13262 | if test "$have_x" != yes; then | |
81ecdfbb RW |
13263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
13264 | $as_echo "$have_x" >&6; } | |
c906108c SS |
13265 | no_x=yes |
13266 | else | |
13267 | # If each of the values was on the command line, it overrides each guess. | |
13268 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
13269 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
13270 | # Update the cache value to reflect the command line values. | |
81ecdfbb RW |
13271 | ac_cv_have_x="have_x=yes\ |
13272 | ac_x_includes='$x_includes'\ | |
13273 | ac_x_libraries='$x_libraries'" | |
13274 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
13275 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
c906108c SS |
13276 | fi |
13277 | ||
13278 | ||
bec39cab | 13279 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 13280 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
13281 | # This code just checks for a few cases where we'd like to ignore those |
13282 | # definitions, even when they're present in the '.mt' file. These cases | |
13283 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 13284 | # not part of the source tree. |
7a292a7a | 13285 | # |
81ecdfbb RW |
13286 | # Check whether --enable-sim was given. |
13287 | if test "${enable_sim+set}" = set; then : | |
13288 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
13289 | echo "enableval = ${enableval}"; |
13290 | case "${enableval}" in | |
13291 | yes) ignore_sim=false ;; | |
13292 | no) ignore_sim=true ;; | |
13293 | *) ignore_sim=false ;; | |
13294 | esac | |
13295 | else | |
13296 | ignore_sim=false | |
81ecdfbb RW |
13297 | fi |
13298 | ||
7a292a7a SS |
13299 | |
13300 | if test ! -d "${srcdir}/../sim"; then | |
13301 | ignore_sim=true | |
13302 | fi | |
13303 | ||
9b624dbe UW |
13304 | SIM= |
13305 | SIM_OBS= | |
13306 | if test "${ignore_sim}" = "false"; then | |
13307 | if test x"${gdb_sim}" != x ; then | |
13308 | SIM="${gdb_sim}" | |
13309 | SIM_OBS="remote-sim.o" | |
60ca704f | 13310 | |
81ecdfbb | 13311 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
7a292a7a | 13312 | |
9b624dbe | 13313 | fi |
7a292a7a SS |
13314 | fi |
13315 | ||
13316 | ||
13317 | ||
c906108c SS |
13318 | |
13319 | ||
13320 | ||
13321 | ||
13322 | ||
13323 | ||
dfcd3bfb | 13324 | |
e56ac5c3 AC |
13325 | |
13326 | ||
b3a90332 AC |
13327 | |
13328 | ||
c35f4ffc | 13329 | # List of host floatformats. |
bec39cab AC |
13330 | |
13331 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13332 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 13333 | _ACEOF |
c35f4ffc | 13334 | |
bec39cab AC |
13335 | |
13336 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 13337 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
13338 | _ACEOF |
13339 | ||
c35f4ffc | 13340 | |
bec39cab | 13341 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 13342 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 13343 | _ACEOF |
c35f4ffc AC |
13344 | |
13345 | ||
c906108c SS |
13346 | # target_subdir is used by the testsuite to find the target libraries. |
13347 | target_subdir= | |
13348 | if test "${host}" != "${target}"; then | |
13349 | target_subdir="${target_alias}/" | |
13350 | fi | |
13351 | ||
13352 | ||
13353 | frags= | |
771b4502 | 13354 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
13355 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
13356 | if test ! -f ${host_makefile_frag}; then | |
81ecdfbb | 13357 | as_fn_error "\"*** Gdb does not support native target ${host}\"" "$LINENO" 5 |
0dad8a66 MK |
13358 | fi |
13359 | frags="$frags $host_makefile_frag" | |
13360 | else | |
13361 | host_makefile_frag=/dev/null | |
c906108c | 13362 | fi |
c906108c | 13363 | |
c906108c SS |
13364 | |
13365 | ||
13366 | ||
771b4502 | 13367 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
13368 | # We pick this up from the host configuration file (.mh) because we |
13369 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
13370 | nativefile=`sed -n ' |
13371 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
13372 | ' ${host_makefile_frag}` | |
c906108c SS |
13373 | fi |
13374 | ||
13375 | ||
b00a8037 | 13376 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
13377 | |
13378 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 13379 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 13380 | _ACEOF |
b00a8037 DJ |
13381 | |
13382 | fi | |
13383 | ||
8dcde887 | 13384 | # Enable multi-ice-gdb-server. |
81ecdfbb RW |
13385 | # Check whether --enable-multi-ice was given. |
13386 | if test "${enable_multi_ice+set}" = set; then : | |
13387 | enableval=$enable_multi_ice; case $enableval in | |
8dcde887 MK |
13388 | yes | no) |
13389 | ;; | |
81ecdfbb | 13390 | *) as_fn_error "bad value $enableval for --enable-multi-ice" "$LINENO" 5 ;; |
8dcde887 | 13391 | esac |
81ecdfbb | 13392 | fi |
b4e70030 | 13393 | |
81ecdfbb RW |
13394 | if test "x$enable_multi_ice" = xyes; then |
13395 | subdirs="$subdirs multi-ice" | |
3ace7edb | 13396 | |
a85f51e7 DJ |
13397 | fi |
13398 | ||
496c0e1b JB |
13399 | # Check whether --enable-gdbserver was given. |
13400 | if test "${enable_gdbserver+set}" = set; then : | |
13401 | enableval=$enable_gdbserver; case "${enableval}" in | |
13402 | yes| no|auto) ;; | |
13403 | *) as_fn_error "bad value ${enableval} for --enable-gdbserver option" "$LINENO" 5 ;; | |
13404 | esac | |
13405 | else | |
13406 | enable_gdbserver=auto | |
13407 | fi | |
13408 | ||
13409 | ||
13410 | # We only build gdbserver automatically in a native configuration, and | |
13411 | # only if the user did not explicitly disable its build. | |
13412 | if test "$gdb_native" = "yes" -a "$enable_gdbserver" != "no"; then | |
81ecdfbb RW |
13413 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gdbserver is supported on this host" >&5 |
13414 | $as_echo_n "checking whether gdbserver is supported on this host... " >&6; } | |
8dcde887 | 13415 | if test "x$build_gdbserver" = xyes; then |
81ecdfbb RW |
13416 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
13417 | $as_echo "yes" >&6; } | |
13418 | subdirs="$subdirs gdbserver" | |
3ace7edb | 13419 | |
496c0e1b | 13420 | gdbserver_build_enabled=yes |
8dcde887 | 13421 | else |
81ecdfbb RW |
13422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
13423 | $as_echo "no" >&6; } | |
8dcde887 MK |
13424 | fi |
13425 | fi | |
13426 | ||
496c0e1b JB |
13427 | # If the user explicitly request the gdbserver to be built, verify that |
13428 | # we were in fact able to enable it. | |
13429 | if test "$enable_gdbserver" = "yes" -a "$gdbserver_build_enabled" != "yes"; then | |
13430 | as_fn_error "Automatic gdbserver build is not supported for this configuration" "$LINENO" 5 | |
13431 | fi | |
13432 | ||
db985757 | 13433 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 13434 | # to an empty version. |
c906108c SS |
13435 | |
13436 | files= | |
13437 | links= | |
5a2402b8 | 13438 | |
c906108c SS |
13439 | rm -f nm.h |
13440 | if test "${nativefile}" != ""; then | |
0f475e27 AC |
13441 | case "${nativefile}" in |
13442 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
13443 | * ) GDB_NM_FILE="${nativefile}" | |
13444 | esac | |
5a2402b8 AC |
13445 | files="${files} ${GDB_NM_FILE}" |
13446 | links="${links} nm.h" | |
60ca704f SE |
13447 | |
13448 | cat >>confdefs.h <<_ACEOF | |
b78960be | 13449 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 13450 | _ACEOF |
5a2402b8 | 13451 | |
c906108c | 13452 | fi |
5a2402b8 AC |
13453 | |
13454 | ||
bec39cab AC |
13455 | ac_sources="$files" |
13456 | ac_dests="$links" | |
13457 | while test -n "$ac_sources"; do | |
13458 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
13459 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
13460 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
13461 | done | |
81ecdfbb | 13462 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
13463 | |
13464 | ||
c906108c SS |
13465 | |
13466 | ||
c906108c | 13467 | |
81ecdfbb | 13468 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
bec39cab | 13469 | |
bec39cab | 13470 | |
c971b7fa | 13471 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb doc/Makefile data-directory/Makefile" |
81ecdfbb RW |
13472 | |
13473 | ac_config_commands="$ac_config_commands default" | |
89a34d1b | 13474 | |
bec39cab AC |
13475 | cat >confcache <<\_ACEOF |
13476 | # This file is a shell script that caches the results of configure | |
13477 | # tests run on this system so they can be shared between configure | |
13478 | # scripts and configure runs, see configure's option --config-cache. | |
13479 | # It is not useful on other systems. If it contains results you don't | |
13480 | # want to keep, you may remove or edit it. | |
13481 | # | |
13482 | # config.status only pays attention to the cache file if you give it | |
13483 | # the --recheck option to rerun configure. | |
13484 | # | |
13485 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
13486 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
13487 | # following values. | |
13488 | ||
13489 | _ACEOF | |
13490 | ||
13491 | # The following way of writing the cache mishandles newlines in values, | |
13492 | # but we know of no workaround that is simple, portable, and efficient. | |
81ecdfbb | 13493 | # So, we kill variables containing newlines. |
bec39cab AC |
13494 | # Ultrix sh set writes to stderr and can't be redirected directly, |
13495 | # and sets the high bit in the cache file unless we assign to the vars. | |
81ecdfbb RW |
13496 | ( |
13497 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
13498 | eval ac_val=\$$ac_var | |
13499 | case $ac_val in #( | |
13500 | *${as_nl}*) | |
13501 | case $ac_var in #( | |
13502 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
13503 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
13504 | esac | |
13505 | case $ac_var in #( | |
13506 | _ | IFS | as_nl) ;; #( | |
13507 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
13508 | *) { eval $ac_var=; unset $ac_var;} ;; | |
13509 | esac ;; | |
13510 | esac | |
13511 | done | |
13512 | ||
bec39cab | 13513 | (set) 2>&1 | |
81ecdfbb RW |
13514 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
13515 | *${as_nl}ac_space=\ *) | |
13516 | # `set' does not quote correctly, so add quotes: double-quote | |
13517 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
bec39cab AC |
13518 | sed -n \ |
13519 | "s/'/'\\\\''/g; | |
13520 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
81ecdfbb | 13521 | ;; #( |
bec39cab AC |
13522 | *) |
13523 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
81ecdfbb | 13524 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
bec39cab | 13525 | ;; |
81ecdfbb RW |
13526 | esac | |
13527 | sort | |
13528 | ) | | |
bec39cab | 13529 | sed ' |
81ecdfbb | 13530 | /^ac_cv_env_/b end |
bec39cab | 13531 | t clear |
81ecdfbb | 13532 | :clear |
bec39cab AC |
13533 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
13534 | t end | |
81ecdfbb RW |
13535 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
13536 | :end' >>confcache | |
13537 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
13538 | if test -w "$cache_file"; then | |
13539 | test "x$cache_file" != "x/dev/null" && | |
13540 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
13541 | $as_echo "$as_me: updating cache $cache_file" >&6;} | |
bec39cab AC |
13542 | cat confcache >$cache_file |
13543 | else | |
81ecdfbb RW |
13544 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
13545 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} | |
bec39cab AC |
13546 | fi |
13547 | fi | |
13548 | rm -f confcache | |
13549 | ||
13550 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
13551 | # Let make expand exec_prefix. | |
13552 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
13553 | ||
bec39cab AC |
13554 | DEFS=-DHAVE_CONFIG_H |
13555 | ||
13556 | ac_libobjs= | |
13557 | ac_ltlibobjs= | |
13558 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
13559 | # 1. Remove the extension, and $U if already installed. | |
81ecdfbb RW |
13560 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
13561 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` | |
13562 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
13563 | # will be set to the directory where LIBOBJS objects are built. | |
13564 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
13565 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
bec39cab AC |
13566 | done |
13567 | LIBOBJS=$ac_libobjs | |
13568 | ||
13569 | LTLIBOBJS=$ac_ltlibobjs | |
13570 | ||
13571 | ||
85981d60 | 13572 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
81ecdfbb RW |
13573 | as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. |
13574 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
85981d60 | 13575 | fi |
a417dc56 | 13576 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
81ecdfbb RW |
13577 | as_fn_error "conditional \"GMAKE\" was never defined. |
13578 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | |
a417dc56 | 13579 | fi |
81ecdfbb RW |
13580 | |
13581 | ||
bec39cab | 13582 | : ${CONFIG_STATUS=./config.status} |
81ecdfbb | 13583 | ac_write_fail=0 |
bec39cab AC |
13584 | ac_clean_files_save=$ac_clean_files |
13585 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
81ecdfbb RW |
13586 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
13587 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
13588 | as_write_fail=0 | |
13589 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
bec39cab AC |
13590 | #! $SHELL |
13591 | # Generated by $as_me. | |
13592 | # Run this file to recreate the current configuration. | |
13593 | # Compiler output produced by configure, useful for debugging | |
13594 | # configure, is in config.log if it exists. | |
13595 | ||
13596 | debug=false | |
13597 | ac_cs_recheck=false | |
13598 | ac_cs_silent=false | |
bec39cab | 13599 | |
81ecdfbb RW |
13600 | SHELL=\${CONFIG_SHELL-$SHELL} |
13601 | export SHELL | |
13602 | _ASEOF | |
13603 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
13604 | ## -------------------- ## | |
13605 | ## M4sh Initialization. ## | |
13606 | ## -------------------- ## | |
13607 | ||
13608 | # Be more Bourne compatible | |
13609 | DUALCASE=1; export DUALCASE # for MKS sh | |
13610 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : | |
bec39cab AC |
13611 | emulate sh |
13612 | NULLCMD=: | |
81ecdfbb | 13613 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
bec39cab AC |
13614 | # is contrary to our usage. Disable this feature. |
13615 | alias -g '${1+"$@"}'='"$@"' | |
81ecdfbb RW |
13616 | setopt NO_GLOB_SUBST |
13617 | else | |
13618 | case `(set -o) 2>/dev/null` in #( | |
13619 | *posix*) : | |
13620 | set -o posix ;; #( | |
13621 | *) : | |
13622 | ;; | |
13623 | esac | |
bec39cab | 13624 | fi |
bec39cab | 13625 | |
81ecdfbb RW |
13626 | |
13627 | as_nl=' | |
13628 | ' | |
13629 | export as_nl | |
13630 | # Printing a long string crashes Solaris 7 /usr/bin/printf. | |
13631 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
13632 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo | |
13633 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo | |
13634 | # Prefer a ksh shell builtin over an external printf program on Solaris, | |
13635 | # but without wasting forks for bash or zsh. | |
13636 | if test -z "$BASH_VERSION$ZSH_VERSION" \ | |
13637 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then | |
13638 | as_echo='print -r --' | |
13639 | as_echo_n='print -rn --' | |
13640 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then | |
13641 | as_echo='printf %s\n' | |
13642 | as_echo_n='printf %s' | |
13643 | else | |
13644 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then | |
13645 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' | |
13646 | as_echo_n='/usr/ucb/echo -n' | |
13647 | else | |
13648 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' | |
13649 | as_echo_n_body='eval | |
13650 | arg=$1; | |
13651 | case $arg in #( | |
13652 | *"$as_nl"*) | |
13653 | expr "X$arg" : "X\\(.*\\)$as_nl"; | |
13654 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; | |
13655 | esac; | |
13656 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" | |
13657 | ' | |
13658 | export as_echo_n_body | |
13659 | as_echo_n='sh -c $as_echo_n_body as_echo' | |
13660 | fi | |
13661 | export as_echo_body | |
13662 | as_echo='sh -c $as_echo_body as_echo' | |
13663 | fi | |
13664 | ||
13665 | # The user is always right. | |
13666 | if test "${PATH_SEPARATOR+set}" != set; then | |
13667 | PATH_SEPARATOR=: | |
13668 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
13669 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
13670 | PATH_SEPARATOR=';' | |
13671 | } | |
bec39cab AC |
13672 | fi |
13673 | ||
13674 | ||
81ecdfbb RW |
13675 | # IFS |
13676 | # We need space, tab and new line, in precisely that order. Quoting is | |
13677 | # there to prevent editors from complaining about space-tab. | |
13678 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word | |
13679 | # splitting by setting IFS to empty value.) | |
13680 | IFS=" "" $as_nl" | |
13681 | ||
13682 | # Find who we are. Look in the path if we contain no directory separator. | |
13683 | case $0 in #(( | |
13684 | *[\\/]* ) as_myself=$0 ;; | |
13685 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13686 | for as_dir in $PATH | |
13687 | do | |
13688 | IFS=$as_save_IFS | |
13689 | test -z "$as_dir" && as_dir=. | |
13690 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
13691 | done | |
13692 | IFS=$as_save_IFS | |
13693 | ||
13694 | ;; | |
13695 | esac | |
13696 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
13697 | # in which case we are not to be found in the path. | |
13698 | if test "x$as_myself" = x; then | |
13699 | as_myself=$0 | |
13700 | fi | |
13701 | if test ! -f "$as_myself"; then | |
13702 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
13703 | exit 1 | |
13704 | fi | |
13705 | ||
13706 | # Unset variables that we do not need and which cause bugs (e.g. in | |
13707 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" | |
13708 | # suppresses any "Segmentation fault" message there. '((' could | |
13709 | # trigger a bug in pdksh 5.2.14. | |
13710 | for as_var in BASH_ENV ENV MAIL MAILPATH | |
13711 | do eval test x\${$as_var+set} = xset \ | |
13712 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
13713 | done | |
bec39cab AC |
13714 | PS1='$ ' |
13715 | PS2='> ' | |
13716 | PS4='+ ' | |
13717 | ||
13718 | # NLS nuisances. | |
81ecdfbb RW |
13719 | LC_ALL=C |
13720 | export LC_ALL | |
13721 | LANGUAGE=C | |
13722 | export LANGUAGE | |
13723 | ||
13724 | # CDPATH. | |
13725 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
13726 | ||
13727 | ||
13728 | # as_fn_error ERROR [LINENO LOG_FD] | |
13729 | # --------------------------------- | |
13730 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
13731 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
13732 | # script with status $?, using 1 if that was 0. | |
13733 | as_fn_error () | |
13734 | { | |
13735 | as_status=$?; test $as_status -eq 0 && as_status=1 | |
13736 | if test "$3"; then | |
13737 | as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
13738 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 | |
13739 | fi | |
13740 | $as_echo "$as_me: error: $1" >&2 | |
13741 | as_fn_exit $as_status | |
13742 | } # as_fn_error | |
13743 | ||
13744 | ||
13745 | # as_fn_set_status STATUS | |
13746 | # ----------------------- | |
13747 | # Set $? to STATUS, without forking. | |
13748 | as_fn_set_status () | |
13749 | { | |
13750 | return $1 | |
13751 | } # as_fn_set_status | |
13752 | ||
13753 | # as_fn_exit STATUS | |
13754 | # ----------------- | |
13755 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
13756 | as_fn_exit () | |
13757 | { | |
13758 | set +e | |
13759 | as_fn_set_status $1 | |
13760 | exit $1 | |
13761 | } # as_fn_exit | |
13762 | ||
13763 | # as_fn_unset VAR | |
13764 | # --------------- | |
13765 | # Portably unset VAR. | |
13766 | as_fn_unset () | |
13767 | { | |
13768 | { eval $1=; unset $1;} | |
13769 | } | |
13770 | as_unset=as_fn_unset | |
13771 | # as_fn_append VAR VALUE | |
13772 | # ---------------------- | |
13773 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
13774 | # advantage of any shell optimizations that allow amortized linear growth over | |
13775 | # repeated appends, instead of the typical quadratic growth present in naive | |
13776 | # implementations. | |
13777 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : | |
13778 | eval 'as_fn_append () | |
13779 | { | |
13780 | eval $1+=\$2 | |
13781 | }' | |
13782 | else | |
13783 | as_fn_append () | |
13784 | { | |
13785 | eval $1=\$$1\$2 | |
13786 | } | |
13787 | fi # as_fn_append | |
13788 | ||
13789 | # as_fn_arith ARG... | |
13790 | # ------------------ | |
13791 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
13792 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
13793 | # must be portable across $(()) and expr. | |
13794 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : | |
13795 | eval 'as_fn_arith () | |
13796 | { | |
13797 | as_val=$(( $* )) | |
13798 | }' | |
13799 | else | |
13800 | as_fn_arith () | |
13801 | { | |
13802 | as_val=`expr "$@" || test $? -eq 1` | |
13803 | } | |
13804 | fi # as_fn_arith | |
bec39cab | 13805 | |
81ecdfbb RW |
13806 | |
13807 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
13808 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
bec39cab AC |
13809 | as_expr=expr |
13810 | else | |
13811 | as_expr=false | |
13812 | fi | |
13813 | ||
81ecdfbb | 13814 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
bec39cab AC |
13815 | as_basename=basename |
13816 | else | |
13817 | as_basename=false | |
13818 | fi | |
13819 | ||
81ecdfbb RW |
13820 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
13821 | as_dirname=dirname | |
13822 | else | |
13823 | as_dirname=false | |
13824 | fi | |
bec39cab | 13825 | |
81ecdfbb | 13826 | as_me=`$as_basename -- "$0" || |
bec39cab AC |
13827 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
13828 | X"$0" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
13829 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
13830 | $as_echo X/"$0" | | |
13831 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
13832 | s//\1/ | |
13833 | q | |
13834 | } | |
13835 | /^X\/\(\/\/\)$/{ | |
13836 | s//\1/ | |
13837 | q | |
13838 | } | |
13839 | /^X\/\(\/\).*/{ | |
13840 | s//\1/ | |
13841 | q | |
13842 | } | |
13843 | s/.*/./; q'` | |
b4e70030 | 13844 | |
b4e70030 JB |
13845 | # Avoid depending upon Character Ranges. |
13846 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
13847 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
13848 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
13849 | as_cr_digits='0123456789' | |
13850 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
13851 | ||
81ecdfbb RW |
13852 | ECHO_C= ECHO_N= ECHO_T= |
13853 | case `echo -n x` in #((((( | |
13854 | -n*) | |
13855 | case `echo 'xy\c'` in | |
13856 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
13857 | xy) ECHO_C='\c';; | |
13858 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
13859 | ECHO_T=' ';; | |
13860 | esac;; | |
13861 | *) | |
13862 | ECHO_N='-n';; | |
bec39cab AC |
13863 | esac |
13864 | ||
81ecdfbb RW |
13865 | rm -f conf$$ conf$$.exe conf$$.file |
13866 | if test -d conf$$.dir; then | |
13867 | rm -f conf$$.dir/conf$$.file | |
bec39cab | 13868 | else |
81ecdfbb RW |
13869 | rm -f conf$$.dir |
13870 | mkdir conf$$.dir 2>/dev/null | |
bec39cab | 13871 | fi |
81ecdfbb RW |
13872 | if (echo >conf$$.file) 2>/dev/null; then |
13873 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 | 13874 | as_ln_s='ln -s' |
81ecdfbb RW |
13875 | # ... but there are two gotchas: |
13876 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. | |
13877 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. | |
13878 | # In both cases, we have to default to `cp -p'. | |
13879 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
13880 | as_ln_s='cp -p' | |
13881 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
13882 | as_ln_s=ln | |
13883 | else | |
13884 | as_ln_s='cp -p' | |
b4e70030 | 13885 | fi |
bec39cab AC |
13886 | else |
13887 | as_ln_s='cp -p' | |
13888 | fi | |
81ecdfbb RW |
13889 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
13890 | rmdir conf$$.dir 2>/dev/null | |
13891 | ||
13892 | ||
13893 | # as_fn_mkdir_p | |
13894 | # ------------- | |
13895 | # Create "$as_dir" as a directory, including parents if necessary. | |
13896 | as_fn_mkdir_p () | |
13897 | { | |
13898 | ||
13899 | case $as_dir in #( | |
13900 | -*) as_dir=./$as_dir;; | |
13901 | esac | |
13902 | test -d "$as_dir" || eval $as_mkdir_p || { | |
13903 | as_dirs= | |
13904 | while :; do | |
13905 | case $as_dir in #( | |
13906 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
13907 | *) as_qdir=$as_dir;; | |
13908 | esac | |
13909 | as_dirs="'$as_qdir' $as_dirs" | |
13910 | as_dir=`$as_dirname -- "$as_dir" || | |
13911 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
13912 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
13913 | X"$as_dir" : 'X\(//\)$' \| \ | |
13914 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
13915 | $as_echo X"$as_dir" | | |
13916 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
13917 | s//\1/ | |
13918 | q | |
13919 | } | |
13920 | /^X\(\/\/\)[^/].*/{ | |
13921 | s//\1/ | |
13922 | q | |
13923 | } | |
13924 | /^X\(\/\/\)$/{ | |
13925 | s//\1/ | |
13926 | q | |
13927 | } | |
13928 | /^X\(\/\).*/{ | |
13929 | s//\1/ | |
13930 | q | |
13931 | } | |
13932 | s/.*/./; q'` | |
13933 | test -d "$as_dir" && break | |
13934 | done | |
13935 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
13936 | } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" | |
13937 | ||
bec39cab | 13938 | |
81ecdfbb | 13939 | } # as_fn_mkdir_p |
bec39cab | 13940 | if mkdir -p . 2>/dev/null; then |
81ecdfbb | 13941 | as_mkdir_p='mkdir -p "$as_dir"' |
bec39cab AC |
13942 | else |
13943 | test -d ./-p && rmdir ./-p | |
13944 | as_mkdir_p=false | |
13945 | fi | |
13946 | ||
81ecdfbb RW |
13947 | if test -x / >/dev/null 2>&1; then |
13948 | as_test_x='test -x' | |
13949 | else | |
13950 | if ls -dL / >/dev/null 2>&1; then | |
13951 | as_ls_L_option=L | |
13952 | else | |
13953 | as_ls_L_option= | |
13954 | fi | |
13955 | as_test_x=' | |
13956 | eval sh -c '\'' | |
13957 | if test -d "$1"; then | |
13958 | test -d "$1/."; | |
13959 | else | |
13960 | case $1 in #( | |
13961 | -*)set "./$1";; | |
13962 | esac; | |
13963 | case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( | |
13964 | ???[sx]*):;;*)false;;esac;fi | |
13965 | '\'' sh | |
13966 | ' | |
13967 | fi | |
13968 | as_executable_p=$as_test_x | |
bec39cab AC |
13969 | |
13970 | # Sed expression to map a string onto a valid CPP name. | |
13971 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
13972 | ||
13973 | # Sed expression to map a string onto a valid variable name. | |
13974 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
13975 | ||
13976 | ||
bec39cab | 13977 | exec 6>&1 |
81ecdfbb RW |
13978 | ## ----------------------------------- ## |
13979 | ## Main body of $CONFIG_STATUS script. ## | |
13980 | ## ----------------------------------- ## | |
13981 | _ASEOF | |
13982 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
13983 | ||
13984 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
13985 | # Save the log message, to keep $0 and so on meaningful, and to | |
bec39cab | 13986 | # report actual input values of CONFIG_FILES etc. instead of their |
81ecdfbb RW |
13987 | # values after options handling. |
13988 | ac_log=" | |
bec39cab | 13989 | This file was extended by $as_me, which was |
81ecdfbb | 13990 | generated by GNU Autoconf 2.64. Invocation command line was |
bec39cab AC |
13991 | |
13992 | CONFIG_FILES = $CONFIG_FILES | |
13993 | CONFIG_HEADERS = $CONFIG_HEADERS | |
13994 | CONFIG_LINKS = $CONFIG_LINKS | |
13995 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
13996 | $ $0 $@ | |
13997 | ||
81ecdfbb RW |
13998 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
13999 | " | |
14000 | ||
bec39cab AC |
14001 | _ACEOF |
14002 | ||
81ecdfbb RW |
14003 | case $ac_config_files in *" |
14004 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
14005 | esac | |
234b45d4 | 14006 | |
81ecdfbb RW |
14007 | case $ac_config_headers in *" |
14008 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
14009 | esac | |
b4e70030 | 14010 | |
b4e70030 | 14011 | |
81ecdfbb RW |
14012 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
14013 | # Files that config.status was made for. | |
14014 | config_files="$ac_config_files" | |
14015 | config_headers="$ac_config_headers" | |
14016 | config_links="$ac_config_links" | |
14017 | config_commands="$ac_config_commands" | |
234b45d4 | 14018 | |
81ecdfbb | 14019 | _ACEOF |
b4e70030 | 14020 | |
81ecdfbb | 14021 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab | 14022 | ac_cs_usage="\ |
81ecdfbb RW |
14023 | \`$as_me' instantiates files and other configuration actions |
14024 | from templates according to the current configuration. Unless the files | |
14025 | and actions are specified as TAGs, all are instantiated by default. | |
234b45d4 | 14026 | |
81ecdfbb | 14027 | Usage: $0 [OPTION]... [TAG]... |
234b45d4 | 14028 | |
bec39cab | 14029 | -h, --help print this help, then exit |
81ecdfbb RW |
14030 | -V, --version print version number and configuration settings, then exit |
14031 | -q, --quiet, --silent | |
14032 | do not print progress messages | |
bec39cab AC |
14033 | -d, --debug don't remove temporary files |
14034 | --recheck update $as_me by reconfiguring in the same conditions | |
81ecdfbb RW |
14035 | --file=FILE[:TEMPLATE] |
14036 | instantiate the configuration file FILE | |
14037 | --header=FILE[:TEMPLATE] | |
14038 | instantiate the configuration header FILE | |
234b45d4 | 14039 | |
bec39cab AC |
14040 | Configuration files: |
14041 | $config_files | |
234b45d4 | 14042 | |
bec39cab AC |
14043 | Configuration headers: |
14044 | $config_headers | |
234b45d4 | 14045 | |
bec39cab AC |
14046 | Configuration links: |
14047 | $config_links | |
234b45d4 | 14048 | |
bec39cab AC |
14049 | Configuration commands: |
14050 | $config_commands | |
14051 | ||
81ecdfbb | 14052 | Report bugs to the package provider." |
b4e70030 | 14053 | |
81ecdfbb RW |
14054 | _ACEOF |
14055 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
bec39cab AC |
14056 | ac_cs_version="\\ |
14057 | config.status | |
81ecdfbb RW |
14058 | configured by $0, generated by GNU Autoconf 2.64, |
14059 | with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | |
bec39cab | 14060 | |
81ecdfbb | 14061 | Copyright (C) 2009 Free Software Foundation, Inc. |
bec39cab AC |
14062 | This config.status script is free software; the Free Software Foundation |
14063 | gives unlimited permission to copy, distribute and modify it." | |
81ecdfbb RW |
14064 | |
14065 | ac_pwd='$ac_pwd' | |
14066 | srcdir='$srcdir' | |
14067 | INSTALL='$INSTALL' | |
81ecdfbb RW |
14068 | AWK='$AWK' |
14069 | test -n "\$AWK" || AWK=awk | |
bec39cab AC |
14070 | _ACEOF |
14071 | ||
81ecdfbb RW |
14072 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14073 | # The default lists apply if the user does not specify any file. | |
bec39cab AC |
14074 | ac_need_defaults=: |
14075 | while test $# != 0 | |
14076 | do | |
14077 | case $1 in | |
14078 | --*=*) | |
81ecdfbb RW |
14079 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
14080 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
bec39cab | 14081 | ac_shift=: |
c906108c | 14082 | ;; |
81ecdfbb | 14083 | *) |
bec39cab AC |
14084 | ac_option=$1 |
14085 | ac_optarg=$2 | |
14086 | ac_shift=shift | |
c906108c | 14087 | ;; |
bec39cab | 14088 | esac |
c906108c | 14089 | |
bec39cab AC |
14090 | case $ac_option in |
14091 | # Handling of the options. | |
bec39cab AC |
14092 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
14093 | ac_cs_recheck=: ;; | |
81ecdfbb RW |
14094 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
14095 | $as_echo "$ac_cs_version"; exit ;; | |
14096 | --debug | --debu | --deb | --de | --d | -d ) | |
bec39cab AC |
14097 | debug=: ;; |
14098 | --file | --fil | --fi | --f ) | |
14099 | $ac_shift | |
81ecdfbb RW |
14100 | case $ac_optarg in |
14101 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14102 | esac | |
14103 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
bec39cab AC |
14104 | ac_need_defaults=false;; |
14105 | --header | --heade | --head | --hea ) | |
14106 | $ac_shift | |
81ecdfbb RW |
14107 | case $ac_optarg in |
14108 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
14109 | esac | |
14110 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
bec39cab | 14111 | ac_need_defaults=false;; |
81ecdfbb RW |
14112 | --he | --h) |
14113 | # Conflict between --help and --header | |
14114 | as_fn_error "ambiguous option: \`$1' | |
14115 | Try \`$0 --help' for more information.";; | |
14116 | --help | --hel | -h ) | |
14117 | $as_echo "$ac_cs_usage"; exit ;; | |
bec39cab AC |
14118 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
14119 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
14120 | ac_cs_silent=: ;; | |
c906108c | 14121 | |
bec39cab | 14122 | # This is an error. |
81ecdfbb RW |
14123 | -*) as_fn_error "unrecognized option: \`$1' |
14124 | Try \`$0 --help' for more information." ;; | |
c906108c | 14125 | |
81ecdfbb RW |
14126 | *) as_fn_append ac_config_targets " $1" |
14127 | ac_need_defaults=false ;; | |
c906108c | 14128 | |
bec39cab AC |
14129 | esac |
14130 | shift | |
14131 | done | |
c906108c | 14132 | |
bec39cab | 14133 | ac_configure_extra_args= |
c906108c | 14134 | |
bec39cab AC |
14135 | if $ac_cs_silent; then |
14136 | exec 6>/dev/null | |
14137 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
14138 | fi | |
c906108c | 14139 | |
bec39cab | 14140 | _ACEOF |
81ecdfbb | 14141 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
bec39cab | 14142 | if \$ac_cs_recheck; then |
81ecdfbb RW |
14143 | set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
14144 | shift | |
14145 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 | |
14146 | CONFIG_SHELL='$SHELL' | |
14147 | export CONFIG_SHELL | |
14148 | exec "\$@" | |
bec39cab AC |
14149 | fi |
14150 | ||
14151 | _ACEOF | |
81ecdfbb RW |
14152 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14153 | exec 5>>config.log | |
14154 | { | |
14155 | echo | |
14156 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
14157 | ## Running $as_me. ## | |
14158 | _ASBOX | |
14159 | $as_echo "$ac_log" | |
14160 | } >&5 | |
bec39cab | 14161 | |
81ecdfbb RW |
14162 | _ACEOF |
14163 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
c906108c | 14164 | # |
81ecdfbb | 14165 | # INIT-COMMANDS |
c906108c | 14166 | # |
a417dc56 | 14167 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
b4e70030 | 14168 | |
bec39cab AC |
14169 | _ACEOF |
14170 | ||
81ecdfbb | 14171 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
4e8d927d | 14172 | |
81ecdfbb | 14173 | # Handling of arguments. |
bec39cab | 14174 | for ac_config_target in $ac_config_targets |
c906108c | 14175 | do |
81ecdfbb RW |
14176 | case $ac_config_target in |
14177 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
14178 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; | |
f997c383 | 14179 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
81ecdfbb RW |
14180 | "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
14181 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
e2207b9a | 14182 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
5ae98d25 | 14183 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
aa2e2d8d | 14184 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
81ecdfbb RW |
14185 | "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
14186 | ||
14187 | *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; | |
c906108c SS |
14188 | esac |
14189 | done | |
14190 | ||
81ecdfbb | 14191 | |
bec39cab AC |
14192 | # If the user did not use the arguments to specify the items to instantiate, |
14193 | # then the envvar interface is used. Set only those that are not. | |
14194 | # We use the long form for the default assignment because of an extremely | |
14195 | # bizarre bug on SunOS 4.1.3. | |
14196 | if $ac_need_defaults; then | |
14197 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
14198 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
14199 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
14200 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
14201 | fi | |
14202 | ||
b4e70030 | 14203 | # Have a temporary directory for convenience. Make it in the build tree |
81ecdfbb | 14204 | # simply because there is no reason against having it here, and in addition, |
b4e70030 | 14205 | # creating and moving files from /tmp can sometimes cause problems. |
81ecdfbb RW |
14206 | # Hook for its removal unless debugging. |
14207 | # Note that there is a small window in which the directory will not be cleaned: | |
14208 | # after its creation but before its name has been assigned to `$tmp'. | |
b4e70030 JB |
14209 | $debug || |
14210 | { | |
81ecdfbb RW |
14211 | tmp= |
14212 | trap 'exit_status=$? | |
14213 | { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status | |
14214 | ' 0 | |
14215 | trap 'as_fn_exit 1' 1 2 13 15 | |
14216 | } | |
14217 | # Create a (secure) tmp directory for tmp files. | |
14218 | ||
14219 | { | |
14220 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
14221 | test -n "$tmp" && test -d "$tmp" | |
14222 | } || | |
14223 | { | |
14224 | tmp=./conf$$-$RANDOM | |
14225 | (umask 077 && mkdir "$tmp") | |
14226 | } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 | |
14227 | ||
14228 | # Set up the scripts for CONFIG_FILES section. | |
14229 | # No need to generate them if there are no CONFIG_FILES. | |
14230 | # This happens for instance with `./config.status config.h'. | |
14231 | if test -n "$CONFIG_FILES"; then | |
14232 | ||
14233 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then | |
14234 | ac_cs_awk_getline=: | |
14235 | ac_cs_awk_pipe_init= | |
14236 | ac_cs_awk_read_file=' | |
14237 | while ((getline aline < (F[key])) > 0) | |
14238 | print(aline) | |
14239 | close(F[key])' | |
14240 | ac_cs_awk_pipe_fini= | |
14241 | else | |
14242 | ac_cs_awk_getline=false | |
14243 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" | |
14244 | ac_cs_awk_read_file=' | |
14245 | print "|#_!!_#|" | |
14246 | print "cat " F[key] " &&" | |
14247 | '$ac_cs_awk_pipe_init | |
14248 | # The final `:' finishes the AND list. | |
14249 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' | |
14250 | fi | |
14251 | ac_cr=`echo X | tr X '\015'` | |
14252 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
14253 | # But we know of no other shell where ac_cr would be empty at this | |
14254 | # point, so we can use a bashism as a fallback. | |
14255 | if test "x$ac_cr" = x; then | |
14256 | eval ac_cr=\$\'\\r\' | |
14257 | fi | |
14258 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
14259 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
14260 | ac_cs_awk_cr='\r' | |
14261 | else | |
14262 | ac_cs_awk_cr=$ac_cr | |
14263 | fi | |
14264 | ||
14265 | echo 'BEGIN {' >"$tmp/subs1.awk" && | |
14266 | _ACEOF | |
14267 | ||
14268 | # Create commands to substitute file output variables. | |
14269 | { | |
14270 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && | |
14271 | echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && | |
14272 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && | |
14273 | echo "_ACAWK" && | |
14274 | echo "_ACEOF" | |
14275 | } >conf$$files.sh && | |
14276 | . ./conf$$files.sh || | |
14277 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14278 | rm -f conf$$files.sh | |
14279 | ||
14280 | { | |
14281 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
14282 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
14283 | echo "_ACEOF" | |
14284 | } >conf$$subs.sh || | |
14285 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14286 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` | |
14287 | ac_delim='%!_!# ' | |
14288 | for ac_last_try in false false false false false :; do | |
14289 | . ./conf$$subs.sh || | |
14290 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14291 | ||
14292 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
14293 | if test $ac_delim_n = $ac_delim_num; then | |
14294 | break | |
14295 | elif $ac_last_try; then | |
14296 | as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 | |
14297 | else | |
14298 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14299 | fi | |
14300 | done | |
14301 | rm -f conf$$subs.sh | |
14302 | ||
14303 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14304 | cat >>"\$tmp/subs1.awk" <<\\_ACAWK && | |
14305 | _ACEOF | |
14306 | sed -n ' | |
14307 | h | |
14308 | s/^/S["/; s/!.*/"]=/ | |
14309 | p | |
14310 | g | |
14311 | s/^[^!]*!// | |
14312 | :repl | |
14313 | t repl | |
14314 | s/'"$ac_delim"'$// | |
14315 | t delim | |
14316 | :nl | |
14317 | h | |
14318 | s/\(.\{148\}\).*/\1/ | |
14319 | t more1 | |
14320 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
14321 | p | |
14322 | n | |
14323 | b repl | |
14324 | :more1 | |
14325 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14326 | p | |
14327 | g | |
14328 | s/.\{148\}// | |
14329 | t nl | |
14330 | :delim | |
14331 | h | |
14332 | s/\(.\{148\}\).*/\1/ | |
14333 | t more2 | |
14334 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
14335 | p | |
14336 | b | |
14337 | :more2 | |
14338 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
14339 | p | |
14340 | g | |
14341 | s/.\{148\}// | |
14342 | t delim | |
14343 | ' <conf$$subs.awk | sed ' | |
14344 | /^[^""]/{ | |
14345 | N | |
14346 | s/\n// | |
14347 | } | |
14348 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
14349 | rm -f conf$$subs.awk | |
14350 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14351 | _ACAWK | |
14352 | cat >>"\$tmp/subs1.awk" <<_ACAWK && | |
14353 | for (key in S) S_is_set[key] = 1 | |
14354 | FS = "\a" | |
14355 | \$ac_cs_awk_pipe_init | |
14356 | } | |
14357 | { | |
14358 | line = $ 0 | |
14359 | nfields = split(line, field, "@") | |
14360 | substed = 0 | |
14361 | len = length(field[1]) | |
14362 | for (i = 2; i < nfields; i++) { | |
14363 | key = field[i] | |
14364 | keylen = length(key) | |
14365 | if (S_is_set[key]) { | |
14366 | value = S[key] | |
14367 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
14368 | len += length(value) + length(field[++i]) | |
14369 | substed = 1 | |
14370 | } else | |
14371 | len += 1 + keylen | |
14372 | } | |
14373 | if (nfields == 3 && !substed) { | |
14374 | key = field[2] | |
14375 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { | |
14376 | \$ac_cs_awk_read_file | |
14377 | next | |
14378 | } | |
14379 | } | |
14380 | print line | |
b4e70030 | 14381 | } |
81ecdfbb RW |
14382 | \$ac_cs_awk_pipe_fini |
14383 | _ACAWK | |
14384 | _ACEOF | |
14385 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14386 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
14387 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
14388 | else | |
14389 | cat | |
14390 | fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ | |
14391 | || as_fn_error "could not setup config files machinery" "$LINENO" 5 | |
14392 | _ACEOF | |
14393 | ||
14394 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | |
14395 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
14396 | # trailing colons and then remove the whole line if VPATH becomes empty | |
14397 | # (actually we leave an empty line to preserve line numbers). | |
14398 | if test "x$srcdir" = x.; then | |
14399 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
14400 | s/:*\$(srcdir):*/:/ | |
14401 | s/:*\${srcdir}:*/:/ | |
14402 | s/:*@srcdir@:*/:/ | |
14403 | s/^\([^=]*=[ ]*\):*/\1/ | |
14404 | s/:*$// | |
14405 | s/^[^=]*=[ ]*$// | |
14406 | }' | |
14407 | fi | |
14408 | ||
14409 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
14410 | fi # test -n "$CONFIG_FILES" | |
14411 | ||
14412 | # Set up the scripts for CONFIG_HEADERS section. | |
14413 | # No need to generate them if there are no CONFIG_HEADERS. | |
14414 | # This happens for instance with `./config.status Makefile'. | |
14415 | if test -n "$CONFIG_HEADERS"; then | |
14416 | cat >"$tmp/defines.awk" <<\_ACAWK || | |
14417 | BEGIN { | |
14418 | _ACEOF | |
14419 | ||
14420 | # Transform confdefs.h into an awk script `defines.awk', embedded as | |
14421 | # here-document in config.status, that substitutes the proper values into | |
14422 | # config.h.in to produce config.h. | |
4e8d927d | 14423 | |
81ecdfbb RW |
14424 | # Create a delimiter string that does not exist in confdefs.h, to ease |
14425 | # handling of long lines. | |
14426 | ac_delim='%!_!# ' | |
14427 | for ac_last_try in false false :; do | |
14428 | ac_t=`sed -n "/$ac_delim/p" confdefs.h` | |
14429 | if test -z "$ac_t"; then | |
14430 | break | |
14431 | elif $ac_last_try; then | |
14432 | as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
14433 | else | |
14434 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
14435 | fi | |
14436 | done | |
4e8d927d | 14437 | |
81ecdfbb RW |
14438 | # For the awk script, D is an array of macro values keyed by name, |
14439 | # likewise P contains macro parameters if any. Preserve backslash | |
14440 | # newline sequences. | |
14441 | ||
14442 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
14443 | sed -n ' | |
14444 | s/.\{148\}/&'"$ac_delim"'/g | |
14445 | t rset | |
14446 | :rset | |
14447 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
14448 | t def | |
14449 | d | |
14450 | :def | |
14451 | s/\\$// | |
14452 | t bsnl | |
14453 | s/["\\]/\\&/g | |
14454 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
14455 | D["\1"]=" \3"/p | |
14456 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
14457 | d | |
14458 | :bsnl | |
14459 | s/["\\]/\\&/g | |
14460 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
14461 | D["\1"]=" \3\\\\\\n"\\/p | |
14462 | t cont | |
14463 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
14464 | t cont | |
14465 | d | |
14466 | :cont | |
14467 | n | |
14468 | s/.\{148\}/&'"$ac_delim"'/g | |
14469 | t clear | |
14470 | :clear | |
14471 | s/\\$// | |
14472 | t bsnlc | |
14473 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
14474 | d | |
14475 | :bsnlc | |
14476 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
14477 | b cont | |
14478 | ' <confdefs.h | sed ' | |
14479 | s/'"$ac_delim"'/"\\\ | |
14480 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
14481 | ||
14482 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14483 | for (key in D) D_is_set[key] = 1 | |
14484 | FS = "\a" | |
14485 | } | |
14486 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
14487 | line = \$ 0 | |
14488 | split(line, arg, " ") | |
14489 | if (arg[1] == "#") { | |
14490 | defundef = arg[2] | |
14491 | mac1 = arg[3] | |
14492 | } else { | |
14493 | defundef = substr(arg[1], 2) | |
14494 | mac1 = arg[2] | |
14495 | } | |
14496 | split(mac1, mac2, "(") #) | |
14497 | macro = mac2[1] | |
14498 | prefix = substr(line, 1, index(line, defundef) - 1) | |
14499 | if (D_is_set[macro]) { | |
14500 | # Preserve the white space surrounding the "#". | |
14501 | print prefix "define", macro P[macro] D[macro] | |
14502 | next | |
14503 | } else { | |
14504 | # Replace #undef with comments. This is necessary, for example, | |
14505 | # in the case of _POSIX_SOURCE, which is predefined and required | |
14506 | # on some systems where configure will not decide to define it. | |
14507 | if (defundef == "undef") { | |
14508 | print "/*", prefix defundef, macro, "*/" | |
14509 | next | |
14510 | } | |
14511 | } | |
b4e70030 | 14512 | } |
81ecdfbb RW |
14513 | { print } |
14514 | _ACAWK | |
b4e70030 | 14515 | _ACEOF |
81ecdfbb RW |
14516 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14517 | as_fn_error "could not setup config headers machinery" "$LINENO" 5 | |
14518 | fi # test -n "$CONFIG_HEADERS" | |
4e8d927d | 14519 | |
4e8d927d | 14520 | |
81ecdfbb RW |
14521 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
14522 | shift | |
14523 | for ac_tag | |
14524 | do | |
14525 | case $ac_tag in | |
14526 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
14527 | esac | |
14528 | case $ac_mode$ac_tag in | |
14529 | :[FHL]*:*);; | |
14530 | :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; | |
14531 | :[FH]-) ac_tag=-:-;; | |
14532 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
14533 | esac | |
14534 | ac_save_IFS=$IFS | |
14535 | IFS=: | |
14536 | set x $ac_tag | |
14537 | IFS=$ac_save_IFS | |
14538 | shift | |
14539 | ac_file=$1 | |
14540 | shift | |
4e8d927d | 14541 | |
81ecdfbb RW |
14542 | case $ac_mode in |
14543 | :L) ac_source=$1;; | |
14544 | :[FH]) | |
14545 | ac_file_inputs= | |
14546 | for ac_f | |
14547 | do | |
14548 | case $ac_f in | |
14549 | -) ac_f="$tmp/stdin";; | |
14550 | *) # Look for the file first in the build tree, then in the source tree | |
14551 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
14552 | # because $ac_f cannot contain `:'. | |
14553 | test -f "$ac_f" || | |
14554 | case $ac_f in | |
14555 | [\\/$]*) false;; | |
14556 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
14557 | esac || | |
14558 | as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; | |
14559 | esac | |
14560 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
14561 | as_fn_append ac_file_inputs " '$ac_f'" | |
14562 | done | |
14563 | ||
14564 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
14565 | # use $as_me), people would be surprised to read: | |
14566 | # /* config.h. Generated by config.status. */ | |
14567 | configure_input='Generated from '` | |
14568 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
14569 | `' by configure.' | |
14570 | if test x"$ac_file" != x-; then | |
14571 | configure_input="$ac_file. $configure_input" | |
14572 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
14573 | $as_echo "$as_me: creating $ac_file" >&6;} | |
b4e70030 | 14574 | fi |
81ecdfbb RW |
14575 | # Neutralize special characters interpreted by sed in replacement strings. |
14576 | case $configure_input in #( | |
14577 | *\&* | *\|* | *\\* ) | |
14578 | ac_sed_conf_input=`$as_echo "$configure_input" | | |
14579 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
14580 | *) ac_sed_conf_input=$configure_input;; | |
14581 | esac | |
4e8d927d | 14582 | |
81ecdfbb RW |
14583 | case $ac_tag in |
14584 | *:-:* | *:-) cat >"$tmp/stdin" \ | |
14585 | || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; | |
14586 | esac | |
14587 | ;; | |
c906108c SS |
14588 | esac |
14589 | ||
81ecdfbb | 14590 | ac_dir=`$as_dirname -- "$ac_file" || |
bec39cab AC |
14591 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
14592 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
14593 | X"$ac_file" : 'X\(//\)$' \| \ | |
81ecdfbb RW |
14594 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
14595 | $as_echo X"$ac_file" | | |
14596 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14597 | s//\1/ | |
14598 | q | |
14599 | } | |
14600 | /^X\(\/\/\)[^/].*/{ | |
14601 | s//\1/ | |
14602 | q | |
14603 | } | |
14604 | /^X\(\/\/\)$/{ | |
14605 | s//\1/ | |
14606 | q | |
14607 | } | |
14608 | /^X\(\/\).*/{ | |
14609 | s//\1/ | |
14610 | q | |
14611 | } | |
14612 | s/.*/./; q'` | |
14613 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
14614 | ac_builddir=. |
14615 | ||
81ecdfbb RW |
14616 | case "$ac_dir" in |
14617 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14618 | *) | |
14619 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
14620 | # A ".." for each directory in $ac_dir_suffix. | |
14621 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
14622 | case $ac_top_builddir_sub in | |
14623 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14624 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
14625 | esac ;; | |
14626 | esac | |
14627 | ac_abs_top_builddir=$ac_pwd | |
14628 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
14629 | # for backward compatibility: | |
14630 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
14631 | |
14632 | case $srcdir in | |
81ecdfbb | 14633 | .) # We are building in place. |
bec39cab | 14634 | ac_srcdir=. |
81ecdfbb RW |
14635 | ac_top_srcdir=$ac_top_builddir_sub |
14636 | ac_abs_top_srcdir=$ac_pwd ;; | |
14637 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 14638 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
14639 | ac_top_srcdir=$srcdir |
14640 | ac_abs_top_srcdir=$srcdir ;; | |
14641 | *) # Relative name. | |
14642 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
14643 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
14644 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 14645 | esac |
81ecdfbb | 14646 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
bec39cab | 14647 | |
c906108c | 14648 | |
81ecdfbb RW |
14649 | case $ac_mode in |
14650 | :F) | |
14651 | # | |
14652 | # CONFIG_FILE | |
14653 | # | |
c906108c | 14654 | |
bec39cab AC |
14655 | case $INSTALL in |
14656 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
81ecdfbb | 14657 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
c906108c | 14658 | esac |
81ecdfbb | 14659 | _ACEOF |
121ce6e5 | 14660 | |
81ecdfbb RW |
14661 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
14662 | # If the template does not know about datarootdir, expand it. | |
14663 | # FIXME: This hack should be removed a few years after 2.60. | |
14664 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
14665 | ac_sed_dataroot=' | |
14666 | /datarootdir/ { | |
14667 | p | |
14668 | q | |
14669 | } | |
14670 | /@datadir@/p | |
14671 | /@docdir@/p | |
14672 | /@infodir@/p | |
14673 | /@localedir@/p | |
14674 | /@mandir@/p' | |
14675 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
14676 | *datarootdir*) ac_datarootdir_seen=yes;; | |
14677 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
14678 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
14679 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
14680 | _ACEOF | |
14681 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14682 | ac_datarootdir_hack=' | |
14683 | s&@datadir@&$datadir&g | |
14684 | s&@docdir@&$docdir&g | |
14685 | s&@infodir@&$infodir&g | |
14686 | s&@localedir@&$localedir&g | |
14687 | s&@mandir@&$mandir&g | |
14688 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
14689 | esac | |
4e8d927d | 14690 | _ACEOF |
81ecdfbb RW |
14691 | |
14692 | # Neutralize VPATH when `$srcdir' = `.'. | |
14693 | # Shell code in configure.ac might set extrasub. | |
14694 | # FIXME: do we really want to maintain this feature? | |
14695 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
14696 | ac_sed_extra="$ac_vpsub | |
bec39cab AC |
14697 | $extrasub |
14698 | _ACEOF | |
81ecdfbb | 14699 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
bec39cab AC |
14700 | :t |
14701 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
81ecdfbb RW |
14702 | s|@configure_input@|$ac_sed_conf_input|;t t |
14703 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
14704 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
14705 | s&@srcdir@&$ac_srcdir&;t t | |
14706 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
14707 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
14708 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
14709 | s&@builddir@&$ac_builddir&;t t | |
14710 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
14711 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
14712 | s&@INSTALL@&$ac_INSTALL&;t t | |
81ecdfbb RW |
14713 | $ac_datarootdir_hack |
14714 | " | |
14715 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | | |
14716 | if $ac_cs_awk_getline; then | |
14717 | $AWK -f "$tmp/subs.awk" | |
14718 | else | |
14719 | $AWK -f "$tmp/subs.awk" | $SHELL | |
14720 | fi >$tmp/out \ | |
14721 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14722 | ||
14723 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
14724 | { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && | |
14725 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && | |
14726 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
14727 | which seems to be undefined. Please make sure it is defined." >&5 | |
14728 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' | |
14729 | which seems to be undefined. Please make sure it is defined." >&2;} | |
14730 | ||
14731 | rm -f "$tmp/stdin" | |
bec39cab | 14732 | case $ac_file in |
81ecdfbb RW |
14733 | -) cat "$tmp/out" && rm -f "$tmp/out";; |
14734 | *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; | |
14735 | esac \ | |
14736 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14737 | ;; | |
14738 | :H) | |
14739 | # | |
14740 | # CONFIG_HEADER | |
14741 | # | |
bec39cab | 14742 | if test x"$ac_file" != x-; then |
81ecdfbb RW |
14743 | { |
14744 | $as_echo "/* $configure_input */" \ | |
14745 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" | |
14746 | } >"$tmp/config.h" \ | |
14747 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
14748 | if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then | |
14749 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
14750 | $as_echo "$as_me: $ac_file is unchanged" >&6;} | |
bec39cab | 14751 | else |
81ecdfbb RW |
14752 | rm -f "$ac_file" |
14753 | mv "$tmp/config.h" "$ac_file" \ | |
14754 | || as_fn_error "could not create $ac_file" "$LINENO" 5 | |
bec39cab AC |
14755 | fi |
14756 | else | |
81ecdfbb RW |
14757 | $as_echo "/* $configure_input */" \ |
14758 | && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ | |
14759 | || as_fn_error "could not create -" "$LINENO" 5 | |
bec39cab | 14760 | fi |
81ecdfbb RW |
14761 | ;; |
14762 | :L) | |
14763 | # | |
14764 | # CONFIG_LINK | |
14765 | # | |
c906108c | 14766 | |
81ecdfbb RW |
14767 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
14768 | : | |
b4e70030 | 14769 | else |
81ecdfbb RW |
14770 | # Prefer the file from the source tree if names are identical. |
14771 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then | |
14772 | ac_source=$srcdir/$ac_source | |
14773 | fi | |
b4e70030 | 14774 | |
81ecdfbb RW |
14775 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
14776 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} | |
b4e70030 | 14777 | |
81ecdfbb RW |
14778 | if test ! -r "$ac_source"; then |
14779 | as_fn_error "$ac_source: file not found" "$LINENO" 5 | |
14780 | fi | |
14781 | rm -f "$ac_file" | |
bec39cab | 14782 | |
81ecdfbb RW |
14783 | # Try a relative symlink, then a hard link, then a copy. |
14784 | case $srcdir in | |
14785 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; | |
14786 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; | |
14787 | esac | |
14788 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || | |
14789 | ln "$ac_source" "$ac_file" 2>/dev/null || | |
14790 | cp -p "$ac_source" "$ac_file" || | |
14791 | as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 | |
14792 | fi | |
14793 | ;; | |
14794 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
14795 | $as_echo "$as_me: executing $ac_file commands" >&6;} | |
14796 | ;; | |
c906108c | 14797 | esac |
b4e70030 | 14798 | |
bec39cab | 14799 | |
81ecdfbb RW |
14800 | case $ac_file$ac_mode in |
14801 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; | |
81ecdfbb | 14802 | "default":C) |
c906108c SS |
14803 | case x$CONFIG_HEADERS in |
14804 | xconfig.h:config.in) | |
14805 | echo > stamp-h ;; | |
14806 | esac | |
bec39cab | 14807 | ;; |
81ecdfbb | 14808 | |
bec39cab | 14809 | esac |
81ecdfbb | 14810 | done # for ac_tag |
c906108c | 14811 | |
bec39cab | 14812 | |
81ecdfbb | 14813 | as_fn_exit 0 |
bec39cab | 14814 | _ACEOF |
bec39cab AC |
14815 | ac_clean_files=$ac_clean_files_save |
14816 | ||
81ecdfbb RW |
14817 | test $ac_write_fail = 0 || |
14818 | as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
14819 | ||
bec39cab AC |
14820 | |
14821 | # configure is writing to config.log, and then calls config.status. | |
14822 | # config.status does its own redirection, appending to config.log. | |
14823 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
14824 | # by configure, so config.status won't be able to write to it; its | |
14825 | # output is simply discarded. So we exec the FD to /dev/null, | |
14826 | # effectively closing config.log, so it can be properly (re)opened and | |
14827 | # appended to by config.status. When coming back to configure, we | |
14828 | # need to make the FD available again. | |
14829 | if test "$no_create" != yes; then | |
14830 | ac_cs_success=: | |
14831 | ac_config_status_args= | |
14832 | test "$silent" = yes && | |
14833 | ac_config_status_args="$ac_config_status_args --quiet" | |
14834 | exec 5>/dev/null | |
14835 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
14836 | exec 5>>config.log | |
14837 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
14838 | # would make configure fail if this is the last instruction. | |
81ecdfbb | 14839 | $ac_cs_success || as_fn_exit $? |
bec39cab | 14840 | fi |
c906108c | 14841 | |
bec39cab | 14842 | # |
81ecdfbb | 14843 | # CONFIG_SUBDIRS section. |
bec39cab | 14844 | # |
c906108c SS |
14845 | if test "$no_recursion" != yes; then |
14846 | ||
81ecdfbb RW |
14847 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
14848 | # so they do not pile up. | |
c906108c SS |
14849 | ac_sub_configure_args= |
14850 | ac_prev= | |
fdc59709 PB |
14851 | eval "set x $ac_configure_args" |
14852 | shift | |
14853 | for ac_arg | |
14854 | do | |
c906108c SS |
14855 | if test -n "$ac_prev"; then |
14856 | ac_prev= | |
14857 | continue | |
14858 | fi | |
bec39cab | 14859 | case $ac_arg in |
c906108c SS |
14860 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
14861 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
14862 | ac_prev=cache_file ;; | |
14863 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
14864 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
14865 | | --c=*) | |
14866 | ;; | |
14867 | --config-cache | -C) | |
c906108c SS |
14868 | ;; |
14869 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
14870 | ac_prev=srcdir ;; | |
14871 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
14872 | ;; | |
bec39cab AC |
14873 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
14874 | ac_prev=prefix ;; | |
14875 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
14876 | ;; | |
81ecdfbb RW |
14877 | --disable-option-checking) |
14878 | ;; | |
fdc59709 PB |
14879 | *) |
14880 | case $ac_arg in | |
81ecdfbb | 14881 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 14882 | esac |
81ecdfbb | 14883 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
c906108c SS |
14884 | esac |
14885 | done | |
14886 | ||
bec39cab AC |
14887 | # Always prepend --prefix to ensure using the same prefix |
14888 | # in subdir configurations. | |
fdc59709 PB |
14889 | ac_arg="--prefix=$prefix" |
14890 | case $ac_arg in | |
81ecdfbb | 14891 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
fdc59709 | 14892 | esac |
81ecdfbb RW |
14893 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
14894 | ||
14895 | # Pass --silent | |
14896 | if test "$silent" = yes; then | |
14897 | ac_sub_configure_args="--silent $ac_sub_configure_args" | |
14898 | fi | |
14899 | ||
14900 | # Always prepend --disable-option-checking to silence warnings, since | |
14901 | # different subdirs can have different --enable and --with options. | |
14902 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" | |
bec39cab | 14903 | |
b4e70030 | 14904 | ac_popdir=`pwd` |
bec39cab | 14905 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
14906 | |
14907 | # Do not complain, so a configure script can configure whichever | |
14908 | # parts of a large source tree are present. | |
fdc59709 | 14909 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 14910 | |
81ecdfbb RW |
14911 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
14912 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 | |
14913 | $as_echo "$ac_msg" >&6 | |
14914 | as_dir="$ac_dir"; as_fn_mkdir_p | |
bec39cab AC |
14915 | ac_builddir=. |
14916 | ||
81ecdfbb RW |
14917 | case "$ac_dir" in |
14918 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14919 | *) | |
14920 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` | |
14921 | # A ".." for each directory in $ac_dir_suffix. | |
14922 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
14923 | case $ac_top_builddir_sub in | |
14924 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
14925 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
14926 | esac ;; | |
14927 | esac | |
14928 | ac_abs_top_builddir=$ac_pwd | |
14929 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
14930 | # for backward compatibility: | |
14931 | ac_top_builddir=$ac_top_build_prefix | |
bec39cab AC |
14932 | |
14933 | case $srcdir in | |
81ecdfbb | 14934 | .) # We are building in place. |
bec39cab | 14935 | ac_srcdir=. |
81ecdfbb RW |
14936 | ac_top_srcdir=$ac_top_builddir_sub |
14937 | ac_abs_top_srcdir=$ac_pwd ;; | |
14938 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
bec39cab | 14939 | ac_srcdir=$srcdir$ac_dir_suffix; |
81ecdfbb RW |
14940 | ac_top_srcdir=$srcdir |
14941 | ac_abs_top_srcdir=$srcdir ;; | |
14942 | *) # Relative name. | |
14943 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
14944 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
14945 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
bec39cab | 14946 | esac |
81ecdfbb | 14947 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
c906108c | 14948 | |
c906108c | 14949 | |
fdc59709 | 14950 | cd "$ac_dir" |
c906108c SS |
14951 | |
14952 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
14953 | if test -f "$ac_srcdir/configure.gnu"; then |
14954 | ac_sub_configure=$ac_srcdir/configure.gnu | |
14955 | elif test -f "$ac_srcdir/configure"; then | |
14956 | ac_sub_configure=$ac_srcdir/configure | |
14957 | elif test -f "$ac_srcdir/configure.in"; then | |
14958 | # This should be Cygnus configure. | |
14959 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 14960 | else |
81ecdfbb RW |
14961 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
14962 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
14963 | ac_sub_configure= |
14964 | fi | |
14965 | ||
14966 | # The recursion is here. | |
14967 | if test -n "$ac_sub_configure"; then | |
c906108c | 14968 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
14969 | case $cache_file in |
14970 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
81ecdfbb RW |
14971 | *) # Relative name. |
14972 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; | |
c906108c | 14973 | esac |
c906108c | 14974 | |
81ecdfbb RW |
14975 | { $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 |
14976 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 14977 | # The eval makes quoting arguments work. |
fdc59709 PB |
14978 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
14979 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
81ecdfbb | 14980 | as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
c906108c SS |
14981 | fi |
14982 | ||
fdc59709 | 14983 | cd "$ac_popdir" |
c906108c SS |
14984 | done |
14985 | fi | |
81ecdfbb RW |
14986 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
14987 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
14988 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
14989 | fi | |
c906108c SS |
14990 | |
14991 | ||
14992 | exit 0 |